You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::Pinpoint::Types::WriteCampaignRequest

Inherits:
Struct
  • Object
show all
Defined in:
(unknown)

Overview

Note:

When passing WriteCampaignRequest as input to an Aws::Client method, you can use a vanilla Hash:

{
  additional_treatments: [
    {
      message_configuration: {
        adm_message: {
          action: "OPEN_APP", # accepts OPEN_APP, DEEP_LINK, URL
          body: "__string",
          image_icon_url: "__string",
          image_small_icon_url: "__string",
          image_url: "__string",
          json_body: "__string",
          media_url: "__string",
          raw_content: "__string",
          silent_push: false,
          time_to_live: 1,
          title: "__string",
          url: "__string",
        },
        apns_message: {
          action: "OPEN_APP", # accepts OPEN_APP, DEEP_LINK, URL
          body: "__string",
          image_icon_url: "__string",
          image_small_icon_url: "__string",
          image_url: "__string",
          json_body: "__string",
          media_url: "__string",
          raw_content: "__string",
          silent_push: false,
          time_to_live: 1,
          title: "__string",
          url: "__string",
        },
        baidu_message: {
          action: "OPEN_APP", # accepts OPEN_APP, DEEP_LINK, URL
          body: "__string",
          image_icon_url: "__string",
          image_small_icon_url: "__string",
          image_url: "__string",
          json_body: "__string",
          media_url: "__string",
          raw_content: "__string",
          silent_push: false,
          time_to_live: 1,
          title: "__string",
          url: "__string",
        },
        default_message: {
          action: "OPEN_APP", # accepts OPEN_APP, DEEP_LINK, URL
          body: "__string",
          image_icon_url: "__string",
          image_small_icon_url: "__string",
          image_url: "__string",
          json_body: "__string",
          media_url: "__string",
          raw_content: "__string",
          silent_push: false,
          time_to_live: 1,
          title: "__string",
          url: "__string",
        },
        email_message: {
          body: "__string",
          from_address: "__string",
          html_body: "__string",
          title: "__string", # required
        },
        gcm_message: {
          action: "OPEN_APP", # accepts OPEN_APP, DEEP_LINK, URL
          body: "__string",
          image_icon_url: "__string",
          image_small_icon_url: "__string",
          image_url: "__string",
          json_body: "__string",
          media_url: "__string",
          raw_content: "__string",
          silent_push: false,
          time_to_live: 1,
          title: "__string",
          url: "__string",
        },
        sms_message: {
          body: "__string",
          message_type: "TRANSACTIONAL", # accepts TRANSACTIONAL, PROMOTIONAL
          sender_id: "__string",
        },
      },
      schedule: {
        end_time: "__string",
        event_filter: {
          dimensions: { # required
            attributes: {
              "__string" => {
                attribute_type: "INCLUSIVE", # accepts INCLUSIVE, EXCLUSIVE
                values: ["__string"], # required
              },
            },
            event_type: {
              dimension_type: "INCLUSIVE", # accepts INCLUSIVE, EXCLUSIVE
              values: ["__string"], # required
            },
            metrics: {
              "__string" => {
                comparison_operator: "__string", # required
                value: 1.0, # required
              },
            },
          },
          filter_type: "SYSTEM", # required, accepts SYSTEM, ENDPOINT
        },
        frequency: "ONCE", # accepts ONCE, HOURLY, DAILY, WEEKLY, MONTHLY, EVENT
        is_local_time: false,
        quiet_time: {
          end: "__string",
          start: "__string",
        },
        start_time: "__string", # required
        timezone: "__string",
      },
      size_percent: 1, # required
      treatment_description: "__string",
      treatment_name: "__string",
    },
  ],
  description: "__string",
  holdout_percent: 1,
  hook: {
    lambda_function_name: "__string",
    mode: "DELIVERY", # accepts DELIVERY, FILTER
    web_url: "__string",
  },
  is_paused: false,
  limits: {
    daily: 1,
    maximum_duration: 1,
    messages_per_second: 1,
    total: 1,
  },
  message_configuration: {
    adm_message: {
      action: "OPEN_APP", # accepts OPEN_APP, DEEP_LINK, URL
      body: "__string",
      image_icon_url: "__string",
      image_small_icon_url: "__string",
      image_url: "__string",
      json_body: "__string",
      media_url: "__string",
      raw_content: "__string",
      silent_push: false,
      time_to_live: 1,
      title: "__string",
      url: "__string",
    },
    apns_message: {
      action: "OPEN_APP", # accepts OPEN_APP, DEEP_LINK, URL
      body: "__string",
      image_icon_url: "__string",
      image_small_icon_url: "__string",
      image_url: "__string",
      json_body: "__string",
      media_url: "__string",
      raw_content: "__string",
      silent_push: false,
      time_to_live: 1,
      title: "__string",
      url: "__string",
    },
    baidu_message: {
      action: "OPEN_APP", # accepts OPEN_APP, DEEP_LINK, URL
      body: "__string",
      image_icon_url: "__string",
      image_small_icon_url: "__string",
      image_url: "__string",
      json_body: "__string",
      media_url: "__string",
      raw_content: "__string",
      silent_push: false,
      time_to_live: 1,
      title: "__string",
      url: "__string",
    },
    default_message: {
      action: "OPEN_APP", # accepts OPEN_APP, DEEP_LINK, URL
      body: "__string",
      image_icon_url: "__string",
      image_small_icon_url: "__string",
      image_url: "__string",
      json_body: "__string",
      media_url: "__string",
      raw_content: "__string",
      silent_push: false,
      time_to_live: 1,
      title: "__string",
      url: "__string",
    },
    email_message: {
      body: "__string",
      from_address: "__string",
      html_body: "__string",
      title: "__string", # required
    },
    gcm_message: {
      action: "OPEN_APP", # accepts OPEN_APP, DEEP_LINK, URL
      body: "__string",
      image_icon_url: "__string",
      image_small_icon_url: "__string",
      image_url: "__string",
      json_body: "__string",
      media_url: "__string",
      raw_content: "__string",
      silent_push: false,
      time_to_live: 1,
      title: "__string",
      url: "__string",
    },
    sms_message: {
      body: "__string",
      message_type: "TRANSACTIONAL", # accepts TRANSACTIONAL, PROMOTIONAL
      sender_id: "__string",
    },
  },
  name: "__string",
  schedule: {
    end_time: "__string",
    event_filter: {
      dimensions: { # required
        attributes: {
          "__string" => {
            attribute_type: "INCLUSIVE", # accepts INCLUSIVE, EXCLUSIVE
            values: ["__string"], # required
          },
        },
        event_type: {
          dimension_type: "INCLUSIVE", # accepts INCLUSIVE, EXCLUSIVE
          values: ["__string"], # required
        },
        metrics: {
          "__string" => {
            comparison_operator: "__string", # required
            value: 1.0, # required
          },
        },
      },
      filter_type: "SYSTEM", # required, accepts SYSTEM, ENDPOINT
    },
    frequency: "ONCE", # accepts ONCE, HOURLY, DAILY, WEEKLY, MONTHLY, EVENT
    is_local_time: false,
    quiet_time: {
      end: "__string",
      start: "__string",
    },
    start_time: "__string", # required
    timezone: "__string",
  },
  segment_id: "__string",
  segment_version: 1,
  tags: {
    "__string" => "__string",
  },
  treatment_description: "__string",
  treatment_name: "__string",
}

Specifies the configuration and other settings for a campaign.

Returned by:

Instance Attribute Summary collapse

Instance Attribute Details

#additional_treatmentsArray<Types::WriteTreatmentResource>

An array of requests that defines additional treatments for the campaign, in addition to the default treatment for the campaign.

Returns:

  • (Array<Types::WriteTreatmentResource>)

    An array of requests that defines additional treatments for the campaign, in addition to the default treatment for the campaign.

#descriptionString

The custom description of the campaign.

Returns:

  • (String)

    The custom description of the campaign.

#holdout_percentInteger

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

Returns:

  • (Integer)

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

#hookTypes::CampaignHook

The settings for the AWS Lambda function to use as a code hook for the campaign.

Returns:

  • (Types::CampaignHook)

    The settings for the AWS Lambda function to use as a code hook for the campaign.

#is_pausedBoolean

Specifies whether to pause the campaign. A paused campaign doesn\'t run unless you resume it by setting this value to false.

Returns:

  • (Boolean)

    Specifies whether to pause the campaign.

#limitsTypes::CampaignLimits

The messaging limits for the campaign.

Returns:

#message_configurationTypes::MessageConfiguration

The message configuration settings for the campaign.

Returns:

#nameString

The custom name of the campaign.

Returns:

  • (String)

    The custom name of the campaign.

#scheduleTypes::Schedule

The schedule settings for the campaign.

Returns:

#segment_idString

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

Returns:

  • (String)

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

#segment_versionInteger

The version of the segment to associate with the campaign.

Returns:

  • (Integer)

    The version of the segment to associate with the campaign.

#tagsHash<String,String>

A string-to-string map of key-value pairs that defines the tags to associate with the campaign. Each tag consists of a required tag key and an associated tag value.

Returns:

  • (Hash<String,String>)

    A string-to-string map of key-value pairs that defines the tags to associate with the campaign.

#treatment_descriptionString

The custom description of a variation of the campaign to use for A/B testing.

Returns:

  • (String)

    The custom description of a variation of the campaign to use for A/B testing.

#treatment_nameString

The custom name of a variation of the campaign to use for A/B testing.

Returns:

  • (String)

    The custom name of a variation of the campaign to use for A/B testing.