Class CfnPushTemplate

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-22T22:42:55.053Z") @Stability(Stable) public class CfnPushTemplate extends CfnResource implements IInspectable, ITaggable
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.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.pinpoint.*;
 Object tags;
 CfnPushTemplate cfnPushTemplate = CfnPushTemplate.Builder.create(this, "MyCfnPushTemplate")
         .templateName("templateName")
         // the properties below are optional
         .adm(AndroidPushNotificationTemplateProperty.builder()
                 .action("action")
                 .body("body")
                 .imageIconUrl("imageIconUrl")
                 .imageUrl("imageUrl")
                 .smallImageIconUrl("smallImageIconUrl")
                 .sound("sound")
                 .title("title")
                 .url("url")
                 .build())
         .apns(APNSPushNotificationTemplateProperty.builder()
                 .action("action")
                 .body("body")
                 .mediaUrl("mediaUrl")
                 .sound("sound")
                 .title("title")
                 .url("url")
                 .build())
         .baidu(AndroidPushNotificationTemplateProperty.builder()
                 .action("action")
                 .body("body")
                 .imageIconUrl("imageIconUrl")
                 .imageUrl("imageUrl")
                 .smallImageIconUrl("smallImageIconUrl")
                 .sound("sound")
                 .title("title")
                 .url("url")
                 .build())
         .default(DefaultPushNotificationTemplateProperty.builder()
                 .action("action")
                 .body("body")
                 .sound("sound")
                 .title("title")
                 .url("url")
                 .build())
         .defaultSubstitutions("defaultSubstitutions")
         .gcm(AndroidPushNotificationTemplateProperty.builder()
                 .action("action")
                 .body("body")
                 .imageIconUrl("imageIconUrl")
                 .imageUrl("imageUrl")
                 .smallImageIconUrl("smallImageIconUrl")
                 .sound("sound")
                 .title("title")
                 .url("url")
                 .build())
         .tags(tags)
         .templateDescription("templateDescription")
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnPushTemplate

      protected CfnPushTemplate(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnPushTemplate

      protected CfnPushTemplate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnPushTemplate

      @Stability(Stable) public CfnPushTemplate(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnPushTemplateProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the message template.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getTemplateName

      @Stability(Stable) @NotNull public String getTemplateName()
      The name of the message template to use for the message.
    • setTemplateName

      @Stability(Stable) public void setTemplateName(@NotNull String value)
      The name of the message template to use for the message.
    • getAdm

      @Stability(Stable) @Nullable public Object getAdm()
      The message template to use for the ADM (Amazon Device Messaging) channel.
    • setAdm

      @Stability(Stable) public void setAdm(@Nullable IResolvable value)
      The message template to use for the ADM (Amazon Device Messaging) channel.
    • setAdm

      @Stability(Stable) public void setAdm(@Nullable CfnPushTemplate.AndroidPushNotificationTemplateProperty value)
      The message template to use for the ADM (Amazon Device Messaging) channel.
    • getApns

      @Stability(Stable) @Nullable public Object getApns()
      The message template to use for the APNs (Apple Push Notification service) channel.
    • setApns

      @Stability(Stable) public void setApns(@Nullable IResolvable value)
      The message template to use for the APNs (Apple Push Notification service) channel.
    • setApns

      @Stability(Stable) public void setApns(@Nullable CfnPushTemplate.APNSPushNotificationTemplateProperty value)
      The message template to use for the APNs (Apple Push Notification service) channel.
    • getBaidu

      @Stability(Stable) @Nullable public Object getBaidu()
      The message template to use for the Baidu (Baidu Cloud Push) channel.
    • setBaidu

      @Stability(Stable) public void setBaidu(@Nullable IResolvable value)
      The message template to use for the Baidu (Baidu Cloud Push) channel.
    • setBaidu

      @Stability(Stable) public void setBaidu(@Nullable CfnPushTemplate.AndroidPushNotificationTemplateProperty value)
      The message template to use for the Baidu (Baidu Cloud Push) channel.
    • getDefaultValue

      @Stability(Stable) @Nullable public Object getDefaultValue()
      The default message template to use for push notification channels.
    • setDefaultValue

      @Stability(Stable) public void setDefaultValue(@Nullable IResolvable value)
      The default message template to use for push notification channels.
    • setDefaultValue

      @Stability(Stable) public void setDefaultValue(@Nullable CfnPushTemplate.DefaultPushNotificationTemplateProperty value)
      The default message template to use for push notification channels.
    • getDefaultSubstitutions

      @Stability(Stable) @Nullable public String getDefaultSubstitutions()
      A JSON object that specifies the default values to use for message variables in the message template.
    • setDefaultSubstitutions

      @Stability(Stable) public void setDefaultSubstitutions(@Nullable String value)
      A JSON object that specifies the default values to use for message variables in the message template.
    • getGcm

      @Stability(Stable) @Nullable public Object getGcm()
      The message template to use for the GCM channel, which is used to send notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service.
    • setGcm

      @Stability(Stable) public void setGcm(@Nullable IResolvable value)
      The message template to use for the GCM channel, which is used to send notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service.
    • setGcm

      @Stability(Stable) public void setGcm(@Nullable CfnPushTemplate.AndroidPushNotificationTemplateProperty value)
      The message template to use for the GCM channel, which is used to send notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service.
    • getTagsRaw

      @Stability(Stable) @Nullable public Object getTagsRaw()
      An array of key-value pairs to apply to this resource.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable Object value)
      An array of key-value pairs to apply to this resource.
    • getTemplateDescription

      @Stability(Stable) @Nullable public String getTemplateDescription()
      A custom description of the message template.
    • setTemplateDescription

      @Stability(Stable) public void setTemplateDescription(@Nullable String value)
      A custom description of the message template.