AWS::Cognito::UserPoolUICustomizationAttachment - AWS CloudFormation

AWS::Cognito::UserPoolUICustomizationAttachment

A container for the UI customization information for the hosted UI in a user pool.

This data type is a response parameter of GetUICustomization.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::Cognito::UserPoolUICustomizationAttachment", "Properties" : { "ClientId" : String, "CSS" : String, "UserPoolId" : String } }

YAML

Type: AWS::Cognito::UserPoolUICustomizationAttachment Properties: ClientId: String CSS: String UserPoolId: String

Properties

ClientId

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

Required: Yes

Type: String

Pattern: [\w+]+

Minimum: 1

Maximum: 128

Update requires: Replacement

CSS

The CSS values in the UI customization.

Required: No

Type: String

Minimum: 0

Maximum: 131072

Update requires: No interruption

UserPoolId

The ID of the user pool.

Required: Yes

Type: String

Pattern: [\w-]+_[0-9a-zA-Z]+

Minimum: 1

Maximum: 55

Update requires: Replacement

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the physicalResourceId, which is “UserPoolUICustomizationAttachment-UserPoolId-ClientId". For example:

{ "Ref": "UserPoolUICustomizationAttachment-us-east-1_FAKEPOOLID-2asc123fakeclientidajjulj6bh" }

For the Amazon Cognito user pool domain UserPoolUICustomizationAttachment-us-east-1_FAKEPOOLID-2asc123fakeclientidajjulj6bh, Ref returns the name of the UI customization attachment.

For more information about using the Ref function, see Ref.

Examples

Creating a new UI customization attachment for a user pool

The following example sets UI customization settings in the referenced user pool and client.

JSON

{ "UserPoolUICustomization":{ "Type":"AWS::Cognito::UserPoolUICustomizationAttachment", "Properties":{ "UserPoolId":{ "Ref":"UserPool" }, "ClientId":{ "Ref":"Client" }, "CSS":".banner-customizable {\nbackground: linear-gradient(#9940B8, #C27BDB)\n}" } } }

YAML

UserPoolUICustomization: Type: AWS::Cognito::UserPoolUICustomizationAttachment Properties: UserPoolId: !Ref UserPool ClientId: !Ref Client CSS: ".banner-customizable { background: linear-gradient(#9940B8, #C27BDB) }"