Skip to content

Update Managed Login Branding

cognitoidentityprovider_update_managed_login_branding R Documentation

Configures the branding settings for a user pool style

Description

Configures the branding settings for a user pool style. This operation is the programmatic option for the configuration of a style in the branding designer.

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.

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_update_managed_login_branding(UserPoolId,
  ManagedLoginBrandingId, UseCognitoProvidedValues, Settings, Assets)

Arguments

UserPoolId

The ID of the user pool that contains the managed login branding style that you want to update.

ManagedLoginBrandingId

The ID of the managed login branding style that you want to update.

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 designer.

When you specify true for this option, you must also omit values for Settings and Assets 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$update_managed_login_branding(
  UserPoolId = "string",
  ManagedLoginBrandingId = "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"
    )
  )
)