CfnCampaignProps

class aws_cdk.aws_pinpoint.CfnCampaignProps(*, application_id, name, schedule, segment_id, additional_treatments=None, campaign_hook=None, custom_delivery_configuration=None, description=None, holdout_percent=None, is_paused=None, limits=None, message_configuration=None, priority=None, segment_version=None, tags=None, template_configuration=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.

  • name (str) – The name of the campaign.

  • schedule (Union[IResolvable, ScheduleProperty, Dict[str, Any]]) – 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, Dict[str, Any]]], 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, Dict[str, Any], None]) – Specifies the Lambda function to use as a code hook for a campaign.

  • custom_delivery_configuration (Union[IResolvable, CustomDeliveryConfigurationProperty, Dict[str, Any], None]) – AWS::Pinpoint::Campaign.CustomDeliveryConfiguration.

  • 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 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 (Union[IResolvable, LimitsProperty, Dict[str, Any], None]) – The messaging limits for the campaign.

  • message_configuration (Union[IResolvable, MessageConfigurationProperty, Dict[str, Any], None]) – The message configuration settings 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 .

  • template_configuration (Union[IResolvable, TemplateConfigurationProperty, Dict[str, Any], None]) – AWS::Pinpoint::Campaign.TemplateConfiguration.

  • 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",
    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(
        custom_delivery_configuration=pinpoint.CfnCampaign.CustomDeliveryConfigurationProperty(
            delivery_uri="deliveryUri",
            endpoint_types=["endpointTypes"]
        ),
        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"
            ),
            custom_message=pinpoint.CfnCampaign.CampaignCustomMessageProperty(
                data="data"
            ),
            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,
        template_configuration=pinpoint.CfnCampaign.TemplateConfigurationProperty(
            email_template=pinpoint.CfnCampaign.TemplateProperty(
                name="name",
                version="version"
            ),
            push_template=pinpoint.CfnCampaign.TemplateProperty(
                name="name",
                version="version"
            ),
            sms_template=pinpoint.CfnCampaign.TemplateProperty(
                name="name",
                version="version"
            ),
            voice_template=pinpoint.CfnCampaign.TemplateProperty(
                name="name",
                version="version"
            )
        ),
        treatment_description="treatmentDescription",
        treatment_name="treatmentName"
    )],
    campaign_hook=pinpoint.CfnCampaign.CampaignHookProperty(
        lambda_function_name="lambdaFunctionName",
        mode="mode",
        web_url="webUrl"
    ),
    custom_delivery_configuration=pinpoint.CfnCampaign.CustomDeliveryConfigurationProperty(
        delivery_uri="deliveryUri",
        endpoint_types=["endpointTypes"]
    ),
    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
    ),
    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"
        ),
        custom_message=pinpoint.CfnCampaign.CampaignCustomMessageProperty(
            data="data"
        ),
        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"
        )
    ),
    priority=123,
    segment_version=123,
    tags=tags,
    template_configuration=pinpoint.CfnCampaign.TemplateConfigurationProperty(
        email_template=pinpoint.CfnCampaign.TemplateProperty(
            name="name",
            version="version"
        ),
        push_template=pinpoint.CfnCampaign.TemplateProperty(
            name="name",
            version="version"
        ),
        sms_template=pinpoint.CfnCampaign.TemplateProperty(
            name="name",
            version="version"
        ),
        voice_template=pinpoint.CfnCampaign.TemplateProperty(
            name="name",
            version="version"
        )
    ),
    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:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-additionaltreatments

application_id

The unique identifier for the Amazon Pinpoint application that the campaign is associated with.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-applicationid

campaign_hook

Specifies the Lambda function to use as a code hook for a campaign.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-campaignhook

custom_delivery_configuration

AWS::Pinpoint::Campaign.CustomDeliveryConfiguration.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-customdeliveryconfiguration

description

A custom description of the campaign.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-description

holdout_percent

The allocated percentage of users (segment members) who shouldn’t receive messages from the campaign.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-holdoutpercent

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. 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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-ispaused

limits

The messaging limits for the campaign.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-limits

message_configuration

The message configuration settings for the campaign.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-messageconfiguration

name

The name of the campaign.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-name

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:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-priority

schedule

The schedule settings for the campaign.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-schedule

segment_id

The unique identifier for the segment to associate with the campaign.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-segmentid

segment_version

The version of the segment to associate with the campaign.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-segmentversion

tags

An array of key-value pairs to apply to this resource.

For more information, see Tag .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-tags

template_configuration

AWS::Pinpoint::Campaign.TemplateConfiguration.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-templateconfiguration

treatment_description

A custom description of the default treatment for the campaign.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-treatmentdescription

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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-treatmentname