Create Managed Login Branding
cognitoidentityprovider_create_managed_login_branding | R Documentation |
Creates a new set of branding settings for a user pool style and associates it with an app client¶
Description¶
Creates a new set of branding settings for a user pool style and associates it with an app client. This operation is the programmatic option for the creation of a new style in the branding designer.
Provides values for UI customization in a Settings
JSON object and
image files in an Assets
array. To send the JSON object Document
type parameter in Settings
, you might need to update to the most
recent version of your Amazon Web Services SDK. To create a new style
with default settings, set UseCognitoProvidedValues
to true
and
don't provide values for any other options.
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.
As a best practice, modify the output of
describe_managed_login_branding_by_client
into the request parameters
for this operation. To get all settings, set ReturnMergedResources
to
true
. For more information, see API and SDK operations for managed
login
branding.
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
Usage¶
cognitoidentityprovider_create_managed_login_branding(UserPoolId,
ClientId, UseCognitoProvidedValues, Settings, Assets)
Arguments¶
UserPoolId
[required] The ID of the user pool where you want to create a new branding style.
ClientId
[required] The app client that you want to create the branding style for. Each style is permanently linked to an app client. To change the style for an app client, delete the existing style with
delete_managed_login_branding
and create a new one.UseCognitoProvidedValues
When true, applies the default branding style options. These default options are managed by Amazon Cognito. You can modify them later in the branding designer.
When you specify
true
for this option, you must also omit values forSettings
andAssets
in the request.Settings
A JSON file, encoded as a
Document
type, with the the settings that you want to apply to your style.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.
Value¶
A list with the following syntax:
list(
ManagedLoginBranding = list(
ManagedLoginBrandingId = "string",
UserPoolId = "string",
UseCognitoProvidedValues = TRUE|FALSE,
Settings = list(),
Assets = list(
list(
Category = "FAVICON_ICO"|"FAVICON_SVG"|"EMAIL_GRAPHIC"|"SMS_GRAPHIC"|"AUTH_APP_GRAPHIC"|"PASSWORD_GRAPHIC"|"PASSKEY_GRAPHIC"|"PAGE_HEADER_LOGO"|"PAGE_HEADER_BACKGROUND"|"PAGE_FOOTER_LOGO"|"PAGE_FOOTER_BACKGROUND"|"PAGE_BACKGROUND"|"FORM_BACKGROUND"|"FORM_LOGO"|"IDP_BUTTON_ICON",
ColorMode = "LIGHT"|"DARK"|"DYNAMIC",
Extension = "ICO"|"JPEG"|"PNG"|"SVG"|"WEBP",
Bytes = raw,
ResourceId = "string"
)
),
CreationDate = as.POSIXct(
"2015-01-01"
),
LastModifiedDate = as.POSIXct(
"2015-01-01"
)
)
)
Request syntax¶
svc$create_managed_login_branding(
UserPoolId = "string",
ClientId = "string",
UseCognitoProvidedValues = TRUE|FALSE,
Settings = list(),
Assets = list(
list(
Category = "FAVICON_ICO"|"FAVICON_SVG"|"EMAIL_GRAPHIC"|"SMS_GRAPHIC"|"AUTH_APP_GRAPHIC"|"PASSWORD_GRAPHIC"|"PASSKEY_GRAPHIC"|"PAGE_HEADER_LOGO"|"PAGE_HEADER_BACKGROUND"|"PAGE_FOOTER_LOGO"|"PAGE_FOOTER_BACKGROUND"|"PAGE_BACKGROUND"|"FORM_BACKGROUND"|"FORM_LOGO"|"IDP_BUTTON_ICON",
ColorMode = "LIGHT"|"DARK"|"DYNAMIC",
Extension = "ICO"|"JPEG"|"PNG"|"SVG"|"WEBP",
Bytes = raw,
ResourceId = "string"
)
)
)