Class CfnCampaign
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.pinpoint.CfnCampaign
- All Implemented Interfaces:
IInspectable
,ITaggable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-22T02:24:05.263Z")
@Stability(Stable)
public class CfnCampaign
extends CfnResource
implements IInspectable, ITaggable
Specifies the settings for a campaign.
A campaign is a messaging initiative that engages a specific segment of users for an Amazon Pinpoint application.
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; CfnCampaign cfnCampaign = CfnCampaign.Builder.create(this, "MyCfnCampaign") .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
Modifier and TypeClassDescriptionstatic interface
Example:static final class
A fluent builder forCfnCampaign
.static interface
Specifies the contents of a message that's sent through a custom channel to recipients of a campaign.static interface
Specifies the content and "From" address for an email message that's sent to recipients of a campaign.static interface
Specifies the settings for events that cause a campaign to be sent.static interface
Specifies settings for invoking an Lambda function that customizes a segment for a campaign.static interface
Specifies the appearance of an in-app message, including the message type, the title and body text, text and background colors, and the configurations of buttons that appear in the message.static interface
Specifies the content and settings for an SMS message that's sent to recipients of a campaign.static interface
Specifies the delivery configuration settings for sending a campaign or campaign treatment through a custom channel.static interface
Specifies the default behavior for a button that appears in an in-app message.static interface
Specifies the dimensions for an event filter that determines when a campaign is sent or a journey activity is performed.static interface
Specifies the configuration of main body text of the in-app message.static interface
Specifies the configuration of a button that appears in an in-app message.static interface
Specifies the configuration and contents of an in-app message.static interface
Specifies the configuration and content of the header or title text of the in-app message.static interface
Specifies the limits on the messages that a campaign can send.static interface
Specifies the message configuration settings for a campaign.static interface
Specifies the content and settings for a push notification that's sent to recipients of a campaign.static interface
Example:static interface
Specifies the configuration of a button with settings that are specific to a certain device type.static interface
Specifies the start and end times that define a time range when messages aren't sent to endpoints.static interface
Specifies the schedule settings for a campaign.static interface
Specifies the dimension type and values for a segment dimension.static interface
Specifies the message template to use for the message, for each type of channel.static interface
Specifies the name and version of the message template to use for the message.static interface
Specifies the settings for a campaign treatment.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnCampaign
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnCampaign
(software.amazon.jsii.JsiiObjectRef objRef) CfnCampaign
(software.constructs.Construct scope, String id, CfnCampaignProps props) -
Method Summary
Modifier and TypeMethodDescriptionAn 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.The Amazon Resource Name (ARN) of the campaign.The unique identifier for the campaign.Specifies the Lambda function to use as a code hook for a campaign.The delivery configuration settings for sending the treatment through a custom channel.A custom description of the campaign.The allocated percentage of users (segment members) who shouldn't receive messages from the campaign.Specifies whether to pause the campaign.The messaging limits for the campaign.The message configuration settings for the treatment.getName()
The name of the campaign.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.The schedule settings for the treatment.The unique identifier for the segment to associate with the campaign.The version of the segment to associate with the campaign.getTags()
Tag Manager which manages the tags for this resource.An array of key-value pairs to apply to this resource.The message template to use for the treatment.A custom description of the treatment.A custom name for the treatment.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setAdditionalTreatments
(List<Object> value) An array of requests that defines additional treatments for the campaign, in addition to the default treatment for the campaign.void
An array of requests that defines additional treatments for the campaign, in addition to the default treatment for the campaign.void
setApplicationId
(String value) The unique identifier for the Amazon Pinpoint application that the campaign is associated with.void
setCampaignHook
(IResolvable value) Specifies the Lambda function to use as a code hook for a campaign.void
Specifies the Lambda function to use as a code hook for a campaign.void
The delivery configuration settings for sending the treatment through a custom channel.void
The delivery configuration settings for sending the treatment through a custom channel.void
setDescription
(String value) A custom description of the campaign.void
setHoldoutPercent
(Number value) The allocated percentage of users (segment members) who shouldn't receive messages from the campaign.void
setIsPaused
(Boolean value) Specifies whether to pause the campaign.void
setIsPaused
(IResolvable value) Specifies whether to pause the campaign.void
setLimits
(IResolvable value) The messaging limits for the campaign.void
The messaging limits for the campaign.void
The message configuration settings for the treatment.void
The message configuration settings for the treatment.void
The name of the campaign.void
setPriority
(Number value) 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.void
setSchedule
(IResolvable value) The schedule settings for the treatment.void
The schedule settings for the treatment.void
setSegmentId
(String value) The unique identifier for the segment to associate with the campaign.void
setSegmentVersion
(Number value) The version of the segment to associate with the campaign.void
setTagsRaw
(Object value) An array of key-value pairs to apply to this resource.void
The message template to use for the treatment.void
The message template to use for the treatment.void
setTreatmentDescription
(String value) A custom description of the treatment.void
setTreatmentName
(String value) A custom name for the treatment.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnCampaign
protected CfnCampaign(software.amazon.jsii.JsiiObjectRef objRef) -
CfnCampaign
protected CfnCampaign(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnCampaign
@Stability(Stable) public CfnCampaign(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnCampaignProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrArn
The Amazon Resource Name (ARN) of the campaign. -
getAttrCampaignId
The unique identifier for the campaign. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getApplicationId
The unique identifier for the Amazon Pinpoint application that the campaign is associated with. -
setApplicationId
The unique identifier for the Amazon Pinpoint application that the campaign is associated with. -
getName
The name of the campaign. -
setName
The name of the campaign. -
getSchedule
The schedule settings for the treatment. -
setSchedule
The schedule settings for the treatment. -
setSchedule
The schedule settings for the treatment. -
getSegmentId
The unique identifier for the segment to associate with the campaign. -
setSegmentId
The unique identifier for the segment to associate with the campaign. -
getAdditionalTreatments
An array of requests that defines additional treatments for the campaign, in addition to the default treatment for the campaign. -
setAdditionalTreatments
An array of requests that defines additional treatments for the campaign, in addition to the default treatment for the campaign. -
setAdditionalTreatments
An array of requests that defines additional treatments for the campaign, in addition to the default treatment for the campaign. -
getCampaignHook
Specifies the Lambda function to use as a code hook for a campaign. -
setCampaignHook
Specifies the Lambda function to use as a code hook for a campaign. -
setCampaignHook
Specifies the Lambda function to use as a code hook for a campaign. -
getCustomDeliveryConfiguration
The delivery configuration settings for sending the treatment through a custom channel. -
setCustomDeliveryConfiguration
The delivery configuration settings for sending the treatment through a custom channel. -
setCustomDeliveryConfiguration
@Stability(Stable) public void setCustomDeliveryConfiguration(@Nullable CfnCampaign.CustomDeliveryConfigurationProperty value) The delivery configuration settings for sending the treatment through a custom channel. -
getDescription
A custom description of the campaign. -
setDescription
A custom description of the campaign. -
getHoldoutPercent
The allocated percentage of users (segment members) who shouldn't receive messages from the campaign. -
setHoldoutPercent
The allocated percentage of users (segment members) who shouldn't receive messages from the campaign. -
getIsPaused
Specifies whether to pause the campaign. -
setIsPaused
Specifies whether to pause the campaign. -
setIsPaused
Specifies whether to pause the campaign. -
getLimits
The messaging limits for the campaign. -
setLimits
The messaging limits for the campaign. -
setLimits
The messaging limits for the campaign. -
getMessageConfiguration
The message configuration settings for the treatment. -
setMessageConfiguration
The message configuration settings for the treatment. -
setMessageConfiguration
@Stability(Stable) public void setMessageConfiguration(@Nullable CfnCampaign.MessageConfigurationProperty value) The message configuration settings for the treatment. -
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. -
setPriority
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. -
getSegmentVersion
The version of the segment to associate with the campaign. -
setSegmentVersion
The version of the segment to associate with the campaign. -
getTagsRaw
An array of key-value pairs to apply to this resource. -
setTagsRaw
An array of key-value pairs to apply to this resource. -
getTemplateConfiguration
The message template to use for the treatment. -
setTemplateConfiguration
The message template to use for the treatment. -
setTemplateConfiguration
@Stability(Stable) public void setTemplateConfiguration(@Nullable CfnCampaign.TemplateConfigurationProperty value) The message template to use for the treatment. -
getTreatmentDescription
A custom description of the treatment. -
setTreatmentDescription
A custom description of the treatment. -
getTreatmentName
A custom name for the treatment. -
setTreatmentName
A custom name for the treatment.
-