Interface CfnCampaignProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnCampaignProps.Jsii$Proxy
CfnCampaign.
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 attributes;
Object customConfig;
Object metrics;
Object tags;
CfnCampaignProps cfnCampaignProps = CfnCampaignProps.builder()
.applicationId("applicationId")
.name("name")
.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())
.segmentId("segmentId")
// the properties below are optional
.additionalTreatments(List.of(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()))
.campaignHook(CampaignHookProperty.builder()
.lambdaFunctionName("lambdaFunctionName")
.mode("mode")
.webUrl("webUrl")
.build())
.customDeliveryConfiguration(CustomDeliveryConfigurationProperty.builder()
.deliveryUri("deliveryUri")
.endpointTypes(List.of("endpointTypes"))
.build())
.description("description")
.holdoutPercent(123)
.isPaused(false)
.limits(LimitsProperty.builder()
.daily(123)
.maximumDuration(123)
.messagesPerSecond(123)
.session(123)
.total(123)
.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())
.priority(123)
.segmentVersion(123)
.tags(tags)
.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();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnCampaignPropsstatic final classAn implementation forCfnCampaignProps -
Method Summary
Modifier and TypeMethodDescriptionstatic CfnCampaignProps.Builderbuilder()default ObjectAn array of requests that defines additional treatments for the campaign, in addition to the default treatment for the campaign.The unique identifier for the Amazon Pinpoint application that the campaign is associated with.default ObjectSpecifies the Lambda function to use as a code hook for a campaign.default ObjectThe delivery configuration settings for sending the treatment through a custom channel.default StringA custom description of the campaign.default NumberThe allocated percentage of users (segment members) who shouldn't receive messages from the campaign.default ObjectSpecifies whether to pause the campaign.default ObjectThe messaging limits for the campaign.default ObjectThe message configuration settings for the treatment.getName()The name of the campaign.default NumberAn integer between 1 and 5, inclusive, that represents the priority of the in-app message campaign, where 1 is the highest priority and 5 is the lowest.The schedule settings for the treatment.The unique identifier for the segment to associate with the campaign.default NumberThe version of the segment to associate with the campaign.default ObjectgetTags()An array of key-value pairs to apply to this resource.default ObjectThe message template to use for the treatment.default StringA custom description of the treatment.default StringA custom name for the treatment.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getApplicationId
The unique identifier for the Amazon Pinpoint application that the campaign is associated with.- See Also:
-
getName
The name of the campaign.- See Also:
-
getSchedule
The schedule settings for the treatment.Returns union: either
IResolvableorCfnCampaign.ScheduleProperty- See Also:
-
getSegmentId
The unique identifier for the segment to associate with the campaign.- See Also:
-
getAdditionalTreatments
An array of requests that defines additional treatments for the campaign, in addition to the default treatment for the campaign.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnCampaign.WriteTreatmentResourceProperty>- See Also:
-
getCampaignHook
Specifies the Lambda function to use as a code hook for a campaign.Returns union: either
IResolvableorCfnCampaign.CampaignHookProperty- See Also:
-
getCustomDeliveryConfiguration
The delivery configuration settings for sending the treatment through a custom channel.This object is required if the
MessageConfigurationobject for the treatment specifies aCustomMessageobject.Returns union: either
IResolvableorCfnCampaign.CustomDeliveryConfigurationProperty- See Also:
-
getDescription
A custom description of the campaign.- See Also:
-
getHoldoutPercent
The allocated percentage of users (segment members) who shouldn't receive messages from the campaign.- See Also:
-
getIsPaused
Specifies whether to pause the campaign.A paused campaign doesn't run unless you resume it by changing this value to
false. If you restart a campaign, the campaign restarts from the beginning and not at the point you paused it. If a campaign is running it will complete and then pause. Pause only pauses or skips the next run for a recurring future scheduled campaign. A campaign scheduled for immediate can't be paused.Returns union: either
BooleanorIResolvable- See Also:
-
getLimits
The messaging limits for the campaign.Returns union: either
IResolvableorCfnCampaign.LimitsProperty- See Also:
-
getMessageConfiguration
The message configuration settings for the treatment.Returns union: either
IResolvableorCfnCampaign.MessageConfigurationProperty- See Also:
-
getPriority
An integer between 1 and 5, inclusive, that represents the priority of the in-app message campaign, where 1 is the highest priority and 5 is the lowest.If there are multiple messages scheduled to be displayed at the same time, the priority determines the order in which those messages are displayed.
- See Also:
-
getSegmentVersion
The version of the segment to associate with the campaign.- See Also:
-
getTags
An array of key-value pairs to apply to this resource.For more information, see Tag .
- See Also:
-
getTemplateConfiguration
The message template to use for the treatment.Returns union: either
IResolvableorCfnCampaign.TemplateConfigurationProperty- See Also:
-
getTreatmentDescription
A custom description of the treatment.- See Also:
-
getTreatmentName
A custom name for the treatment.- See Also:
-
builder
- Returns:
- a
CfnCampaignProps.BuilderofCfnCampaignProps
-