Skip to content
v2.278.0

CfnInAppTemplateProps ​

Struct External

Properties for defining a CfnInAppTemplate.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_pinpoint as pinpoint } from 'aws-cdk-lib';

declare const customConfig: any;
declare const tags: any;
const cfnInAppTemplateProps: pinpoint.CfnInAppTemplateProps = {
  templateName: 'templateName',

  // the properties below are optional
  content: [{
    backgroundColor: 'backgroundColor',
    bodyConfig: {
      alignment: 'alignment',
      body: 'body',
      textColor: 'textColor',
    },
    headerConfig: {
      alignment: 'alignment',
      header: 'header',
      textColor: 'textColor',
    },
    imageUrl: 'imageUrl',
    primaryBtn: {
      android: {
        buttonAction: 'buttonAction',
        link: 'link',
      },
      defaultConfig: {
        backgroundColor: 'backgroundColor',
        borderRadius: 123,
        buttonAction: 'buttonAction',
        link: 'link',
        text: 'text',
        textColor: 'textColor',
      },
      ios: {
        buttonAction: 'buttonAction',
        link: 'link',
      },
      web: {
        buttonAction: 'buttonAction',
        link: 'link',
      },
    },
    secondaryBtn: {
      android: {
        buttonAction: 'buttonAction',
        link: 'link',
      },
      defaultConfig: {
        backgroundColor: 'backgroundColor',
        borderRadius: 123,
        buttonAction: 'buttonAction',
        link: 'link',
        text: 'text',
        textColor: 'textColor',
      },
      ios: {
        buttonAction: 'buttonAction',
        link: 'link',
      },
      web: {
        buttonAction: 'buttonAction',
        link: 'link',
      },
    },
  }],
  customConfig: customConfig,
  layout: 'layout',
  tags: tags,
  templateDescription: 'templateDescription',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_pinpoint as pinpoint

# custom_config: Any
# tags: Any

cfn_in_app_template_props = pinpoint.CfnInAppTemplateProps(
    template_name="templateName",

    # the properties below are optional
    content=[pinpoint.CfnInAppTemplate.InAppMessageContentProperty(
        background_color="backgroundColor",
        body_config=pinpoint.CfnInAppTemplate.BodyConfigProperty(
            alignment="alignment",
            body="body",
            text_color="textColor"
        ),
        header_config=pinpoint.CfnInAppTemplate.HeaderConfigProperty(
            alignment="alignment",
            header="header",
            text_color="textColor"
        ),
        image_url="imageUrl",
        primary_btn=pinpoint.CfnInAppTemplate.ButtonConfigProperty(
            android=pinpoint.CfnInAppTemplate.OverrideButtonConfigurationProperty(
                button_action="buttonAction",
                link="link"
            ),
            default_config=pinpoint.CfnInAppTemplate.DefaultButtonConfigurationProperty(
                background_color="backgroundColor",
                border_radius=123,
                button_action="buttonAction",
                link="link",
                text="text",
                text_color="textColor"
            ),
            ios=pinpoint.CfnInAppTemplate.OverrideButtonConfigurationProperty(
                button_action="buttonAction",
                link="link"
            ),
            web=pinpoint.CfnInAppTemplate.OverrideButtonConfigurationProperty(
                button_action="buttonAction",
                link="link"
            )
        ),
        secondary_btn=pinpoint.CfnInAppTemplate.ButtonConfigProperty(
            android=pinpoint.CfnInAppTemplate.OverrideButtonConfigurationProperty(
                button_action="buttonAction",
                link="link"
            ),
            default_config=pinpoint.CfnInAppTemplate.DefaultButtonConfigurationProperty(
                background_color="backgroundColor",
                border_radius=123,
                button_action="buttonAction",
                link="link",
                text="text",
                text_color="textColor"
            ),
            ios=pinpoint.CfnInAppTemplate.OverrideButtonConfigurationProperty(
                button_action="buttonAction",
                link="link"
            ),
            web=pinpoint.CfnInAppTemplate.OverrideButtonConfigurationProperty(
                button_action="buttonAction",
                link="link"
            )
        )
    )],
    custom_config=custom_config,
    layout="layout",
    tags=tags,
    template_description="templateDescription"
)
java
// 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;

CfnInAppTemplateProps cfnInAppTemplateProps = CfnInAppTemplateProps.builder()
        .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();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Pinpoint;

var customConfig;
var tags;

var cfnInAppTemplateProps = new CfnInAppTemplateProps {
    TemplateName = "templateName",

    // the properties below are optional
    Content = new [] { new InAppMessageContentProperty {
        BackgroundColor = "backgroundColor",
        BodyConfig = new BodyConfigProperty {
            Alignment = "alignment",
            Body = "body",
            TextColor = "textColor"
        },
        HeaderConfig = new HeaderConfigProperty {
            Alignment = "alignment",
            Header = "header",
            TextColor = "textColor"
        },
        ImageUrl = "imageUrl",
        PrimaryBtn = new ButtonConfigProperty {
            Android = new OverrideButtonConfigurationProperty {
                ButtonAction = "buttonAction",
                Link = "link"
            },
            DefaultConfig = new DefaultButtonConfigurationProperty {
                BackgroundColor = "backgroundColor",
                BorderRadius = 123,
                ButtonAction = "buttonAction",
                Link = "link",
                Text = "text",
                TextColor = "textColor"
            },
            Ios = new OverrideButtonConfigurationProperty {
                ButtonAction = "buttonAction",
                Link = "link"
            },
            Web = new OverrideButtonConfigurationProperty {
                ButtonAction = "buttonAction",
                Link = "link"
            }
        },
        SecondaryBtn = new ButtonConfigProperty {
            Android = new OverrideButtonConfigurationProperty {
                ButtonAction = "buttonAction",
                Link = "link"
            },
            DefaultConfig = new DefaultButtonConfigurationProperty {
                BackgroundColor = "backgroundColor",
                BorderRadius = 123,
                ButtonAction = "buttonAction",
                Link = "link",
                Text = "text",
                TextColor = "textColor"
            },
            Ios = new OverrideButtonConfigurationProperty {
                ButtonAction = "buttonAction",
                Link = "link"
            },
            Web = new OverrideButtonConfigurationProperty {
                ButtonAction = "buttonAction",
                Link = "link"
            }
        }
    } },
    CustomConfig = customConfig,
    Layout = "layout",
    Tags = tags,
    TemplateDescription = "templateDescription"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var customConfig interface{}
var tags interface{}

cfnInAppTemplateProps := &CfnInAppTemplateProps{
	TemplateName: jsii.String("templateName"),

	// the properties below are optional
	Content: []interface{}{
		&InAppMessageContentProperty{
			BackgroundColor: jsii.String("backgroundColor"),
			BodyConfig: &BodyConfigProperty{
				Alignment: jsii.String("alignment"),
				Body: jsii.String("body"),
				TextColor: jsii.String("textColor"),
			},
			HeaderConfig: &HeaderConfigProperty{
				Alignment: jsii.String("alignment"),
				Header: jsii.String("header"),
				TextColor: jsii.String("textColor"),
			},
			ImageUrl: jsii.String("imageUrl"),
			PrimaryBtn: &ButtonConfigProperty{
				Android: &OverrideButtonConfigurationProperty{
					ButtonAction: jsii.String("buttonAction"),
					Link: jsii.String("link"),
				},
				DefaultConfig: &DefaultButtonConfigurationProperty{
					BackgroundColor: jsii.String("backgroundColor"),
					BorderRadius: jsii.Number(123),
					ButtonAction: jsii.String("buttonAction"),
					Link: jsii.String("link"),
					Text: jsii.String("text"),
					TextColor: jsii.String("textColor"),
				},
				Ios: &OverrideButtonConfigurationProperty{
					ButtonAction: jsii.String("buttonAction"),
					Link: jsii.String("link"),
				},
				Web: &OverrideButtonConfigurationProperty{
					ButtonAction: jsii.String("buttonAction"),
					Link: jsii.String("link"),
				},
			},
			SecondaryBtn: &ButtonConfigProperty{
				Android: &OverrideButtonConfigurationProperty{
					ButtonAction: jsii.String("buttonAction"),
					Link: jsii.String("link"),
				},
				DefaultConfig: &DefaultButtonConfigurationProperty{
					BackgroundColor: jsii.String("backgroundColor"),
					BorderRadius: jsii.Number(123),
					ButtonAction: jsii.String("buttonAction"),
					Link: jsii.String("link"),
					Text: jsii.String("text"),
					TextColor: jsii.String("textColor"),
				},
				Ios: &OverrideButtonConfigurationProperty{
					ButtonAction: jsii.String("buttonAction"),
					Link: jsii.String("link"),
				},
				Web: &OverrideButtonConfigurationProperty{
					ButtonAction: jsii.String("buttonAction"),
					Link: jsii.String("link"),
				},
			},
		},
	},
	CustomConfig: customConfig,
	Layout: jsii.String("layout"),
	Tags: tags,
	TemplateDescription: jsii.String("templateDescription"),
}

Properties ​

contentoptionalIResolvable | IResolvable | CfnInAppTemplate.InAppMessageContentProperty[]contentoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, InAppMessageContentProperty]]]contentoptionalIResolvableContentoptionalIResolvableContentoptionalinterface{} #
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.
customConfigoptionalanycustom_configoptionalAnycustomConfigoptionalObjectCustomConfigoptionalobjectCustomConfigoptionalinterface{} #
Custom data, in the form of key-value pairs, that is included in an in-app messaging payload.
layoutoptionalstringlayoutoptionalstrlayoutoptionalStringLayoutoptionalstringLayoutoptional*string #
A string that determines the appearance of the in-app message. You can specify one of the following:.
notes
  • 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.
tagsoptionalanytagsoptionalAnytagsoptionalObjectTagsoptionalobjectTagsoptionalinterface{} #
An array of key-value pairs to apply to this resource.

For more information, see Tag .

templateDescriptionoptionalstringtemplate_descriptionoptionalstrtemplateDescriptionoptionalStringTemplateDescriptionoptionalstringTemplateDescriptionoptional*string #
An optional description of the in-app template.
templateNamestringtemplate_namestrtemplateNameStringTemplateNamestringTemplateName*string required #
The name of the in-app message template.