updateManagedLoginBranding method
Configures the branding settings for a user pool style. This operation is the programmatic option for the configuration of a style in the branding editor.
Provides values for UI customization in a Settings JSON
object and image files in an Assets array.
This operation has a 2-megabyte request-size limit and include the CSS settings and image assets for your app client. Your branding settings might exceed 2MB in size. Amazon Cognito doesn't require that you pass all parameters in one request and preserves existing style settings that you don't specify. If your request is larger than 2MB, separate it into multiple requests, each with a size smaller than the limit.
Learn more
- Signing Amazon Web Services API Requests
- Using the Amazon Cognito user pools API and user pool endpoints
May throw ConcurrentModificationException.
May throw InternalErrorException.
May throw InvalidParameterException.
May throw NotAuthorizedException.
May throw OperationNotEnabledException.
May throw ResourceNotFoundException.
May throw TooManyRequestsException.
Parameter assets :
An array of image files that you want to apply to roles like backgrounds,
logos, and icons. Each object must also indicate whether it is for dark
mode, light mode, or browser-adaptive mode.
Parameter managedLoginBrandingId :
The ID of the managed login branding style that you want to update.
Parameter settings :
A JSON file, encoded as a Document type, with the the
settings that you want to apply to your style.
The following components are not currently implemented and reserved for future use:
-
signUp -
instructions -
sessionTimerDisplay -
languageSelector(for localization, see Managed login localization)
Parameter useCognitoProvidedValues :
When true, applies the default branding style options. This
option reverts to default style options that are managed by Amazon
Cognito. You can modify them later in the branding editor.
When you specify true for this option, you must also omit
values for Settings and Assets in the request.
Parameter userPoolId :
The ID of the user pool that contains the managed login branding style
that you want to update.
Implementation
Future<UpdateManagedLoginBrandingResponse> updateManagedLoginBranding({
List<AssetType>? assets,
String? managedLoginBrandingId,
Object? settings,
bool? useCognitoProvidedValues,
String? userPoolId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'AWSCognitoIdentityProviderService.UpdateManagedLoginBranding'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (assets != null) 'Assets': assets,
if (managedLoginBrandingId != null)
'ManagedLoginBrandingId': managedLoginBrandingId,
if (settings != null) 'Settings': settings,
if (useCognitoProvidedValues != null)
'UseCognitoProvidedValues': useCognitoProvidedValues,
if (userPoolId != null) 'UserPoolId': userPoolId,
},
);
return UpdateManagedLoginBrandingResponse.fromJson(jsonResponse.body);
}