CognitoIdentityProvider / Client / set_ui_customization
set_ui_customization#
- CognitoIdentityProvider.Client.set_ui_customization(**kwargs)#
Configures UI branding settings for domains with the hosted UI (classic) branding version. Your user pool must have a domain. Configure a domain with .
Set the default configuration for all clients with a
ClientId
ofALL
. When theClientId
value is an app client ID, the settings you pass in this request apply to that app client and override the defaultALL
configuration.Note
Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.
Learn more
See also: AWS API Documentation
Request Syntax
response = client.set_ui_customization( UserPoolId='string', ClientId='string', CSS='string', ImageFile=b'bytes' )
- Parameters:
UserPoolId (string) –
[REQUIRED]
The ID of the user pool where you want to apply branding to the classic hosted UI.
ClientId (string) – The ID of the app client that you want to customize. To apply a default style to all app clients not configured with client-level branding, set this parameter value to
ALL
.CSS (string) – A plaintext CSS file that contains the custom fields that you want to apply to your user pool or app client. To download a template, go to the Amazon Cognito console. Navigate to your user pool App clients tab, select Login pages, edit Hosted UI (classic) style, and select the link to
CSS template.css
.ImageFile (bytes) – The image that you want to set as your login in the classic hosted UI, as a Base64-formatted binary object.
- Return type:
dict
- Returns:
Response Syntax
{ 'UICustomization': { 'UserPoolId': 'string', 'ClientId': 'string', 'ImageUrl': 'string', 'CSS': 'string', 'CSSVersion': 'string', 'LastModifiedDate': datetime(2015, 1, 1), 'CreationDate': datetime(2015, 1, 1) } }
Response Structure
(dict) –
UICustomization (dict) –
Information about the hosted UI branding that you applied.
UserPoolId (string) –
The ID of the user pool with hosted UI customizations.
ClientId (string) –
The app client ID for your UI customization. When this value isn’t present, the customization applies to all user pool app clients that don’t have client-level settings..
ImageUrl (string) –
A URL path to the hosted logo image of your UI customization.
CSS (string) –
The CSS values in the UI customization.
CSSVersion (string) –
The CSS version number.
LastModifiedDate (datetime) –
The date and time when the item was modified. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a human-readable format like ISO 8601 or a Java
Date
object.CreationDate (datetime) –
The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a human-readable format like ISO 8601 or a Java
Date
object.
Exceptions
CognitoIdentityProvider.Client.exceptions.InvalidParameterException
CognitoIdentityProvider.Client.exceptions.ResourceNotFoundException
CognitoIdentityProvider.Client.exceptions.NotAuthorizedException
CognitoIdentityProvider.Client.exceptions.TooManyRequestsException
CognitoIdentityProvider.Client.exceptions.InternalErrorException