aws-cdk-lib.aws_pinpoint.CfnCampaign.WriteTreatmentResourceProperty

interface WriteTreatmentResourceProperty

LanguageType name
.NETAmazon.CDK.AWS.Pinpoint.CfnCampaign.WriteTreatmentResourceProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awspinpoint#CfnCampaign_WriteTreatmentResourceProperty
Javasoftware.amazon.awscdk.services.pinpoint.CfnCampaign.WriteTreatmentResourceProperty
Pythonaws_cdk.aws_pinpoint.CfnCampaign.WriteTreatmentResourceProperty
TypeScript aws-cdk-lib » aws_pinpoint » CfnCampaign » WriteTreatmentResourceProperty

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

// 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',
};

Properties

NameTypeDescription
customDeliveryConfiguration?IResolvable | CustomDeliveryConfigurationPropertyThe delivery configuration settings for sending the treatment through a custom channel.
messageConfiguration?IResolvable | MessageConfigurationPropertyThe message configuration settings for the treatment.
schedule?IResolvable | SchedulePropertyThe schedule settings for the treatment.
sizePercent?numberThe allocated percentage of users (segment members) to send the treatment to.
templateConfiguration?IResolvable | TemplateConfigurationPropertyThe message template to use for the treatment.
treatmentDescription?stringA custom description of the treatment.
treatmentName?stringA custom name for the treatment.

customDeliveryConfiguration?

Type: IResolvable | CustomDeliveryConfigurationProperty (optional)

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.


messageConfiguration?

Type: IResolvable | MessageConfigurationProperty (optional)

The message configuration settings for the treatment.


schedule?

Type: IResolvable | ScheduleProperty (optional)

The schedule settings for the treatment.


sizePercent?

Type: number (optional)

The allocated percentage of users (segment members) to send the treatment to.


templateConfiguration?

Type: IResolvable | TemplateConfigurationProperty (optional)

The message template to use for the treatment.


treatmentDescription?

Type: string (optional)

A custom description of the treatment.


treatmentName?

Type: string (optional)

A custom name for the treatment.