CfnManagedLoginBrandingPropsMixin
- class aws_cdk.mixins_preview.aws_cognito.mixins.CfnManagedLoginBrandingPropsMixin(props, *, strategy=None)
Bases:
MixinCreates 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
SettingsJSON object and image files in anAssetsarray. To send the JSON objectDocumenttype parameter inSettings, 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
ReturnMergedResourcestotrue. For more information, see API and SDK operations for managed login branding- See:
- 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:
props (
Union[CfnManagedLoginBrandingMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- 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
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
AssetTypeProperty
- class CfnManagedLoginBrandingPropsMixin.AssetTypeProperty(*, bytes=None, category=None, color_mode=None, extension=None, resource_id=None)
Bases:
objectAn 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:
- 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.
- 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.
- 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:
- Type:
The display-mode target of the asset
- extension
The file type of the image file.