Skip to content
v2.278.0

WriteTreatmentResourceProperty Struct ​

Specifies the settings for a campaign treatment.

A treatment is a variation of a campaign that's used for A/B testing of a campaign.

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 attributes: any;
declare const customConfig: any;
declare const metrics: any;
const writeTreatmentResourceProperty: pinpoint.CfnCampaign.WriteTreatmentResourceProperty = {
  customDeliveryConfiguration: {
    deliveryUri: 'deliveryUri',
    endpointTypes: ['endpointTypes'],
  },
  messageConfiguration: {
    admMessage: {
      action: 'action',
      body: 'body',
      imageIconUrl: 'imageIconUrl',
      imageSmallIconUrl: 'imageSmallIconUrl',
      imageUrl: 'imageUrl',
      jsonBody: 'jsonBody',
      mediaUrl: 'mediaUrl',
      rawContent: 'rawContent',
      silentPush: false,
      timeToLive: 123,
      title: 'title',
      url: 'url',
    },
    apnsMessage: {
      action: 'action',
      body: 'body',
      imageIconUrl: 'imageIconUrl',
      imageSmallIconUrl: 'imageSmallIconUrl',
      imageUrl: 'imageUrl',
      jsonBody: 'jsonBody',
      mediaUrl: 'mediaUrl',
      rawContent: 'rawContent',
      silentPush: false,
      timeToLive: 123,
      title: 'title',
      url: 'url',
    },
    baiduMessage: {
      action: 'action',
      body: 'body',
      imageIconUrl: 'imageIconUrl',
      imageSmallIconUrl: 'imageSmallIconUrl',
      imageUrl: 'imageUrl',
      jsonBody: 'jsonBody',
      mediaUrl: 'mediaUrl',
      rawContent: 'rawContent',
      silentPush: false,
      timeToLive: 123,
      title: 'title',
      url: 'url',
    },
    customMessage: {
      data: 'data',
    },
    defaultMessage: {
      action: 'action',
      body: 'body',
      imageIconUrl: 'imageIconUrl',
      imageSmallIconUrl: 'imageSmallIconUrl',
      imageUrl: 'imageUrl',
      jsonBody: 'jsonBody',
      mediaUrl: 'mediaUrl',
      rawContent: 'rawContent',
      silentPush: false,
      timeToLive: 123,
      title: 'title',
      url: 'url',
    },
    emailMessage: {
      body: 'body',
      fromAddress: 'fromAddress',
      htmlBody: 'htmlBody',
      title: 'title',
    },
    gcmMessage: {
      action: 'action',
      body: 'body',
      imageIconUrl: 'imageIconUrl',
      imageSmallIconUrl: 'imageSmallIconUrl',
      imageUrl: 'imageUrl',
      jsonBody: 'jsonBody',
      mediaUrl: 'mediaUrl',
      rawContent: 'rawContent',
      silentPush: false,
      timeToLive: 123,
      title: 'title',
      url: 'url',
    },
    inAppMessage: {
      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',
    },
    smsMessage: {
      body: 'body',
      entityId: 'entityId',
      messageType: 'messageType',
      originationNumber: 'originationNumber',
      senderId: 'senderId',
      templateId: 'templateId',
    },
  },
  schedule: {
    endTime: 'endTime',
    eventFilter: {
      dimensions: {
        attributes: attributes,
        eventType: {
          dimensionType: 'dimensionType',
          values: ['values'],
        },
        metrics: metrics,
      },
      filterType: 'filterType',
    },
    frequency: 'frequency',
    isLocalTime: false,
    quietTime: {
      end: 'end',
      start: 'start',
    },
    startTime: 'startTime',
    timeZone: 'timeZone',
  },
  sizePercent: 123,
  templateConfiguration: {
    emailTemplate: {
      name: 'name',
      version: 'version',
    },
    pushTemplate: {
      name: 'name',
      version: 'version',
    },
    smsTemplate: {
      name: 'name',
      version: 'version',
    },
    voiceTemplate: {
      name: 'name',
      version: 'version',
    },
  },
  treatmentDescription: 'treatmentDescription',
  treatmentName: 'treatmentName',
};
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

# attributes: Any
# custom_config: Any
# metrics: Any

write_treatment_resource_property = pinpoint.CfnCampaign.WriteTreatmentResourceProperty(
    custom_delivery_configuration=pinpoint.CfnCampaign.CustomDeliveryConfigurationProperty(
        delivery_uri="deliveryUri",
        endpoint_types=["endpointTypes"]
    ),
    message_configuration=pinpoint.CfnCampaign.MessageConfigurationProperty(
        adm_message=pinpoint.CfnCampaign.MessageProperty(
            action="action",
            body="body",
            image_icon_url="imageIconUrl",
            image_small_icon_url="imageSmallIconUrl",
            image_url="imageUrl",
            json_body="jsonBody",
            media_url="mediaUrl",
            raw_content="rawContent",
            silent_push=False,
            time_to_live=123,
            title="title",
            url="url"
        ),
        apns_message=pinpoint.CfnCampaign.MessageProperty(
            action="action",
            body="body",
            image_icon_url="imageIconUrl",
            image_small_icon_url="imageSmallIconUrl",
            image_url="imageUrl",
            json_body="jsonBody",
            media_url="mediaUrl",
            raw_content="rawContent",
            silent_push=False,
            time_to_live=123,
            title="title",
            url="url"
        ),
        baidu_message=pinpoint.CfnCampaign.MessageProperty(
            action="action",
            body="body",
            image_icon_url="imageIconUrl",
            image_small_icon_url="imageSmallIconUrl",
            image_url="imageUrl",
            json_body="jsonBody",
            media_url="mediaUrl",
            raw_content="rawContent",
            silent_push=False,
            time_to_live=123,
            title="title",
            url="url"
        ),
        custom_message=pinpoint.CfnCampaign.CampaignCustomMessageProperty(
            data="data"
        ),
        default_message=pinpoint.CfnCampaign.MessageProperty(
            action="action",
            body="body",
            image_icon_url="imageIconUrl",
            image_small_icon_url="imageSmallIconUrl",
            image_url="imageUrl",
            json_body="jsonBody",
            media_url="mediaUrl",
            raw_content="rawContent",
            silent_push=False,
            time_to_live=123,
            title="title",
            url="url"
        ),
        email_message=pinpoint.CfnCampaign.CampaignEmailMessageProperty(
            body="body",
            from_address="fromAddress",
            html_body="htmlBody",
            title="title"
        ),
        gcm_message=pinpoint.CfnCampaign.MessageProperty(
            action="action",
            body="body",
            image_icon_url="imageIconUrl",
            image_small_icon_url="imageSmallIconUrl",
            image_url="imageUrl",
            json_body="jsonBody",
            media_url="mediaUrl",
            raw_content="rawContent",
            silent_push=False,
            time_to_live=123,
            title="title",
            url="url"
        ),
        in_app_message=pinpoint.CfnCampaign.CampaignInAppMessageProperty(
            content=[pinpoint.CfnCampaign.InAppMessageContentProperty(
                background_color="backgroundColor",
                body_config=pinpoint.CfnCampaign.InAppMessageBodyConfigProperty(
                    alignment="alignment",
                    body="body",
                    text_color="textColor"
                ),
                header_config=pinpoint.CfnCampaign.InAppMessageHeaderConfigProperty(
                    alignment="alignment",
                    header="header",
                    text_color="textColor"
                ),
                image_url="imageUrl",
                primary_btn=pinpoint.CfnCampaign.InAppMessageButtonProperty(
                    android=pinpoint.CfnCampaign.OverrideButtonConfigurationProperty(
                        button_action="buttonAction",
                        link="link"
                    ),
                    default_config=pinpoint.CfnCampaign.DefaultButtonConfigurationProperty(
                        background_color="backgroundColor",
                        border_radius=123,
                        button_action="buttonAction",
                        link="link",
                        text="text",
                        text_color="textColor"
                    ),
                    ios=pinpoint.CfnCampaign.OverrideButtonConfigurationProperty(
                        button_action="buttonAction",
                        link="link"
                    ),
                    web=pinpoint.CfnCampaign.OverrideButtonConfigurationProperty(
                        button_action="buttonAction",
                        link="link"
                    )
                ),
                secondary_btn=pinpoint.CfnCampaign.InAppMessageButtonProperty(
                    android=pinpoint.CfnCampaign.OverrideButtonConfigurationProperty(
                        button_action="buttonAction",
                        link="link"
                    ),
                    default_config=pinpoint.CfnCampaign.DefaultButtonConfigurationProperty(
                        background_color="backgroundColor",
                        border_radius=123,
                        button_action="buttonAction",
                        link="link",
                        text="text",
                        text_color="textColor"
                    ),
                    ios=pinpoint.CfnCampaign.OverrideButtonConfigurationProperty(
                        button_action="buttonAction",
                        link="link"
                    ),
                    web=pinpoint.CfnCampaign.OverrideButtonConfigurationProperty(
                        button_action="buttonAction",
                        link="link"
                    )
                )
            )],
            custom_config=custom_config,
            layout="layout"
        ),
        sms_message=pinpoint.CfnCampaign.CampaignSmsMessageProperty(
            body="body",
            entity_id="entityId",
            message_type="messageType",
            origination_number="originationNumber",
            sender_id="senderId",
            template_id="templateId"
        )
    ),
    schedule=pinpoint.CfnCampaign.ScheduleProperty(
        end_time="endTime",
        event_filter=pinpoint.CfnCampaign.CampaignEventFilterProperty(
            dimensions=pinpoint.CfnCampaign.EventDimensionsProperty(
                attributes=attributes,
                event_type=pinpoint.CfnCampaign.SetDimensionProperty(
                    dimension_type="dimensionType",
                    values=["values"]
                ),
                metrics=metrics
            ),
            filter_type="filterType"
        ),
        frequency="frequency",
        is_local_time=False,
        quiet_time=pinpoint.CfnCampaign.QuietTimeProperty(
            end="end",
            start="start"
        ),
        start_time="startTime",
        time_zone="timeZone"
    ),
    size_percent=123,
    template_configuration=pinpoint.CfnCampaign.TemplateConfigurationProperty(
        email_template=pinpoint.CfnCampaign.TemplateProperty(
            name="name",
            version="version"
        ),
        push_template=pinpoint.CfnCampaign.TemplateProperty(
            name="name",
            version="version"
        ),
        sms_template=pinpoint.CfnCampaign.TemplateProperty(
            name="name",
            version="version"
        ),
        voice_template=pinpoint.CfnCampaign.TemplateProperty(
            name="name",
            version="version"
        )
    ),
    treatment_description="treatmentDescription",
    treatment_name="treatmentName"
)
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 attributes;
Object customConfig;
Object metrics;

WriteTreatmentResourceProperty writeTreatmentResourceProperty = WriteTreatmentResourceProperty.builder()
        .customDeliveryConfiguration(CustomDeliveryConfigurationProperty.builder()
                .deliveryUri("deliveryUri")
                .endpointTypes(List.of("endpointTypes"))
                .build())
        .messageConfiguration(MessageConfigurationProperty.builder()
                .admMessage(MessageProperty.builder()
                        .action("action")
                        .body("body")
                        .imageIconUrl("imageIconUrl")
                        .imageSmallIconUrl("imageSmallIconUrl")
                        .imageUrl("imageUrl")
                        .jsonBody("jsonBody")
                        .mediaUrl("mediaUrl")
                        .rawContent("rawContent")
                        .silentPush(false)
                        .timeToLive(123)
                        .title("title")
                        .url("url")
                        .build())
                .apnsMessage(MessageProperty.builder()
                        .action("action")
                        .body("body")
                        .imageIconUrl("imageIconUrl")
                        .imageSmallIconUrl("imageSmallIconUrl")
                        .imageUrl("imageUrl")
                        .jsonBody("jsonBody")
                        .mediaUrl("mediaUrl")
                        .rawContent("rawContent")
                        .silentPush(false)
                        .timeToLive(123)
                        .title("title")
                        .url("url")
                        .build())
                .baiduMessage(MessageProperty.builder()
                        .action("action")
                        .body("body")
                        .imageIconUrl("imageIconUrl")
                        .imageSmallIconUrl("imageSmallIconUrl")
                        .imageUrl("imageUrl")
                        .jsonBody("jsonBody")
                        .mediaUrl("mediaUrl")
                        .rawContent("rawContent")
                        .silentPush(false)
                        .timeToLive(123)
                        .title("title")
                        .url("url")
                        .build())
                .customMessage(CampaignCustomMessageProperty.builder()
                        .data("data")
                        .build())
                .defaultMessage(MessageProperty.builder()
                        .action("action")
                        .body("body")
                        .imageIconUrl("imageIconUrl")
                        .imageSmallIconUrl("imageSmallIconUrl")
                        .imageUrl("imageUrl")
                        .jsonBody("jsonBody")
                        .mediaUrl("mediaUrl")
                        .rawContent("rawContent")
                        .silentPush(false)
                        .timeToLive(123)
                        .title("title")
                        .url("url")
                        .build())
                .emailMessage(CampaignEmailMessageProperty.builder()
                        .body("body")
                        .fromAddress("fromAddress")
                        .htmlBody("htmlBody")
                        .title("title")
                        .build())
                .gcmMessage(MessageProperty.builder()
                        .action("action")
                        .body("body")
                        .imageIconUrl("imageIconUrl")
                        .imageSmallIconUrl("imageSmallIconUrl")
                        .imageUrl("imageUrl")
                        .jsonBody("jsonBody")
                        .mediaUrl("mediaUrl")
                        .rawContent("rawContent")
                        .silentPush(false)
                        .timeToLive(123)
                        .title("title")
                        .url("url")
                        .build())
                .inAppMessage(CampaignInAppMessageProperty.builder()
                        .content(List.of(InAppMessageContentProperty.builder()
                                .backgroundColor("backgroundColor")
                                .bodyConfig(InAppMessageBodyConfigProperty.builder()
                                        .alignment("alignment")
                                        .body("body")
                                        .textColor("textColor")
                                        .build())
                                .headerConfig(InAppMessageHeaderConfigProperty.builder()
                                        .alignment("alignment")
                                        .header("header")
                                        .textColor("textColor")
                                        .build())
                                .imageUrl("imageUrl")
                                .primaryBtn(InAppMessageButtonProperty.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(InAppMessageButtonProperty.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")
                        .build())
                .smsMessage(CampaignSmsMessageProperty.builder()
                        .body("body")
                        .entityId("entityId")
                        .messageType("messageType")
                        .originationNumber("originationNumber")
                        .senderId("senderId")
                        .templateId("templateId")
                        .build())
                .build())
        .schedule(ScheduleProperty.builder()
                .endTime("endTime")
                .eventFilter(CampaignEventFilterProperty.builder()
                        .dimensions(EventDimensionsProperty.builder()
                                .attributes(attributes)
                                .eventType(SetDimensionProperty.builder()
                                        .dimensionType("dimensionType")
                                        .values(List.of("values"))
                                        .build())
                                .metrics(metrics)
                                .build())
                        .filterType("filterType")
                        .build())
                .frequency("frequency")
                .isLocalTime(false)
                .quietTime(QuietTimeProperty.builder()
                        .end("end")
                        .start("start")
                        .build())
                .startTime("startTime")
                .timeZone("timeZone")
                .build())
        .sizePercent(123)
        .templateConfiguration(TemplateConfigurationProperty.builder()
                .emailTemplate(TemplateProperty.builder()
                        .name("name")
                        .version("version")
                        .build())
                .pushTemplate(TemplateProperty.builder()
                        .name("name")
                        .version("version")
                        .build())
                .smsTemplate(TemplateProperty.builder()
                        .name("name")
                        .version("version")
                        .build())
                .voiceTemplate(TemplateProperty.builder()
                        .name("name")
                        .version("version")
                        .build())
                .build())
        .treatmentDescription("treatmentDescription")
        .treatmentName("treatmentName")
        .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 attributes;
var customConfig;
var metrics;

var writeTreatmentResourceProperty = new WriteTreatmentResourceProperty {
    CustomDeliveryConfiguration = new CustomDeliveryConfigurationProperty {
        DeliveryUri = "deliveryUri",
        EndpointTypes = new [] { "endpointTypes" }
    },
    MessageConfiguration = new MessageConfigurationProperty {
        AdmMessage = new MessageProperty {
            Action = "action",
            Body = "body",
            ImageIconUrl = "imageIconUrl",
            ImageSmallIconUrl = "imageSmallIconUrl",
            ImageUrl = "imageUrl",
            JsonBody = "jsonBody",
            MediaUrl = "mediaUrl",
            RawContent = "rawContent",
            SilentPush = false,
            TimeToLive = 123,
            Title = "title",
            Url = "url"
        },
        ApnsMessage = new MessageProperty {
            Action = "action",
            Body = "body",
            ImageIconUrl = "imageIconUrl",
            ImageSmallIconUrl = "imageSmallIconUrl",
            ImageUrl = "imageUrl",
            JsonBody = "jsonBody",
            MediaUrl = "mediaUrl",
            RawContent = "rawContent",
            SilentPush = false,
            TimeToLive = 123,
            Title = "title",
            Url = "url"
        },
        BaiduMessage = new MessageProperty {
            Action = "action",
            Body = "body",
            ImageIconUrl = "imageIconUrl",
            ImageSmallIconUrl = "imageSmallIconUrl",
            ImageUrl = "imageUrl",
            JsonBody = "jsonBody",
            MediaUrl = "mediaUrl",
            RawContent = "rawContent",
            SilentPush = false,
            TimeToLive = 123,
            Title = "title",
            Url = "url"
        },
        CustomMessage = new CampaignCustomMessageProperty {
            Data = "data"
        },
        DefaultMessage = new MessageProperty {
            Action = "action",
            Body = "body",
            ImageIconUrl = "imageIconUrl",
            ImageSmallIconUrl = "imageSmallIconUrl",
            ImageUrl = "imageUrl",
            JsonBody = "jsonBody",
            MediaUrl = "mediaUrl",
            RawContent = "rawContent",
            SilentPush = false,
            TimeToLive = 123,
            Title = "title",
            Url = "url"
        },
        EmailMessage = new CampaignEmailMessageProperty {
            Body = "body",
            FromAddress = "fromAddress",
            HtmlBody = "htmlBody",
            Title = "title"
        },
        GcmMessage = new MessageProperty {
            Action = "action",
            Body = "body",
            ImageIconUrl = "imageIconUrl",
            ImageSmallIconUrl = "imageSmallIconUrl",
            ImageUrl = "imageUrl",
            JsonBody = "jsonBody",
            MediaUrl = "mediaUrl",
            RawContent = "rawContent",
            SilentPush = false,
            TimeToLive = 123,
            Title = "title",
            Url = "url"
        },
        InAppMessage = new CampaignInAppMessageProperty {
            Content = new [] { new InAppMessageContentProperty {
                BackgroundColor = "backgroundColor",
                BodyConfig = new InAppMessageBodyConfigProperty {
                    Alignment = "alignment",
                    Body = "body",
                    TextColor = "textColor"
                },
                HeaderConfig = new InAppMessageHeaderConfigProperty {
                    Alignment = "alignment",
                    Header = "header",
                    TextColor = "textColor"
                },
                ImageUrl = "imageUrl",
                PrimaryBtn = new InAppMessageButtonProperty {
                    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 InAppMessageButtonProperty {
                    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"
        },
        SmsMessage = new CampaignSmsMessageProperty {
            Body = "body",
            EntityId = "entityId",
            MessageType = "messageType",
            OriginationNumber = "originationNumber",
            SenderId = "senderId",
            TemplateId = "templateId"
        }
    },
    Schedule = new ScheduleProperty {
        EndTime = "endTime",
        EventFilter = new CampaignEventFilterProperty {
            Dimensions = new EventDimensionsProperty {
                Attributes = attributes,
                EventType = new SetDimensionProperty {
                    DimensionType = "dimensionType",
                    Values = new [] { "values" }
                },
                Metrics = metrics
            },
            FilterType = "filterType"
        },
        Frequency = "frequency",
        IsLocalTime = false,
        QuietTime = new QuietTimeProperty {
            End = "end",
            Start = "start"
        },
        StartTime = "startTime",
        TimeZone = "timeZone"
    },
    SizePercent = 123,
    TemplateConfiguration = new TemplateConfigurationProperty {
        EmailTemplate = new TemplateProperty {
            Name = "name",
            Version = "version"
        },
        PushTemplate = new TemplateProperty {
            Name = "name",
            Version = "version"
        },
        SmsTemplate = new TemplateProperty {
            Name = "name",
            Version = "version"
        },
        VoiceTemplate = new TemplateProperty {
            Name = "name",
            Version = "version"
        }
    },
    TreatmentDescription = "treatmentDescription",
    TreatmentName = "treatmentName"
};
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 attributes interface{}
var customConfig interface{}
var metrics interface{}

writeTreatmentResourceProperty := &WriteTreatmentResourceProperty{
	CustomDeliveryConfiguration: &CustomDeliveryConfigurationProperty{
		DeliveryUri: jsii.String("deliveryUri"),
		EndpointTypes: []*string{
			jsii.String("endpointTypes"),
		},
	},
	MessageConfiguration: &MessageConfigurationProperty{
		AdmMessage: &MessageProperty{
			Action: jsii.String("action"),
			Body: jsii.String("body"),
			ImageIconUrl: jsii.String("imageIconUrl"),
			ImageSmallIconUrl: jsii.String("imageSmallIconUrl"),
			ImageUrl: jsii.String("imageUrl"),
			JsonBody: jsii.String("jsonBody"),
			MediaUrl: jsii.String("mediaUrl"),
			RawContent: jsii.String("rawContent"),
			SilentPush: jsii.Boolean(false),
			TimeToLive: jsii.Number(123),
			Title: jsii.String("title"),
			Url: jsii.String("url"),
		},
		ApnsMessage: &MessageProperty{
			Action: jsii.String("action"),
			Body: jsii.String("body"),
			ImageIconUrl: jsii.String("imageIconUrl"),
			ImageSmallIconUrl: jsii.String("imageSmallIconUrl"),
			ImageUrl: jsii.String("imageUrl"),
			JsonBody: jsii.String("jsonBody"),
			MediaUrl: jsii.String("mediaUrl"),
			RawContent: jsii.String("rawContent"),
			SilentPush: jsii.Boolean(false),
			TimeToLive: jsii.Number(123),
			Title: jsii.String("title"),
			Url: jsii.String("url"),
		},
		BaiduMessage: &MessageProperty{
			Action: jsii.String("action"),
			Body: jsii.String("body"),
			ImageIconUrl: jsii.String("imageIconUrl"),
			ImageSmallIconUrl: jsii.String("imageSmallIconUrl"),
			ImageUrl: jsii.String("imageUrl"),
			JsonBody: jsii.String("jsonBody"),
			MediaUrl: jsii.String("mediaUrl"),
			RawContent: jsii.String("rawContent"),
			SilentPush: jsii.Boolean(false),
			TimeToLive: jsii.Number(123),
			Title: jsii.String("title"),
			Url: jsii.String("url"),
		},
		CustomMessage: &CampaignCustomMessageProperty{
			Data: jsii.String("data"),
		},
		DefaultMessage: &MessageProperty{
			Action: jsii.String("action"),
			Body: jsii.String("body"),
			ImageIconUrl: jsii.String("imageIconUrl"),
			ImageSmallIconUrl: jsii.String("imageSmallIconUrl"),
			ImageUrl: jsii.String("imageUrl"),
			JsonBody: jsii.String("jsonBody"),
			MediaUrl: jsii.String("mediaUrl"),
			RawContent: jsii.String("rawContent"),
			SilentPush: jsii.Boolean(false),
			TimeToLive: jsii.Number(123),
			Title: jsii.String("title"),
			Url: jsii.String("url"),
		},
		EmailMessage: &CampaignEmailMessageProperty{
			Body: jsii.String("body"),
			FromAddress: jsii.String("fromAddress"),
			HtmlBody: jsii.String("htmlBody"),
			Title: jsii.String("title"),
		},
		GcmMessage: &MessageProperty{
			Action: jsii.String("action"),
			Body: jsii.String("body"),
			ImageIconUrl: jsii.String("imageIconUrl"),
			ImageSmallIconUrl: jsii.String("imageSmallIconUrl"),
			ImageUrl: jsii.String("imageUrl"),
			JsonBody: jsii.String("jsonBody"),
			MediaUrl: jsii.String("mediaUrl"),
			RawContent: jsii.String("rawContent"),
			SilentPush: jsii.Boolean(false),
			TimeToLive: jsii.Number(123),
			Title: jsii.String("title"),
			Url: jsii.String("url"),
		},
		InAppMessage: &CampaignInAppMessageProperty{
			Content: []interface{}{
				&InAppMessageContentProperty{
					BackgroundColor: jsii.String("backgroundColor"),
					BodyConfig: &InAppMessageBodyConfigProperty{
						Alignment: jsii.String("alignment"),
						Body: jsii.String("body"),
						TextColor: jsii.String("textColor"),
					},
					HeaderConfig: &InAppMessageHeaderConfigProperty{
						Alignment: jsii.String("alignment"),
						Header: jsii.String("header"),
						TextColor: jsii.String("textColor"),
					},
					ImageUrl: jsii.String("imageUrl"),
					PrimaryBtn: &InAppMessageButtonProperty{
						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: &InAppMessageButtonProperty{
						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"),
		},
		SmsMessage: &CampaignSmsMessageProperty{
			Body: jsii.String("body"),
			EntityId: jsii.String("entityId"),
			MessageType: jsii.String("messageType"),
			OriginationNumber: jsii.String("originationNumber"),
			SenderId: jsii.String("senderId"),
			TemplateId: jsii.String("templateId"),
		},
	},
	Schedule: &ScheduleProperty{
		EndTime: jsii.String("endTime"),
		EventFilter: &CampaignEventFilterProperty{
			Dimensions: &EventDimensionsProperty{
				Attributes: attributes,
				EventType: &SetDimensionProperty{
					DimensionType: jsii.String("dimensionType"),
					Values: []*string{
						jsii.String("values"),
					},
				},
				Metrics: metrics,
			},
			FilterType: jsii.String("filterType"),
		},
		Frequency: jsii.String("frequency"),
		IsLocalTime: jsii.Boolean(false),
		QuietTime: &QuietTimeProperty{
			End: jsii.String("end"),
			Start: jsii.String("start"),
		},
		StartTime: jsii.String("startTime"),
		TimeZone: jsii.String("timeZone"),
	},
	SizePercent: jsii.Number(123),
	TemplateConfiguration: &TemplateConfigurationProperty{
		EmailTemplate: &TemplateProperty{
			Name: jsii.String("name"),
			Version: jsii.String("version"),
		},
		PushTemplate: &TemplateProperty{
			Name: jsii.String("name"),
			Version: jsii.String("version"),
		},
		SmsTemplate: &TemplateProperty{
			Name: jsii.String("name"),
			Version: jsii.String("version"),
		},
		VoiceTemplate: &TemplateProperty{
			Name: jsii.String("name"),
			Version: jsii.String("version"),
		},
	},
	TreatmentDescription: jsii.String("treatmentDescription"),
	TreatmentName: jsii.String("treatmentName"),
}

Properties ​

customDeliveryConfigurationoptionalIResolvable | CfnCampaign.CustomDeliveryConfigurationPropertycustom_delivery_configurationoptionaltyping.Union[IResolvable, CustomDeliveryConfigurationProperty]customDeliveryConfigurationoptionalIResolvableCustomDeliveryConfigurationoptionalIResolvableCustomDeliveryConfigurationoptionalinterface{} #
The delivery configuration settings for sending the treatment through a custom channel.

This object is required if the MessageConfiguration object for the treatment specifies a CustomMessage object.

messageConfigurationoptionalIResolvable | CfnCampaign.MessageConfigurationPropertymessage_configurationoptionaltyping.Union[IResolvable, MessageConfigurationProperty]messageConfigurationoptionalIResolvableMessageConfigurationoptionalIResolvableMessageConfigurationoptionalinterface{} #
The message configuration settings for the treatment.
scheduleoptionalIResolvable | CfnCampaign.SchedulePropertyscheduleoptionaltyping.Union[IResolvable, ScheduleProperty]scheduleoptionalIResolvableScheduleoptionalIResolvableScheduleoptionalinterface{} #
The schedule settings for the treatment.
sizePercentoptionalnumbersize_percentoptionalint | floatsizePercentoptionalNumberSizePercentoptionaldoubleSizePercentoptional*float64 #
The allocated percentage of users (segment members) to send the treatment to.
templateConfigurationoptionalIResolvable | CfnCampaign.TemplateConfigurationPropertytemplate_configurationoptionaltyping.Union[IResolvable, TemplateConfigurationProperty]templateConfigurationoptionalIResolvableTemplateConfigurationoptionalIResolvableTemplateConfigurationoptionalinterface{} #
The message template to use for the treatment.
treatmentDescriptionoptionalstringtreatment_descriptionoptionalstrtreatmentDescriptionoptionalStringTreatmentDescriptionoptionalstringTreatmentDescriptionoptional*string #
A custom description of the treatment.
treatmentNameoptionalstringtreatment_nameoptionalstrtreatmentNameoptionalStringTreatmentNameoptionalstringTreatmentNameoptional*string #
A custom name for the treatment.