Class CfnCampaign
Specifies the settings for a campaign.
Inherited Members
Namespace: Amazon.CDK.AWS.Pinpoint
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnCampaign : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnCampaign
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
A campaign is a messaging initiative that engages a specific segment of users for an Amazon Pinpoint application.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html
CloudformationResource: AWS::Pinpoint::Campaign
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(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 |
CfnCampaign(Construct, String, ICfnCampaignProps) |
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 | The delivery configuration settings for sending the treatment through a custom channel. |
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 treatment. |
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 treatment. |
SegmentId | The unique identifier for the segment to associate with the campaign. |
SegmentVersion | The version of the segment to associate with the campaign. |
Tags | Tag Manager which manages the tags for this resource. |
TagsRaw | An array of key-value pairs to apply to this resource. |
TemplateConfiguration | The message template to use for the treatment. |
TreatmentDescription | A custom description of the treatment. |
TreatmentName | A custom name for the treatment. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
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
CfnCampaign(Construct, String, ICfnCampaignProps)
public CfnCampaign(Construct scope, string id, ICfnCampaignProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnCampaignProps
Resource properties.
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
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
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
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
The delivery configuration settings for sending the treatment through a custom channel.
public virtual object CustomDeliveryConfiguration { get; set; }
Property Value
System.Object
Description
A custom description of the campaign.
public virtual string Description { get; set; }
Property Value
System.String
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>
IsPaused
Specifies whether to pause the campaign.
public virtual object IsPaused { get; set; }
Property Value
System.Object
Limits
The messaging limits for the campaign.
public virtual object Limits { get; set; }
Property Value
System.Object
MessageConfiguration
The message configuration settings for the treatment.
public virtual object MessageConfiguration { get; set; }
Property Value
System.Object
Name
The name of the campaign.
public virtual string Name { get; set; }
Property Value
System.String
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>
Schedule
The schedule settings for the treatment.
public virtual object Schedule { get; set; }
Property Value
System.Object
SegmentId
The unique identifier for the segment to associate with the campaign.
public virtual string SegmentId { get; set; }
Property Value
System.String
SegmentVersion
The version of the segment to associate with the campaign.
public virtual Nullable<double> SegmentVersion { get; set; }
Property Value
System.Nullable<System.Double>
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
An array of key-value pairs to apply to this resource.
public virtual object TagsRaw { get; set; }
Property Value
System.Object
TemplateConfiguration
The message template to use for the treatment.
public virtual object TemplateConfiguration { get; set; }
Property Value
System.Object
TreatmentDescription
A custom description of the treatment.
public virtual string TreatmentDescription { get; set; }
Property Value
System.String
TreatmentName
A custom name for the treatment.
public virtual string TreatmentName { get; set; }
Property Value
System.String
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>