Class: AWSCDK::Pinpoint::CfnCampaignProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Pinpoint::CfnCampaignProps
- Defined in:
- pinpoint/cfn_campaign_props.rb
Overview
Properties for defining a CfnCampaign.
Instance Attribute Summary collapse
-
#additional_treatments ⇒ AWSCDK::IResolvable, ...
readonly
An array of requests that defines additional treatments for the campaign, in addition to the default treatment for the campaign.
-
#application_id ⇒ String
readonly
The unique identifier for the Amazon Pinpoint application that the campaign is associated with.
-
#campaign_hook ⇒ AWSCDK::IResolvable, ...
readonly
Specifies the Lambda function to use as a code hook for a campaign.
-
#custom_delivery_configuration ⇒ AWSCDK::IResolvable, ...
readonly
The delivery configuration settings for sending the treatment through a custom channel.
-
#description ⇒ String?
readonly
A custom description of the campaign.
-
#holdout_percent ⇒ Numeric?
readonly
The allocated percentage of users (segment members) who shouldn't receive messages from the campaign.
-
#is_paused ⇒ Boolean, ...
readonly
Specifies whether to pause the campaign.
-
#limits ⇒ AWSCDK::IResolvable, ...
readonly
The messaging limits for the campaign.
-
#message_configuration ⇒ AWSCDK::IResolvable, ...
readonly
The message configuration settings for the treatment.
-
#name ⇒ String
readonly
The name of the campaign.
-
#priority ⇒ Numeric?
readonly
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 ⇒ AWSCDK::IResolvable, AWSCDK::Pinpoint::CfnCampaign::ScheduleProperty
readonly
The schedule settings for the treatment.
-
#segment_id ⇒ String
readonly
The unique identifier for the segment to associate with the campaign.
-
#segment_version ⇒ Numeric?
readonly
The version of the segment to associate with the campaign.
-
#tags ⇒ Object?
readonly
An array of key-value pairs to apply to this resource.
-
#template_configuration ⇒ AWSCDK::IResolvable, ...
readonly
The message template to use for the treatment.
-
#treatment_description ⇒ String?
readonly
A custom description of the treatment.
-
#treatment_name ⇒ String?
readonly
A custom name for the treatment.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(application_id:, name:, schedule:, segment_id:, additional_treatments: nil, campaign_hook: nil, custom_delivery_configuration: nil, description: nil, holdout_percent: nil, is_paused: nil, limits: nil, message_configuration: nil, priority: nil, segment_version: nil, tags: nil, template_configuration: nil, treatment_description: nil, treatment_name: nil) ⇒ CfnCampaignProps
constructor
A new instance of CfnCampaignProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(application_id:, name:, schedule:, segment_id:, additional_treatments: nil, campaign_hook: nil, custom_delivery_configuration: nil, description: nil, holdout_percent: nil, is_paused: nil, limits: nil, message_configuration: nil, priority: nil, segment_version: nil, tags: nil, template_configuration: nil, treatment_description: nil, treatment_name: nil) ⇒ CfnCampaignProps
Returns a new instance of CfnCampaignProps.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'pinpoint/cfn_campaign_props.rb', line 27 def initialize(application_id:, name:, schedule:, segment_id:, additional_treatments: nil, campaign_hook: nil, custom_delivery_configuration: nil, description: nil, holdout_percent: nil, is_paused: nil, limits: nil, message_configuration: nil, priority: nil, segment_version: nil, tags: nil, template_configuration: nil, treatment_description: nil, treatment_name: nil) @application_id = application_id Jsii::Type.check_type(@application_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "applicationId") @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") @schedule = schedule.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnCampaign::ScheduleProperty.new(**schedule.transform_keys(&:to_sym)) : schedule Jsii::Type.check_type(@schedule, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5DYW1wYWlnbi5TY2hlZHVsZVByb3BlcnR5In1dfX0=")), "schedule") @segment_id = segment_id Jsii::Type.check_type(@segment_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "segmentId") @additional_treatments = additional_treatments Jsii::Type.check_type(@additional_treatments, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcGlucG9pbnQuQ2ZuQ2FtcGFpZ24uV3JpdGVUcmVhdG1lbnRSZXNvdXJjZVByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "additionalTreatments") unless @additional_treatments.nil? @campaign_hook = campaign_hook.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnCampaign::CampaignHookProperty.new(**campaign_hook.transform_keys(&:to_sym)) : campaign_hook Jsii::Type.check_type(@campaign_hook, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5DYW1wYWlnbi5DYW1wYWlnbkhvb2tQcm9wZXJ0eSJ9XX19")), "campaignHook") unless @campaign_hook.nil? @custom_delivery_configuration = custom_delivery_configuration.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnCampaign::CustomDeliveryConfigurationProperty.new(**custom_delivery_configuration.transform_keys(&:to_sym)) : custom_delivery_configuration Jsii::Type.check_type(@custom_delivery_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5DYW1wYWlnbi5DdXN0b21EZWxpdmVyeUNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "customDeliveryConfiguration") unless @custom_delivery_configuration.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @holdout_percent = holdout_percent Jsii::Type.check_type(@holdout_percent, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "holdoutPercent") unless @holdout_percent.nil? @is_paused = is_paused Jsii::Type.check_type(@is_paused, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "isPaused") unless @is_paused.nil? @limits = limits.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnCampaign::LimitsProperty.new(**limits.transform_keys(&:to_sym)) : limits Jsii::Type.check_type(@limits, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5DYW1wYWlnbi5MaW1pdHNQcm9wZXJ0eSJ9XX19")), "limits") unless @limits.nil? @message_configuration = .is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnCampaign::MessageConfigurationProperty.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@message_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5DYW1wYWlnbi5NZXNzYWdlQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "messageConfiguration") unless @message_configuration.nil? @priority = priority Jsii::Type.check_type(@priority, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "priority") unless @priority.nil? @segment_version = segment_version Jsii::Type.check_type(@segment_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "segmentVersion") unless @segment_version.nil? @tags = Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "tags") unless @tags.nil? @template_configuration = template_configuration.is_a?(Hash) ? ::AWSCDK::Pinpoint::CfnCampaign::TemplateConfigurationProperty.new(**template_configuration.transform_keys(&:to_sym)) : template_configuration Jsii::Type.check_type(@template_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waW5wb2ludC5DZm5DYW1wYWlnbi5UZW1wbGF0ZUNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "templateConfiguration") unless @template_configuration.nil? @treatment_description = treatment_description Jsii::Type.check_type(@treatment_description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "treatmentDescription") unless @treatment_description.nil? @treatment_name = treatment_name Jsii::Type.check_type(@treatment_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "treatmentName") unless @treatment_name.nil? end |
Instance Attribute Details
#additional_treatments ⇒ AWSCDK::IResolvable, ... (readonly)
An array of requests that defines additional treatments for the campaign, in addition to the default treatment for the campaign.
90 91 92 |
# File 'pinpoint/cfn_campaign_props.rb', line 90 def additional_treatments @additional_treatments end |
#application_id ⇒ String (readonly)
The unique identifier for the Amazon Pinpoint application that the campaign is associated with.
70 71 72 |
# File 'pinpoint/cfn_campaign_props.rb', line 70 def application_id @application_id end |
#campaign_hook ⇒ AWSCDK::IResolvable, ... (readonly)
Specifies the Lambda function to use as a code hook for a campaign.
95 96 97 |
# File 'pinpoint/cfn_campaign_props.rb', line 95 def campaign_hook @campaign_hook end |
#custom_delivery_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
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.
102 103 104 |
# File 'pinpoint/cfn_campaign_props.rb', line 102 def custom_delivery_configuration @custom_delivery_configuration end |
#description ⇒ String? (readonly)
A custom description of the campaign.
107 108 109 |
# File 'pinpoint/cfn_campaign_props.rb', line 107 def description @description end |
#holdout_percent ⇒ Numeric? (readonly)
The allocated percentage of users (segment members) who shouldn't receive messages from the campaign.
112 113 114 |
# File 'pinpoint/cfn_campaign_props.rb', line 112 def holdout_percent @holdout_percent end |
#is_paused ⇒ Boolean, ... (readonly)
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.
119 120 121 |
# File 'pinpoint/cfn_campaign_props.rb', line 119 def is_paused @is_paused end |
#limits ⇒ AWSCDK::IResolvable, ... (readonly)
The messaging limits for the campaign.
124 125 126 |
# File 'pinpoint/cfn_campaign_props.rb', line 124 def limits @limits end |
#message_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
The message configuration settings for the treatment.
129 130 131 |
# File 'pinpoint/cfn_campaign_props.rb', line 129 def @message_configuration end |
#name ⇒ String (readonly)
The name of the campaign.
75 76 77 |
# File 'pinpoint/cfn_campaign_props.rb', line 75 def name @name end |
#priority ⇒ Numeric? (readonly)
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.
136 137 138 |
# File 'pinpoint/cfn_campaign_props.rb', line 136 def priority @priority end |
#schedule ⇒ AWSCDK::IResolvable, AWSCDK::Pinpoint::CfnCampaign::ScheduleProperty (readonly)
The schedule settings for the treatment.
80 81 82 |
# File 'pinpoint/cfn_campaign_props.rb', line 80 def schedule @schedule end |
#segment_id ⇒ String (readonly)
The unique identifier for the segment to associate with the campaign.
85 86 87 |
# File 'pinpoint/cfn_campaign_props.rb', line 85 def segment_id @segment_id end |
#segment_version ⇒ Numeric? (readonly)
The version of the segment to associate with the campaign.
141 142 143 |
# File 'pinpoint/cfn_campaign_props.rb', line 141 def segment_version @segment_version end |
#tags ⇒ Object? (readonly)
An array of key-value pairs to apply to this resource.
For more information, see Tag .
148 149 150 |
# File 'pinpoint/cfn_campaign_props.rb', line 148 def @tags end |
#template_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
The message template to use for the treatment.
153 154 155 |
# File 'pinpoint/cfn_campaign_props.rb', line 153 def template_configuration @template_configuration end |
#treatment_description ⇒ String? (readonly)
A custom description of the treatment.
158 159 160 |
# File 'pinpoint/cfn_campaign_props.rb', line 158 def treatment_description @treatment_description end |
#treatment_name ⇒ String? (readonly)
A custom name for the treatment.
163 164 165 |
# File 'pinpoint/cfn_campaign_props.rb', line 163 def treatment_name @treatment_name end |
Class Method Details
.jsii_properties ⇒ Object
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
# File 'pinpoint/cfn_campaign_props.rb', line 165 def self.jsii_properties { :application_id => "applicationId", :name => "name", :schedule => "schedule", :segment_id => "segmentId", :additional_treatments => "additionalTreatments", :campaign_hook => "campaignHook", :custom_delivery_configuration => "customDeliveryConfiguration", :description => "description", :holdout_percent => "holdoutPercent", :is_paused => "isPaused", :limits => "limits", :message_configuration => "messageConfiguration", :priority => "priority", :segment_version => "segmentVersion", :tags => "tags", :template_configuration => "templateConfiguration", :treatment_description => "treatmentDescription", :treatment_name => "treatmentName", } end |
Instance Method Details
#to_jsii ⇒ Object
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'pinpoint/cfn_campaign_props.rb', line 188 def to_jsii result = {} result.merge!({ "applicationId" => @application_id, "name" => @name, "schedule" => @schedule, "segmentId" => @segment_id, "additionalTreatments" => @additional_treatments, "campaignHook" => @campaign_hook, "customDeliveryConfiguration" => @custom_delivery_configuration, "description" => @description, "holdoutPercent" => @holdout_percent, "isPaused" => @is_paused, "limits" => @limits, "messageConfiguration" => @message_configuration, "priority" => @priority, "segmentVersion" => @segment_version, "tags" => @tags, "templateConfiguration" => @template_configuration, "treatmentDescription" => @treatment_description, "treatmentName" => @treatment_name, }) result.compact end |