Class CfnCampaign
A CloudFormation AWS::Pinpoint::Campaign
.
Inherited Members
Namespace: Amazon.CDK.AWS.Pinpoint
Assembly: Amazon.CDK.AWS.Pinpoint.dll
Syntax (csharp)
public class CfnCampaign : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnCampaign
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
Specifies the settings for a campaign. A campaign is a messaging initiative that engages a specific segment of users for an Amazon Pinpoint application.
CloudformationResource: AWS::Pinpoint::Campaign
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html
ExampleMetadata: fixture=_generated
Examples
// 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 tags;
var cfnCampaign = new CfnCampaign(this, "MyCfnCampaign", new CfnCampaignProps {
ApplicationId = "applicationId",
Name = "name",
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"
},
SegmentId = "segmentId",
// the properties below are optional
AdditionalTreatments = new [] { 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"
} },
CampaignHook = new CampaignHookProperty {
LambdaFunctionName = "lambdaFunctionName",
Mode = "mode",
WebUrl = "webUrl"
},
CustomDeliveryConfiguration = new CustomDeliveryConfigurationProperty {
DeliveryUri = "deliveryUri",
EndpointTypes = new [] { "endpointTypes" }
},
Description = "description",
HoldoutPercent = 123,
IsPaused = false,
Limits = new LimitsProperty {
Daily = 123,
MaximumDuration = 123,
MessagesPerSecond = 123,
Session = 123,
Total = 123
},
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"
}
},
Priority = 123,
SegmentVersion = 123,
Tags = tags,
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"
});
Synopsis
Constructors
CfnCampaign(Construct, String, ICfnCampaignProps) | Create a new |
CfnCampaign(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnCampaign(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AdditionalTreatments | An array of requests that defines additional treatments for the campaign, in addition to the default treatment for the campaign. |
ApplicationId | The unique identifier for the Amazon Pinpoint application that the campaign is associated with. |
AttrArn | The Amazon Resource Name (ARN) of the campaign. |
AttrCampaignId | The unique identifier for the campaign. |
CampaignHook | Specifies the Lambda function to use as a code hook for a campaign. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
CustomDeliveryConfiguration |
|
Description | A custom description of the campaign. |
HoldoutPercent | The allocated percentage of users (segment members) who shouldn't receive messages from the campaign. |
IsPaused | Specifies whether to pause the campaign. |
Limits | The messaging limits for the campaign. |
MessageConfiguration | The message configuration settings for the campaign. |
Name | The name of the campaign. |
Priority | 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. |
Schedule | The schedule settings for the campaign. |
SegmentId | The unique identifier for the segment to associate with the campaign. |
SegmentVersion | The version of the segment to associate with the campaign. |
Tags | An array of key-value pairs to apply to this resource. |
TemplateConfiguration |
|
TreatmentDescription | A custom description of the default treatment for the campaign. |
TreatmentName | A custom name of the default treatment for the campaign, if the campaign has multiple treatments. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnCampaign(Construct, String, ICfnCampaignProps)
Create a new AWS::Pinpoint::Campaign
.
public CfnCampaign(Construct scope, string id, ICfnCampaignProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnCampaignProps
- resource properties.
CfnCampaign(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnCampaign(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnCampaign(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnCampaign(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AdditionalTreatments
An array of requests that defines additional treatments for the campaign, in addition to the default treatment for the campaign.
public virtual object AdditionalTreatments { get; set; }
Property Value
System.Object
Remarks
ApplicationId
The unique identifier for the Amazon Pinpoint application that the campaign is associated with.
public virtual string ApplicationId { get; set; }
Property Value
System.String
Remarks
AttrArn
The Amazon Resource Name (ARN) of the campaign.
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Arn
AttrCampaignId
The unique identifier for the campaign.
public virtual string AttrCampaignId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: CampaignId
CampaignHook
Specifies the Lambda function to use as a code hook for a campaign.
public virtual object CampaignHook { get; set; }
Property Value
System.Object
Remarks
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
CustomDeliveryConfiguration
AWS::Pinpoint::Campaign.CustomDeliveryConfiguration
.
public virtual object CustomDeliveryConfiguration { get; set; }
Property Value
System.Object
Remarks
Description
A custom description of the campaign.
public virtual string Description { get; set; }
Property Value
System.String
Remarks
HoldoutPercent
The allocated percentage of users (segment members) who shouldn't receive messages from the campaign.
public virtual Nullable<double> HoldoutPercent { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
IsPaused
Specifies whether to pause the campaign.
public virtual object IsPaused { get; set; }
Property Value
System.Object
Remarks
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.
Limits
The messaging limits for the campaign.
public virtual object Limits { get; set; }
Property Value
System.Object
Remarks
MessageConfiguration
The message configuration settings for the campaign.
public virtual object MessageConfiguration { get; set; }
Property Value
System.Object
Remarks
Name
The name of the campaign.
public virtual string Name { get; set; }
Property Value
System.String
Remarks
Priority
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.
public virtual Nullable<double> Priority { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
If there are multiple messages scheduled to be displayed at the same time, the priority determines the order in which those messages are displayed.
Schedule
The schedule settings for the campaign.
public virtual object Schedule { get; set; }
Property Value
System.Object
Remarks
SegmentId
The unique identifier for the segment to associate with the campaign.
public virtual string SegmentId { get; set; }
Property Value
System.String
Remarks
SegmentVersion
The version of the segment to associate with the campaign.
public virtual Nullable<double> SegmentVersion { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Tags
An array of key-value pairs to apply to this resource.
public virtual TagManager Tags { get; }
Property Value
Remarks
For more information, see Tag .
TemplateConfiguration
AWS::Pinpoint::Campaign.TemplateConfiguration
.
public virtual object TemplateConfiguration { get; set; }
Property Value
System.Object
Remarks
TreatmentDescription
A custom description of the default treatment for the campaign.
public virtual string TreatmentDescription { get; set; }
Property Value
System.String
Remarks
TreatmentName
A custom name of the default treatment for the campaign, if the campaign has multiple treatments.
public virtual string TreatmentName { get; set; }
Property Value
System.String
Remarks
A treatment is a variation of a campaign that's used for A/B testing.
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>