CfnManagedLoginBrandingPropsMixin

class aws_cdk.mixins_preview.aws_cognito.mixins.CfnManagedLoginBrandingPropsMixin(props, *, strategy=None)

Bases: Mixin

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-managedloginbranding.html

CloudformationResource:

AWS::Cognito::ManagedLoginBranding

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_cognito import mixins as cognito_mixins

# settings: Any

cfn_managed_login_branding_props_mixin = cognito_mixins.CfnManagedLoginBrandingPropsMixin(cognito_mixins.CfnManagedLoginBrandingMixinProps(
    assets=[cognito_mixins.CfnManagedLoginBrandingPropsMixin.AssetTypeProperty(
        bytes="bytes",
        category="category",
        color_mode="colorMode",
        extension="extension",
        resource_id="resourceId"
    )],
    client_id="clientId",
    return_merged_resources=False,
    settings=settings,
    use_cognito_provided_values=False,
    user_pool_id="userPoolId"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Cognito::ManagedLoginBranding.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['assets', 'clientId', 'returnMergedResources', 'settings', 'useCognitoProvidedValues', 'userPoolId']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

AssetTypeProperty

class CfnManagedLoginBrandingPropsMixin.AssetTypeProperty(*, bytes=None, category=None, color_mode=None, extension=None, resource_id=None)

Bases: object

An image file from a managed login branding style in a user pool.

Parameters:
  • bytes (Optional[str]) – The image file, in Base64-encoded binary.

  • category (Optional[str]) – The category that the image corresponds to in your managed login configuration. Managed login has asset categories for different types of logos, backgrounds, and icons.

  • color_mode (Optional[str]) – The display-mode target of the asset: light, dark, or browser-adaptive. For example, Amazon Cognito displays a dark-mode image only when the browser or application is in dark mode, but displays a browser-adaptive file in all contexts.

  • extension (Optional[str]) – The file type of the image file.

  • resource_id (Optional[str]) – The ID of the asset.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-managedloginbranding-assettype.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_cognito import mixins as cognito_mixins

asset_type_property = cognito_mixins.CfnManagedLoginBrandingPropsMixin.AssetTypeProperty(
    bytes="bytes",
    category="category",
    color_mode="colorMode",
    extension="extension",
    resource_id="resourceId"
)

Attributes

bytes

The image file, in Base64-encoded binary.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-managedloginbranding-assettype.html#cfn-cognito-managedloginbranding-assettype-bytes

category

The category that the image corresponds to in your managed login configuration.

Managed login has asset categories for different types of logos, backgrounds, and icons.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-managedloginbranding-assettype.html#cfn-cognito-managedloginbranding-assettype-category

color_mode

light, dark, or browser-adaptive.

For example, Amazon Cognito displays a dark-mode image only when the browser or application is in dark mode, but displays a browser-adaptive file in all contexts.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-managedloginbranding-assettype.html#cfn-cognito-managedloginbranding-assettype-colormode

Type:

The display-mode target of the asset

extension

The file type of the image file.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-managedloginbranding-assettype.html#cfn-cognito-managedloginbranding-assettype-extension

resource_id

The ID of the asset.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-managedloginbranding-assettype.html#cfn-cognito-managedloginbranding-assettype-resourceid