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

  • 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]) – 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.

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

  • 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]) – The message template to use for the treatment.

  • treatment_description (Optional[str]) – A custom description of the treatment.

  • treatment_name (Optional[str]) – A custom name for the treatment.

See:

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.
from aws_cdk import 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.

See:

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.

See:

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.

See:

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

custom_delivery_configuration

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.

See:

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

description

A custom description of the campaign.

See:

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.

See:

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.

See:

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

limits

The messaging limits for the campaign.

See:

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

See:

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

name

The name of the campaign.

See:

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.

See:

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

schedule

The schedule settings for the treatment.

See:

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.

See:

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.

See:

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 .

See:

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

template_configuration

The message template to use for the treatment.

See:

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

treatment_description

A custom description of the treatment.

See:

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

treatment_name

A custom name for the treatment.

See:

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