CfnPushTemplatePropsMixin

class aws_cdk.mixins_preview.aws_pinpoint.mixins.CfnPushTemplatePropsMixin(props, *, strategy=None)

Bases: Mixin

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

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-pushtemplate.html

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:

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 = ['adm', 'apns', 'baidu', 'default', 'defaultSubstitutions', 'gcm', 'tags', 'templateDescription', 'templateName']

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

APNSPushNotificationTemplateProperty

class CfnPushTemplatePropsMixin.APNSPushNotificationTemplateProperty(*, action=None, body=None, media_url=None, sound=None, title=None, url=None)

Bases: object

Specifies 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 the Library/Sounds folder in your app’s data container. If the sound file can’t be found or you specify default for 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 the Action property is URL .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-apnspushnotificationtemplate.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_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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-apnspushnotificationtemplate.html#cfn-pinpoint-pushtemplate-apnspushnotificationtemplate-action

body

The message body to use in push notifications that are based on the message template.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-apnspushnotificationtemplate.html#cfn-pinpoint-pushtemplate-apnspushnotificationtemplate-body

media_url

The URL of an image or video to display in push notifications that are based on the message template.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-apnspushnotificationtemplate.html#cfn-pinpoint-pushtemplate-apnspushnotificationtemplate-mediaurl

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/Sounds folder in your app’s data container. If the sound file can’t be found or you specify default for the value, the system plays the default alert sound.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-apnspushnotificationtemplate.html#cfn-pinpoint-pushtemplate-apnspushnotificationtemplate-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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-apnspushnotificationtemplate.html#cfn-pinpoint-pushtemplate-apnspushnotificationtemplate-title

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 Action property is URL .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-apnspushnotificationtemplate.html#cfn-pinpoint-pushtemplate-apnspushnotificationtemplate-url

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

Specifies 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 the Action property is URL .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-androidpushnotificationtemplate.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_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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-androidpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-androidpushnotificationtemplate-action

body

The message body to use in a push notification that’s based on the message template.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-androidpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-androidpushnotificationtemplate-body

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-androidpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-androidpushnotificationtemplate-imageiconurl

image_url

The URL of an image to display in a push notification that’s based on the message template.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-androidpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-androidpushnotificationtemplate-imageurl

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-androidpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-androidpushnotificationtemplate-smallimageiconurl

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-androidpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-androidpushnotificationtemplate-sound

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-androidpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-androidpushnotificationtemplate-title

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 Action property is URL .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-androidpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-androidpushnotificationtemplate-url

DefaultPushNotificationTemplateProperty

class CfnPushTemplatePropsMixin.DefaultPushNotificationTemplateProperty(*, action=None, body=None, sound=None, title=None, url=None)

Bases: object

Specifies 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 the Library/Sounds folder in your app’s data container. If the sound file can’t be found or you specify default for 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 the Action property is URL .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-defaultpushnotificationtemplate.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_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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-defaultpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-defaultpushnotificationtemplate-action

body

The message body to use in push notifications that are based on the message template.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-defaultpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-defaultpushnotificationtemplate-body

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/Sounds folder in your app’s data container. If the sound file can’t be found or you specify default for the value, the system plays the default alert sound.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-defaultpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-defaultpushnotificationtemplate-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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-defaultpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-defaultpushnotificationtemplate-title

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 Action property is URL .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-defaultpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-defaultpushnotificationtemplate-url