CfnInAppTemplatePropsMixin
- class aws_cdk.mixins_preview.aws_pinpoint.mixins.CfnInAppTemplatePropsMixin(props, *, strategy=None)
Bases:
MixinCreates a message template that you can use to send in-app messages.
A message template is a set of content and settings that you can define, save, and reuse in messages for any of your Amazon Pinpoint applications. The In-App channel is unavailable in AWS GovCloud (US).
- See:
- CloudformationResource:
AWS::Pinpoint::InAppTemplate
- 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_pinpoint import mixins as pinpoint_mixins # custom_config: Any # tags: Any cfn_in_app_template_props_mixin = pinpoint_mixins.CfnInAppTemplatePropsMixin(pinpoint_mixins.CfnInAppTemplateMixinProps( content=[pinpoint_mixins.CfnInAppTemplatePropsMixin.InAppMessageContentProperty( background_color="backgroundColor", body_config=pinpoint_mixins.CfnInAppTemplatePropsMixin.BodyConfigProperty( alignment="alignment", body="body", text_color="textColor" ), header_config=pinpoint_mixins.CfnInAppTemplatePropsMixin.HeaderConfigProperty( alignment="alignment", header="header", text_color="textColor" ), image_url="imageUrl", primary_btn=pinpoint_mixins.CfnInAppTemplatePropsMixin.ButtonConfigProperty( android=pinpoint_mixins.CfnInAppTemplatePropsMixin.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ), default_config=pinpoint_mixins.CfnInAppTemplatePropsMixin.DefaultButtonConfigurationProperty( background_color="backgroundColor", border_radius=123, button_action="buttonAction", link="link", text="text", text_color="textColor" ), ios=pinpoint_mixins.CfnInAppTemplatePropsMixin.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ), web=pinpoint_mixins.CfnInAppTemplatePropsMixin.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ) ), secondary_btn=pinpoint_mixins.CfnInAppTemplatePropsMixin.ButtonConfigProperty( android=pinpoint_mixins.CfnInAppTemplatePropsMixin.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ), default_config=pinpoint_mixins.CfnInAppTemplatePropsMixin.DefaultButtonConfigurationProperty( background_color="backgroundColor", border_radius=123, button_action="buttonAction", link="link", text="text", text_color="textColor" ), ios=pinpoint_mixins.CfnInAppTemplatePropsMixin.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ), web=pinpoint_mixins.CfnInAppTemplatePropsMixin.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ) ) )], custom_config=custom_config, layout="layout", tags=tags, template_description="templateDescription", template_name="templateName" ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::Pinpoint::InAppTemplate.- Parameters:
props (
Union[CfnInAppTemplateMixinProps,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 = ['content', 'customConfig', 'layout', 'tags', 'templateDescription', 'templateName']
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
BodyConfigProperty
- class CfnInAppTemplatePropsMixin.BodyConfigProperty(*, alignment=None, body=None, text_color=None)
Bases:
objectSpecifies the configuration of the main body text of the in-app message.
- Parameters:
alignment (
Optional[str]) – The text alignment of the main body text of the message. Acceptable values:LEFT,CENTER,RIGHT.body (
Optional[str]) – The main body text of the message.text_color (
Optional[str]) – The color of the body text, expressed as a hex color code (such as #000000 for black).
- 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_pinpoint import mixins as pinpoint_mixins body_config_property = pinpoint_mixins.CfnInAppTemplatePropsMixin.BodyConfigProperty( alignment="alignment", body="body", text_color="textColor" )
Attributes
- alignment
The text alignment of the main body text of the message.
Acceptable values:
LEFT,CENTER,RIGHT.
- body
The main body text of the message.
- text_color
The color of the body text, expressed as a hex color code (such as #000000 for black).
HeaderConfigProperty
- class CfnInAppTemplatePropsMixin.HeaderConfigProperty(*, alignment=None, header=None, text_color=None)
Bases:
objectSpecifies the configuration and content of the header or title text of the in-app message.
- Parameters:
alignment (
Optional[str]) – The text alignment of the title of the message. Acceptable values:LEFT,CENTER,RIGHT.header (
Optional[str]) – The title text of the in-app message.text_color (
Optional[str]) – The color of the title text, expressed as a hex color code (such as #000000 for black).
- 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_pinpoint import mixins as pinpoint_mixins header_config_property = pinpoint_mixins.CfnInAppTemplatePropsMixin.HeaderConfigProperty( alignment="alignment", header="header", text_color="textColor" )
Attributes
- alignment
The text alignment of the title of the message.
Acceptable values:
LEFT,CENTER,RIGHT.
- header
The title text of the in-app message.
- text_color
The color of the title text, expressed as a hex color code (such as #000000 for black).
InAppMessageContentProperty
- class CfnInAppTemplatePropsMixin.InAppMessageContentProperty(*, background_color=None, body_config=None, header_config=None, image_url=None, primary_btn=None, secondary_btn=None)
Bases:
objectSpecifies the configuration of an in-app message, including its header, body, buttons, colors, and images.
- Parameters:
background_color (
Optional[str]) – The background color for an in-app message banner, expressed as a hex color code (such as #000000 for black).body_config (
Union[IResolvable,BodyConfigProperty,Dict[str,Any],None]) – An object that contains configuration information about the header or title text of the in-app message.header_config (
Union[IResolvable,HeaderConfigProperty,Dict[str,Any],None]) – An object that contains configuration information about the header or title text of the in-app message.image_url (
Optional[str]) – The URL of the image that appears on an in-app message banner.primary_btn (
Union[IResolvable,ButtonConfigProperty,Dict[str,Any],None]) – An object that contains configuration information about the primary button in an in-app message.secondary_btn (
Union[IResolvable,ButtonConfigProperty,Dict[str,Any],None]) – An object that contains configuration information about the secondary button in an in-app message.
- 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_pinpoint import mixins as pinpoint_mixins in_app_message_content_property = pinpoint_mixins.CfnInAppTemplatePropsMixin.InAppMessageContentProperty( background_color="backgroundColor", body_config=pinpoint_mixins.CfnInAppTemplatePropsMixin.BodyConfigProperty( alignment="alignment", body="body", text_color="textColor" ), header_config=pinpoint_mixins.CfnInAppTemplatePropsMixin.HeaderConfigProperty( alignment="alignment", header="header", text_color="textColor" ), image_url="imageUrl", primary_btn=pinpoint_mixins.CfnInAppTemplatePropsMixin.ButtonConfigProperty( android=pinpoint_mixins.CfnInAppTemplatePropsMixin.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ), default_config=pinpoint_mixins.CfnInAppTemplatePropsMixin.DefaultButtonConfigurationProperty( background_color="backgroundColor", border_radius=123, button_action="buttonAction", link="link", text="text", text_color="textColor" ), ios=pinpoint_mixins.CfnInAppTemplatePropsMixin.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ), web=pinpoint_mixins.CfnInAppTemplatePropsMixin.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ) ), secondary_btn=pinpoint_mixins.CfnInAppTemplatePropsMixin.ButtonConfigProperty( android=pinpoint_mixins.CfnInAppTemplatePropsMixin.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ), default_config=pinpoint_mixins.CfnInAppTemplatePropsMixin.DefaultButtonConfigurationProperty( background_color="backgroundColor", border_radius=123, button_action="buttonAction", link="link", text="text", text_color="textColor" ), ios=pinpoint_mixins.CfnInAppTemplatePropsMixin.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ), web=pinpoint_mixins.CfnInAppTemplatePropsMixin.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ) ) )
Attributes
- background_color
The background color for an in-app message banner, expressed as a hex color code (such as #000000 for black).
- body_config
An object that contains configuration information about the header or title text of the in-app message.
- header_config
An object that contains configuration information about the header or title text of the in-app message.
- image_url
The URL of the image that appears on an in-app message banner.
- primary_btn
An object that contains configuration information about the primary button in an in-app message.
- secondary_btn
An object that contains configuration information about the secondary button in an in-app message.