CfnCampaignProps¶
-
class
aws_cdk.aws_pinpoint.
CfnCampaignProps
(*, application_id, message_configuration, name, schedule, segment_id, additional_treatments=None, campaign_hook=None, description=None, holdout_percent=None, is_paused=None, limits=None, priority=None, segment_version=None, tags=None, treatment_description=None, treatment_name=None)¶ Bases:
object
Properties for defining a
CfnCampaign
.- Parameters
application_id (
str
) – The unique identifier for the Amazon Pinpoint application that the campaign is associated with.message_configuration (
Union
[IResolvable
,MessageConfigurationProperty
]) – The message configuration settings for the campaign.name (
str
) – The name of the campaign.schedule (
Union
[IResolvable
,ScheduleProperty
]) – The schedule settings for the campaign.segment_id (
str
) – The unique identifier for the segment to associate with the campaign.additional_treatments (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,WriteTreatmentResourceProperty
]],None
]) – An array of requests that defines additional treatments for the campaign, in addition to the default treatment for the campaign.campaign_hook (
Union
[IResolvable
,CampaignHookProperty
,None
]) – Specifies the Lambda function to use as a code hook for a campaign.description (
Optional
[str
]) – A custom description of the campaign.holdout_percent (
Union
[int
,float
,None
]) – The allocated percentage of users (segment members) who shouldn’t receive messages from the campaign.is_paused (
Union
[bool
,IResolvable
,None
]) – Specifies whether to pause the campaign. A paused campaign doesn’t run unless you resume it by changing this value tofalse
. If you restart a campaign, the campaign restarts from the beginning and not at the point you paused it.limits (
Union
[IResolvable
,LimitsProperty
,None
]) – The messaging limits for the campaign.priority (
Union
[int
,float
,None
]) – 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.segment_version (
Union
[int
,float
,None
]) – The version of the segment to associate with the campaign.tags (
Optional
[Any
]) – An array of key-value pairs to apply to this resource. For more information, see Tag .treatment_description (
Optional
[str
]) – A custom description of the default treatment for the campaign.treatment_name (
Optional
[str
]) – A custom name of the default treatment for the campaign, if the campaign has multiple treatments. A treatment is a variation of a campaign that’s used for A/B testing.
- Link
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html
- ExampleMetadata
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_pinpoint as pinpoint # attributes: Any # custom_config: Any # metrics: Any # tags: Any cfn_campaign_props = pinpoint.CfnCampaignProps( application_id="applicationId", message_configuration=pinpoint.CfnCampaign.MessageConfigurationProperty( adm_message=pinpoint.CfnCampaign.MessageProperty( action="action", body="body", image_icon_url="imageIconUrl", image_small_icon_url="imageSmallIconUrl", image_url="imageUrl", json_body="jsonBody", media_url="mediaUrl", raw_content="rawContent", silent_push=False, time_to_live=123, title="title", url="url" ), apns_message=pinpoint.CfnCampaign.MessageProperty( action="action", body="body", image_icon_url="imageIconUrl", image_small_icon_url="imageSmallIconUrl", image_url="imageUrl", json_body="jsonBody", media_url="mediaUrl", raw_content="rawContent", silent_push=False, time_to_live=123, title="title", url="url" ), baidu_message=pinpoint.CfnCampaign.MessageProperty( action="action", body="body", image_icon_url="imageIconUrl", image_small_icon_url="imageSmallIconUrl", image_url="imageUrl", json_body="jsonBody", media_url="mediaUrl", raw_content="rawContent", silent_push=False, time_to_live=123, title="title", url="url" ), default_message=pinpoint.CfnCampaign.MessageProperty( action="action", body="body", image_icon_url="imageIconUrl", image_small_icon_url="imageSmallIconUrl", image_url="imageUrl", json_body="jsonBody", media_url="mediaUrl", raw_content="rawContent", silent_push=False, time_to_live=123, title="title", url="url" ), email_message=pinpoint.CfnCampaign.CampaignEmailMessageProperty( body="body", from_address="fromAddress", html_body="htmlBody", title="title" ), gcm_message=pinpoint.CfnCampaign.MessageProperty( action="action", body="body", image_icon_url="imageIconUrl", image_small_icon_url="imageSmallIconUrl", image_url="imageUrl", json_body="jsonBody", media_url="mediaUrl", raw_content="rawContent", silent_push=False, time_to_live=123, title="title", url="url" ), in_app_message=pinpoint.CfnCampaign.CampaignInAppMessageProperty( content=[pinpoint.CfnCampaign.InAppMessageContentProperty( background_color="backgroundColor", body_config=pinpoint.CfnCampaign.InAppMessageBodyConfigProperty( alignment="alignment", body="body", text_color="textColor" ), header_config=pinpoint.CfnCampaign.InAppMessageHeaderConfigProperty( alignment="alignment", header="header", text_color="textColor" ), image_url="imageUrl", primary_btn=pinpoint.CfnCampaign.InAppMessageButtonProperty( android=pinpoint.CfnCampaign.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ), default_config=pinpoint.CfnCampaign.DefaultButtonConfigurationProperty( background_color="backgroundColor", border_radius=123, button_action="buttonAction", link="link", text="text", text_color="textColor" ), ios=pinpoint.CfnCampaign.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ), web=pinpoint.CfnCampaign.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ) ), secondary_btn=pinpoint.CfnCampaign.InAppMessageButtonProperty( android=pinpoint.CfnCampaign.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ), default_config=pinpoint.CfnCampaign.DefaultButtonConfigurationProperty( background_color="backgroundColor", border_radius=123, button_action="buttonAction", link="link", text="text", text_color="textColor" ), ios=pinpoint.CfnCampaign.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ), web=pinpoint.CfnCampaign.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ) ) )], custom_config=custom_config, layout="layout" ), sms_message=pinpoint.CfnCampaign.CampaignSmsMessageProperty( body="body", entity_id="entityId", message_type="messageType", origination_number="originationNumber", sender_id="senderId", template_id="templateId" ) ), name="name", schedule=pinpoint.CfnCampaign.ScheduleProperty( end_time="endTime", event_filter=pinpoint.CfnCampaign.CampaignEventFilterProperty( dimensions=pinpoint.CfnCampaign.EventDimensionsProperty( attributes=attributes, event_type=pinpoint.CfnCampaign.SetDimensionProperty( dimension_type="dimensionType", values=["values"] ), metrics=metrics ), filter_type="filterType" ), frequency="frequency", is_local_time=False, quiet_time=pinpoint.CfnCampaign.QuietTimeProperty( end="end", start="start" ), start_time="startTime", time_zone="timeZone" ), segment_id="segmentId", # the properties below are optional additional_treatments=[pinpoint.CfnCampaign.WriteTreatmentResourceProperty( message_configuration=pinpoint.CfnCampaign.MessageConfigurationProperty( adm_message=pinpoint.CfnCampaign.MessageProperty( action="action", body="body", image_icon_url="imageIconUrl", image_small_icon_url="imageSmallIconUrl", image_url="imageUrl", json_body="jsonBody", media_url="mediaUrl", raw_content="rawContent", silent_push=False, time_to_live=123, title="title", url="url" ), apns_message=pinpoint.CfnCampaign.MessageProperty( action="action", body="body", image_icon_url="imageIconUrl", image_small_icon_url="imageSmallIconUrl", image_url="imageUrl", json_body="jsonBody", media_url="mediaUrl", raw_content="rawContent", silent_push=False, time_to_live=123, title="title", url="url" ), baidu_message=pinpoint.CfnCampaign.MessageProperty( action="action", body="body", image_icon_url="imageIconUrl", image_small_icon_url="imageSmallIconUrl", image_url="imageUrl", json_body="jsonBody", media_url="mediaUrl", raw_content="rawContent", silent_push=False, time_to_live=123, title="title", url="url" ), default_message=pinpoint.CfnCampaign.MessageProperty( action="action", body="body", image_icon_url="imageIconUrl", image_small_icon_url="imageSmallIconUrl", image_url="imageUrl", json_body="jsonBody", media_url="mediaUrl", raw_content="rawContent", silent_push=False, time_to_live=123, title="title", url="url" ), email_message=pinpoint.CfnCampaign.CampaignEmailMessageProperty( body="body", from_address="fromAddress", html_body="htmlBody", title="title" ), gcm_message=pinpoint.CfnCampaign.MessageProperty( action="action", body="body", image_icon_url="imageIconUrl", image_small_icon_url="imageSmallIconUrl", image_url="imageUrl", json_body="jsonBody", media_url="mediaUrl", raw_content="rawContent", silent_push=False, time_to_live=123, title="title", url="url" ), in_app_message=pinpoint.CfnCampaign.CampaignInAppMessageProperty( content=[pinpoint.CfnCampaign.InAppMessageContentProperty( background_color="backgroundColor", body_config=pinpoint.CfnCampaign.InAppMessageBodyConfigProperty( alignment="alignment", body="body", text_color="textColor" ), header_config=pinpoint.CfnCampaign.InAppMessageHeaderConfigProperty( alignment="alignment", header="header", text_color="textColor" ), image_url="imageUrl", primary_btn=pinpoint.CfnCampaign.InAppMessageButtonProperty( android=pinpoint.CfnCampaign.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ), default_config=pinpoint.CfnCampaign.DefaultButtonConfigurationProperty( background_color="backgroundColor", border_radius=123, button_action="buttonAction", link="link", text="text", text_color="textColor" ), ios=pinpoint.CfnCampaign.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ), web=pinpoint.CfnCampaign.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ) ), secondary_btn=pinpoint.CfnCampaign.InAppMessageButtonProperty( android=pinpoint.CfnCampaign.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ), default_config=pinpoint.CfnCampaign.DefaultButtonConfigurationProperty( background_color="backgroundColor", border_radius=123, button_action="buttonAction", link="link", text="text", text_color="textColor" ), ios=pinpoint.CfnCampaign.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ), web=pinpoint.CfnCampaign.OverrideButtonConfigurationProperty( button_action="buttonAction", link="link" ) ) )], custom_config=custom_config, layout="layout" ), sms_message=pinpoint.CfnCampaign.CampaignSmsMessageProperty( body="body", entity_id="entityId", message_type="messageType", origination_number="originationNumber", sender_id="senderId", template_id="templateId" ) ), schedule=pinpoint.CfnCampaign.ScheduleProperty( end_time="endTime", event_filter=pinpoint.CfnCampaign.CampaignEventFilterProperty( dimensions=pinpoint.CfnCampaign.EventDimensionsProperty( attributes=attributes, event_type=pinpoint.CfnCampaign.SetDimensionProperty( dimension_type="dimensionType", values=["values"] ), metrics=metrics ), filter_type="filterType" ), frequency="frequency", is_local_time=False, quiet_time=pinpoint.CfnCampaign.QuietTimeProperty( end="end", start="start" ), start_time="startTime", time_zone="timeZone" ), size_percent=123, treatment_description="treatmentDescription", treatment_name="treatmentName" )], campaign_hook=pinpoint.CfnCampaign.CampaignHookProperty( lambda_function_name="lambdaFunctionName", mode="mode", web_url="webUrl" ), description="description", holdout_percent=123, is_paused=False, limits=pinpoint.CfnCampaign.LimitsProperty( daily=123, maximum_duration=123, messages_per_second=123, session=123, total=123 ), priority=123, segment_version=123, tags=tags, treatment_description="treatmentDescription", treatment_name="treatmentName" )
Attributes
-
additional_treatments
¶ An array of requests that defines additional treatments for the campaign, in addition to the default treatment for the campaign.
- Link
- Return type
Union
[IResolvable
,List
[Union
[IResolvable
,WriteTreatmentResourceProperty
]],None
]
-
application_id
¶ The unique identifier for the Amazon Pinpoint application that the campaign is associated with.
-
campaign_hook
¶ Specifies the Lambda function to use as a code hook for a campaign.
-
description
¶ A custom description of the campaign.
-
holdout_percent
¶ The allocated percentage of users (segment members) who shouldn’t receive messages from the campaign.
- Link
- Return type
Union
[int
,float
,None
]
-
is_paused
¶ 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.- Link
- Return type
Union
[bool
,IResolvable
,None
]
-
limits
¶ The messaging limits for the campaign.
-
message_configuration
¶ 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.
If there are multiple messages scheduled to be displayed at the same time, the priority determines the order in which those messages are displayed.
- Link
- Return type
Union
[int
,float
,None
]
-
schedule
¶ The schedule settings for the campaign.
-
segment_id
¶ The unique identifier for the segment to associate with the campaign.
-
segment_version
¶ The version of the segment to associate with the campaign.
- Link
- Return type
Union
[int
,float
,None
]
An array of key-value pairs to apply to this resource.
For more information, see Tag .
-
treatment_description
¶ A custom description of the default treatment for the campaign.
-
treatment_name
¶ A custom name of the default treatment for the campaign, if the campaign has multiple treatments.
A treatment is a variation of a campaign that’s used for A/B testing.