@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:41.223Z") @Stability(value=Stable) public class CfnInAppTemplate extends CfnResource implements IInspectable
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();
| Modifier and Type | Class and Description |
|---|---|
static interface |
CfnInAppTemplate.BodyConfigProperty
Specifies the configuration of the main body text of the in-app message.
|
static class |
CfnInAppTemplate.Builder
A fluent builder for
CfnInAppTemplate. |
static interface |
CfnInAppTemplate.ButtonConfigProperty
Specifies the behavior of buttons that appear in an in-app message template.
|
static interface |
CfnInAppTemplate.DefaultButtonConfigurationProperty
Specifies the default behavior of a button that appears in an in-app message.
|
static interface |
CfnInAppTemplate.HeaderConfigProperty
Specifies the configuration and content of the header or title text of the in-app message.
|
static interface |
CfnInAppTemplate.InAppMessageContentProperty
Specifies the configuration of an in-app message, including its header, body, buttons, colors, and images.
|
static interface |
CfnInAppTemplate.OverrideButtonConfigurationProperty
Specifies the configuration of a button with settings that are specific to a certain device type.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnInAppTemplate(software.constructs.Construct scope,
String id,
CfnInAppTemplateProps props)
Create a new `AWS::Pinpoint::InAppTemplate`.
|
protected |
CfnInAppTemplate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnInAppTemplate(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttrArn()
The Amazon Resource Name (ARN) of the message template.
|
protected Map<String,Object> |
getCfnProperties() |
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.
|
Object |
getCustomConfig()
Custom data, in the form of key-value pairs, that is included in an in-app messaging payload.
|
String |
getLayout()
A string that determines the appearance of the in-app message.
|
TagManager |
getTags()
An array of key-value pairs to apply to this resource.
|
String |
getTemplateDescription()
An optional description of the in-app template.
|
String |
getTemplateName()
The name of the in-app message template.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setContent(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.
|
void |
setContent(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.
|
void |
setCustomConfig(Object value)
Custom data, in the form of key-value pairs, that is included in an in-app messaging payload.
|
void |
setLayout(String value)
A string that determines the appearance of the in-app message.
|
void |
setTemplateDescription(String value)
An optional description of the in-app template.
|
void |
setTemplateName(String value)
The name of the in-app message template.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnInAppTemplate(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnInAppTemplate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnInAppTemplate(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnInAppTemplateProps props)
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.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrArn()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
For more information, see Tag .
@Stability(value=Stable) @NotNull public Object getCustomConfig()
@Stability(value=Stable)
public void setCustomConfig(@NotNull
Object value)
@Stability(value=Stable) @NotNull public String getTemplateName()
@Stability(value=Stable)
public void setTemplateName(@NotNull
String value)
@Stability(value=Stable) @Nullable public Object getContent()
@Stability(value=Stable)
public void setContent(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setContent(@Nullable
List<Object> value)
@Stability(value=Stable) @Nullable public String getLayout()
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.@Stability(value=Stable)
public void setLayout(@Nullable
String value)
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.@Stability(value=Stable) @Nullable public String getTemplateDescription()
@Stability(value=Stable)
public void setTemplateDescription(@Nullable
String value)
Copyright © 2022. All rights reserved.