Class CfnInAppTemplate

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:00.832Z") @Stability(Stable) public class CfnInAppTemplate extends CfnResource implements IInspectable
A CloudFormation AWS::Pinpoint::InAppTemplate.

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

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 customConfig;
 Object tags;
 CfnInAppTemplate cfnInAppTemplate = CfnInAppTemplate.Builder.create(this, "MyCfnInAppTemplate")
         .templateName("templateName")
         // the properties below are optional
         .content(List.of(InAppMessageContentProperty.builder()
                 .backgroundColor("backgroundColor")
                 .bodyConfig(BodyConfigProperty.builder()
                         .alignment("alignment")
                         .body("body")
                         .textColor("textColor")
                         .build())
                 .headerConfig(HeaderConfigProperty.builder()
                         .alignment("alignment")
                         .header("header")
                         .textColor("textColor")
                         .build())
                 .imageUrl("imageUrl")
                 .primaryBtn(ButtonConfigProperty.builder()
                         .android(OverrideButtonConfigurationProperty.builder()
                                 .buttonAction("buttonAction")
                                 .link("link")
                                 .build())
                         .defaultConfig(DefaultButtonConfigurationProperty.builder()
                                 .backgroundColor("backgroundColor")
                                 .borderRadius(123)
                                 .buttonAction("buttonAction")
                                 .link("link")
                                 .text("text")
                                 .textColor("textColor")
                                 .build())
                         .ios(OverrideButtonConfigurationProperty.builder()
                                 .buttonAction("buttonAction")
                                 .link("link")
                                 .build())
                         .web(OverrideButtonConfigurationProperty.builder()
                                 .buttonAction("buttonAction")
                                 .link("link")
                                 .build())
                         .build())
                 .secondaryBtn(ButtonConfigProperty.builder()
                         .android(OverrideButtonConfigurationProperty.builder()
                                 .buttonAction("buttonAction")
                                 .link("link")
                                 .build())
                         .defaultConfig(DefaultButtonConfigurationProperty.builder()
                                 .backgroundColor("backgroundColor")
                                 .borderRadius(123)
                                 .buttonAction("buttonAction")
                                 .link("link")
                                 .text("text")
                                 .textColor("textColor")
                                 .build())
                         .ios(OverrideButtonConfigurationProperty.builder()
                                 .buttonAction("buttonAction")
                                 .link("link")
                                 .build())
                         .web(OverrideButtonConfigurationProperty.builder()
                                 .buttonAction("buttonAction")
                                 .link("link")
                                 .build())
                         .build())
                 .build()))
         .customConfig(customConfig)
         .layout("layout")
         .tags(tags)
         .templateDescription("templateDescription")
         .build();
 
  • 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

    • CfnInAppTemplate

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

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

      @Stability(Stable) public CfnInAppTemplate(@NotNull Construct scope, @NotNull String id, @NotNull CfnInAppTemplateProps props)
      Create a new AWS::Pinpoint::InAppTemplate.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      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.
    • getCfnProperties

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

      @Stability(Stable) @NotNull public TagManager getTags()
      An array of key-value pairs to apply to this resource.

      For more information, see Tag .

    • getCustomConfig

      @Stability(Stable) @NotNull public Object getCustomConfig()
      Custom data, in the form of key-value pairs, that is included in an in-app messaging payload.
    • setCustomConfig

      @Stability(Stable) public void setCustomConfig(@NotNull Object value)
      Custom data, in the form of key-value pairs, that is included in an in-app messaging payload.
    • getTemplateName

      @Stability(Stable) @NotNull public String getTemplateName()
      The name of the in-app message template.
    • setTemplateName

      @Stability(Stable) public void setTemplateName(@NotNull String value)
      The name of the in-app message template.
    • getContent

      @Stability(Stable) @Nullable public Object getContent()
      An object that contains information about the content of an in-app message, including its title and body text, text colors, background colors, images, buttons, and behaviors.
    • setContent

      @Stability(Stable) public void setContent(@Nullable IResolvable value)
      An object that contains information about the content of an in-app message, including its title and body text, text colors, background colors, images, buttons, and behaviors.
    • setContent

      @Stability(Stable) public void setContent(@Nullable List<Object> value)
      An object that contains information about the content of an in-app message, including its title and body text, text colors, background colors, images, buttons, and behaviors.
    • getLayout

      @Stability(Stable) @Nullable public String getLayout()
      A string that determines the appearance of the in-app message. You can specify one of the following:.

      • BOTTOM_BANNER – a message that appears as a banner at the bottom of the page.
      • TOP_BANNER – a message that appears as a banner at the top of the page.
      • OVERLAYS – a message that covers entire screen.
      • MOBILE_FEED – a message that appears in a window in front of the page.
      • MIDDLE_BANNER – a message that appears as a banner in the middle of the page.
      • CAROUSEL – a scrollable layout of up to five unique messages.
    • setLayout

      @Stability(Stable) public void setLayout(@Nullable String value)
      A string that determines the appearance of the in-app message. You can specify one of the following:.

      • BOTTOM_BANNER – a message that appears as a banner at the bottom of the page.
      • TOP_BANNER – a message that appears as a banner at the top of the page.
      • OVERLAYS – a message that covers entire screen.
      • MOBILE_FEED – a message that appears in a window in front of the page.
      • MIDDLE_BANNER – a message that appears as a banner in the middle of the page.
      • CAROUSEL – a scrollable layout of up to five unique messages.
    • getTemplateDescription

      @Stability(Stable) @Nullable public String getTemplateDescription()
      An optional description of the in-app template.
    • setTemplateDescription

      @Stability(Stable) public void setTemplateDescription(@Nullable String value)
      An optional description of the in-app template.