AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::Cognito::ManagedLoginBranding

CfnManagedLoginBranding

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 AWS SDK. 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 [DescribeManagedLoginBrandingByClient](https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_DescribeManagedLoginBrandingByClient.html) 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](https://docs.aws.amazon.com/cognito/latest/developerguide/managed-login-brandingdesigner.html#branding-designer-api)

Import

import { CfnManagedLoginBranding } from 'aws-cdk-lib/aws-cognito';

Or use the module namespace:

import * as cognito from 'aws-cdk-lib/aws-cognito';
// cognito.CfnManagedLoginBranding

Properties

Configuration passed to the constructor as CfnManagedLoginBrandingProps.

userPoolIdRequired
string

The user pool where the branding style is assigned.

assetsOptional
IResolvable | IResolvable | AssetTypeProperty[]

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.

clientIdOptional
string

The app client that you want to assign the branding style to. Each style is linked to an app client until you delete it.

returnMergedResourcesOptional
boolean | IResolvable

When `true` , returns values for branding options that are unchanged from Amazon Cognito defaults. When `false` or when you omit this parameter, returns only values that you customized in your branding style.

settingsOptional
any

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)](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-managed-login.html#managed-login-localization)

useCognitoProvidedValuesOptional
boolean | IResolvable

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.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the Amazon Cognito Cheat Sheet

Everything you need to know about Amazon Cognito on one page. HD quality, print-friendly.

Download Free Infographic