CfnPushTemplatePropsMixin
- class aws_cdk.mixins_preview.aws_pinpoint.mixins.CfnPushTemplatePropsMixin(props, *, strategy=None)
Bases:
MixinCreates a message template that you can use in messages that are sent through a push notification channel.
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.
- See:
- CloudformationResource:
AWS::Pinpoint::PushTemplate
- 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 # tags: Any cfn_push_template_props_mixin = pinpoint_mixins.CfnPushTemplatePropsMixin(pinpoint_mixins.CfnPushTemplateMixinProps( adm=pinpoint_mixins.CfnPushTemplatePropsMixin.AndroidPushNotificationTemplateProperty( action="action", body="body", image_icon_url="imageIconUrl", image_url="imageUrl", small_image_icon_url="smallImageIconUrl", sound="sound", title="title", url="url" ), apns=pinpoint_mixins.CfnPushTemplatePropsMixin.APNSPushNotificationTemplateProperty( action="action", body="body", media_url="mediaUrl", sound="sound", title="title", url="url" ), baidu=pinpoint_mixins.CfnPushTemplatePropsMixin.AndroidPushNotificationTemplateProperty( action="action", body="body", image_icon_url="imageIconUrl", image_url="imageUrl", small_image_icon_url="smallImageIconUrl", sound="sound", title="title", url="url" ), default=pinpoint_mixins.CfnPushTemplatePropsMixin.DefaultPushNotificationTemplateProperty( action="action", body="body", sound="sound", title="title", url="url" ), default_substitutions="defaultSubstitutions", gcm=pinpoint_mixins.CfnPushTemplatePropsMixin.AndroidPushNotificationTemplateProperty( action="action", body="body", image_icon_url="imageIconUrl", image_url="imageUrl", small_image_icon_url="smallImageIconUrl", sound="sound", title="title", url="url" ), tags=tags, template_description="templateDescription", template_name="templateName" ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::Pinpoint::PushTemplate.- Parameters:
props (
Union[CfnPushTemplateMixinProps,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 = ['adm', 'apns', 'baidu', 'default', 'defaultSubstitutions', 'gcm', '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
APNSPushNotificationTemplateProperty
- class CfnPushTemplatePropsMixin.APNSPushNotificationTemplateProperty(*, action=None, body=None, media_url=None, sound=None, title=None, url=None)
Bases:
objectSpecifies channel-specific content and settings for a message template that can be used in push notifications that are sent through the APNs (Apple Push Notification service) channel.
- Parameters:
action (
Optional[str]) – The action to occur if a recipient taps a push notification that’s based on the message template. Valid values are: -OPEN_APP– Your app opens or it becomes the foreground app if it was sent to the background. This is the default action. -DEEP_LINK– Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS platform. -URL– The default mobile browser on the recipient’s device opens and loads the web page at a URL that you specify.body (
Optional[str]) – The message body to use in push notifications that are based on the message template.media_url (
Optional[str]) – The URL of an image or video to display in push notifications that are based on the message template.sound (
Optional[str]) – The key for the sound to play when the recipient receives a push notification that’s based on the message template. The value for this key is the name of a sound file in your app’s main bundle or theLibrary/Soundsfolder in your app’s data container. If the sound file can’t be found or you specifydefaultfor the value, the system plays the default alert sound.title (
Optional[str]) – The title to use in push notifications that are based on the message template. This title appears above the notification message on a recipient’s device.url (
Optional[str]) – The URL to open in the recipient’s default mobile browser, if a recipient taps a push notification that’s based on the message template and the value of theActionproperty isURL.
- 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 a_pNSPush_notification_template_property = pinpoint_mixins.CfnPushTemplatePropsMixin.APNSPushNotificationTemplateProperty( action="action", body="body", media_url="mediaUrl", sound="sound", title="title", url="url" )
Attributes
- action
The action to occur if a recipient taps a push notification that’s based on the message template.
Valid values are:
OPEN_APP– Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.DEEP_LINK– Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS platform.URL– The default mobile browser on the recipient’s device opens and loads the web page at a URL that you specify.
- body
The message body to use in push notifications that are based on the message template.
- media_url
The URL of an image or video to display in push notifications that are based on the message template.
- sound
The key for the sound to play when the recipient receives a push notification that’s based on the message template.
The value for this key is the name of a sound file in your app’s main bundle or the
Library/Soundsfolder in your app’s data container. If the sound file can’t be found or you specifydefaultfor the value, the system plays the default alert sound.
- title
The title to use in push notifications that are based on the message template.
This title appears above the notification message on a recipient’s device.
- url
The URL to open in the recipient’s default mobile browser, if a recipient taps a push notification that’s based on the message template and the value of the
Actionproperty isURL.
AndroidPushNotificationTemplateProperty
- class CfnPushTemplatePropsMixin.AndroidPushNotificationTemplateProperty(*, action=None, body=None, image_icon_url=None, image_url=None, small_image_icon_url=None, sound=None, title=None, url=None)
Bases:
objectSpecifies channel-specific content and settings for a message template that can be used in push notifications that are sent through the ADM (Amazon Device Messaging), Baidu (Baidu Cloud Push), or GCM (Firebase Cloud Messaging, formerly Google Cloud Messaging) channel.
- Parameters:
action (
Optional[str]) – The action to occur if a recipient taps a push notification that’s based on the message template. Valid values are: -OPEN_APP– Your app opens or it becomes the foreground app if it was sent to the background. This is the default action. -DEEP_LINK– Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform. -URL– The default mobile browser on the recipient’s device opens and loads the web page at a URL that you specify.body (
Optional[str]) – The message body to use in a push notification that’s based on the message template.image_icon_url (
Optional[str]) – The URL of the large icon image to display in the content view of a push notification that’s based on the message template.image_url (
Optional[str]) – The URL of an image to display in a push notification that’s based on the message template.small_image_icon_url (
Optional[str]) – The URL of the small icon image to display in the status bar and the content view of a push notification that’s based on the message template.sound (
Optional[str]) – The sound to play when a recipient receives a push notification that’s based on the message template. You can use the default stream or specify the file name of a sound resource that’s bundled in your app. On an Android platform, the sound file must reside in/res/raw/.title (
Optional[str]) – The title to use in a push notification that’s based on the message template. This title appears above the notification message on a recipient’s device.url (
Optional[str]) – The URL to open in a recipient’s default mobile browser, if a recipient taps a push notification that’s based on the message template and the value of theActionproperty isURL.
- 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 android_push_notification_template_property = pinpoint_mixins.CfnPushTemplatePropsMixin.AndroidPushNotificationTemplateProperty( action="action", body="body", image_icon_url="imageIconUrl", image_url="imageUrl", small_image_icon_url="smallImageIconUrl", sound="sound", title="title", url="url" )
Attributes
- action
The action to occur if a recipient taps a push notification that’s based on the message template.
Valid values are:
OPEN_APP– Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.DEEP_LINK– Your app opens and displays a designated user interface in the app. This action uses the deep-linking features of the Android platform.URL– The default mobile browser on the recipient’s device opens and loads the web page at a URL that you specify.
- body
The message body to use in a push notification that’s based on the message template.
- image_icon_url
The URL of the large icon image to display in the content view of a push notification that’s based on the message template.
- image_url
The URL of an image to display in a push notification that’s based on the message template.
- small_image_icon_url
The URL of the small icon image to display in the status bar and the content view of a push notification that’s based on the message template.
- sound
The sound to play when a recipient receives a push notification that’s based on the message template.
You can use the default stream or specify the file name of a sound resource that’s bundled in your app. On an Android platform, the sound file must reside in
/res/raw/.
- title
The title to use in a push notification that’s based on the message template.
This title appears above the notification message on a recipient’s device.
- url
The URL to open in a recipient’s default mobile browser, if a recipient taps a push notification that’s based on the message template and the value of the
Actionproperty isURL.
DefaultPushNotificationTemplateProperty
- class CfnPushTemplatePropsMixin.DefaultPushNotificationTemplateProperty(*, action=None, body=None, sound=None, title=None, url=None)
Bases:
objectSpecifies the default settings and content for a message template that can be used in messages that are sent through a push notification channel.
- Parameters:
action (
Optional[str]) – The action to occur if a recipient taps a push notification that’s based on the message template. Valid values are: -OPEN_APP– Your app opens or it becomes the foreground app if it was sent to the background. This is the default action. -DEEP_LINK– Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS and Android platforms. -URL– The default mobile browser on the recipient’s device opens and loads the web page at a URL that you specify.body (
Optional[str]) – The message body to use in push notifications that are based on the message template.sound (
Optional[str]) – The sound to play when a recipient receives a push notification that’s based on the message template. You can use the default stream or specify the file name of a sound resource that’s bundled in your app. On an Android platform, the sound file must reside in/res/raw/. For an iOS platform, this value is the key for the name of a sound file in your app’s main bundle or theLibrary/Soundsfolder in your app’s data container. If the sound file can’t be found or you specifydefaultfor the value, the system plays the default alert sound.title (
Optional[str]) – The title to use in push notifications that are based on the message template. This title appears above the notification message on a recipient’s device.url (
Optional[str]) – The URL to open in a recipient’s default mobile browser, if a recipient taps a push notification that’s based on the message template and the value of theActionproperty isURL.
- 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 default_push_notification_template_property = pinpoint_mixins.CfnPushTemplatePropsMixin.DefaultPushNotificationTemplateProperty( action="action", body="body", sound="sound", title="title", url="url" )
Attributes
- action
The action to occur if a recipient taps a push notification that’s based on the message template.
Valid values are:
OPEN_APP– Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.DEEP_LINK– Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS and Android platforms.URL– The default mobile browser on the recipient’s device opens and loads the web page at a URL that you specify.
- body
The message body to use in push notifications that are based on the message template.
- sound
The sound to play when a recipient receives a push notification that’s based on the message template.
You can use the default stream or specify the file name of a sound resource that’s bundled in your app. On an Android platform, the sound file must reside in
/res/raw/.For an iOS platform, this value is the key for the name of a sound file in your app’s main bundle or the
Library/Soundsfolder in your app’s data container. If the sound file can’t be found or you specifydefaultfor the value, the system plays the default alert sound.
- title
The title to use in push notifications that are based on the message template.
This title appears above the notification message on a recipient’s device.
- url
The URL to open in a recipient’s default mobile browser, if a recipient taps a push notification that’s based on the message template and the value of the
Actionproperty isURL.