Pinpoint

Table of Contents

Client

class Pinpoint.Client

A low-level client representing Amazon Pinpoint:

import boto3

client = boto3.client('pinpoint')

These are the available methods:

can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
create_app(**kwargs)

Creates or updates an app.

See also: AWS API Documentation

Request Syntax

response = client.create_app(
    CreateApplicationRequest={
        'Name': 'string'
    }
)
Parameters
CreateApplicationRequest (dict) --

[REQUIRED] Application Request.

  • Name (string) -- The display name of the application. Used in the Amazon Pinpoint console.
Return type
dict
Returns
Response Syntax
{
    'ApplicationResponse': {
        'Id': 'string',
        'Name': 'string'
    }
}

Response Structure

  • (dict) -- 201 response
    • ApplicationResponse (dict) -- Application Response.
      • Id (string) -- The unique application ID.
      • Name (string) -- The display name of the application.
create_campaign(**kwargs)

Creates or updates a campaign.

See also: AWS API Documentation

Request Syntax

response = client.create_campaign(
    ApplicationId='string',
    WriteCampaignRequest={
        'AdditionalTreatments': [
            {
                'MessageConfiguration': {
                    'ADMMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'APNSMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'BaiduMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'DefaultMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'EmailMessage': {
                        'Body': 'string',
                        'FromAddress': 'string',
                        'HtmlBody': 'string',
                        'Title': 'string'
                    },
                    'GCMMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'SMSMessage': {
                        'Body': 'string',
                        'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL',
                        'SenderId': 'string'
                    }
                },
                'Schedule': {
                    'EndTime': 'string',
                    'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY',
                    'IsLocalTime': True|False,
                    'QuietTime': {
                        'End': 'string',
                        'Start': 'string'
                    },
                    'StartTime': 'string',
                    'Timezone': 'string'
                },
                'SizePercent': 123,
                'TreatmentDescription': 'string',
                'TreatmentName': 'string'
            },
        ],
        'Description': 'string',
        'HoldoutPercent': 123,
        'Hook': {
            'LambdaFunctionName': 'string',
            'Mode': 'DELIVERY'|'FILTER',
            'WebUrl': 'string'
        },
        'IsPaused': True|False,
        'Limits': {
            'Daily': 123,
            'MaximumDuration': 123,
            'MessagesPerSecond': 123,
            'Total': 123
        },
        'MessageConfiguration': {
            'ADMMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'APNSMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'BaiduMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'DefaultMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'EmailMessage': {
                'Body': 'string',
                'FromAddress': 'string',
                'HtmlBody': 'string',
                'Title': 'string'
            },
            'GCMMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'SMSMessage': {
                'Body': 'string',
                'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL',
                'SenderId': 'string'
            }
        },
        'Name': 'string',
        'Schedule': {
            'EndTime': 'string',
            'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY',
            'IsLocalTime': True|False,
            'QuietTime': {
                'End': 'string',
                'Start': 'string'
            },
            'StartTime': 'string',
            'Timezone': 'string'
        },
        'SegmentId': 'string',
        'SegmentVersion': 123,
        'TreatmentDescription': 'string',
        'TreatmentName': 'string'
    }
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • WriteCampaignRequest (dict) --

    [REQUIRED] Used to create a campaign.

    • AdditionalTreatments (list) -- Treatments that are defined in addition to the default treatment.
      • (dict) -- Used to create a campaign treatment.
        • MessageConfiguration (dict) -- The message configuration settings.
          • ADMMessage (dict) -- The message that the campaign delivers to ADM channels. Overrides the default message.
            • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
            • Body (string) -- The message body. Can include up to 140 characters.
            • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl (string) -- The URL that points to an image used in the push notification.
            • JsonBody (string) -- The JSON payload used for a silent push.
            • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
            • Title (string) -- The message title that displays above the message on the user's device.
            • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
          • APNSMessage (dict) -- The message that the campaign delivers to APNS channels. Overrides the default message.
            • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
            • Body (string) -- The message body. Can include up to 140 characters.
            • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl (string) -- The URL that points to an image used in the push notification.
            • JsonBody (string) -- The JSON payload used for a silent push.
            • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
            • Title (string) -- The message title that displays above the message on the user's device.
            • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
          • BaiduMessage (dict) -- The message that the campaign delivers to Baidu channels. Overrides the default message.
            • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
            • Body (string) -- The message body. Can include up to 140 characters.
            • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl (string) -- The URL that points to an image used in the push notification.
            • JsonBody (string) -- The JSON payload used for a silent push.
            • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
            • Title (string) -- The message title that displays above the message on the user's device.
            • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
          • DefaultMessage (dict) -- The default message for all channels.
            • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
            • Body (string) -- The message body. Can include up to 140 characters.
            • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl (string) -- The URL that points to an image used in the push notification.
            • JsonBody (string) -- The JSON payload used for a silent push.
            • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
            • Title (string) -- The message title that displays above the message on the user's device.
            • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
          • EmailMessage (dict) -- The email message configuration.
            • Body (string) -- The email text body.
            • FromAddress (string) -- The email address used to send the email from. Defaults to use FromAddress specified in the Email Channel.
            • HtmlBody (string) -- The email html body.
            • Title (string) -- The email title (Or subject).
          • GCMMessage (dict) -- The message that the campaign delivers to GCM channels. Overrides the default message.
            • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
            • Body (string) -- The message body. Can include up to 140 characters.
            • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl (string) -- The URL that points to an image used in the push notification.
            • JsonBody (string) -- The JSON payload used for a silent push.
            • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
            • Title (string) -- The message title that displays above the message on the user's device.
            • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
          • SMSMessage (dict) -- The SMS message configuration.
            • Body (string) -- The SMS text body.
            • MessageType (string) -- Is this is a transactional SMS message, otherwise a promotional message.
            • SenderId (string) -- Sender ID of sent message.
        • Schedule (dict) -- The campaign schedule.
          • EndTime (string) -- The scheduled time that the campaign ends in ISO 8601 format.
          • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY
          • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.
          • QuietTime (dict) -- The time during which the campaign sends no messages.
            • End (string) -- The default end time for quiet time in ISO 8601 format.
            • Start (string) -- The default start time for quiet time in ISO 8601 format.
          • StartTime (string) -- The scheduled time that the campaign begins in ISO 8601 format.
          • Timezone (string) -- The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
        • SizePercent (integer) -- The allocated percentage of users for this treatment.
        • TreatmentDescription (string) -- A custom description for the treatment.
        • TreatmentName (string) -- The custom name of a variation of the campaign used for A/B testing.
    • Description (string) -- A description of the campaign.
    • HoldoutPercent (integer) -- The allocated percentage of end users who will not receive messages from this campaign.
    • Hook (dict) -- Campaign hook information.
      • LambdaFunctionName (string) -- Lambda function name or arn to be called for delivery
      • Mode (string) -- What mode Lambda should be invoked in.
      • WebUrl (string) -- Web URL to call for hook. If the URL has authentication specified it will be added as authentication to the request
    • IsPaused (boolean) -- Indicates whether the campaign is paused. A paused campaign does not send messages unless you resume it by setting IsPaused to false.
    • Limits (dict) -- The campaign limits settings.
      • Daily (integer) -- The maximum number of messages that the campaign can send daily.
      • MaximumDuration (integer) -- The length of time (in seconds) that the campaign can run before it ends and message deliveries stop. This duration begins at the scheduled start time for the campaign. The minimum value is 60.
      • MessagesPerSecond (integer) -- The number of messages that the campaign can send per second. The minimum value is 50, and the maximum is 20000.
      • Total (integer) -- The maximum total number of messages that the campaign can send.
    • MessageConfiguration (dict) -- The message configuration settings.
      • ADMMessage (dict) -- The message that the campaign delivers to ADM channels. Overrides the default message.
        • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
        • Body (string) -- The message body. Can include up to 140 characters.
        • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
        • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
        • ImageUrl (string) -- The URL that points to an image used in the push notification.
        • JsonBody (string) -- The JSON payload used for a silent push.
        • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
        • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
        • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
        • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
        • Title (string) -- The message title that displays above the message on the user's device.
        • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
      • APNSMessage (dict) -- The message that the campaign delivers to APNS channels. Overrides the default message.
        • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
        • Body (string) -- The message body. Can include up to 140 characters.
        • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
        • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
        • ImageUrl (string) -- The URL that points to an image used in the push notification.
        • JsonBody (string) -- The JSON payload used for a silent push.
        • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
        • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
        • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
        • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
        • Title (string) -- The message title that displays above the message on the user's device.
        • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
      • BaiduMessage (dict) -- The message that the campaign delivers to Baidu channels. Overrides the default message.
        • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
        • Body (string) -- The message body. Can include up to 140 characters.
        • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
        • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
        • ImageUrl (string) -- The URL that points to an image used in the push notification.
        • JsonBody (string) -- The JSON payload used for a silent push.
        • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
        • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
        • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
        • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
        • Title (string) -- The message title that displays above the message on the user's device.
        • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
      • DefaultMessage (dict) -- The default message for all channels.
        • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
        • Body (string) -- The message body. Can include up to 140 characters.
        • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
        • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
        • ImageUrl (string) -- The URL that points to an image used in the push notification.
        • JsonBody (string) -- The JSON payload used for a silent push.
        • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
        • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
        • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
        • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
        • Title (string) -- The message title that displays above the message on the user's device.
        • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
      • EmailMessage (dict) -- The email message configuration.
        • Body (string) -- The email text body.
        • FromAddress (string) -- The email address used to send the email from. Defaults to use FromAddress specified in the Email Channel.
        • HtmlBody (string) -- The email html body.
        • Title (string) -- The email title (Or subject).
      • GCMMessage (dict) -- The message that the campaign delivers to GCM channels. Overrides the default message.
        • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
        • Body (string) -- The message body. Can include up to 140 characters.
        • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
        • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
        • ImageUrl (string) -- The URL that points to an image used in the push notification.
        • JsonBody (string) -- The JSON payload used for a silent push.
        • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
        • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
        • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
        • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
        • Title (string) -- The message title that displays above the message on the user's device.
        • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
      • SMSMessage (dict) -- The SMS message configuration.
        • Body (string) -- The SMS text body.
        • MessageType (string) -- Is this is a transactional SMS message, otherwise a promotional message.
        • SenderId (string) -- Sender ID of sent message.
    • Name (string) -- The custom name of the campaign.
    • Schedule (dict) -- The campaign schedule.
      • EndTime (string) -- The scheduled time that the campaign ends in ISO 8601 format.
      • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY
      • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.
      • QuietTime (dict) -- The time during which the campaign sends no messages.
        • End (string) -- The default end time for quiet time in ISO 8601 format.
        • Start (string) -- The default start time for quiet time in ISO 8601 format.
      • StartTime (string) -- The scheduled time that the campaign begins in ISO 8601 format.
      • Timezone (string) -- The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
    • SegmentId (string) -- The ID of the segment to which the campaign sends messages.
    • SegmentVersion (integer) -- The version of the segment to which the campaign sends messages.
    • TreatmentDescription (string) -- A custom description for the treatment.
    • TreatmentName (string) -- The custom name of a variation of the campaign used for A/B testing.
Return type

dict

Returns

Response Syntax

{
    'CampaignResponse': {
        'AdditionalTreatments': [
            {
                'Id': 'string',
                'MessageConfiguration': {
                    'ADMMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'APNSMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'BaiduMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'DefaultMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'EmailMessage': {
                        'Body': 'string',
                        'FromAddress': 'string',
                        'HtmlBody': 'string',
                        'Title': 'string'
                    },
                    'GCMMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'SMSMessage': {
                        'Body': 'string',
                        'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL',
                        'SenderId': 'string'
                    }
                },
                'Schedule': {
                    'EndTime': 'string',
                    'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY',
                    'IsLocalTime': True|False,
                    'QuietTime': {
                        'End': 'string',
                        'Start': 'string'
                    },
                    'StartTime': 'string',
                    'Timezone': 'string'
                },
                'SizePercent': 123,
                'State': {
                    'CampaignStatus': 'SCHEDULED'|'EXECUTING'|'PENDING_NEXT_RUN'|'COMPLETED'|'PAUSED'|'DELETED'
                },
                'TreatmentDescription': 'string',
                'TreatmentName': 'string'
            },
        ],
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'DefaultState': {
            'CampaignStatus': 'SCHEDULED'|'EXECUTING'|'PENDING_NEXT_RUN'|'COMPLETED'|'PAUSED'|'DELETED'
        },
        'Description': 'string',
        'HoldoutPercent': 123,
        'Hook': {
            'LambdaFunctionName': 'string',
            'Mode': 'DELIVERY'|'FILTER',
            'WebUrl': 'string'
        },
        'Id': 'string',
        'IsPaused': True|False,
        'LastModifiedDate': 'string',
        'Limits': {
            'Daily': 123,
            'MaximumDuration': 123,
            'MessagesPerSecond': 123,
            'Total': 123
        },
        'MessageConfiguration': {
            'ADMMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'APNSMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'BaiduMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'DefaultMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'EmailMessage': {
                'Body': 'string',
                'FromAddress': 'string',
                'HtmlBody': 'string',
                'Title': 'string'
            },
            'GCMMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'SMSMessage': {
                'Body': 'string',
                'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL',
                'SenderId': 'string'
            }
        },
        'Name': 'string',
        'Schedule': {
            'EndTime': 'string',
            'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY',
            'IsLocalTime': True|False,
            'QuietTime': {
                'End': 'string',
                'Start': 'string'
            },
            'StartTime': 'string',
            'Timezone': 'string'
        },
        'SegmentId': 'string',
        'SegmentVersion': 123,
        'State': {
            'CampaignStatus': 'SCHEDULED'|'EXECUTING'|'PENDING_NEXT_RUN'|'COMPLETED'|'PAUSED'|'DELETED'
        },
        'TreatmentDescription': 'string',
        'TreatmentName': 'string',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 201 response
    • CampaignResponse (dict) -- Campaign definition
      • AdditionalTreatments (list) -- Treatments that are defined in addition to the default treatment.
        • (dict) -- Treatment resource
          • Id (string) -- The unique treatment ID.
          • MessageConfiguration (dict) -- The message configuration settings.
            • ADMMessage (dict) -- The message that the campaign delivers to ADM channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • APNSMessage (dict) -- The message that the campaign delivers to APNS channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • BaiduMessage (dict) -- The message that the campaign delivers to Baidu channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • DefaultMessage (dict) -- The default message for all channels.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • EmailMessage (dict) -- The email message configuration.
              • Body (string) -- The email text body.
              • FromAddress (string) -- The email address used to send the email from. Defaults to use FromAddress specified in the Email Channel.
              • HtmlBody (string) -- The email html body.
              • Title (string) -- The email title (Or subject).
            • GCMMessage (dict) -- The message that the campaign delivers to GCM channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • SMSMessage (dict) -- The SMS message configuration.
              • Body (string) -- The SMS text body.
              • MessageType (string) -- Is this is a transactional SMS message, otherwise a promotional message.
              • SenderId (string) -- Sender ID of sent message.
          • Schedule (dict) -- The campaign schedule.
            • EndTime (string) -- The scheduled time that the campaign ends in ISO 8601 format.
            • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY
            • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.
            • QuietTime (dict) -- The time during which the campaign sends no messages.
              • End (string) -- The default end time for quiet time in ISO 8601 format.
              • Start (string) -- The default start time for quiet time in ISO 8601 format.
            • StartTime (string) -- The scheduled time that the campaign begins in ISO 8601 format.
            • Timezone (string) -- The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
          • SizePercent (integer) -- The allocated percentage of users for this treatment.
          • State (dict) -- The treatment status.
            • CampaignStatus (string) -- The status of the campaign, or the status of a treatment that belongs to an A/B test campaign. Valid values: SCHEDULED, EXECUTING, PENDING_NEXT_RUN, COMPLETED, PAUSED
          • TreatmentDescription (string) -- A custom description for the treatment.
          • TreatmentName (string) -- The custom name of a variation of the campaign used for A/B testing.
      • ApplicationId (string) -- The ID of the application to which the campaign applies.
      • CreationDate (string) -- The date the campaign was created in ISO 8601 format.
      • DefaultState (dict) -- The status of the campaign's default treatment. Only present for A/B test campaigns.
        • CampaignStatus (string) -- The status of the campaign, or the status of a treatment that belongs to an A/B test campaign. Valid values: SCHEDULED, EXECUTING, PENDING_NEXT_RUN, COMPLETED, PAUSED
      • Description (string) -- A description of the campaign.
      • HoldoutPercent (integer) -- The allocated percentage of end users who will not receive messages from this campaign.
      • Hook (dict) -- Campaign hook information.
        • LambdaFunctionName (string) -- Lambda function name or arn to be called for delivery
        • Mode (string) -- What mode Lambda should be invoked in.
        • WebUrl (string) -- Web URL to call for hook. If the URL has authentication specified it will be added as authentication to the request
      • Id (string) -- The unique campaign ID.
      • IsPaused (boolean) -- Indicates whether the campaign is paused. A paused campaign does not send messages unless you resume it by setting IsPaused to false.
      • LastModifiedDate (string) -- The date the campaign was last updated in ISO 8601 format.
      • Limits (dict) -- The campaign limits settings.
        • Daily (integer) -- The maximum number of messages that the campaign can send daily.
        • MaximumDuration (integer) -- The length of time (in seconds) that the campaign can run before it ends and message deliveries stop. This duration begins at the scheduled start time for the campaign. The minimum value is 60.
        • MessagesPerSecond (integer) -- The number of messages that the campaign can send per second. The minimum value is 50, and the maximum is 20000.
        • Total (integer) -- The maximum total number of messages that the campaign can send.
      • MessageConfiguration (dict) -- The message configuration settings.
        • ADMMessage (dict) -- The message that the campaign delivers to ADM channels. Overrides the default message.
          • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
          • Body (string) -- The message body. Can include up to 140 characters.
          • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl (string) -- The URL that points to an image used in the push notification.
          • JsonBody (string) -- The JSON payload used for a silent push.
          • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
          • Title (string) -- The message title that displays above the message on the user's device.
          • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
        • APNSMessage (dict) -- The message that the campaign delivers to APNS channels. Overrides the default message.
          • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
          • Body (string) -- The message body. Can include up to 140 characters.
          • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl (string) -- The URL that points to an image used in the push notification.
          • JsonBody (string) -- The JSON payload used for a silent push.
          • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
          • Title (string) -- The message title that displays above the message on the user's device.
          • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
        • BaiduMessage (dict) -- The message that the campaign delivers to Baidu channels. Overrides the default message.
          • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
          • Body (string) -- The message body. Can include up to 140 characters.
          • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl (string) -- The URL that points to an image used in the push notification.
          • JsonBody (string) -- The JSON payload used for a silent push.
          • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
          • Title (string) -- The message title that displays above the message on the user's device.
          • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
        • DefaultMessage (dict) -- The default message for all channels.
          • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
          • Body (string) -- The message body. Can include up to 140 characters.
          • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl (string) -- The URL that points to an image used in the push notification.
          • JsonBody (string) -- The JSON payload used for a silent push.
          • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
          • Title (string) -- The message title that displays above the message on the user's device.
          • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
        • EmailMessage (dict) -- The email message configuration.
          • Body (string) -- The email text body.
          • FromAddress (string) -- The email address used to send the email from. Defaults to use FromAddress specified in the Email Channel.
          • HtmlBody (string) -- The email html body.
          • Title (string) -- The email title (Or subject).
        • GCMMessage (dict) -- The message that the campaign delivers to GCM channels. Overrides the default message.
          • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
          • Body (string) -- The message body. Can include up to 140 characters.
          • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl (string) -- The URL that points to an image used in the push notification.
          • JsonBody (string) -- The JSON payload used for a silent push.
          • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
          • Title (string) -- The message title that displays above the message on the user's device.
          • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
        • SMSMessage (dict) -- The SMS message configuration.
          • Body (string) -- The SMS text body.
          • MessageType (string) -- Is this is a transactional SMS message, otherwise a promotional message.
          • SenderId (string) -- Sender ID of sent message.
      • Name (string) -- The custom name of the campaign.
      • Schedule (dict) -- The campaign schedule.
        • EndTime (string) -- The scheduled time that the campaign ends in ISO 8601 format.
        • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY
        • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.
        • QuietTime (dict) -- The time during which the campaign sends no messages.
          • End (string) -- The default end time for quiet time in ISO 8601 format.
          • Start (string) -- The default start time for quiet time in ISO 8601 format.
        • StartTime (string) -- The scheduled time that the campaign begins in ISO 8601 format.
        • Timezone (string) -- The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
      • SegmentId (string) -- The ID of the segment to which the campaign sends messages.
      • SegmentVersion (integer) -- The version of the segment to which the campaign sends messages.
      • State (dict) -- The campaign status. An A/B test campaign will have a status of COMPLETED only when all treatments have a status of COMPLETED.
        • CampaignStatus (string) -- The status of the campaign, or the status of a treatment that belongs to an A/B test campaign. Valid values: SCHEDULED, EXECUTING, PENDING_NEXT_RUN, COMPLETED, PAUSED
      • TreatmentDescription (string) -- A custom description for the treatment.
      • TreatmentName (string) -- The custom name of a variation of the campaign used for A/B testing.
      • Version (integer) -- The campaign version number.

create_export_job(**kwargs)

Creates an export job.

See also: AWS API Documentation

Request Syntax

response = client.create_export_job(
    ApplicationId='string',
    ExportJobRequest={
        'RoleArn': 'string',
        'S3UrlPrefix': 'string',
        'SegmentId': 'string',
        'SegmentVersion': 123
    }
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • ExportJobRequest (dict) --

    [REQUIRED] Export job request.

    • RoleArn (string) -- The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the Amazon S3 location that endpoints will be exported to.
    • S3UrlPrefix (string) -- A URL that points to the location within an Amazon S3 bucket that will receive the export. The location is typically a folder with multiple files. The URL should follow this format: s3://bucket-name/folder-name/ Amazon Pinpoint will export endpoints to this location.
    • SegmentId (string) -- The ID of the segment to export endpoints from. If not present, Amazon Pinpoint exports all of the endpoints that belong to the application.
    • SegmentVersion (integer) -- The version of the segment to export if specified.
Return type

dict

Returns

Response Syntax

{
    'ExportJobResponse': {
        'ApplicationId': 'string',
        'CompletedPieces': 123,
        'CompletionDate': 'string',
        'CreationDate': 'string',
        'Definition': {
            'RoleArn': 'string',
            'S3UrlPrefix': 'string',
            'SegmentId': 'string',
            'SegmentVersion': 123
        },
        'FailedPieces': 123,
        'Failures': [
            'string',
        ],
        'Id': 'string',
        'JobStatus': 'CREATED'|'INITIALIZING'|'PROCESSING'|'COMPLETING'|'COMPLETED'|'FAILING'|'FAILED',
        'TotalFailures': 123,
        'TotalPieces': 123,
        'TotalProcessed': 123,
        'Type': 'string'
    }
}

Response Structure

  • (dict) -- 202 response
    • ExportJobResponse (dict) -- Export job response.
      • ApplicationId (string) -- The unique ID of the application associated with the export job.
      • CompletedPieces (integer) -- The number of pieces that have successfully completed as of the time of the request.
      • CompletionDate (string) -- The date the job completed in ISO 8601 format.
      • CreationDate (string) -- The date the job was created in ISO 8601 format.
      • Definition (dict) -- The export job settings.
        • RoleArn (string) -- The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the Amazon S3 location that endpoints will be exported to.
        • S3UrlPrefix (string) -- A URL that points to the location within an Amazon S3 bucket that will receive the export. The location is typically a folder with multiple files. The URL should follow this format: s3://bucket-name/folder-name/ Amazon Pinpoint will export endpoints to this location.
        • SegmentId (string) -- The ID of the segment to export endpoints from. If not present, Amazon Pinpoint exports all of the endpoints that belong to the application.
        • SegmentVersion (integer) -- The version of the segment to export if specified.
      • FailedPieces (integer) -- The number of pieces that failed to be processed as of the time of the request.
      • Failures (list) -- Provides up to 100 of the first failed entries for the job, if any exist.
        • (string) --
      • Id (string) -- The unique ID of the job.
      • JobStatus (string) -- The status of the job. Valid values: CREATED, INITIALIZING, PROCESSING, COMPLETING, COMPLETED, FAILING, FAILED The job status is FAILED if one or more pieces failed.
      • TotalFailures (integer) -- The number of endpoints that were not processed; for example, because of syntax errors.
      • TotalPieces (integer) -- The total number of pieces that must be processed to finish the job. Each piece is an approximately equal portion of the endpoints.
      • TotalProcessed (integer) -- The number of endpoints that were processed by the job.
      • Type (string) -- The job type. Will be 'EXPORT'.

create_import_job(**kwargs)

Creates or updates an import job.

See also: AWS API Documentation

Request Syntax

response = client.create_import_job(
    ApplicationId='string',
    ImportJobRequest={
        'DefineSegment': True|False,
        'ExternalId': 'string',
        'Format': 'CSV'|'JSON',
        'RegisterEndpoints': True|False,
        'RoleArn': 'string',
        'S3Url': 'string',
        'SegmentId': 'string',
        'SegmentName': 'string'
    }
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • ImportJobRequest (dict) --

    [REQUIRED] Import job request.

    • DefineSegment (boolean) -- Sets whether the endpoints create a segment when they are imported.
    • ExternalId (string) -- (Deprecated) Your AWS account ID, which you assigned to the ExternalID key in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This requirement is removed, and external IDs are not recommended for IAM roles assumed by Amazon Pinpoint.
    • Format (string) -- The format of the files that contain the endpoint definitions. Valid values: CSV, JSON
    • RegisterEndpoints (boolean) -- Sets whether the endpoints are registered with Amazon Pinpoint when they are imported.
    • RoleArn (string) -- The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the Amazon S3 location that contains the endpoints to import.
    • S3Url (string) -- The URL of the S3 bucket that contains the segment information to import. The location can be a folder or a single file. The URL should use the following format: s3://bucket-name/folder-name/file-name Amazon Pinpoint imports endpoints from this location and any subfolders it contains.
    • SegmentId (string) -- The ID of the segment to update if the import job is meant to update an existing segment.
    • SegmentName (string) -- A custom name for the segment created by the import job. Use if DefineSegment is true.
Return type

dict

Returns

Response Syntax

{
    'ImportJobResponse': {
        'ApplicationId': 'string',
        'CompletedPieces': 123,
        'CompletionDate': 'string',
        'CreationDate': 'string',
        'Definition': {
            'DefineSegment': True|False,
            'ExternalId': 'string',
            'Format': 'CSV'|'JSON',
            'RegisterEndpoints': True|False,
            'RoleArn': 'string',
            'S3Url': 'string',
            'SegmentId': 'string',
            'SegmentName': 'string'
        },
        'FailedPieces': 123,
        'Failures': [
            'string',
        ],
        'Id': 'string',
        'JobStatus': 'CREATED'|'INITIALIZING'|'PROCESSING'|'COMPLETING'|'COMPLETED'|'FAILING'|'FAILED',
        'TotalFailures': 123,
        'TotalPieces': 123,
        'TotalProcessed': 123,
        'Type': 'string'
    }
}

Response Structure

  • (dict) -- 201 response
    • ImportJobResponse (dict) -- Import job response.
      • ApplicationId (string) -- The unique ID of the application to which the import job applies.
      • CompletedPieces (integer) -- The number of pieces that have successfully imported as of the time of the request.
      • CompletionDate (string) -- The date the import job completed in ISO 8601 format.
      • CreationDate (string) -- The date the import job was created in ISO 8601 format.
      • Definition (dict) -- The import job settings.
        • DefineSegment (boolean) -- Sets whether the endpoints create a segment when they are imported.
        • ExternalId (string) -- (Deprecated) Your AWS account ID, which you assigned to the ExternalID key in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This requirement is removed, and external IDs are not recommended for IAM roles assumed by Amazon Pinpoint.
        • Format (string) -- The format of the files that contain the endpoint definitions. Valid values: CSV, JSON
        • RegisterEndpoints (boolean) -- Sets whether the endpoints are registered with Amazon Pinpoint when they are imported.
        • RoleArn (string) -- The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the Amazon S3 location that contains the endpoints to import.
        • S3Url (string) -- The URL of the S3 bucket that contains the segment information to import. The location can be a folder or a single file. The URL should use the following format: s3://bucket-name/folder-name/file-name Amazon Pinpoint imports endpoints from this location and any subfolders it contains.
        • SegmentId (string) -- The ID of the segment to update if the import job is meant to update an existing segment.
        • SegmentName (string) -- A custom name for the segment created by the import job. Use if DefineSegment is true.
      • FailedPieces (integer) -- The number of pieces that have failed to import as of the time of the request.
      • Failures (list) -- Provides up to 100 of the first failed entries for the job, if any exist.
        • (string) --
      • Id (string) -- The unique ID of the import job.
      • JobStatus (string) -- The status of the import job. Valid values: CREATED, INITIALIZING, PROCESSING, COMPLETING, COMPLETED, FAILING, FAILED The job status is FAILED if one or more pieces failed to import.
      • TotalFailures (integer) -- The number of endpoints that failed to import; for example, because of syntax errors.
      • TotalPieces (integer) -- The total number of pieces that must be imported to finish the job. Each piece is an approximately equal portion of the endpoints to import.
      • TotalProcessed (integer) -- The number of endpoints that were processed by the import job.
      • Type (string) -- The job type. Will be Import.

create_segment(**kwargs)

Used to create or update a segment.

See also: AWS API Documentation

Request Syntax

response = client.create_segment(
    ApplicationId='string',
    WriteSegmentRequest={
        'Dimensions': {
            'Attributes': {
                'string': {
                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                }
            },
            'Behavior': {
                'Recency': {
                    'Duration': 'HR_24'|'DAY_7'|'DAY_14'|'DAY_30',
                    'RecencyType': 'ACTIVE'|'INACTIVE'
                }
            },
            'Demographic': {
                'AppVersion': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'Channel': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'DeviceType': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'Make': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'Model': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'Platform': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                }
            },
            'Location': {
                'Country': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'GPSPoint': {
                    'Coordinates': {
                        'Latitude': 123.0,
                        'Longitude': 123.0
                    },
                    'RangeInKilometers': 123.0
                }
            },
            'Metrics': {
                'string': {
                    'ComparisonOperator': 'string',
                    'Value': 123.0
                }
            },
            'UserAttributes': {
                'string': {
                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                }
            }
        },
        'Name': 'string',
        'SegmentGroups': {
            'Groups': [
                {
                    'Dimensions': [
                        {
                            'Attributes': {
                                'string': {
                                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'Behavior': {
                                'Recency': {
                                    'Duration': 'HR_24'|'DAY_7'|'DAY_14'|'DAY_30',
                                    'RecencyType': 'ACTIVE'|'INACTIVE'
                                }
                            },
                            'Demographic': {
                                'AppVersion': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Channel': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'DeviceType': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Make': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Model': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Platform': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'Location': {
                                'Country': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'GPSPoint': {
                                    'Coordinates': {
                                        'Latitude': 123.0,
                                        'Longitude': 123.0
                                    },
                                    'RangeInKilometers': 123.0
                                }
                            },
                            'Metrics': {
                                'string': {
                                    'ComparisonOperator': 'string',
                                    'Value': 123.0
                                }
                            },
                            'UserAttributes': {
                                'string': {
                                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            }
                        },
                    ],
                    'SourceSegments': [
                        {
                            'Id': 'string',
                            'Version': 123
                        },
                    ],
                    'SourceType': 'ALL'|'ANY'|'NONE',
                    'Type': 'ALL'|'ANY'|'NONE'
                },
            ],
            'Include': 'ALL'|'ANY'|'NONE'
        }
    }
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • WriteSegmentRequest (dict) --

    [REQUIRED] Segment definition.

    • Dimensions (dict) -- The segment dimensions attributes.
      • Attributes (dict) -- Custom segment attributes.
        • (string) --
          • (dict) -- Custom attibute dimension
            • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
      • Behavior (dict) -- The segment behaviors attributes.
        • Recency (dict) -- The recency of use.
          • Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
          • RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
      • Demographic (dict) -- The segment demographics attributes.
        • AppVersion (dict) -- The app version criteria for the segment.
          • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
          • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
            • (string) --
        • Channel (dict) -- The channel criteria for the segment.
          • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
          • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
            • (string) --
        • DeviceType (dict) -- The device type criteria for the segment.
          • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
          • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
            • (string) --
        • Make (dict) -- The device make criteria for the segment.
          • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
          • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
            • (string) --
        • Model (dict) -- The device model criteria for the segment.
          • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
          • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
            • (string) --
        • Platform (dict) -- The device platform criteria for the segment.
          • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
          • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
            • (string) --
      • Location (dict) -- The segment location attributes.
        • Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
          • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
          • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
            • (string) --
        • GPSPoint (dict) -- The GPS Point dimension.
          • Coordinates (dict) -- Coordinate to measure distance from.
            • Latitude (float) -- Latitude
            • Longitude (float) -- Longitude
          • RangeInKilometers (float) -- Range in kilometers from the coordinate.
      • Metrics (dict) -- Custom segment metrics.
        • (string) --
          • (dict) -- Custom metric dimension
            • ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
            • Value (float) -- Value to be compared.
      • UserAttributes (dict) -- Custom segment user attributes.
        • (string) --
          • (dict) -- Custom attibute dimension
            • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
    • Name (string) -- The name of segment
    • SegmentGroups (dict) -- A segment group, which consists of zero or more source segments, plus dimensions that are applied to those source segments. Your request can only include one segment group. Your request can include either a SegmentGroups object or a Dimensions object, but not both.
      • Groups (list) -- A set of segment criteria to evaluate.
        • (dict) -- Segment group definition.
          • Dimensions (list) -- List of dimensions to include or exclude.
            • (dict) -- Segment dimensions
              • Attributes (dict) -- Custom segment attributes.
                • (string) --
                  • (dict) -- Custom attibute dimension
                    • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
              • Behavior (dict) -- The segment behaviors attributes.
                • Recency (dict) -- The recency of use.
                  • Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
                  • RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
              • Demographic (dict) -- The segment demographics attributes.
                • AppVersion (dict) -- The app version criteria for the segment.
                  • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                  • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                    • (string) --
                • Channel (dict) -- The channel criteria for the segment.
                  • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                  • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                    • (string) --
                • DeviceType (dict) -- The device type criteria for the segment.
                  • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                  • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                    • (string) --
                • Make (dict) -- The device make criteria for the segment.
                  • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                  • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                    • (string) --
                • Model (dict) -- The device model criteria for the segment.
                  • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                  • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                    • (string) --
                • Platform (dict) -- The device platform criteria for the segment.
                  • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                  • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                    • (string) --
              • Location (dict) -- The segment location attributes.
                • Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
                  • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                  • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                    • (string) --
                • GPSPoint (dict) -- The GPS Point dimension.
                  • Coordinates (dict) -- Coordinate to measure distance from.
                    • Latitude (float) -- Latitude
                    • Longitude (float) -- Longitude
                  • RangeInKilometers (float) -- Range in kilometers from the coordinate.
              • Metrics (dict) -- Custom segment metrics.
                • (string) --
                  • (dict) -- Custom metric dimension
                    • ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
                    • Value (float) -- Value to be compared.
              • UserAttributes (dict) -- Custom segment user attributes.
                • (string) --
                  • (dict) -- Custom attibute dimension
                    • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
          • SourceSegments (list) -- The base segment that you build your segment on. The source segment defines the starting "universe" of endpoints. When you add dimensions to the segment, it filters the source segment based on the dimensions that you specify. You can specify more than one dimensional segment. You can only specify one imported segment.
            • (dict) -- Segment reference.
              • Id (string) -- A unique identifier for the segment.
              • Version (integer) -- If specified contains a specific version of the segment included.
          • SourceType (string) -- Specify how to handle multiple source segments. For example, if you specify three source segments, should the resulting segment be based on any or all of the segments? Acceptable values: ANY or ALL.
          • Type (string) -- Specify how to handle multiple segment dimensions. For example, if you specify three dimensions, should the resulting segment include endpoints that are matched by all, any, or none of the dimensions? Acceptable values: ALL, ANY, or NONE.
      • Include (string) -- Specify how to handle multiple segment groups. For example, if the segment includes three segment groups, should the resulting segment include endpoints that are matched by all, any, or none of the segment groups you created. Acceptable values: ALL, ANY, or NONE.
Return type

dict

Returns

Response Syntax

{
    'SegmentResponse': {
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'Dimensions': {
            'Attributes': {
                'string': {
                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                }
            },
            'Behavior': {
                'Recency': {
                    'Duration': 'HR_24'|'DAY_7'|'DAY_14'|'DAY_30',
                    'RecencyType': 'ACTIVE'|'INACTIVE'
                }
            },
            'Demographic': {
                'AppVersion': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'Channel': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'DeviceType': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'Make': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'Model': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'Platform': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                }
            },
            'Location': {
                'Country': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'GPSPoint': {
                    'Coordinates': {
                        'Latitude': 123.0,
                        'Longitude': 123.0
                    },
                    'RangeInKilometers': 123.0
                }
            },
            'Metrics': {
                'string': {
                    'ComparisonOperator': 'string',
                    'Value': 123.0
                }
            },
            'UserAttributes': {
                'string': {
                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                }
            }
        },
        'Id': 'string',
        'ImportDefinition': {
            'ChannelCounts': {
                'string': 123
            },
            'ExternalId': 'string',
            'Format': 'CSV'|'JSON',
            'RoleArn': 'string',
            'S3Url': 'string',
            'Size': 123
        },
        'LastModifiedDate': 'string',
        'Name': 'string',
        'SegmentGroups': {
            'Groups': [
                {
                    'Dimensions': [
                        {
                            'Attributes': {
                                'string': {
                                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'Behavior': {
                                'Recency': {
                                    'Duration': 'HR_24'|'DAY_7'|'DAY_14'|'DAY_30',
                                    'RecencyType': 'ACTIVE'|'INACTIVE'
                                }
                            },
                            'Demographic': {
                                'AppVersion': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Channel': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'DeviceType': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Make': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Model': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Platform': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'Location': {
                                'Country': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'GPSPoint': {
                                    'Coordinates': {
                                        'Latitude': 123.0,
                                        'Longitude': 123.0
                                    },
                                    'RangeInKilometers': 123.0
                                }
                            },
                            'Metrics': {
                                'string': {
                                    'ComparisonOperator': 'string',
                                    'Value': 123.0
                                }
                            },
                            'UserAttributes': {
                                'string': {
                                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            }
                        },
                    ],
                    'SourceSegments': [
                        {
                            'Id': 'string',
                            'Version': 123
                        },
                    ],
                    'SourceType': 'ALL'|'ANY'|'NONE',
                    'Type': 'ALL'|'ANY'|'NONE'
                },
            ],
            'Include': 'ALL'|'ANY'|'NONE'
        },
        'SegmentType': 'DIMENSIONAL'|'IMPORT',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 201 response
    • SegmentResponse (dict) -- Segment definition.
      • ApplicationId (string) -- The ID of the application that the segment applies to.
      • CreationDate (string) -- The date and time when the segment was created.
      • Dimensions (dict) -- The segment dimensions attributes.
        • Attributes (dict) -- Custom segment attributes.
          • (string) --
            • (dict) -- Custom attibute dimension
              • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
              • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                • (string) --
        • Behavior (dict) -- The segment behaviors attributes.
          • Recency (dict) -- The recency of use.
            • Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
            • RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
        • Demographic (dict) -- The segment demographics attributes.
          • AppVersion (dict) -- The app version criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • Channel (dict) -- The channel criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • DeviceType (dict) -- The device type criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • Make (dict) -- The device make criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • Model (dict) -- The device model criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • Platform (dict) -- The device platform criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
        • Location (dict) -- The segment location attributes.
          • Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • GPSPoint (dict) -- The GPS Point dimension.
            • Coordinates (dict) -- Coordinate to measure distance from.
              • Latitude (float) -- Latitude
              • Longitude (float) -- Longitude
            • RangeInKilometers (float) -- Range in kilometers from the coordinate.
        • Metrics (dict) -- Custom segment metrics.
          • (string) --
            • (dict) -- Custom metric dimension
              • ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
              • Value (float) -- Value to be compared.
        • UserAttributes (dict) -- Custom segment user attributes.
          • (string) --
            • (dict) -- Custom attibute dimension
              • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
              • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                • (string) --
      • Id (string) -- The unique segment ID.
      • ImportDefinition (dict) -- The import job settings.
        • ChannelCounts (dict) -- The number of channel types in the imported segment.
          • (string) --
            • (integer) --
        • ExternalId (string) -- (Deprecated) Your AWS account ID, which you assigned to the ExternalID key in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This requirement is removed, and external IDs are not recommended for IAM roles assumed by Amazon Pinpoint.
        • Format (string) -- The format of the endpoint files that were imported to create this segment. Valid values: CSV, JSON
        • RoleArn (string) -- The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the endpoints in Amazon S3.
        • S3Url (string) -- The URL of the S3 bucket that the segment was imported from.
        • Size (integer) -- The number of endpoints that were successfully imported to create this segment.
      • LastModifiedDate (string) -- The date and time when the segment was last modified.
      • Name (string) -- The name of the segment.
      • SegmentGroups (dict) -- A segment group, which consists of zero or more source segments, plus dimensions that are applied to those source segments.
        • Groups (list) -- A set of segment criteria to evaluate.
          • (dict) -- Segment group definition.
            • Dimensions (list) -- List of dimensions to include or exclude.
              • (dict) -- Segment dimensions
                • Attributes (dict) -- Custom segment attributes.
                  • (string) --
                    • (dict) -- Custom attibute dimension
                      • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                      • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                        • (string) --
                • Behavior (dict) -- The segment behaviors attributes.
                  • Recency (dict) -- The recency of use.
                    • Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
                    • RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
                • Demographic (dict) -- The segment demographics attributes.
                  • AppVersion (dict) -- The app version criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • Channel (dict) -- The channel criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • DeviceType (dict) -- The device type criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • Make (dict) -- The device make criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • Model (dict) -- The device model criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • Platform (dict) -- The device platform criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                • Location (dict) -- The segment location attributes.
                  • Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • GPSPoint (dict) -- The GPS Point dimension.
                    • Coordinates (dict) -- Coordinate to measure distance from.
                      • Latitude (float) -- Latitude
                      • Longitude (float) -- Longitude
                    • RangeInKilometers (float) -- Range in kilometers from the coordinate.
                • Metrics (dict) -- Custom segment metrics.
                  • (string) --
                    • (dict) -- Custom metric dimension
                      • ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
                      • Value (float) -- Value to be compared.
                • UserAttributes (dict) -- Custom segment user attributes.
                  • (string) --
                    • (dict) -- Custom attibute dimension
                      • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                      • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                        • (string) --
            • SourceSegments (list) -- The base segment that you build your segment on. The source segment defines the starting "universe" of endpoints. When you add dimensions to the segment, it filters the source segment based on the dimensions that you specify. You can specify more than one dimensional segment. You can only specify one imported segment.
              • (dict) -- Segment reference.
                • Id (string) -- A unique identifier for the segment.
                • Version (integer) -- If specified contains a specific version of the segment included.
            • SourceType (string) -- Specify how to handle multiple source segments. For example, if you specify three source segments, should the resulting segment be based on any or all of the segments? Acceptable values: ANY or ALL.
            • Type (string) -- Specify how to handle multiple segment dimensions. For example, if you specify three dimensions, should the resulting segment include endpoints that are matched by all, any, or none of the dimensions? Acceptable values: ALL, ANY, or NONE.
        • Include (string) -- Specify how to handle multiple segment groups. For example, if the segment includes three segment groups, should the resulting segment include endpoints that are matched by all, any, or none of the segment groups you created. Acceptable values: ALL, ANY, or NONE.
      • SegmentType (string) -- The segment type: DIMENSIONAL - A dynamic segment built from selection criteria based on endpoint data reported by your app. You create this type of segment by using the segment builder in the Amazon Pinpoint console or by making a POST request to the segments resource. IMPORT - A static segment built from an imported set of endpoint definitions. You create this type of segment by importing a segment in the Amazon Pinpoint console or by making a POST request to the jobs/import resource.
      • Version (integer) -- The segment version number.

delete_adm_channel(**kwargs)

Delete an ADM channel.

See also: AWS API Documentation

Request Syntax

response = client.delete_adm_channel(
    ApplicationId='string'
)
Parameters
ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
Return type
dict
Returns
Response Syntax
{
    'ADMChannelResponse': {
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'Enabled': True|False,
        'HasCredential': True|False,
        'Id': 'string',
        'IsArchived': True|False,
        'LastModifiedBy': 'string',
        'LastModifiedDate': 'string',
        'Platform': 'string',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response
    • ADMChannelResponse (dict) -- Amazon Device Messaging channel definition.
      • ApplicationId (string) -- The ID of the application to which the channel applies.
      • CreationDate (string) -- The date and time when this channel was created.
      • Enabled (boolean) -- Indicates whether or not the channel is enabled for sending messages.
      • HasCredential (boolean) -- Not used. Retained for backwards compatibility.
      • Id (string) -- (Deprecated) An identifier for the channel. Retained for backwards compatibility.
      • IsArchived (boolean) -- Indicates whether or not the channel is archived.
      • LastModifiedBy (string) -- The user who last updated this channel.
      • LastModifiedDate (string) -- The date and time when this channel was last modified.
      • Platform (string) -- The platform type. For this channel, the value is always "ADM."
      • Version (integer) -- The channel version.
delete_apns_channel(**kwargs)

Deletes the APNs channel for an app.

See also: AWS API Documentation

Request Syntax

response = client.delete_apns_channel(
    ApplicationId='string'
)
Parameters
ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
Return type
dict
Returns
Response Syntax
{
    'APNSChannelResponse': {
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'DefaultAuthenticationMethod': 'string',
        'Enabled': True|False,
        'HasCredential': True|False,
        'HasTokenKey': True|False,
        'Id': 'string',
        'IsArchived': True|False,
        'LastModifiedBy': 'string',
        'LastModifiedDate': 'string',
        'Platform': 'string',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response
    • APNSChannelResponse (dict) -- Apple Distribution Push Notification Service channel definition.
      • ApplicationId (string) -- The ID of the application that the channel applies to.
      • CreationDate (string) -- The date and time when this channel was created.
      • DefaultAuthenticationMethod (string) -- The default authentication method used for APNs.
      • Enabled (boolean) -- If the channel is enabled for sending messages.
      • HasCredential (boolean) -- Not used. Retained for backwards compatibility.
      • HasTokenKey (boolean) -- Indicates whether the channel is configured with a key for APNs token authentication. Provide a token key by setting the TokenKey attribute.
      • Id (string) -- (Deprecated) An identifier for the channel. Retained for backwards compatibility.
      • IsArchived (boolean) -- Indicates whether or not the channel is archived.
      • LastModifiedBy (string) -- The user who last updated this channel.
      • LastModifiedDate (string) -- The date and time when this channel was last modified.
      • Platform (string) -- The platform type. For this channel, the value is always "ADM."
      • Version (integer) -- The channel version.
delete_apns_sandbox_channel(**kwargs)

Delete an APNS sandbox channel.

See also: AWS API Documentation

Request Syntax

response = client.delete_apns_sandbox_channel(
    ApplicationId='string'
)
Parameters
ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
Return type
dict
Returns
Response Syntax
{
    'APNSSandboxChannelResponse': {
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'DefaultAuthenticationMethod': 'string',
        'Enabled': True|False,
        'HasCredential': True|False,
        'HasTokenKey': True|False,
        'Id': 'string',
        'IsArchived': True|False,
        'LastModifiedBy': 'string',
        'LastModifiedDate': 'string',
        'Platform': 'string',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response
    • APNSSandboxChannelResponse (dict) -- Apple Development Push Notification Service channel definition.
      • ApplicationId (string) -- The ID of the application to which the channel applies.
      • CreationDate (string) -- When was this segment created
      • DefaultAuthenticationMethod (string) -- The default authentication method used for APNs.
      • Enabled (boolean) -- If the channel is enabled for sending messages.
      • HasCredential (boolean) -- Not used. Retained for backwards compatibility.
      • HasTokenKey (boolean) -- Indicates whether the channel is configured with a key for APNs token authentication. Provide a token key by setting the TokenKey attribute.
      • Id (string) -- Channel ID. Not used, only for backwards compatibility.
      • IsArchived (boolean) -- Is this channel archived
      • LastModifiedBy (string) -- Who last updated this entry
      • LastModifiedDate (string) -- Last date this was updated
      • Platform (string) -- The platform type. Will be APNS_SANDBOX.
      • Version (integer) -- Version of channel
delete_apns_voip_channel(**kwargs)

Delete an APNS VoIP channel

See also: AWS API Documentation

Request Syntax

response = client.delete_apns_voip_channel(
    ApplicationId='string'
)
Parameters
ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
Return type
dict
Returns
Response Syntax
{
    'APNSVoipChannelResponse': {
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'DefaultAuthenticationMethod': 'string',
        'Enabled': True|False,
        'HasCredential': True|False,
        'HasTokenKey': True|False,
        'Id': 'string',
        'IsArchived': True|False,
        'LastModifiedBy': 'string',
        'LastModifiedDate': 'string',
        'Platform': 'string',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response
    • APNSVoipChannelResponse (dict) -- Apple VoIP Push Notification Service channel definition.
      • ApplicationId (string) -- Application id
      • CreationDate (string) -- When was this segment created
      • DefaultAuthenticationMethod (string) -- The default authentication method used for APNs.
      • Enabled (boolean) -- If the channel is enabled for sending messages.
      • HasCredential (boolean) -- Not used. Retained for backwards compatibility.
      • HasTokenKey (boolean) -- If the channel is registered with a token key for authentication.
      • Id (string) -- Channel ID. Not used, only for backwards compatibility.
      • IsArchived (boolean) -- Is this channel archived
      • LastModifiedBy (string) -- Who made the last change
      • LastModifiedDate (string) -- Last date this was updated
      • Platform (string) -- The platform type. Will be APNS.
      • Version (integer) -- Version of channel
delete_apns_voip_sandbox_channel(**kwargs)

Delete an APNS VoIP sandbox channel

See also: AWS API Documentation

Request Syntax

response = client.delete_apns_voip_sandbox_channel(
    ApplicationId='string'
)
Parameters
ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
Return type
dict
Returns
Response Syntax
{
    'APNSVoipSandboxChannelResponse': {
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'DefaultAuthenticationMethod': 'string',
        'Enabled': True|False,
        'HasCredential': True|False,
        'HasTokenKey': True|False,
        'Id': 'string',
        'IsArchived': True|False,
        'LastModifiedBy': 'string',
        'LastModifiedDate': 'string',
        'Platform': 'string',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response
    • APNSVoipSandboxChannelResponse (dict) -- Apple VoIP Developer Push Notification Service channel definition.
      • ApplicationId (string) -- Application id
      • CreationDate (string) -- When was this segment created
      • DefaultAuthenticationMethod (string) -- The default authentication method used for APNs.
      • Enabled (boolean) -- If the channel is enabled for sending messages.
      • HasCredential (boolean) -- Not used. Retained for backwards compatibility.
      • HasTokenKey (boolean) -- If the channel is registered with a token key for authentication.
      • Id (string) -- Channel ID. Not used, only for backwards compatibility.
      • IsArchived (boolean) -- Is this channel archived
      • LastModifiedBy (string) -- Who made the last change
      • LastModifiedDate (string) -- Last date this was updated
      • Platform (string) -- The platform type. Will be APNS.
      • Version (integer) -- Version of channel
delete_app(**kwargs)

Deletes an app.

See also: AWS API Documentation

Request Syntax

response = client.delete_app(
    ApplicationId='string'
)
Parameters
ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
Return type
dict
Returns
Response Syntax
{
    'ApplicationResponse': {
        'Id': 'string',
        'Name': 'string'
    }
}

Response Structure

  • (dict) -- 200 response
    • ApplicationResponse (dict) -- Application Response.
      • Id (string) -- The unique application ID.
      • Name (string) -- The display name of the application.
delete_baidu_channel(**kwargs)

Delete a BAIDU GCM channel

See also: AWS API Documentation

Request Syntax

response = client.delete_baidu_channel(
    ApplicationId='string'
)
Parameters
ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
Return type
dict
Returns
Response Syntax
{
    'BaiduChannelResponse': {
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'Credential': 'string',
        'Enabled': True|False,
        'HasCredential': True|False,
        'Id': 'string',
        'IsArchived': True|False,
        'LastModifiedBy': 'string',
        'LastModifiedDate': 'string',
        'Platform': 'string',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response
    • BaiduChannelResponse (dict) -- Baidu Cloud Messaging channel definition
      • ApplicationId (string) -- Application id
      • CreationDate (string) -- When was this segment created
      • Credential (string) -- The Baidu API key from Baidu.
      • Enabled (boolean) -- If the channel is enabled for sending messages.
      • HasCredential (boolean) -- Not used. Retained for backwards compatibility.
      • Id (string) -- Channel ID. Not used, only for backwards compatibility.
      • IsArchived (boolean) -- Is this channel archived
      • LastModifiedBy (string) -- Who made the last change
      • LastModifiedDate (string) -- Last date this was updated
      • Platform (string) -- The platform type. Will be BAIDU
      • Version (integer) -- Version of channel
delete_campaign(**kwargs)

Deletes a campaign.

See also: AWS API Documentation

Request Syntax

response = client.delete_campaign(
    ApplicationId='string',
    CampaignId='string'
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • CampaignId (string) -- [REQUIRED] The unique ID of the campaign.
Return type

dict

Returns

Response Syntax

{
    'CampaignResponse': {
        'AdditionalTreatments': [
            {
                'Id': 'string',
                'MessageConfiguration': {
                    'ADMMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'APNSMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'BaiduMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'DefaultMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'EmailMessage': {
                        'Body': 'string',
                        'FromAddress': 'string',
                        'HtmlBody': 'string',
                        'Title': 'string'
                    },
                    'GCMMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'SMSMessage': {
                        'Body': 'string',
                        'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL',
                        'SenderId': 'string'
                    }
                },
                'Schedule': {
                    'EndTime': 'string',
                    'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY',
                    'IsLocalTime': True|False,
                    'QuietTime': {
                        'End': 'string',
                        'Start': 'string'
                    },
                    'StartTime': 'string',
                    'Timezone': 'string'
                },
                'SizePercent': 123,
                'State': {
                    'CampaignStatus': 'SCHEDULED'|'EXECUTING'|'PENDING_NEXT_RUN'|'COMPLETED'|'PAUSED'|'DELETED'
                },
                'TreatmentDescription': 'string',
                'TreatmentName': 'string'
            },
        ],
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'DefaultState': {
            'CampaignStatus': 'SCHEDULED'|'EXECUTING'|'PENDING_NEXT_RUN'|'COMPLETED'|'PAUSED'|'DELETED'
        },
        'Description': 'string',
        'HoldoutPercent': 123,
        'Hook': {
            'LambdaFunctionName': 'string',
            'Mode': 'DELIVERY'|'FILTER',
            'WebUrl': 'string'
        },
        'Id': 'string',
        'IsPaused': True|False,
        'LastModifiedDate': 'string',
        'Limits': {
            'Daily': 123,
            'MaximumDuration': 123,
            'MessagesPerSecond': 123,
            'Total': 123
        },
        'MessageConfiguration': {
            'ADMMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'APNSMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'BaiduMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'DefaultMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'EmailMessage': {
                'Body': 'string',
                'FromAddress': 'string',
                'HtmlBody': 'string',
                'Title': 'string'
            },
            'GCMMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'SMSMessage': {
                'Body': 'string',
                'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL',
                'SenderId': 'string'
            }
        },
        'Name': 'string',
        'Schedule': {
            'EndTime': 'string',
            'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY',
            'IsLocalTime': True|False,
            'QuietTime': {
                'End': 'string',
                'Start': 'string'
            },
            'StartTime': 'string',
            'Timezone': 'string'
        },
        'SegmentId': 'string',
        'SegmentVersion': 123,
        'State': {
            'CampaignStatus': 'SCHEDULED'|'EXECUTING'|'PENDING_NEXT_RUN'|'COMPLETED'|'PAUSED'|'DELETED'
        },
        'TreatmentDescription': 'string',
        'TreatmentName': 'string',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response
    • CampaignResponse (dict) -- Campaign definition
      • AdditionalTreatments (list) -- Treatments that are defined in addition to the default treatment.
        • (dict) -- Treatment resource
          • Id (string) -- The unique treatment ID.
          • MessageConfiguration (dict) -- The message configuration settings.
            • ADMMessage (dict) -- The message that the campaign delivers to ADM channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • APNSMessage (dict) -- The message that the campaign delivers to APNS channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • BaiduMessage (dict) -- The message that the campaign delivers to Baidu channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • DefaultMessage (dict) -- The default message for all channels.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • EmailMessage (dict) -- The email message configuration.
              • Body (string) -- The email text body.
              • FromAddress (string) -- The email address used to send the email from. Defaults to use FromAddress specified in the Email Channel.
              • HtmlBody (string) -- The email html body.
              • Title (string) -- The email title (Or subject).
            • GCMMessage (dict) -- The message that the campaign delivers to GCM channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • SMSMessage (dict) -- The SMS message configuration.
              • Body (string) -- The SMS text body.
              • MessageType (string) -- Is this is a transactional SMS message, otherwise a promotional message.
              • SenderId (string) -- Sender ID of sent message.
          • Schedule (dict) -- The campaign schedule.
            • EndTime (string) -- The scheduled time that the campaign ends in ISO 8601 format.
            • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY
            • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.
            • QuietTime (dict) -- The time during which the campaign sends no messages.
              • End (string) -- The default end time for quiet time in ISO 8601 format.
              • Start (string) -- The default start time for quiet time in ISO 8601 format.
            • StartTime (string) -- The scheduled time that the campaign begins in ISO 8601 format.
            • Timezone (string) -- The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
          • SizePercent (integer) -- The allocated percentage of users for this treatment.
          • State (dict) -- The treatment status.
            • CampaignStatus (string) -- The status of the campaign, or the status of a treatment that belongs to an A/B test campaign. Valid values: SCHEDULED, EXECUTING, PENDING_NEXT_RUN, COMPLETED, PAUSED
          • TreatmentDescription (string) -- A custom description for the treatment.
          • TreatmentName (string) -- The custom name of a variation of the campaign used for A/B testing.
      • ApplicationId (string) -- The ID of the application to which the campaign applies.
      • CreationDate (string) -- The date the campaign was created in ISO 8601 format.
      • DefaultState (dict) -- The status of the campaign's default treatment. Only present for A/B test campaigns.
        • CampaignStatus (string) -- The status of the campaign, or the status of a treatment that belongs to an A/B test campaign. Valid values: SCHEDULED, EXECUTING, PENDING_NEXT_RUN, COMPLETED, PAUSED
      • Description (string) -- A description of the campaign.
      • HoldoutPercent (integer) -- The allocated percentage of end users who will not receive messages from this campaign.
      • Hook (dict) -- Campaign hook information.
        • LambdaFunctionName (string) -- Lambda function name or arn to be called for delivery
        • Mode (string) -- What mode Lambda should be invoked in.
        • WebUrl (string) -- Web URL to call for hook. If the URL has authentication specified it will be added as authentication to the request
      • Id (string) -- The unique campaign ID.
      • IsPaused (boolean) -- Indicates whether the campaign is paused. A paused campaign does not send messages unless you resume it by setting IsPaused to false.
      • LastModifiedDate (string) -- The date the campaign was last updated in ISO 8601 format.
      • Limits (dict) -- The campaign limits settings.
        • Daily (integer) -- The maximum number of messages that the campaign can send daily.
        • MaximumDuration (integer) -- The length of time (in seconds) that the campaign can run before it ends and message deliveries stop. This duration begins at the scheduled start time for the campaign. The minimum value is 60.
        • MessagesPerSecond (integer) -- The number of messages that the campaign can send per second. The minimum value is 50, and the maximum is 20000.
        • Total (integer) -- The maximum total number of messages that the campaign can send.
      • MessageConfiguration (dict) -- The message configuration settings.
        • ADMMessage (dict) -- The message that the campaign delivers to ADM channels. Overrides the default message.
          • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
          • Body (string) -- The message body. Can include up to 140 characters.
          • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl (string) -- The URL that points to an image used in the push notification.
          • JsonBody (string) -- The JSON payload used for a silent push.
          • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
          • Title (string) -- The message title that displays above the message on the user's device.
          • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
        • APNSMessage (dict) -- The message that the campaign delivers to APNS channels. Overrides the default message.
          • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
          • Body (string) -- The message body. Can include up to 140 characters.
          • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl (string) -- The URL that points to an image used in the push notification.
          • JsonBody (string) -- The JSON payload used for a silent push.
          • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
          • Title (string) -- The message title that displays above the message on the user's device.
          • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
        • BaiduMessage (dict) -- The message that the campaign delivers to Baidu channels. Overrides the default message.
          • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
          • Body (string) -- The message body. Can include up to 140 characters.
          • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl (string) -- The URL that points to an image used in the push notification.
          • JsonBody (string) -- The JSON payload used for a silent push.
          • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
          • Title (string) -- The message title that displays above the message on the user's device.
          • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
        • DefaultMessage (dict) -- The default message for all channels.
          • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
          • Body (string) -- The message body. Can include up to 140 characters.
          • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl (string) -- The URL that points to an image used in the push notification.
          • JsonBody (string) -- The JSON payload used for a silent push.
          • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
          • Title (string) -- The message title that displays above the message on the user's device.
          • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
        • EmailMessage (dict) -- The email message configuration.
          • Body (string) -- The email text body.
          • FromAddress (string) -- The email address used to send the email from. Defaults to use FromAddress specified in the Email Channel.
          • HtmlBody (string) -- The email html body.
          • Title (string) -- The email title (Or subject).
        • GCMMessage (dict) -- The message that the campaign delivers to GCM channels. Overrides the default message.
          • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
          • Body (string) -- The message body. Can include up to 140 characters.
          • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl (string) -- The URL that points to an image used in the push notification.
          • JsonBody (string) -- The JSON payload used for a silent push.
          • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
          • Title (string) -- The message title that displays above the message on the user's device.
          • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
        • SMSMessage (dict) -- The SMS message configuration.
          • Body (string) -- The SMS text body.
          • MessageType (string) -- Is this is a transactional SMS message, otherwise a promotional message.
          • SenderId (string) -- Sender ID of sent message.
      • Name (string) -- The custom name of the campaign.
      • Schedule (dict) -- The campaign schedule.
        • EndTime (string) -- The scheduled time that the campaign ends in ISO 8601 format.
        • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY
        • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.
        • QuietTime (dict) -- The time during which the campaign sends no messages.
          • End (string) -- The default end time for quiet time in ISO 8601 format.
          • Start (string) -- The default start time for quiet time in ISO 8601 format.
        • StartTime (string) -- The scheduled time that the campaign begins in ISO 8601 format.
        • Timezone (string) -- The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
      • SegmentId (string) -- The ID of the segment to which the campaign sends messages.
      • SegmentVersion (integer) -- The version of the segment to which the campaign sends messages.
      • State (dict) -- The campaign status. An A/B test campaign will have a status of COMPLETED only when all treatments have a status of COMPLETED.
        • CampaignStatus (string) -- The status of the campaign, or the status of a treatment that belongs to an A/B test campaign. Valid values: SCHEDULED, EXECUTING, PENDING_NEXT_RUN, COMPLETED, PAUSED
      • TreatmentDescription (string) -- A custom description for the treatment.
      • TreatmentName (string) -- The custom name of a variation of the campaign used for A/B testing.
      • Version (integer) -- The campaign version number.

delete_email_channel(**kwargs)

Delete an email channel.

See also: AWS API Documentation

Request Syntax

response = client.delete_email_channel(
    ApplicationId='string'
)
Parameters
ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
Return type
dict
Returns
Response Syntax
{
    'EmailChannelResponse': {
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'Enabled': True|False,
        'FromAddress': 'string',
        'HasCredential': True|False,
        'Id': 'string',
        'Identity': 'string',
        'IsArchived': True|False,
        'LastModifiedBy': 'string',
        'LastModifiedDate': 'string',
        'MessagesPerSecond': 123,
        'Platform': 'string',
        'RoleArn': 'string',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response
    • EmailChannelResponse (dict) -- Email Channel Response.
      • ApplicationId (string) -- The unique ID of the application to which the email channel belongs.
      • CreationDate (string) -- The date that the settings were last updated in ISO 8601 format.
      • Enabled (boolean) -- If the channel is enabled for sending messages.
      • FromAddress (string) -- The email address used to send emails from.
      • HasCredential (boolean) -- Not used. Retained for backwards compatibility.
      • Id (string) -- Channel ID. Not used, only for backwards compatibility.
      • Identity (string) -- The ARN of an identity verified with SES.
      • IsArchived (boolean) -- Is this channel archived
      • LastModifiedBy (string) -- Who last updated this entry
      • LastModifiedDate (string) -- Last date this was updated
      • MessagesPerSecond (integer) -- Messages per second that can be sent
      • Platform (string) -- Platform type. Will be "EMAIL"
      • RoleArn (string) -- The ARN of an IAM Role used to submit events to Mobile Analytics' event ingestion service
      • Version (integer) -- Version of channel
delete_endpoint(**kwargs)

Deletes an endpoint.

See also: AWS API Documentation

Request Syntax

response = client.delete_endpoint(
    ApplicationId='string',
    EndpointId='string'
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • EndpointId (string) -- [REQUIRED] The unique ID of the endpoint.
Return type

dict

Returns

Response Syntax

{
    'EndpointResponse': {
        'Address': 'string',
        'ApplicationId': 'string',
        'Attributes': {
            'string': [
                'string',
            ]
        },
        'ChannelType': 'GCM'|'APNS'|'APNS_SANDBOX'|'APNS_VOIP'|'APNS_VOIP_SANDBOX'|'ADM'|'SMS'|'EMAIL'|'BAIDU'|'CUSTOM',
        'CohortId': 'string',
        'CreationDate': 'string',
        'Demographic': {
            'AppVersion': 'string',
            'Locale': 'string',
            'Make': 'string',
            'Model': 'string',
            'ModelVersion': 'string',
            'Platform': 'string',
            'PlatformVersion': 'string',
            'Timezone': 'string'
        },
        'EffectiveDate': 'string',
        'EndpointStatus': 'string',
        'Id': 'string',
        'Location': {
            'City': 'string',
            'Country': 'string',
            'Latitude': 123.0,
            'Longitude': 123.0,
            'PostalCode': 'string',
            'Region': 'string'
        },
        'Metrics': {
            'string': 123.0
        },
        'OptOut': 'string',
        'RequestId': 'string',
        'User': {
            'UserAttributes': {
                'string': [
                    'string',
                ]
            },
            'UserId': 'string'
        }
    }
}

Response Structure

  • (dict) -- 202 response
    • EndpointResponse (dict) -- Endpoint response
      • Address (string) -- The address of the endpoint as provided by your push provider. For example, the DeviceToken or RegistrationId.
      • ApplicationId (string) -- The ID of the application that is associated with the endpoint.
      • Attributes (dict) -- Custom attributes that describe the endpoint by associating a name with an array of values. For example, an attribute named "interests" might have the following values: ["science", "politics", "travel"]. You can use these attributes as selection criteria when you create segments. The Amazon Pinpoint console can't display attribute names that include the following characters: hash/pound sign (#), colon (:), question mark (?), backslash (), and forward slash (/). For this reason, you should avoid using these characters in the names of custom attributes.
        • (string) --
          • (list) --
            • (string) --
      • ChannelType (string) -- The channel type. Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX | ADM | SMS | EMAIL | BAIDU
      • CohortId (string) -- A number from 0-99 that represents the cohort the endpoint is assigned to. Endpoints are grouped into cohorts randomly, and each cohort contains approximately 1 percent of the endpoints for an app. Amazon Pinpoint assigns cohorts to the holdout or treatment allocations for a campaign.
      • CreationDate (string) -- The date and time when the endpoint was created, shown in ISO 8601 format.
      • Demographic (dict) -- The endpoint demographic attributes.
        • AppVersion (string) -- The version of the application associated with the endpoint.
        • Locale (string) -- The endpoint locale in the following format: The ISO 639-1 alpha-2 code, followed by an underscore, followed by an ISO 3166-1 alpha-2 value.
        • Make (string) -- The manufacturer of the endpoint device, such as Apple or Samsung.
        • Model (string) -- The model name or number of the endpoint device, such as iPhone.
        • ModelVersion (string) -- The model version of the endpoint device.
        • Platform (string) -- The platform of the endpoint device, such as iOS or Android.
        • PlatformVersion (string) -- The platform version of the endpoint device.
        • Timezone (string) -- The timezone of the endpoint. Specified as a tz database value, such as Americas/Los_Angeles.
      • EffectiveDate (string) -- The date and time when the endpoint was last updated, shown in ISO 8601 format.
      • EndpointStatus (string) -- Unused.
      • Id (string) -- The unique ID that you assigned to the endpoint. The ID should be a globally unique identifier (GUID) to ensure that it doesn't conflict with other endpoint IDs associated with the application.
      • Location (dict) -- The endpoint location attributes.
        • City (string) -- The city where the endpoint is located.
        • Country (string) -- The two-letter code for the country or region of the endpoint. Specified as an ISO 3166-1 Alpha-2 code, such as "US" for the United States.
        • Latitude (float) -- The latitude of the endpoint location, rounded to one decimal place.
        • Longitude (float) -- The longitude of the endpoint location, rounded to one decimal place.
        • PostalCode (string) -- The postal code or zip code of the endpoint.
        • Region (string) -- The region of the endpoint location. For example, in the United States, this corresponds to a state.
      • Metrics (dict) -- Custom metrics that your app reports to Amazon Pinpoint.
        • (string) --
          • (float) --
      • OptOut (string) -- Indicates whether a user has opted out of receiving messages with one of the following values: ALL - User has opted out of all messages. NONE - Users has not opted out and receives all messages.
      • RequestId (string) -- The unique ID for the most recent request to update the endpoint.
      • User (dict) -- Custom user-specific attributes that your app reports to Amazon Pinpoint.
        • UserAttributes (dict) -- Custom attributes that describe the user by associating a name with an array of values. For example, an attribute named "interests" might have the following values: ["science", "politics", "travel"]. You can use these attributes as selection criteria when you create segments. The Amazon Pinpoint console can't display attribute names that include the following characters: hash/pound sign (#), colon (:), question mark (?), backslash (), and forward slash (/). For this reason, you should avoid using these characters in the names of custom attributes.
          • (string) --
            • (list) --
              • (string) --
        • UserId (string) -- The unique ID of the user.

delete_event_stream(**kwargs)

Deletes the event stream for an app.

See also: AWS API Documentation

Request Syntax

response = client.delete_event_stream(
    ApplicationId='string'
)
Parameters
ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
Return type
dict
Returns
Response Syntax
{
    'EventStream': {
        'ApplicationId': 'string',
        'DestinationStreamArn': 'string',
        'ExternalId': 'string',
        'LastModifiedDate': 'string',
        'LastUpdatedBy': 'string',
        'RoleArn': 'string'
    }
}

Response Structure

  • (dict) -- 200 response
    • EventStream (dict) -- Model for an event publishing subscription export.
      • ApplicationId (string) -- The ID of the application from which events should be published.
      • DestinationStreamArn (string) -- The Amazon Resource Name (ARN) of the Amazon Kinesis stream or Firehose delivery stream to which you want to publish events. Firehose ARN: arn:aws:firehose:REGION:ACCOUNT_ID:deliverystream/STREAM_NAME Kinesis ARN: arn:aws:kinesis:REGION:ACCOUNT_ID:stream/STREAM_NAME
      • ExternalId (string) -- (Deprecated) Your AWS account ID, which you assigned to the ExternalID key in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This requirement is removed, and external IDs are not recommended for IAM roles assumed by Amazon Pinpoint.
      • LastModifiedDate (string) -- The date the event stream was last updated in ISO 8601 format.
      • LastUpdatedBy (string) -- The IAM user who last modified the event stream.
      • RoleArn (string) -- The IAM role that authorizes Amazon Pinpoint to publish events to the stream in your account.
delete_gcm_channel(**kwargs)

Deletes the GCM channel for an app.

See also: AWS API Documentation

Request Syntax

response = client.delete_gcm_channel(
    ApplicationId='string'
)
Parameters
ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
Return type
dict
Returns
Response Syntax
{
    'GCMChannelResponse': {
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'Credential': 'string',
        'Enabled': True|False,
        'HasCredential': True|False,
        'Id': 'string',
        'IsArchived': True|False,
        'LastModifiedBy': 'string',
        'LastModifiedDate': 'string',
        'Platform': 'string',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response
    • GCMChannelResponse (dict) -- Google Cloud Messaging channel definition
      • ApplicationId (string) -- The ID of the application to which the channel applies.
      • CreationDate (string) -- When was this segment created
      • Credential (string) -- The GCM API key from Google.
      • Enabled (boolean) -- If the channel is enabled for sending messages.
      • HasCredential (boolean) -- Not used. Retained for backwards compatibility.
      • Id (string) -- Channel ID. Not used. Present only for backwards compatibility.
      • IsArchived (boolean) -- Is this channel archived
      • LastModifiedBy (string) -- Who last updated this entry
      • LastModifiedDate (string) -- Last date this was updated
      • Platform (string) -- The platform type. Will be GCM
      • Version (integer) -- Version of channel
delete_segment(**kwargs)

Deletes a segment.

See also: AWS API Documentation

Request Syntax

response = client.delete_segment(
    ApplicationId='string',
    SegmentId='string'
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • SegmentId (string) -- [REQUIRED] The unique ID of the segment.
Return type

dict

Returns

Response Syntax

{
    'SegmentResponse': {
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'Dimensions': {
            'Attributes': {
                'string': {
                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                }
            },
            'Behavior': {
                'Recency': {
                    'Duration': 'HR_24'|'DAY_7'|'DAY_14'|'DAY_30',
                    'RecencyType': 'ACTIVE'|'INACTIVE'
                }
            },
            'Demographic': {
                'AppVersion': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'Channel': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'DeviceType': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'Make': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'Model': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'Platform': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                }
            },
            'Location': {
                'Country': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'GPSPoint': {
                    'Coordinates': {
                        'Latitude': 123.0,
                        'Longitude': 123.0
                    },
                    'RangeInKilometers': 123.0
                }
            },
            'Metrics': {
                'string': {
                    'ComparisonOperator': 'string',
                    'Value': 123.0
                }
            },
            'UserAttributes': {
                'string': {
                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                }
            }
        },
        'Id': 'string',
        'ImportDefinition': {
            'ChannelCounts': {
                'string': 123
            },
            'ExternalId': 'string',
            'Format': 'CSV'|'JSON',
            'RoleArn': 'string',
            'S3Url': 'string',
            'Size': 123
        },
        'LastModifiedDate': 'string',
        'Name': 'string',
        'SegmentGroups': {
            'Groups': [
                {
                    'Dimensions': [
                        {
                            'Attributes': {
                                'string': {
                                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'Behavior': {
                                'Recency': {
                                    'Duration': 'HR_24'|'DAY_7'|'DAY_14'|'DAY_30',
                                    'RecencyType': 'ACTIVE'|'INACTIVE'
                                }
                            },
                            'Demographic': {
                                'AppVersion': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Channel': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'DeviceType': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Make': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Model': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Platform': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'Location': {
                                'Country': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'GPSPoint': {
                                    'Coordinates': {
                                        'Latitude': 123.0,
                                        'Longitude': 123.0
                                    },
                                    'RangeInKilometers': 123.0
                                }
                            },
                            'Metrics': {
                                'string': {
                                    'ComparisonOperator': 'string',
                                    'Value': 123.0
                                }
                            },
                            'UserAttributes': {
                                'string': {
                                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            }
                        },
                    ],
                    'SourceSegments': [
                        {
                            'Id': 'string',
                            'Version': 123
                        },
                    ],
                    'SourceType': 'ALL'|'ANY'|'NONE',
                    'Type': 'ALL'|'ANY'|'NONE'
                },
            ],
            'Include': 'ALL'|'ANY'|'NONE'
        },
        'SegmentType': 'DIMENSIONAL'|'IMPORT',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response
    • SegmentResponse (dict) -- Segment definition.
      • ApplicationId (string) -- The ID of the application that the segment applies to.
      • CreationDate (string) -- The date and time when the segment was created.
      • Dimensions (dict) -- The segment dimensions attributes.
        • Attributes (dict) -- Custom segment attributes.
          • (string) --
            • (dict) -- Custom attibute dimension
              • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
              • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                • (string) --
        • Behavior (dict) -- The segment behaviors attributes.
          • Recency (dict) -- The recency of use.
            • Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
            • RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
        • Demographic (dict) -- The segment demographics attributes.
          • AppVersion (dict) -- The app version criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • Channel (dict) -- The channel criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • DeviceType (dict) -- The device type criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • Make (dict) -- The device make criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • Model (dict) -- The device model criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • Platform (dict) -- The device platform criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
        • Location (dict) -- The segment location attributes.
          • Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • GPSPoint (dict) -- The GPS Point dimension.
            • Coordinates (dict) -- Coordinate to measure distance from.
              • Latitude (float) -- Latitude
              • Longitude (float) -- Longitude
            • RangeInKilometers (float) -- Range in kilometers from the coordinate.
        • Metrics (dict) -- Custom segment metrics.
          • (string) --
            • (dict) -- Custom metric dimension
              • ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
              • Value (float) -- Value to be compared.
        • UserAttributes (dict) -- Custom segment user attributes.
          • (string) --
            • (dict) -- Custom attibute dimension
              • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
              • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                • (string) --
      • Id (string) -- The unique segment ID.
      • ImportDefinition (dict) -- The import job settings.
        • ChannelCounts (dict) -- The number of channel types in the imported segment.
          • (string) --
            • (integer) --
        • ExternalId (string) -- (Deprecated) Your AWS account ID, which you assigned to the ExternalID key in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This requirement is removed, and external IDs are not recommended for IAM roles assumed by Amazon Pinpoint.
        • Format (string) -- The format of the endpoint files that were imported to create this segment. Valid values: CSV, JSON
        • RoleArn (string) -- The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the endpoints in Amazon S3.
        • S3Url (string) -- The URL of the S3 bucket that the segment was imported from.
        • Size (integer) -- The number of endpoints that were successfully imported to create this segment.
      • LastModifiedDate (string) -- The date and time when the segment was last modified.
      • Name (string) -- The name of the segment.
      • SegmentGroups (dict) -- A segment group, which consists of zero or more source segments, plus dimensions that are applied to those source segments.
        • Groups (list) -- A set of segment criteria to evaluate.
          • (dict) -- Segment group definition.
            • Dimensions (list) -- List of dimensions to include or exclude.
              • (dict) -- Segment dimensions
                • Attributes (dict) -- Custom segment attributes.
                  • (string) --
                    • (dict) -- Custom attibute dimension
                      • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                      • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                        • (string) --
                • Behavior (dict) -- The segment behaviors attributes.
                  • Recency (dict) -- The recency of use.
                    • Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
                    • RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
                • Demographic (dict) -- The segment demographics attributes.
                  • AppVersion (dict) -- The app version criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • Channel (dict) -- The channel criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • DeviceType (dict) -- The device type criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • Make (dict) -- The device make criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • Model (dict) -- The device model criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • Platform (dict) -- The device platform criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                • Location (dict) -- The segment location attributes.
                  • Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • GPSPoint (dict) -- The GPS Point dimension.
                    • Coordinates (dict) -- Coordinate to measure distance from.
                      • Latitude (float) -- Latitude
                      • Longitude (float) -- Longitude
                    • RangeInKilometers (float) -- Range in kilometers from the coordinate.
                • Metrics (dict) -- Custom segment metrics.
                  • (string) --
                    • (dict) -- Custom metric dimension
                      • ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
                      • Value (float) -- Value to be compared.
                • UserAttributes (dict) -- Custom segment user attributes.
                  • (string) --
                    • (dict) -- Custom attibute dimension
                      • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                      • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                        • (string) --
            • SourceSegments (list) -- The base segment that you build your segment on. The source segment defines the starting "universe" of endpoints. When you add dimensions to the segment, it filters the source segment based on the dimensions that you specify. You can specify more than one dimensional segment. You can only specify one imported segment.
              • (dict) -- Segment reference.
                • Id (string) -- A unique identifier for the segment.
                • Version (integer) -- If specified contains a specific version of the segment included.
            • SourceType (string) -- Specify how to handle multiple source segments. For example, if you specify three source segments, should the resulting segment be based on any or all of the segments? Acceptable values: ANY or ALL.
            • Type (string) -- Specify how to handle multiple segment dimensions. For example, if you specify three dimensions, should the resulting segment include endpoints that are matched by all, any, or none of the dimensions? Acceptable values: ALL, ANY, or NONE.
        • Include (string) -- Specify how to handle multiple segment groups. For example, if the segment includes three segment groups, should the resulting segment include endpoints that are matched by all, any, or none of the segment groups you created. Acceptable values: ALL, ANY, or NONE.
      • SegmentType (string) -- The segment type: DIMENSIONAL - A dynamic segment built from selection criteria based on endpoint data reported by your app. You create this type of segment by using the segment builder in the Amazon Pinpoint console or by making a POST request to the segments resource. IMPORT - A static segment built from an imported set of endpoint definitions. You create this type of segment by importing a segment in the Amazon Pinpoint console or by making a POST request to the jobs/import resource.
      • Version (integer) -- The segment version number.

delete_sms_channel(**kwargs)

Delete an SMS channel.

See also: AWS API Documentation

Request Syntax

response = client.delete_sms_channel(
    ApplicationId='string'
)
Parameters
ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
Return type
dict
Returns
Response Syntax
{
    'SMSChannelResponse': {
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'Enabled': True|False,
        'HasCredential': True|False,
        'Id': 'string',
        'IsArchived': True|False,
        'LastModifiedBy': 'string',
        'LastModifiedDate': 'string',
        'Platform': 'string',
        'PromotionalMessagesPerSecond': 123,
        'SenderId': 'string',
        'ShortCode': 'string',
        'TransactionalMessagesPerSecond': 123,
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response
    • SMSChannelResponse (dict) -- SMS Channel Response.
      • ApplicationId (string) -- The unique ID of the application to which the SMS channel belongs.
      • CreationDate (string) -- The date that the settings were last updated in ISO 8601 format.
      • Enabled (boolean) -- If the channel is enabled for sending messages.
      • HasCredential (boolean) -- Not used. Retained for backwards compatibility.
      • Id (string) -- Channel ID. Not used, only for backwards compatibility.
      • IsArchived (boolean) -- Is this channel archived
      • LastModifiedBy (string) -- Who last updated this entry
      • LastModifiedDate (string) -- Last date this was updated
      • Platform (string) -- Platform type. Will be "SMS"
      • PromotionalMessagesPerSecond (integer) -- Promotional messages per second that can be sent
      • SenderId (string) -- Sender identifier of your messages.
      • ShortCode (string) -- The short code registered with the phone provider.
      • TransactionalMessagesPerSecond (integer) -- Transactional messages per second that can be sent
      • Version (integer) -- Version of channel
delete_user_endpoints(**kwargs)

Deletes endpoints that are associated with a User ID.

See also: AWS API Documentation

Request Syntax

response = client.delete_user_endpoints(
    ApplicationId='string',
    UserId='string'
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • UserId (string) -- [REQUIRED] The unique ID of the user.
Return type

dict

Returns

Response Syntax

{
    'EndpointsResponse': {
        'Item': [
            {
                'Address': 'string',
                'ApplicationId': 'string',
                'Attributes': {
                    'string': [
                        'string',
                    ]
                },
                'ChannelType': 'GCM'|'APNS'|'APNS_SANDBOX'|'APNS_VOIP'|'APNS_VOIP_SANDBOX'|'ADM'|'SMS'|'EMAIL'|'BAIDU'|'CUSTOM',
                'CohortId': 'string',
                'CreationDate': 'string',
                'Demographic': {
                    'AppVersion': 'string',
                    'Locale': 'string',
                    'Make': 'string',
                    'Model': 'string',
                    'ModelVersion': 'string',
                    'Platform': 'string',
                    'PlatformVersion': 'string',
                    'Timezone': 'string'
                },
                'EffectiveDate': 'string',
                'EndpointStatus': 'string',
                'Id': 'string',
                'Location': {
                    'City': 'string',
                    'Country': 'string',
                    'Latitude': 123.0,
                    'Longitude': 123.0,
                    'PostalCode': 'string',
                    'Region': 'string'
                },
                'Metrics': {
                    'string': 123.0
                },
                'OptOut': 'string',
                'RequestId': 'string',
                'User': {
                    'UserAttributes': {
                        'string': [
                            'string',
                        ]
                    },
                    'UserId': 'string'
                }
            },
        ]
    }
}

Response Structure

  • (dict) -- 202 response
    • EndpointsResponse (dict) -- List of endpoints
      • Item (list) -- The list of endpoints.
        • (dict) -- Endpoint response
          • Address (string) -- The address of the endpoint as provided by your push provider. For example, the DeviceToken or RegistrationId.
          • ApplicationId (string) -- The ID of the application that is associated with the endpoint.
          • Attributes (dict) -- Custom attributes that describe the endpoint by associating a name with an array of values. For example, an attribute named "interests" might have the following values: ["science", "politics", "travel"]. You can use these attributes as selection criteria when you create segments. The Amazon Pinpoint console can't display attribute names that include the following characters: hash/pound sign (#), colon (:), question mark (?), backslash (), and forward slash (/). For this reason, you should avoid using these characters in the names of custom attributes.
            • (string) --
              • (list) --
                • (string) --
          • ChannelType (string) -- The channel type. Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX | ADM | SMS | EMAIL | BAIDU
          • CohortId (string) -- A number from 0-99 that represents the cohort the endpoint is assigned to. Endpoints are grouped into cohorts randomly, and each cohort contains approximately 1 percent of the endpoints for an app. Amazon Pinpoint assigns cohorts to the holdout or treatment allocations for a campaign.
          • CreationDate (string) -- The date and time when the endpoint was created, shown in ISO 8601 format.
          • Demographic (dict) -- The endpoint demographic attributes.
            • AppVersion (string) -- The version of the application associated with the endpoint.
            • Locale (string) -- The endpoint locale in the following format: The ISO 639-1 alpha-2 code, followed by an underscore, followed by an ISO 3166-1 alpha-2 value.
            • Make (string) -- The manufacturer of the endpoint device, such as Apple or Samsung.
            • Model (string) -- The model name or number of the endpoint device, such as iPhone.
            • ModelVersion (string) -- The model version of the endpoint device.
            • Platform (string) -- The platform of the endpoint device, such as iOS or Android.
            • PlatformVersion (string) -- The platform version of the endpoint device.
            • Timezone (string) -- The timezone of the endpoint. Specified as a tz database value, such as Americas/Los_Angeles.
          • EffectiveDate (string) -- The date and time when the endpoint was last updated, shown in ISO 8601 format.
          • EndpointStatus (string) -- Unused.
          • Id (string) -- The unique ID that you assigned to the endpoint. The ID should be a globally unique identifier (GUID) to ensure that it doesn't conflict with other endpoint IDs associated with the application.
          • Location (dict) -- The endpoint location attributes.
            • City (string) -- The city where the endpoint is located.
            • Country (string) -- The two-letter code for the country or region of the endpoint. Specified as an ISO 3166-1 Alpha-2 code, such as "US" for the United States.
            • Latitude (float) -- The latitude of the endpoint location, rounded to one decimal place.
            • Longitude (float) -- The longitude of the endpoint location, rounded to one decimal place.
            • PostalCode (string) -- The postal code or zip code of the endpoint.
            • Region (string) -- The region of the endpoint location. For example, in the United States, this corresponds to a state.
          • Metrics (dict) -- Custom metrics that your app reports to Amazon Pinpoint.
            • (string) --
              • (float) --
          • OptOut (string) -- Indicates whether a user has opted out of receiving messages with one of the following values: ALL - User has opted out of all messages. NONE - Users has not opted out and receives all messages.
          • RequestId (string) -- The unique ID for the most recent request to update the endpoint.
          • User (dict) -- Custom user-specific attributes that your app reports to Amazon Pinpoint.
            • UserAttributes (dict) -- Custom attributes that describe the user by associating a name with an array of values. For example, an attribute named "interests" might have the following values: ["science", "politics", "travel"]. You can use these attributes as selection criteria when you create segments. The Amazon Pinpoint console can't display attribute names that include the following characters: hash/pound sign (#), colon (:), question mark (?), backslash (), and forward slash (/). For this reason, you should avoid using these characters in the names of custom attributes.
              • (string) --
                • (list) --
                  • (string) --
            • UserId (string) -- The unique ID of the user.

generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

Generate a presigned url given a client, its method, and arguments

Parameters
  • ClientMethod (string) -- The client method to presign for
  • Params (dict) -- The parameters normally passed to ClientMethod.
  • ExpiresIn (int) -- The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)
  • HttpMethod (string) -- The http method to use on the generated url. By default, the http method is whatever is used in the method's model.
Returns

The presigned url

get_adm_channel(**kwargs)

Get an ADM channel.

See also: AWS API Documentation

Request Syntax

response = client.get_adm_channel(
    ApplicationId='string'
)
Parameters
ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
Return type
dict
Returns
Response Syntax
{
    'ADMChannelResponse': {
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'Enabled': True|False,
        'HasCredential': True|False,
        'Id': 'string',
        'IsArchived': True|False,
        'LastModifiedBy': 'string',
        'LastModifiedDate': 'string',
        'Platform': 'string',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response
    • ADMChannelResponse (dict) -- Amazon Device Messaging channel definition.
      • ApplicationId (string) -- The ID of the application to which the channel applies.
      • CreationDate (string) -- The date and time when this channel was created.
      • Enabled (boolean) -- Indicates whether or not the channel is enabled for sending messages.
      • HasCredential (boolean) -- Not used. Retained for backwards compatibility.
      • Id (string) -- (Deprecated) An identifier for the channel. Retained for backwards compatibility.
      • IsArchived (boolean) -- Indicates whether or not the channel is archived.
      • LastModifiedBy (string) -- The user who last updated this channel.
      • LastModifiedDate (string) -- The date and time when this channel was last modified.
      • Platform (string) -- The platform type. For this channel, the value is always "ADM."
      • Version (integer) -- The channel version.
get_apns_channel(**kwargs)

Returns information about the APNs channel for an app.

See also: AWS API Documentation

Request Syntax

response = client.get_apns_channel(
    ApplicationId='string'
)
Parameters
ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
Return type
dict
Returns
Response Syntax
{
    'APNSChannelResponse': {
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'DefaultAuthenticationMethod': 'string',
        'Enabled': True|False,
        'HasCredential': True|False,
        'HasTokenKey': True|False,
        'Id': 'string',
        'IsArchived': True|False,
        'LastModifiedBy': 'string',
        'LastModifiedDate': 'string',
        'Platform': 'string',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response
    • APNSChannelResponse (dict) -- Apple Distribution Push Notification Service channel definition.
      • ApplicationId (string) -- The ID of the application that the channel applies to.
      • CreationDate (string) -- The date and time when this channel was created.
      • DefaultAuthenticationMethod (string) -- The default authentication method used for APNs.
      • Enabled (boolean) -- If the channel is enabled for sending messages.
      • HasCredential (boolean) -- Not used. Retained for backwards compatibility.
      • HasTokenKey (boolean) -- Indicates whether the channel is configured with a key for APNs token authentication. Provide a token key by setting the TokenKey attribute.
      • Id (string) -- (Deprecated) An identifier for the channel. Retained for backwards compatibility.
      • IsArchived (boolean) -- Indicates whether or not the channel is archived.
      • LastModifiedBy (string) -- The user who last updated this channel.
      • LastModifiedDate (string) -- The date and time when this channel was last modified.
      • Platform (string) -- The platform type. For this channel, the value is always "ADM."
      • Version (integer) -- The channel version.
get_apns_sandbox_channel(**kwargs)

Get an APNS sandbox channel.

See also: AWS API Documentation

Request Syntax

response = client.get_apns_sandbox_channel(
    ApplicationId='string'
)
Parameters
ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
Return type
dict
Returns
Response Syntax
{
    'APNSSandboxChannelResponse': {
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'DefaultAuthenticationMethod': 'string',
        'Enabled': True|False,
        'HasCredential': True|False,
        'HasTokenKey': True|False,
        'Id': 'string',
        'IsArchived': True|False,
        'LastModifiedBy': 'string',
        'LastModifiedDate': 'string',
        'Platform': 'string',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response
    • APNSSandboxChannelResponse (dict) -- Apple Development Push Notification Service channel definition.
      • ApplicationId (string) -- The ID of the application to which the channel applies.
      • CreationDate (string) -- When was this segment created
      • DefaultAuthenticationMethod (string) -- The default authentication method used for APNs.
      • Enabled (boolean) -- If the channel is enabled for sending messages.
      • HasCredential (boolean) -- Not used. Retained for backwards compatibility.
      • HasTokenKey (boolean) -- Indicates whether the channel is configured with a key for APNs token authentication. Provide a token key by setting the TokenKey attribute.
      • Id (string) -- Channel ID. Not used, only for backwards compatibility.
      • IsArchived (boolean) -- Is this channel archived
      • LastModifiedBy (string) -- Who last updated this entry
      • LastModifiedDate (string) -- Last date this was updated
      • Platform (string) -- The platform type. Will be APNS_SANDBOX.
      • Version (integer) -- Version of channel
get_apns_voip_channel(**kwargs)

Get an APNS VoIP channel

See also: AWS API Documentation

Request Syntax

response = client.get_apns_voip_channel(
    ApplicationId='string'
)
Parameters
ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
Return type
dict
Returns
Response Syntax
{
    'APNSVoipChannelResponse': {
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'DefaultAuthenticationMethod': 'string',
        'Enabled': True|False,
        'HasCredential': True|False,
        'HasTokenKey': True|False,
        'Id': 'string',
        'IsArchived': True|False,
        'LastModifiedBy': 'string',
        'LastModifiedDate': 'string',
        'Platform': 'string',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response
    • APNSVoipChannelResponse (dict) -- Apple VoIP Push Notification Service channel definition.
      • ApplicationId (string) -- Application id
      • CreationDate (string) -- When was this segment created
      • DefaultAuthenticationMethod (string) -- The default authentication method used for APNs.
      • Enabled (boolean) -- If the channel is enabled for sending messages.
      • HasCredential (boolean) -- Not used. Retained for backwards compatibility.
      • HasTokenKey (boolean) -- If the channel is registered with a token key for authentication.
      • Id (string) -- Channel ID. Not used, only for backwards compatibility.
      • IsArchived (boolean) -- Is this channel archived
      • LastModifiedBy (string) -- Who made the last change
      • LastModifiedDate (string) -- Last date this was updated
      • Platform (string) -- The platform type. Will be APNS.
      • Version (integer) -- Version of channel
get_apns_voip_sandbox_channel(**kwargs)

Get an APNS VoIPSandbox channel

See also: AWS API Documentation

Request Syntax

response = client.get_apns_voip_sandbox_channel(
    ApplicationId='string'
)
Parameters
ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
Return type
dict
Returns
Response Syntax
{
    'APNSVoipSandboxChannelResponse': {
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'DefaultAuthenticationMethod': 'string',
        'Enabled': True|False,
        'HasCredential': True|False,
        'HasTokenKey': True|False,
        'Id': 'string',
        'IsArchived': True|False,
        'LastModifiedBy': 'string',
        'LastModifiedDate': 'string',
        'Platform': 'string',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response
    • APNSVoipSandboxChannelResponse (dict) -- Apple VoIP Developer Push Notification Service channel definition.
      • ApplicationId (string) -- Application id
      • CreationDate (string) -- When was this segment created
      • DefaultAuthenticationMethod (string) -- The default authentication method used for APNs.
      • Enabled (boolean) -- If the channel is enabled for sending messages.
      • HasCredential (boolean) -- Not used. Retained for backwards compatibility.
      • HasTokenKey (boolean) -- If the channel is registered with a token key for authentication.
      • Id (string) -- Channel ID. Not used, only for backwards compatibility.
      • IsArchived (boolean) -- Is this channel archived
      • LastModifiedBy (string) -- Who made the last change
      • LastModifiedDate (string) -- Last date this was updated
      • Platform (string) -- The platform type. Will be APNS.
      • Version (integer) -- Version of channel
get_app(**kwargs)

Returns information about an app.

See also: AWS API Documentation

Request Syntax

response = client.get_app(
    ApplicationId='string'
)
Parameters
ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
Return type
dict
Returns
Response Syntax
{
    'ApplicationResponse': {
        'Id': 'string',
        'Name': 'string'
    }
}

Response Structure

  • (dict) -- 200 response
    • ApplicationResponse (dict) -- Application Response.
      • Id (string) -- The unique application ID.
      • Name (string) -- The display name of the application.
get_application_settings(**kwargs)

Used to request the settings for an app.

See also: AWS API Documentation

Request Syntax

response = client.get_application_settings(
    ApplicationId='string'
)
Parameters
ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
Return type
dict
Returns
Response Syntax
{
    'ApplicationSettingsResource': {
        'ApplicationId': 'string',
        'CampaignHook': {
            'LambdaFunctionName': 'string',
            'Mode': 'DELIVERY'|'FILTER',
            'WebUrl': 'string'
        },
        'LastModifiedDate': 'string',
        'Limits': {
            'Daily': 123,
            'MaximumDuration': 123,
            'MessagesPerSecond': 123,
            'Total': 123
        },
        'QuietTime': {
            'End': 'string',
            'Start': 'string'
        }
    }
}

Response Structure

  • (dict) -- 200 response
    • ApplicationSettingsResource (dict) -- Application settings.
      • ApplicationId (string) -- The unique ID for the application.
      • CampaignHook (dict) -- Default campaign hook.
        • LambdaFunctionName (string) -- Lambda function name or arn to be called for delivery
        • Mode (string) -- What mode Lambda should be invoked in.
        • WebUrl (string) -- Web URL to call for hook. If the URL has authentication specified it will be added as authentication to the request
      • LastModifiedDate (string) -- The date that the settings were last updated in ISO 8601 format.
      • Limits (dict) -- The default campaign limits for the app. These limits apply to each campaign for the app, unless the campaign overrides the default with limits of its own.
        • Daily (integer) -- The maximum number of messages that the campaign can send daily.
        • MaximumDuration (integer) -- The length of time (in seconds) that the campaign can run before it ends and message deliveries stop. This duration begins at the scheduled start time for the campaign. The minimum value is 60.
        • MessagesPerSecond (integer) -- The number of messages that the campaign can send per second. The minimum value is 50, and the maximum is 20000.
        • Total (integer) -- The maximum total number of messages that the campaign can send.
      • QuietTime (dict) -- The default quiet time for the app. Each campaign for this app sends no messages during this time unless the campaign overrides the default with a quiet time of its own.
        • End (string) -- The default end time for quiet time in ISO 8601 format.
        • Start (string) -- The default start time for quiet time in ISO 8601 format.
get_apps(**kwargs)

Returns information about your apps.

See also: AWS API Documentation

Request Syntax

response = client.get_apps(
    PageSize='string',
    Token='string'
)
Parameters
  • PageSize (string) -- The number of entries you want on each page in the response.
  • Token (string) -- The NextToken string returned on a previous page that you use to get the next page of results in a paginated response.
Return type

dict

Returns

Response Syntax

{
    'ApplicationsResponse': {
        'Item': [
            {
                'Id': 'string',
                'Name': 'string'
            },
        ],
        'NextToken': 'string'
    }
}

Response Structure

  • (dict) -- 200 response
    • ApplicationsResponse (dict) -- Get Applications Result.
      • Item (list) -- List of applications returned in this page.
        • (dict) -- Application Response.
          • Id (string) -- The unique application ID.
          • Name (string) -- The display name of the application.
      • NextToken (string) -- The string that you use in a subsequent request to get the next page of results in a paginated response.

get_baidu_channel(**kwargs)

Get a BAIDU GCM channel

See also: AWS API Documentation

Request Syntax

response = client.get_baidu_channel(
    ApplicationId='string'
)
Parameters
ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
Return type
dict
Returns
Response Syntax
{
    'BaiduChannelResponse': {
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'Credential': 'string',
        'Enabled': True|False,
        'HasCredential': True|False,
        'Id': 'string',
        'IsArchived': True|False,
        'LastModifiedBy': 'string',
        'LastModifiedDate': 'string',
        'Platform': 'string',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response
    • BaiduChannelResponse (dict) -- Baidu Cloud Messaging channel definition
      • ApplicationId (string) -- Application id
      • CreationDate (string) -- When was this segment created
      • Credential (string) -- The Baidu API key from Baidu.
      • Enabled (boolean) -- If the channel is enabled for sending messages.
      • HasCredential (boolean) -- Not used. Retained for backwards compatibility.
      • Id (string) -- Channel ID. Not used, only for backwards compatibility.
      • IsArchived (boolean) -- Is this channel archived
      • LastModifiedBy (string) -- Who made the last change
      • LastModifiedDate (string) -- Last date this was updated
      • Platform (string) -- The platform type. Will be BAIDU
      • Version (integer) -- Version of channel
get_campaign(**kwargs)

Returns information about a campaign.

See also: AWS API Documentation

Request Syntax

response = client.get_campaign(
    ApplicationId='string',
    CampaignId='string'
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • CampaignId (string) -- [REQUIRED] The unique ID of the campaign.
Return type

dict

Returns

Response Syntax

{
    'CampaignResponse': {
        'AdditionalTreatments': [
            {
                'Id': 'string',
                'MessageConfiguration': {
                    'ADMMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'APNSMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'BaiduMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'DefaultMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'EmailMessage': {
                        'Body': 'string',
                        'FromAddress': 'string',
                        'HtmlBody': 'string',
                        'Title': 'string'
                    },
                    'GCMMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'SMSMessage': {
                        'Body': 'string',
                        'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL',
                        'SenderId': 'string'
                    }
                },
                'Schedule': {
                    'EndTime': 'string',
                    'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY',
                    'IsLocalTime': True|False,
                    'QuietTime': {
                        'End': 'string',
                        'Start': 'string'
                    },
                    'StartTime': 'string',
                    'Timezone': 'string'
                },
                'SizePercent': 123,
                'State': {
                    'CampaignStatus': 'SCHEDULED'|'EXECUTING'|'PENDING_NEXT_RUN'|'COMPLETED'|'PAUSED'|'DELETED'
                },
                'TreatmentDescription': 'string',
                'TreatmentName': 'string'
            },
        ],
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'DefaultState': {
            'CampaignStatus': 'SCHEDULED'|'EXECUTING'|'PENDING_NEXT_RUN'|'COMPLETED'|'PAUSED'|'DELETED'
        },
        'Description': 'string',
        'HoldoutPercent': 123,
        'Hook': {
            'LambdaFunctionName': 'string',
            'Mode': 'DELIVERY'|'FILTER',
            'WebUrl': 'string'
        },
        'Id': 'string',
        'IsPaused': True|False,
        'LastModifiedDate': 'string',
        'Limits': {
            'Daily': 123,
            'MaximumDuration': 123,
            'MessagesPerSecond': 123,
            'Total': 123
        },
        'MessageConfiguration': {
            'ADMMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'APNSMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'BaiduMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'DefaultMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'EmailMessage': {
                'Body': 'string',
                'FromAddress': 'string',
                'HtmlBody': 'string',
                'Title': 'string'
            },
            'GCMMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'SMSMessage': {
                'Body': 'string',
                'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL',
                'SenderId': 'string'
            }
        },
        'Name': 'string',
        'Schedule': {
            'EndTime': 'string',
            'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY',
            'IsLocalTime': True|False,
            'QuietTime': {
                'End': 'string',
                'Start': 'string'
            },
            'StartTime': 'string',
            'Timezone': 'string'
        },
        'SegmentId': 'string',
        'SegmentVersion': 123,
        'State': {
            'CampaignStatus': 'SCHEDULED'|'EXECUTING'|'PENDING_NEXT_RUN'|'COMPLETED'|'PAUSED'|'DELETED'
        },
        'TreatmentDescription': 'string',
        'TreatmentName': 'string',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response
    • CampaignResponse (dict) -- Campaign definition
      • AdditionalTreatments (list) -- Treatments that are defined in addition to the default treatment.
        • (dict) -- Treatment resource
          • Id (string) -- The unique treatment ID.
          • MessageConfiguration (dict) -- The message configuration settings.
            • ADMMessage (dict) -- The message that the campaign delivers to ADM channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • APNSMessage (dict) -- The message that the campaign delivers to APNS channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • BaiduMessage (dict) -- The message that the campaign delivers to Baidu channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • DefaultMessage (dict) -- The default message for all channels.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • EmailMessage (dict) -- The email message configuration.
              • Body (string) -- The email text body.
              • FromAddress (string) -- The email address used to send the email from. Defaults to use FromAddress specified in the Email Channel.
              • HtmlBody (string) -- The email html body.
              • Title (string) -- The email title (Or subject).
            • GCMMessage (dict) -- The message that the campaign delivers to GCM channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • SMSMessage (dict) -- The SMS message configuration.
              • Body (string) -- The SMS text body.
              • MessageType (string) -- Is this is a transactional SMS message, otherwise a promotional message.
              • SenderId (string) -- Sender ID of sent message.
          • Schedule (dict) -- The campaign schedule.
            • EndTime (string) -- The scheduled time that the campaign ends in ISO 8601 format.
            • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY
            • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.
            • QuietTime (dict) -- The time during which the campaign sends no messages.
              • End (string) -- The default end time for quiet time in ISO 8601 format.
              • Start (string) -- The default start time for quiet time in ISO 8601 format.
            • StartTime (string) -- The scheduled time that the campaign begins in ISO 8601 format.
            • Timezone (string) -- The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
          • SizePercent (integer) -- The allocated percentage of users for this treatment.
          • State (dict) -- The treatment status.
            • CampaignStatus (string) -- The status of the campaign, or the status of a treatment that belongs to an A/B test campaign. Valid values: SCHEDULED, EXECUTING, PENDING_NEXT_RUN, COMPLETED, PAUSED
          • TreatmentDescription (string) -- A custom description for the treatment.
          • TreatmentName (string) -- The custom name of a variation of the campaign used for A/B testing.
      • ApplicationId (string) -- The ID of the application to which the campaign applies.
      • CreationDate (string) -- The date the campaign was created in ISO 8601 format.
      • DefaultState (dict) -- The status of the campaign's default treatment. Only present for A/B test campaigns.
        • CampaignStatus (string) -- The status of the campaign, or the status of a treatment that belongs to an A/B test campaign. Valid values: SCHEDULED, EXECUTING, PENDING_NEXT_RUN, COMPLETED, PAUSED
      • Description (string) -- A description of the campaign.
      • HoldoutPercent (integer) -- The allocated percentage of end users who will not receive messages from this campaign.
      • Hook (dict) -- Campaign hook information.
        • LambdaFunctionName (string) -- Lambda function name or arn to be called for delivery
        • Mode (string) -- What mode Lambda should be invoked in.
        • WebUrl (string) -- Web URL to call for hook. If the URL has authentication specified it will be added as authentication to the request
      • Id (string) -- The unique campaign ID.
      • IsPaused (boolean) -- Indicates whether the campaign is paused. A paused campaign does not send messages unless you resume it by setting IsPaused to false.
      • LastModifiedDate (string) -- The date the campaign was last updated in ISO 8601 format.
      • Limits (dict) -- The campaign limits settings.
        • Daily (integer) -- The maximum number of messages that the campaign can send daily.
        • MaximumDuration (integer) -- The length of time (in seconds) that the campaign can run before it ends and message deliveries stop. This duration begins at the scheduled start time for the campaign. The minimum value is 60.
        • MessagesPerSecond (integer) -- The number of messages that the campaign can send per second. The minimum value is 50, and the maximum is 20000.
        • Total (integer) -- The maximum total number of messages that the campaign can send.
      • MessageConfiguration (dict) -- The message configuration settings.
        • ADMMessage (dict) -- The message that the campaign delivers to ADM channels. Overrides the default message.
          • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
          • Body (string) -- The message body. Can include up to 140 characters.
          • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl (string) -- The URL that points to an image used in the push notification.
          • JsonBody (string) -- The JSON payload used for a silent push.
          • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
          • Title (string) -- The message title that displays above the message on the user's device.
          • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
        • APNSMessage (dict) -- The message that the campaign delivers to APNS channels. Overrides the default message.
          • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
          • Body (string) -- The message body. Can include up to 140 characters.
          • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl (string) -- The URL that points to an image used in the push notification.
          • JsonBody (string) -- The JSON payload used for a silent push.
          • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
          • Title (string) -- The message title that displays above the message on the user's device.
          • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
        • BaiduMessage (dict) -- The message that the campaign delivers to Baidu channels. Overrides the default message.
          • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
          • Body (string) -- The message body. Can include up to 140 characters.
          • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl (string) -- The URL that points to an image used in the push notification.
          • JsonBody (string) -- The JSON payload used for a silent push.
          • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
          • Title (string) -- The message title that displays above the message on the user's device.
          • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
        • DefaultMessage (dict) -- The default message for all channels.
          • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
          • Body (string) -- The message body. Can include up to 140 characters.
          • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl (string) -- The URL that points to an image used in the push notification.
          • JsonBody (string) -- The JSON payload used for a silent push.
          • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
          • Title (string) -- The message title that displays above the message on the user's device.
          • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
        • EmailMessage (dict) -- The email message configuration.
          • Body (string) -- The email text body.
          • FromAddress (string) -- The email address used to send the email from. Defaults to use FromAddress specified in the Email Channel.
          • HtmlBody (string) -- The email html body.
          • Title (string) -- The email title (Or subject).
        • GCMMessage (dict) -- The message that the campaign delivers to GCM channels. Overrides the default message.
          • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
          • Body (string) -- The message body. Can include up to 140 characters.
          • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl (string) -- The URL that points to an image used in the push notification.
          • JsonBody (string) -- The JSON payload used for a silent push.
          • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
          • Title (string) -- The message title that displays above the message on the user's device.
          • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
        • SMSMessage (dict) -- The SMS message configuration.
          • Body (string) -- The SMS text body.
          • MessageType (string) -- Is this is a transactional SMS message, otherwise a promotional message.
          • SenderId (string) -- Sender ID of sent message.
      • Name (string) -- The custom name of the campaign.
      • Schedule (dict) -- The campaign schedule.
        • EndTime (string) -- The scheduled time that the campaign ends in ISO 8601 format.
        • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY
        • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.
        • QuietTime (dict) -- The time during which the campaign sends no messages.
          • End (string) -- The default end time for quiet time in ISO 8601 format.
          • Start (string) -- The default start time for quiet time in ISO 8601 format.
        • StartTime (string) -- The scheduled time that the campaign begins in ISO 8601 format.
        • Timezone (string) -- The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
      • SegmentId (string) -- The ID of the segment to which the campaign sends messages.
      • SegmentVersion (integer) -- The version of the segment to which the campaign sends messages.
      • State (dict) -- The campaign status. An A/B test campaign will have a status of COMPLETED only when all treatments have a status of COMPLETED.
        • CampaignStatus (string) -- The status of the campaign, or the status of a treatment that belongs to an A/B test campaign. Valid values: SCHEDULED, EXECUTING, PENDING_NEXT_RUN, COMPLETED, PAUSED
      • TreatmentDescription (string) -- A custom description for the treatment.
      • TreatmentName (string) -- The custom name of a variation of the campaign used for A/B testing.
      • Version (integer) -- The campaign version number.

get_campaign_activities(**kwargs)

Returns information about the activity performed by a campaign.

See also: AWS API Documentation

Request Syntax

response = client.get_campaign_activities(
    ApplicationId='string',
    CampaignId='string',
    PageSize='string',
    Token='string'
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • CampaignId (string) -- [REQUIRED] The unique ID of the campaign.
  • PageSize (string) -- The number of entries you want on each page in the response.
  • Token (string) -- The NextToken string returned on a previous page that you use to get the next page of results in a paginated response.
Return type

dict

Returns

Response Syntax

{
    'ActivitiesResponse': {
        'Item': [
            {
                'ApplicationId': 'string',
                'CampaignId': 'string',
                'End': 'string',
                'Id': 'string',
                'Result': 'string',
                'ScheduledStart': 'string',
                'Start': 'string',
                'State': 'string',
                'SuccessfulEndpointCount': 123,
                'TimezonesCompletedCount': 123,
                'TimezonesTotalCount': 123,
                'TotalEndpointCount': 123,
                'TreatmentId': 'string'
            },
        ],
        'NextToken': 'string'
    }
}

Response Structure

  • (dict) -- 200 response
    • ActivitiesResponse (dict) -- Activities for campaign.
      • Item (list) -- List of campaign activities
        • (dict) -- Activity definition
          • ApplicationId (string) -- The ID of the application to which the campaign applies.
          • CampaignId (string) -- The ID of the campaign to which the activity applies.
          • End (string) -- The actual time the activity was marked CANCELLED or COMPLETED. Provided in ISO 8601 format.
          • Id (string) -- The unique activity ID.
          • Result (string) -- Indicates whether the activity succeeded. Valid values: SUCCESS, FAIL
          • ScheduledStart (string) -- The scheduled start time for the activity in ISO 8601 format.
          • Start (string) -- The actual start time of the activity in ISO 8601 format.
          • State (string) -- The state of the activity. Valid values: PENDING, INITIALIZING, RUNNING, PAUSED, CANCELLED, COMPLETED
          • SuccessfulEndpointCount (integer) -- The total number of endpoints to which the campaign successfully delivered messages.
          • TimezonesCompletedCount (integer) -- The total number of timezones completed.
          • TimezonesTotalCount (integer) -- The total number of unique timezones present in the segment.
          • TotalEndpointCount (integer) -- The total number of endpoints to which the campaign attempts to deliver messages.
          • TreatmentId (string) -- The ID of a variation of the campaign used for A/B testing.
      • NextToken (string) -- The string that you use in a subsequent request to get the next page of results in a paginated response.

get_campaign_version(**kwargs)

Returns information about a specific version of a campaign.

See also: AWS API Documentation

Request Syntax

response = client.get_campaign_version(
    ApplicationId='string',
    CampaignId='string',
    Version='string'
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • CampaignId (string) -- [REQUIRED] The unique ID of the campaign.
  • Version (string) -- [REQUIRED] The version of the campaign.
Return type

dict

Returns

Response Syntax

{
    'CampaignResponse': {
        'AdditionalTreatments': [
            {
                'Id': 'string',
                'MessageConfiguration': {
                    'ADMMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'APNSMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'BaiduMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'DefaultMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'EmailMessage': {
                        'Body': 'string',
                        'FromAddress': 'string',
                        'HtmlBody': 'string',
                        'Title': 'string'
                    },
                    'GCMMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'SMSMessage': {
                        'Body': 'string',
                        'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL',
                        'SenderId': 'string'
                    }
                },
                'Schedule': {
                    'EndTime': 'string',
                    'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY',
                    'IsLocalTime': True|False,
                    'QuietTime': {
                        'End': 'string',
                        'Start': 'string'
                    },
                    'StartTime': 'string',
                    'Timezone': 'string'
                },
                'SizePercent': 123,
                'State': {
                    'CampaignStatus': 'SCHEDULED'|'EXECUTING'|'PENDING_NEXT_RUN'|'COMPLETED'|'PAUSED'|'DELETED'
                },
                'TreatmentDescription': 'string',
                'TreatmentName': 'string'
            },
        ],
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'DefaultState': {
            'CampaignStatus': 'SCHEDULED'|'EXECUTING'|'PENDING_NEXT_RUN'|'COMPLETED'|'PAUSED'|'DELETED'
        },
        'Description': 'string',
        'HoldoutPercent': 123,
        'Hook': {
            'LambdaFunctionName': 'string',
            'Mode': 'DELIVERY'|'FILTER',
            'WebUrl': 'string'
        },
        'Id': 'string',
        'IsPaused': True|False,
        'LastModifiedDate': 'string',
        'Limits': {
            'Daily': 123,
            'MaximumDuration': 123,
            'MessagesPerSecond': 123,
            'Total': 123
        },
        'MessageConfiguration': {
            'ADMMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'APNSMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'BaiduMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'DefaultMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'EmailMessage': {
                'Body': 'string',
                'FromAddress': 'string',
                'HtmlBody': 'string',
                'Title': 'string'
            },
            'GCMMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ImageIconUrl': 'string',
                'ImageSmallIconUrl': 'string',
                'ImageUrl': 'string',
                'JsonBody': 'string',
                'MediaUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'SMSMessage': {
                'Body': 'string',
                'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL',
                'SenderId': 'string'
            }
        },
        'Name': 'string',
        'Schedule': {
            'EndTime': 'string',
            'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY',
            'IsLocalTime': True|False,
            'QuietTime': {
                'End': 'string',
                'Start': 'string'
            },
            'StartTime': 'string',
            'Timezone': 'string'
        },
        'SegmentId': 'string',
        'SegmentVersion': 123,
        'State': {
            'CampaignStatus': 'SCHEDULED'|'EXECUTING'|'PENDING_NEXT_RUN'|'COMPLETED'|'PAUSED'|'DELETED'
        },
        'TreatmentDescription': 'string',
        'TreatmentName': 'string',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response
    • CampaignResponse (dict) -- Campaign definition
      • AdditionalTreatments (list) -- Treatments that are defined in addition to the default treatment.
        • (dict) -- Treatment resource
          • Id (string) -- The unique treatment ID.
          • MessageConfiguration (dict) -- The message configuration settings.
            • ADMMessage (dict) -- The message that the campaign delivers to ADM channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • APNSMessage (dict) -- The message that the campaign delivers to APNS channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • BaiduMessage (dict) -- The message that the campaign delivers to Baidu channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • DefaultMessage (dict) -- The default message for all channels.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • EmailMessage (dict) -- The email message configuration.
              • Body (string) -- The email text body.
              • FromAddress (string) -- The email address used to send the email from. Defaults to use FromAddress specified in the Email Channel.
              • HtmlBody (string) -- The email html body.
              • Title (string) -- The email title (Or subject).
            • GCMMessage (dict) -- The message that the campaign delivers to GCM channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • SMSMessage (dict) -- The SMS message configuration.
              • Body (string) -- The SMS text body.
              • MessageType (string) -- Is this is a transactional SMS message, otherwise a promotional message.
              • SenderId (string) -- Sender ID of sent message.
          • Schedule (dict) -- The campaign schedule.
            • EndTime (string) -- The scheduled time that the campaign ends in ISO 8601 format.
            • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY
            • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.
            • QuietTime (dict) -- The time during which the campaign sends no messages.
              • End (string) -- The default end time for quiet time in ISO 8601 format.
              • Start (string) -- The default start time for quiet time in ISO 8601 format.
            • StartTime (string) -- The scheduled time that the campaign begins in ISO 8601 format.
            • Timezone (string) -- The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
          • SizePercent (integer) -- The allocated percentage of users for this treatment.
          • State (dict) -- The treatment status.
            • CampaignStatus (string) -- The status of the campaign, or the status of a treatment that belongs to an A/B test campaign. Valid values: SCHEDULED, EXECUTING, PENDING_NEXT_RUN, COMPLETED, PAUSED
          • TreatmentDescription (string) -- A custom description for the treatment.
          • TreatmentName (string) -- The custom name of a variation of the campaign used for A/B testing.
      • ApplicationId (string) -- The ID of the application to which the campaign applies.
      • CreationDate (string) -- The date the campaign was created in ISO 8601 format.
      • DefaultState (dict) -- The status of the campaign's default treatment. Only present for A/B test campaigns.
        • CampaignStatus (string) -- The status of the campaign, or the status of a treatment that belongs to an A/B test campaign. Valid values: SCHEDULED, EXECUTING, PENDING_NEXT_RUN, COMPLETED, PAUSED
      • Description (string) -- A description of the campaign.
      • HoldoutPercent (integer) -- The allocated percentage of end users who will not receive messages from this campaign.
      • Hook (dict) -- Campaign hook information.
        • LambdaFunctionName (string) -- Lambda function name or arn to be called for delivery
        • Mode (string) -- What mode Lambda should be invoked in.
        • WebUrl (string) -- Web URL to call for hook. If the URL has authentication specified it will be added as authentication to the request
      • Id (string) -- The unique campaign ID.
      • IsPaused (boolean) -- Indicates whether the campaign is paused. A paused campaign does not send messages unless you resume it by setting IsPaused to false.
      • LastModifiedDate (string) -- The date the campaign was last updated in ISO 8601 format.
      • Limits (dict) -- The campaign limits settings.
        • Daily (integer) -- The maximum number of messages that the campaign can send daily.
        • MaximumDuration (integer) -- The length of time (in seconds) that the campaign can run before it ends and message deliveries stop. This duration begins at the scheduled start time for the campaign. The minimum value is 60.
        • MessagesPerSecond (integer) -- The number of messages that the campaign can send per second. The minimum value is 50, and the maximum is 20000.
        • Total (integer) -- The maximum total number of messages that the campaign can send.
      • MessageConfiguration (dict) -- The message configuration settings.
        • ADMMessage (dict) -- The message that the campaign delivers to ADM channels. Overrides the default message.
          • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
          • Body (string) -- The message body. Can include up to 140 characters.
          • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl (string) -- The URL that points to an image used in the push notification.
          • JsonBody (string) -- The JSON payload used for a silent push.
          • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
          • Title (string) -- The message title that displays above the message on the user's device.
          • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
        • APNSMessage (dict) -- The message that the campaign delivers to APNS channels. Overrides the default message.
          • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
          • Body (string) -- The message body. Can include up to 140 characters.
          • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl (string) -- The URL that points to an image used in the push notification.
          • JsonBody (string) -- The JSON payload used for a silent push.
          • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
          • Title (string) -- The message title that displays above the message on the user's device.
          • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
        • BaiduMessage (dict) -- The message that the campaign delivers to Baidu channels. Overrides the default message.
          • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
          • Body (string) -- The message body. Can include up to 140 characters.
          • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl (string) -- The URL that points to an image used in the push notification.
          • JsonBody (string) -- The JSON payload used for a silent push.
          • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
          • Title (string) -- The message title that displays above the message on the user's device.
          • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
        • DefaultMessage (dict) -- The default message for all channels.
          • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
          • Body (string) -- The message body. Can include up to 140 characters.
          • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl (string) -- The URL that points to an image used in the push notification.
          • JsonBody (string) -- The JSON payload used for a silent push.
          • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
          • Title (string) -- The message title that displays above the message on the user's device.
          • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
        • EmailMessage (dict) -- The email message configuration.
          • Body (string) -- The email text body.
          • FromAddress (string) -- The email address used to send the email from. Defaults to use FromAddress specified in the Email Channel.
          • HtmlBody (string) -- The email html body.
          • Title (string) -- The email title (Or subject).
        • GCMMessage (dict) -- The message that the campaign delivers to GCM channels. Overrides the default message.
          • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
          • Body (string) -- The message body. Can include up to 140 characters.
          • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl (string) -- The URL that points to an image used in the push notification.
          • JsonBody (string) -- The JSON payload used for a silent push.
          • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
          • Title (string) -- The message title that displays above the message on the user's device.
          • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
        • SMSMessage (dict) -- The SMS message configuration.
          • Body (string) -- The SMS text body.
          • MessageType (string) -- Is this is a transactional SMS message, otherwise a promotional message.
          • SenderId (string) -- Sender ID of sent message.
      • Name (string) -- The custom name of the campaign.
      • Schedule (dict) -- The campaign schedule.
        • EndTime (string) -- The scheduled time that the campaign ends in ISO 8601 format.
        • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY
        • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.
        • QuietTime (dict) -- The time during which the campaign sends no messages.
          • End (string) -- The default end time for quiet time in ISO 8601 format.
          • Start (string) -- The default start time for quiet time in ISO 8601 format.
        • StartTime (string) -- The scheduled time that the campaign begins in ISO 8601 format.
        • Timezone (string) -- The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
      • SegmentId (string) -- The ID of the segment to which the campaign sends messages.
      • SegmentVersion (integer) -- The version of the segment to which the campaign sends messages.
      • State (dict) -- The campaign status. An A/B test campaign will have a status of COMPLETED only when all treatments have a status of COMPLETED.
        • CampaignStatus (string) -- The status of the campaign, or the status of a treatment that belongs to an A/B test campaign. Valid values: SCHEDULED, EXECUTING, PENDING_NEXT_RUN, COMPLETED, PAUSED
      • TreatmentDescription (string) -- A custom description for the treatment.
      • TreatmentName (string) -- The custom name of a variation of the campaign used for A/B testing.
      • Version (integer) -- The campaign version number.

get_campaign_versions(**kwargs)

Returns information about your campaign versions.

See also: AWS API Documentation

Request Syntax

response = client.get_campaign_versions(
    ApplicationId='string',
    CampaignId='string',
    PageSize='string',
    Token='string'
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • CampaignId (string) -- [REQUIRED] The unique ID of the campaign.
  • PageSize (string) -- The number of entries you want on each page in the response.
  • Token (string) -- The NextToken string returned on a previous page that you use to get the next page of results in a paginated response.
Return type

dict

Returns

Response Syntax

{
    'CampaignsResponse': {
        'Item': [
            {
                'AdditionalTreatments': [
                    {
                        'Id': 'string',
                        'MessageConfiguration': {
                            'ADMMessage': {
                                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                                'Body': 'string',
                                'ImageIconUrl': 'string',
                                'ImageSmallIconUrl': 'string',
                                'ImageUrl': 'string',
                                'JsonBody': 'string',
                                'MediaUrl': 'string',
                                'RawContent': 'string',
                                'SilentPush': True|False,
                                'TimeToLive': 123,
                                'Title': 'string',
                                'Url': 'string'
                            },
                            'APNSMessage': {
                                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                                'Body': 'string',
                                'ImageIconUrl': 'string',
                                'ImageSmallIconUrl': 'string',
                                'ImageUrl': 'string',
                                'JsonBody': 'string',
                                'MediaUrl': 'string',
                                'RawContent': 'string',
                                'SilentPush': True|False,
                                'TimeToLive': 123,
                                'Title': 'string',
                                'Url': 'string'
                            },
                            'BaiduMessage': {
                                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                                'Body': 'string',
                                'ImageIconUrl': 'string',
                                'ImageSmallIconUrl': 'string',
                                'ImageUrl': 'string',
                                'JsonBody': 'string',
                                'MediaUrl': 'string',
                                'RawContent': 'string',
                                'SilentPush': True|False,
                                'TimeToLive': 123,
                                'Title': 'string',
                                'Url': 'string'
                            },
                            'DefaultMessage': {
                                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                                'Body': 'string',
                                'ImageIconUrl': 'string',
                                'ImageSmallIconUrl': 'string',
                                'ImageUrl': 'string',
                                'JsonBody': 'string',
                                'MediaUrl': 'string',
                                'RawContent': 'string',
                                'SilentPush': True|False,
                                'TimeToLive': 123,
                                'Title': 'string',
                                'Url': 'string'
                            },
                            'EmailMessage': {
                                'Body': 'string',
                                'FromAddress': 'string',
                                'HtmlBody': 'string',
                                'Title': 'string'
                            },
                            'GCMMessage': {
                                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                                'Body': 'string',
                                'ImageIconUrl': 'string',
                                'ImageSmallIconUrl': 'string',
                                'ImageUrl': 'string',
                                'JsonBody': 'string',
                                'MediaUrl': 'string',
                                'RawContent': 'string',
                                'SilentPush': True|False,
                                'TimeToLive': 123,
                                'Title': 'string',
                                'Url': 'string'
                            },
                            'SMSMessage': {
                                'Body': 'string',
                                'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL',
                                'SenderId': 'string'
                            }
                        },
                        'Schedule': {
                            'EndTime': 'string',
                            'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY',
                            'IsLocalTime': True|False,
                            'QuietTime': {
                                'End': 'string',
                                'Start': 'string'
                            },
                            'StartTime': 'string',
                            'Timezone': 'string'
                        },
                        'SizePercent': 123,
                        'State': {
                            'CampaignStatus': 'SCHEDULED'|'EXECUTING'|'PENDING_NEXT_RUN'|'COMPLETED'|'PAUSED'|'DELETED'
                        },
                        'TreatmentDescription': 'string',
                        'TreatmentName': 'string'
                    },
                ],
                'ApplicationId': 'string',
                'CreationDate': 'string',
                'DefaultState': {
                    'CampaignStatus': 'SCHEDULED'|'EXECUTING'|'PENDING_NEXT_RUN'|'COMPLETED'|'PAUSED'|'DELETED'
                },
                'Description': 'string',
                'HoldoutPercent': 123,
                'Hook': {
                    'LambdaFunctionName': 'string',
                    'Mode': 'DELIVERY'|'FILTER',
                    'WebUrl': 'string'
                },
                'Id': 'string',
                'IsPaused': True|False,
                'LastModifiedDate': 'string',
                'Limits': {
                    'Daily': 123,
                    'MaximumDuration': 123,
                    'MessagesPerSecond': 123,
                    'Total': 123
                },
                'MessageConfiguration': {
                    'ADMMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'APNSMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'BaiduMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'DefaultMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'EmailMessage': {
                        'Body': 'string',
                        'FromAddress': 'string',
                        'HtmlBody': 'string',
                        'Title': 'string'
                    },
                    'GCMMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'SMSMessage': {
                        'Body': 'string',
                        'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL',
                        'SenderId': 'string'
                    }
                },
                'Name': 'string',
                'Schedule': {
                    'EndTime': 'string',
                    'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY',
                    'IsLocalTime': True|False,
                    'QuietTime': {
                        'End': 'string',
                        'Start': 'string'
                    },
                    'StartTime': 'string',
                    'Timezone': 'string'
                },
                'SegmentId': 'string',
                'SegmentVersion': 123,
                'State': {
                    'CampaignStatus': 'SCHEDULED'|'EXECUTING'|'PENDING_NEXT_RUN'|'COMPLETED'|'PAUSED'|'DELETED'
                },
                'TreatmentDescription': 'string',
                'TreatmentName': 'string',
                'Version': 123
            },
        ],
        'NextToken': 'string'
    }
}

Response Structure

  • (dict) -- 200 response
    • CampaignsResponse (dict) -- List of available campaigns.
      • Item (list) -- A list of campaigns.
        • (dict) -- Campaign definition
          • AdditionalTreatments (list) -- Treatments that are defined in addition to the default treatment.
            • (dict) -- Treatment resource
              • Id (string) -- The unique treatment ID.
              • MessageConfiguration (dict) -- The message configuration settings.
                • ADMMessage (dict) -- The message that the campaign delivers to ADM channels. Overrides the default message.
                  • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
                  • Body (string) -- The message body. Can include up to 140 characters.
                  • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
                  • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
                  • ImageUrl (string) -- The URL that points to an image used in the push notification.
                  • JsonBody (string) -- The JSON payload used for a silent push.
                  • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
                  • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
                  • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
                  • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
                  • Title (string) -- The message title that displays above the message on the user's device.
                  • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
                • APNSMessage (dict) -- The message that the campaign delivers to APNS channels. Overrides the default message.
                  • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
                  • Body (string) -- The message body. Can include up to 140 characters.
                  • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
                  • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
                  • ImageUrl (string) -- The URL that points to an image used in the push notification.
                  • JsonBody (string) -- The JSON payload used for a silent push.
                  • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
                  • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
                  • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
                  • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
                  • Title (string) -- The message title that displays above the message on the user's device.
                  • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
                • BaiduMessage (dict) -- The message that the campaign delivers to Baidu channels. Overrides the default message.
                  • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
                  • Body (string) -- The message body. Can include up to 140 characters.
                  • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
                  • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
                  • ImageUrl (string) -- The URL that points to an image used in the push notification.
                  • JsonBody (string) -- The JSON payload used for a silent push.
                  • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
                  • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
                  • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
                  • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
                  • Title (string) -- The message title that displays above the message on the user's device.
                  • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
                • DefaultMessage (dict) -- The default message for all channels.
                  • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
                  • Body (string) -- The message body. Can include up to 140 characters.
                  • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
                  • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
                  • ImageUrl (string) -- The URL that points to an image used in the push notification.
                  • JsonBody (string) -- The JSON payload used for a silent push.
                  • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
                  • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
                  • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
                  • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
                  • Title (string) -- The message title that displays above the message on the user's device.
                  • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
                • EmailMessage (dict) -- The email message configuration.
                  • Body (string) -- The email text body.
                  • FromAddress (string) -- The email address used to send the email from. Defaults to use FromAddress specified in the Email Channel.
                  • HtmlBody (string) -- The email html body.
                  • Title (string) -- The email title (Or subject).
                • GCMMessage (dict) -- The message that the campaign delivers to GCM channels. Overrides the default message.
                  • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
                  • Body (string) -- The message body. Can include up to 140 characters.
                  • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
                  • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
                  • ImageUrl (string) -- The URL that points to an image used in the push notification.
                  • JsonBody (string) -- The JSON payload used for a silent push.
                  • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
                  • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
                  • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
                  • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
                  • Title (string) -- The message title that displays above the message on the user's device.
                  • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
                • SMSMessage (dict) -- The SMS message configuration.
                  • Body (string) -- The SMS text body.
                  • MessageType (string) -- Is this is a transactional SMS message, otherwise a promotional message.
                  • SenderId (string) -- Sender ID of sent message.
              • Schedule (dict) -- The campaign schedule.
                • EndTime (string) -- The scheduled time that the campaign ends in ISO 8601 format.
                • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY
                • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.
                • QuietTime (dict) -- The time during which the campaign sends no messages.
                  • End (string) -- The default end time for quiet time in ISO 8601 format.
                  • Start (string) -- The default start time for quiet time in ISO 8601 format.
                • StartTime (string) -- The scheduled time that the campaign begins in ISO 8601 format.
                • Timezone (string) -- The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
              • SizePercent (integer) -- The allocated percentage of users for this treatment.
              • State (dict) -- The treatment status.
                • CampaignStatus (string) -- The status of the campaign, or the status of a treatment that belongs to an A/B test campaign. Valid values: SCHEDULED, EXECUTING, PENDING_NEXT_RUN, COMPLETED, PAUSED
              • TreatmentDescription (string) -- A custom description for the treatment.
              • TreatmentName (string) -- The custom name of a variation of the campaign used for A/B testing.
          • ApplicationId (string) -- The ID of the application to which the campaign applies.
          • CreationDate (string) -- The date the campaign was created in ISO 8601 format.
          • DefaultState (dict) -- The status of the campaign's default treatment. Only present for A/B test campaigns.
            • CampaignStatus (string) -- The status of the campaign, or the status of a treatment that belongs to an A/B test campaign. Valid values: SCHEDULED, EXECUTING, PENDING_NEXT_RUN, COMPLETED, PAUSED
          • Description (string) -- A description of the campaign.
          • HoldoutPercent (integer) -- The allocated percentage of end users who will not receive messages from this campaign.
          • Hook (dict) -- Campaign hook information.
            • LambdaFunctionName (string) -- Lambda function name or arn to be called for delivery
            • Mode (string) -- What mode Lambda should be invoked in.
            • WebUrl (string) -- Web URL to call for hook. If the URL has authentication specified it will be added as authentication to the request
          • Id (string) -- The unique campaign ID.
          • IsPaused (boolean) -- Indicates whether the campaign is paused. A paused campaign does not send messages unless you resume it by setting IsPaused to false.
          • LastModifiedDate (string) -- The date the campaign was last updated in ISO 8601 format.
          • Limits (dict) -- The campaign limits settings.
            • Daily (integer) -- The maximum number of messages that the campaign can send daily.
            • MaximumDuration (integer) -- The length of time (in seconds) that the campaign can run before it ends and message deliveries stop. This duration begins at the scheduled start time for the campaign. The minimum value is 60.
            • MessagesPerSecond (integer) -- The number of messages that the campaign can send per second. The minimum value is 50, and the maximum is 20000.
            • Total (integer) -- The maximum total number of messages that the campaign can send.
          • MessageConfiguration (dict) -- The message configuration settings.
            • ADMMessage (dict) -- The message that the campaign delivers to ADM channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • APNSMessage (dict) -- The message that the campaign delivers to APNS channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • BaiduMessage (dict) -- The message that the campaign delivers to Baidu channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • DefaultMessage (dict) -- The default message for all channels.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • EmailMessage (dict) -- The email message configuration.
              • Body (string) -- The email text body.
              • FromAddress (string) -- The email address used to send the email from. Defaults to use FromAddress specified in the Email Channel.
              • HtmlBody (string) -- The email html body.
              • Title (string) -- The email title (Or subject).
            • GCMMessage (dict) -- The message that the campaign delivers to GCM channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • SMSMessage (dict) -- The SMS message configuration.
              • Body (string) -- The SMS text body.
              • MessageType (string) -- Is this is a transactional SMS message, otherwise a promotional message.
              • SenderId (string) -- Sender ID of sent message.
          • Name (string) -- The custom name of the campaign.
          • Schedule (dict) -- The campaign schedule.
            • EndTime (string) -- The scheduled time that the campaign ends in ISO 8601 format.
            • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY
            • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.
            • QuietTime (dict) -- The time during which the campaign sends no messages.
              • End (string) -- The default end time for quiet time in ISO 8601 format.
              • Start (string) -- The default start time for quiet time in ISO 8601 format.
            • StartTime (string) -- The scheduled time that the campaign begins in ISO 8601 format.
            • Timezone (string) -- The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
          • SegmentId (string) -- The ID of the segment to which the campaign sends messages.
          • SegmentVersion (integer) -- The version of the segment to which the campaign sends messages.
          • State (dict) -- The campaign status. An A/B test campaign will have a status of COMPLETED only when all treatments have a status of COMPLETED.
            • CampaignStatus (string) -- The status of the campaign, or the status of a treatment that belongs to an A/B test campaign. Valid values: SCHEDULED, EXECUTING, PENDING_NEXT_RUN, COMPLETED, PAUSED
          • TreatmentDescription (string) -- A custom description for the treatment.
          • TreatmentName (string) -- The custom name of a variation of the campaign used for A/B testing.
          • Version (integer) -- The campaign version number.
      • NextToken (string) -- The string that you use in a subsequent request to get the next page of results in a paginated response.

get_campaigns(**kwargs)

Returns information about your campaigns.

See also: AWS API Documentation

Request Syntax

response = client.get_campaigns(
    ApplicationId='string',
    PageSize='string',
    Token='string'
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • PageSize (string) -- The number of entries you want on each page in the response.
  • Token (string) -- The NextToken string returned on a previous page that you use to get the next page of results in a paginated response.
Return type

dict

Returns

Response Syntax

{
    'CampaignsResponse': {
        'Item': [
            {
                'AdditionalTreatments': [
                    {
                        'Id': 'string',
                        'MessageConfiguration': {
                            'ADMMessage': {
                                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                                'Body': 'string',
                                'ImageIconUrl': 'string',
                                'ImageSmallIconUrl': 'string',
                                'ImageUrl': 'string',
                                'JsonBody': 'string',
                                'MediaUrl': 'string',
                                'RawContent': 'string',
                                'SilentPush': True|False,
                                'TimeToLive': 123,
                                'Title': 'string',
                                'Url': 'string'
                            },
                            'APNSMessage': {
                                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                                'Body': 'string',
                                'ImageIconUrl': 'string',
                                'ImageSmallIconUrl': 'string',
                                'ImageUrl': 'string',
                                'JsonBody': 'string',
                                'MediaUrl': 'string',
                                'RawContent': 'string',
                                'SilentPush': True|False,
                                'TimeToLive': 123,
                                'Title': 'string',
                                'Url': 'string'
                            },
                            'BaiduMessage': {
                                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                                'Body': 'string',
                                'ImageIconUrl': 'string',
                                'ImageSmallIconUrl': 'string',
                                'ImageUrl': 'string',
                                'JsonBody': 'string',
                                'MediaUrl': 'string',
                                'RawContent': 'string',
                                'SilentPush': True|False,
                                'TimeToLive': 123,
                                'Title': 'string',
                                'Url': 'string'
                            },
                            'DefaultMessage': {
                                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                                'Body': 'string',
                                'ImageIconUrl': 'string',
                                'ImageSmallIconUrl': 'string',
                                'ImageUrl': 'string',
                                'JsonBody': 'string',
                                'MediaUrl': 'string',
                                'RawContent': 'string',
                                'SilentPush': True|False,
                                'TimeToLive': 123,
                                'Title': 'string',
                                'Url': 'string'
                            },
                            'EmailMessage': {
                                'Body': 'string',
                                'FromAddress': 'string',
                                'HtmlBody': 'string',
                                'Title': 'string'
                            },
                            'GCMMessage': {
                                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                                'Body': 'string',
                                'ImageIconUrl': 'string',
                                'ImageSmallIconUrl': 'string',
                                'ImageUrl': 'string',
                                'JsonBody': 'string',
                                'MediaUrl': 'string',
                                'RawContent': 'string',
                                'SilentPush': True|False,
                                'TimeToLive': 123,
                                'Title': 'string',
                                'Url': 'string'
                            },
                            'SMSMessage': {
                                'Body': 'string',
                                'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL',
                                'SenderId': 'string'
                            }
                        },
                        'Schedule': {
                            'EndTime': 'string',
                            'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY',
                            'IsLocalTime': True|False,
                            'QuietTime': {
                                'End': 'string',
                                'Start': 'string'
                            },
                            'StartTime': 'string',
                            'Timezone': 'string'
                        },
                        'SizePercent': 123,
                        'State': {
                            'CampaignStatus': 'SCHEDULED'|'EXECUTING'|'PENDING_NEXT_RUN'|'COMPLETED'|'PAUSED'|'DELETED'
                        },
                        'TreatmentDescription': 'string',
                        'TreatmentName': 'string'
                    },
                ],
                'ApplicationId': 'string',
                'CreationDate': 'string',
                'DefaultState': {
                    'CampaignStatus': 'SCHEDULED'|'EXECUTING'|'PENDING_NEXT_RUN'|'COMPLETED'|'PAUSED'|'DELETED'
                },
                'Description': 'string',
                'HoldoutPercent': 123,
                'Hook': {
                    'LambdaFunctionName': 'string',
                    'Mode': 'DELIVERY'|'FILTER',
                    'WebUrl': 'string'
                },
                'Id': 'string',
                'IsPaused': True|False,
                'LastModifiedDate': 'string',
                'Limits': {
                    'Daily': 123,
                    'MaximumDuration': 123,
                    'MessagesPerSecond': 123,
                    'Total': 123
                },
                'MessageConfiguration': {
                    'ADMMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'APNSMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'BaiduMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'DefaultMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'EmailMessage': {
                        'Body': 'string',
                        'FromAddress': 'string',
                        'HtmlBody': 'string',
                        'Title': 'string'
                    },
                    'GCMMessage': {
                        'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                        'Body': 'string',
                        'ImageIconUrl': 'string',
                        'ImageSmallIconUrl': 'string',
                        'ImageUrl': 'string',
                        'JsonBody': 'string',
                        'MediaUrl': 'string',
                        'RawContent': 'string',
                        'SilentPush': True|False,
                        'TimeToLive': 123,
                        'Title': 'string',
                        'Url': 'string'
                    },
                    'SMSMessage': {
                        'Body': 'string',
                        'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL',
                        'SenderId': 'string'
                    }
                },
                'Name': 'string',
                'Schedule': {
                    'EndTime': 'string',
                    'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY',
                    'IsLocalTime': True|False,
                    'QuietTime': {
                        'End': 'string',
                        'Start': 'string'
                    },
                    'StartTime': 'string',
                    'Timezone': 'string'
                },
                'SegmentId': 'string',
                'SegmentVersion': 123,
                'State': {
                    'CampaignStatus': 'SCHEDULED'|'EXECUTING'|'PENDING_NEXT_RUN'|'COMPLETED'|'PAUSED'|'DELETED'
                },
                'TreatmentDescription': 'string',
                'TreatmentName': 'string',
                'Version': 123
            },
        ],
        'NextToken': 'string'
    }
}

Response Structure

  • (dict) -- 200 response
    • CampaignsResponse (dict) -- List of available campaigns.
      • Item (list) -- A list of campaigns.
        • (dict) -- Campaign definition
          • AdditionalTreatments (list) -- Treatments that are defined in addition to the default treatment.
            • (dict) -- Treatment resource
              • Id (string) -- The unique treatment ID.
              • MessageConfiguration (dict) -- The message configuration settings.
                • ADMMessage (dict) -- The message that the campaign delivers to ADM channels. Overrides the default message.
                  • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
                  • Body (string) -- The message body. Can include up to 140 characters.
                  • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
                  • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
                  • ImageUrl (string) -- The URL that points to an image used in the push notification.
                  • JsonBody (string) -- The JSON payload used for a silent push.
                  • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
                  • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
                  • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
                  • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
                  • Title (string) -- The message title that displays above the message on the user's device.
                  • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
                • APNSMessage (dict) -- The message that the campaign delivers to APNS channels. Overrides the default message.
                  • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
                  • Body (string) -- The message body. Can include up to 140 characters.
                  • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
                  • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
                  • ImageUrl (string) -- The URL that points to an image used in the push notification.
                  • JsonBody (string) -- The JSON payload used for a silent push.
                  • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
                  • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
                  • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
                  • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
                  • Title (string) -- The message title that displays above the message on the user's device.
                  • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
                • BaiduMessage (dict) -- The message that the campaign delivers to Baidu channels. Overrides the default message.
                  • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
                  • Body (string) -- The message body. Can include up to 140 characters.
                  • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
                  • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
                  • ImageUrl (string) -- The URL that points to an image used in the push notification.
                  • JsonBody (string) -- The JSON payload used for a silent push.
                  • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
                  • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
                  • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
                  • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
                  • Title (string) -- The message title that displays above the message on the user's device.
                  • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
                • DefaultMessage (dict) -- The default message for all channels.
                  • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
                  • Body (string) -- The message body. Can include up to 140 characters.
                  • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
                  • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
                  • ImageUrl (string) -- The URL that points to an image used in the push notification.
                  • JsonBody (string) -- The JSON payload used for a silent push.
                  • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
                  • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
                  • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
                  • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
                  • Title (string) -- The message title that displays above the message on the user's device.
                  • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
                • EmailMessage (dict) -- The email message configuration.
                  • Body (string) -- The email text body.
                  • FromAddress (string) -- The email address used to send the email from. Defaults to use FromAddress specified in the Email Channel.
                  • HtmlBody (string) -- The email html body.
                  • Title (string) -- The email title (Or subject).
                • GCMMessage (dict) -- The message that the campaign delivers to GCM channels. Overrides the default message.
                  • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
                  • Body (string) -- The message body. Can include up to 140 characters.
                  • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
                  • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
                  • ImageUrl (string) -- The URL that points to an image used in the push notification.
                  • JsonBody (string) -- The JSON payload used for a silent push.
                  • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
                  • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
                  • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
                  • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
                  • Title (string) -- The message title that displays above the message on the user's device.
                  • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
                • SMSMessage (dict) -- The SMS message configuration.
                  • Body (string) -- The SMS text body.
                  • MessageType (string) -- Is this is a transactional SMS message, otherwise a promotional message.
                  • SenderId (string) -- Sender ID of sent message.
              • Schedule (dict) -- The campaign schedule.
                • EndTime (string) -- The scheduled time that the campaign ends in ISO 8601 format.
                • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY
                • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.
                • QuietTime (dict) -- The time during which the campaign sends no messages.
                  • End (string) -- The default end time for quiet time in ISO 8601 format.
                  • Start (string) -- The default start time for quiet time in ISO 8601 format.
                • StartTime (string) -- The scheduled time that the campaign begins in ISO 8601 format.
                • Timezone (string) -- The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
              • SizePercent (integer) -- The allocated percentage of users for this treatment.
              • State (dict) -- The treatment status.
                • CampaignStatus (string) -- The status of the campaign, or the status of a treatment that belongs to an A/B test campaign. Valid values: SCHEDULED, EXECUTING, PENDING_NEXT_RUN, COMPLETED, PAUSED
              • TreatmentDescription (string) -- A custom description for the treatment.
              • TreatmentName (string) -- The custom name of a variation of the campaign used for A/B testing.
          • ApplicationId (string) -- The ID of the application to which the campaign applies.
          • CreationDate (string) -- The date the campaign was created in ISO 8601 format.
          • DefaultState (dict) -- The status of the campaign's default treatment. Only present for A/B test campaigns.
            • CampaignStatus (string) -- The status of the campaign, or the status of a treatment that belongs to an A/B test campaign. Valid values: SCHEDULED, EXECUTING, PENDING_NEXT_RUN, COMPLETED, PAUSED
          • Description (string) -- A description of the campaign.
          • HoldoutPercent (integer) -- The allocated percentage of end users who will not receive messages from this campaign.
          • Hook (dict) -- Campaign hook information.
            • LambdaFunctionName (string) -- Lambda function name or arn to be called for delivery
            • Mode (string) -- What mode Lambda should be invoked in.
            • WebUrl (string) -- Web URL to call for hook. If the URL has authentication specified it will be added as authentication to the request
          • Id (string) -- The unique campaign ID.
          • IsPaused (boolean) -- Indicates whether the campaign is paused. A paused campaign does not send messages unless you resume it by setting IsPaused to false.
          • LastModifiedDate (string) -- The date the campaign was last updated in ISO 8601 format.
          • Limits (dict) -- The campaign limits settings.
            • Daily (integer) -- The maximum number of messages that the campaign can send daily.
            • MaximumDuration (integer) -- The length of time (in seconds) that the campaign can run before it ends and message deliveries stop. This duration begins at the scheduled start time for the campaign. The minimum value is 60.
            • MessagesPerSecond (integer) -- The number of messages that the campaign can send per second. The minimum value is 50, and the maximum is 20000.
            • Total (integer) -- The maximum total number of messages that the campaign can send.
          • MessageConfiguration (dict) -- The message configuration settings.
            • ADMMessage (dict) -- The message that the campaign delivers to ADM channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • APNSMessage (dict) -- The message that the campaign delivers to APNS channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • BaiduMessage (dict) -- The message that the campaign delivers to Baidu channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • DefaultMessage (dict) -- The default message for all channels.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • EmailMessage (dict) -- The email message configuration.
              • Body (string) -- The email text body.
              • FromAddress (string) -- The email address used to send the email from. Defaults to use FromAddress specified in the Email Channel.
              • HtmlBody (string) -- The email html body.
              • Title (string) -- The email title (Or subject).
            • GCMMessage (dict) -- The message that the campaign delivers to GCM channels. Overrides the default message.
              • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify.
              • Body (string) -- The message body. Can include up to 140 characters.
              • ImageIconUrl (string) -- The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl (string) -- The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl (string) -- The URL that points to an image used in the push notification.
              • JsonBody (string) -- The JSON payload used for a silent push.
              • MediaUrl (string) -- The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept if the service is unable to deliver the notification the first time. If the value is 0, it treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. This value is converted to the expiration field when sent to the service. It only applies to APNs and GCM
              • Title (string) -- The message title that displays above the message on the user's device.
              • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.
            • SMSMessage (dict) -- The SMS message configuration.
              • Body (string) -- The SMS text body.
              • MessageType (string) -- Is this is a transactional SMS message, otherwise a promotional message.
              • SenderId (string) -- Sender ID of sent message.
          • Name (string) -- The custom name of the campaign.
          • Schedule (dict) -- The campaign schedule.
            • EndTime (string) -- The scheduled time that the campaign ends in ISO 8601 format.
            • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY
            • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.
            • QuietTime (dict) -- The time during which the campaign sends no messages.
              • End (string) -- The default end time for quiet time in ISO 8601 format.
              • Start (string) -- The default start time for quiet time in ISO 8601 format.
            • StartTime (string) -- The scheduled time that the campaign begins in ISO 8601 format.
            • Timezone (string) -- The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
          • SegmentId (string) -- The ID of the segment to which the campaign sends messages.
          • SegmentVersion (integer) -- The version of the segment to which the campaign sends messages.
          • State (dict) -- The campaign status. An A/B test campaign will have a status of COMPLETED only when all treatments have a status of COMPLETED.
            • CampaignStatus (string) -- The status of the campaign, or the status of a treatment that belongs to an A/B test campaign. Valid values: SCHEDULED, EXECUTING, PENDING_NEXT_RUN, COMPLETED, PAUSED
          • TreatmentDescription (string) -- A custom description for the treatment.
          • TreatmentName (string) -- The custom name of a variation of the campaign used for A/B testing.
          • Version (integer) -- The campaign version number.
      • NextToken (string) -- The string that you use in a subsequent request to get the next page of results in a paginated response.

get_channels(**kwargs)

Get all channels.

See also: AWS API Documentation

Request Syntax

response = client.get_channels(
    ApplicationId='string'
)
Parameters
ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
Return type
dict
Returns
Response Syntax
{
    'ChannelsResponse': {
        'Channels': {
            'string': {
                'ApplicationId': 'string',
                'CreationDate': 'string',
                'Enabled': True|False,
                'HasCredential': True|False,
                'Id': 'string',
                'IsArchived': True|False,
                'LastModifiedBy': 'string',
                'LastModifiedDate': 'string',
                'Version': 123
            }
        }
    }
}

Response Structure

  • (dict) -- 200 response
    • ChannelsResponse (dict) -- Get channels definition
      • Channels (dict) -- A map of channels, with the ChannelType as the key and the Channel as the value.
        • (string) --
          • (dict) -- Base definition for channel response.
            • ApplicationId (string) -- Application id
            • CreationDate (string) -- When was this segment created
            • Enabled (boolean) -- If the channel is enabled for sending messages.
            • HasCredential (boolean) -- Not used. Retained for backwards compatibility.
            • Id (string) -- Channel ID. Not used, only for backwards compatibility.
            • IsArchived (boolean) -- Is this channel archived
            • LastModifiedBy (string) -- Who made the last change
            • LastModifiedDate (string) -- Last date this was updated
            • Version (integer) -- Version of channel
get_email_channel(**kwargs)

Get an email channel.

See also: AWS API Documentation

Request Syntax

response = client.get_email_channel(
    ApplicationId='string'
)
Parameters
ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
Return type
dict
Returns
Response Syntax
{
    'EmailChannelResponse': {
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'Enabled': True|False,
        'FromAddress': 'string',
        'HasCredential': True|False,
        'Id': 'string',
        'Identity': 'string',
        'IsArchived': True|False,
        'LastModifiedBy': 'string',
        'LastModifiedDate': 'string',
        'MessagesPerSecond': 123,
        'Platform': 'string',
        'RoleArn': 'string',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response
    • EmailChannelResponse (dict) -- Email Channel Response.
      • ApplicationId (string) -- The unique ID of the application to which the email channel belongs.
      • CreationDate (string) -- The date that the settings were last updated in ISO 8601 format.
      • Enabled (boolean) -- If the channel is enabled for sending messages.
      • FromAddress (string) -- The email address used to send emails from.
      • HasCredential (boolean) -- Not used. Retained for backwards compatibility.
      • Id (string) -- Channel ID. Not used, only for backwards compatibility.
      • Identity (string) -- The ARN of an identity verified with SES.
      • IsArchived (boolean) -- Is this channel archived
      • LastModifiedBy (string) -- Who last updated this entry
      • LastModifiedDate (string) -- Last date this was updated
      • MessagesPerSecond (integer) -- Messages per second that can be sent
      • Platform (string) -- Platform type. Will be "EMAIL"
      • RoleArn (string) -- The ARN of an IAM Role used to submit events to Mobile Analytics' event ingestion service
      • Version (integer) -- Version of channel
get_endpoint(**kwargs)

Returns information about an endpoint.

See also: AWS API Documentation

Request Syntax

response = client.get_endpoint(
    ApplicationId='string',
    EndpointId='string'
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • EndpointId (string) -- [REQUIRED] The unique ID of the endpoint.
Return type

dict

Returns

Response Syntax

{
    'EndpointResponse': {
        'Address': 'string',
        'ApplicationId': 'string',
        'Attributes': {
            'string': [
                'string',
            ]
        },
        'ChannelType': 'GCM'|'APNS'|'APNS_SANDBOX'|'APNS_VOIP'|'APNS_VOIP_SANDBOX'|'ADM'|'SMS'|'EMAIL'|'BAIDU'|'CUSTOM',
        'CohortId': 'string',
        'CreationDate': 'string',
        'Demographic': {
            'AppVersion': 'string',
            'Locale': 'string',
            'Make': 'string',
            'Model': 'string',
            'ModelVersion': 'string',
            'Platform': 'string',
            'PlatformVersion': 'string',
            'Timezone': 'string'
        },
        'EffectiveDate': 'string',
        'EndpointStatus': 'string',
        'Id': 'string',
        'Location': {
            'City': 'string',
            'Country': 'string',
            'Latitude': 123.0,
            'Longitude': 123.0,
            'PostalCode': 'string',
            'Region': 'string'
        },
        'Metrics': {
            'string': 123.0
        },
        'OptOut': 'string',
        'RequestId': 'string',
        'User': {
            'UserAttributes': {
                'string': [
                    'string',
                ]
            },
            'UserId': 'string'
        }
    }
}

Response Structure

  • (dict) -- 200 response
    • EndpointResponse (dict) -- Endpoint response
      • Address (string) -- The address of the endpoint as provided by your push provider. For example, the DeviceToken or RegistrationId.
      • ApplicationId (string) -- The ID of the application that is associated with the endpoint.
      • Attributes (dict) -- Custom attributes that describe the endpoint by associating a name with an array of values. For example, an attribute named "interests" might have the following values: ["science", "politics", "travel"]. You can use these attributes as selection criteria when you create segments. The Amazon Pinpoint console can't display attribute names that include the following characters: hash/pound sign (#), colon (:), question mark (?), backslash (), and forward slash (/). For this reason, you should avoid using these characters in the names of custom attributes.
        • (string) --
          • (list) --
            • (string) --
      • ChannelType (string) -- The channel type. Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX | ADM | SMS | EMAIL | BAIDU
      • CohortId (string) -- A number from 0-99 that represents the cohort the endpoint is assigned to. Endpoints are grouped into cohorts randomly, and each cohort contains approximately 1 percent of the endpoints for an app. Amazon Pinpoint assigns cohorts to the holdout or treatment allocations for a campaign.
      • CreationDate (string) -- The date and time when the endpoint was created, shown in ISO 8601 format.
      • Demographic (dict) -- The endpoint demographic attributes.
        • AppVersion (string) -- The version of the application associated with the endpoint.
        • Locale (string) -- The endpoint locale in the following format: The ISO 639-1 alpha-2 code, followed by an underscore, followed by an ISO 3166-1 alpha-2 value.
        • Make (string) -- The manufacturer of the endpoint device, such as Apple or Samsung.
        • Model (string) -- The model name or number of the endpoint device, such as iPhone.
        • ModelVersion (string) -- The model version of the endpoint device.
        • Platform (string) -- The platform of the endpoint device, such as iOS or Android.
        • PlatformVersion (string) -- The platform version of the endpoint device.
        • Timezone (string) -- The timezone of the endpoint. Specified as a tz database value, such as Americas/Los_Angeles.
      • EffectiveDate (string) -- The date and time when the endpoint was last updated, shown in ISO 8601 format.
      • EndpointStatus (string) -- Unused.
      • Id (string) -- The unique ID that you assigned to the endpoint. The ID should be a globally unique identifier (GUID) to ensure that it doesn't conflict with other endpoint IDs associated with the application.
      • Location (dict) -- The endpoint location attributes.
        • City (string) -- The city where the endpoint is located.
        • Country (string) -- The two-letter code for the country or region of the endpoint. Specified as an ISO 3166-1 Alpha-2 code, such as "US" for the United States.
        • Latitude (float) -- The latitude of the endpoint location, rounded to one decimal place.
        • Longitude (float) -- The longitude of the endpoint location, rounded to one decimal place.
        • PostalCode (string) -- The postal code or zip code of the endpoint.
        • Region (string) -- The region of the endpoint location. For example, in the United States, this corresponds to a state.
      • Metrics (dict) -- Custom metrics that your app reports to Amazon Pinpoint.
        • (string) --
          • (float) --
      • OptOut (string) -- Indicates whether a user has opted out of receiving messages with one of the following values: ALL - User has opted out of all messages. NONE - Users has not opted out and receives all messages.
      • RequestId (string) -- The unique ID for the most recent request to update the endpoint.
      • User (dict) -- Custom user-specific attributes that your app reports to Amazon Pinpoint.
        • UserAttributes (dict) -- Custom attributes that describe the user by associating a name with an array of values. For example, an attribute named "interests" might have the following values: ["science", "politics", "travel"]. You can use these attributes as selection criteria when you create segments. The Amazon Pinpoint console can't display attribute names that include the following characters: hash/pound sign (#), colon (:), question mark (?), backslash (), and forward slash (/). For this reason, you should avoid using these characters in the names of custom attributes.
          • (string) --
            • (list) --
              • (string) --
        • UserId (string) -- The unique ID of the user.

get_event_stream(**kwargs)

Returns the event stream for an app.

See also: AWS API Documentation

Request Syntax

response = client.get_event_stream(
    ApplicationId='string'
)
Parameters
ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
Return type
dict
Returns
Response Syntax
{
    'EventStream': {
        'ApplicationId': 'string',
        'DestinationStreamArn': 'string',
        'ExternalId': 'string',
        'LastModifiedDate': 'string',
        'LastUpdatedBy': 'string',
        'RoleArn': 'string'
    }
}

Response Structure

  • (dict) -- 200 response
    • EventStream (dict) -- Model for an event publishing subscription export.
      • ApplicationId (string) -- The ID of the application from which events should be published.
      • DestinationStreamArn (string) -- The Amazon Resource Name (ARN) of the Amazon Kinesis stream or Firehose delivery stream to which you want to publish events. Firehose ARN: arn:aws:firehose:REGION:ACCOUNT_ID:deliverystream/STREAM_NAME Kinesis ARN: arn:aws:kinesis:REGION:ACCOUNT_ID:stream/STREAM_NAME
      • ExternalId (string) -- (Deprecated) Your AWS account ID, which you assigned to the ExternalID key in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This requirement is removed, and external IDs are not recommended for IAM roles assumed by Amazon Pinpoint.
      • LastModifiedDate (string) -- The date the event stream was last updated in ISO 8601 format.
      • LastUpdatedBy (string) -- The IAM user who last modified the event stream.
      • RoleArn (string) -- The IAM role that authorizes Amazon Pinpoint to publish events to the stream in your account.
get_export_job(**kwargs)

Returns information about an export job.

See also: AWS API Documentation

Request Syntax

response = client.get_export_job(
    ApplicationId='string',
    JobId='string'
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • JobId (string) -- [REQUIRED] The unique ID of the job.
Return type

dict

Returns

Response Syntax

{
    'ExportJobResponse': {
        'ApplicationId': 'string',
        'CompletedPieces': 123,
        'CompletionDate': 'string',
        'CreationDate': 'string',
        'Definition': {
            'RoleArn': 'string',
            'S3UrlPrefix': 'string',
            'SegmentId': 'string',
            'SegmentVersion': 123
        },
        'FailedPieces': 123,
        'Failures': [
            'string',
        ],
        'Id': 'string',
        'JobStatus': 'CREATED'|'INITIALIZING'|'PROCESSING'|'COMPLETING'|'COMPLETED'|'FAILING'|'FAILED',
        'TotalFailures': 123,
        'TotalPieces': 123,
        'TotalProcessed': 123,
        'Type': 'string'
    }
}

Response Structure

  • (dict) -- 200 response
    • ExportJobResponse (dict) -- Export job response.
      • ApplicationId (string) -- The unique ID of the application associated with the export job.
      • CompletedPieces (integer) -- The number of pieces that have successfully completed as of the time of the request.
      • CompletionDate (string) -- The date the job completed in ISO 8601 format.
      • CreationDate (string) -- The date the job was created in ISO 8601 format.
      • Definition (dict) -- The export job settings.
        • RoleArn (string) -- The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the Amazon S3 location that endpoints will be exported to.
        • S3UrlPrefix (string) -- A URL that points to the location within an Amazon S3 bucket that will receive the export. The location is typically a folder with multiple files. The URL should follow this format: s3://bucket-name/folder-name/ Amazon Pinpoint will export endpoints to this location.
        • SegmentId (string) -- The ID of the segment to export endpoints from. If not present, Amazon Pinpoint exports all of the endpoints that belong to the application.
        • SegmentVersion (integer) -- The version of the segment to export if specified.
      • FailedPieces (integer) -- The number of pieces that failed to be processed as of the time of the request.
      • Failures (list) -- Provides up to 100 of the first failed entries for the job, if any exist.
        • (string) --
      • Id (string) -- The unique ID of the job.
      • JobStatus (string) -- The status of the job. Valid values: CREATED, INITIALIZING, PROCESSING, COMPLETING, COMPLETED, FAILING, FAILED The job status is FAILED if one or more pieces failed.
      • TotalFailures (integer) -- The number of endpoints that were not processed; for example, because of syntax errors.
      • TotalPieces (integer) -- The total number of pieces that must be processed to finish the job. Each piece is an approximately equal portion of the endpoints.
      • TotalProcessed (integer) -- The number of endpoints that were processed by the job.
      • Type (string) -- The job type. Will be 'EXPORT'.

get_export_jobs(**kwargs)

Returns information about your export jobs.

See also: AWS API Documentation

Request Syntax

response = client.get_export_jobs(
    ApplicationId='string',
    PageSize='string',
    Token='string'
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • PageSize (string) -- The number of entries you want on each page in the response.
  • Token (string) -- The NextToken string returned on a previous page that you use to get the next page of results in a paginated response.
Return type

dict

Returns

Response Syntax

{
    'ExportJobsResponse': {
        'Item': [
            {
                'ApplicationId': 'string',
                'CompletedPieces': 123,
                'CompletionDate': 'string',
                'CreationDate': 'string',
                'Definition': {
                    'RoleArn': 'string',
                    'S3UrlPrefix': 'string',
                    'SegmentId': 'string',
                    'SegmentVersion': 123
                },
                'FailedPieces': 123,
                'Failures': [
                    'string',
                ],
                'Id': 'string',
                'JobStatus': 'CREATED'|'INITIALIZING'|'PROCESSING'|'COMPLETING'|'COMPLETED'|'FAILING'|'FAILED',
                'TotalFailures': 123,
                'TotalPieces': 123,
                'TotalProcessed': 123,
                'Type': 'string'
            },
        ],
        'NextToken': 'string'
    }
}

Response Structure

  • (dict) -- 200 response
    • ExportJobsResponse (dict) -- Export job list.
      • Item (list) -- A list of export jobs for the application.
        • (dict) -- Export job response.
          • ApplicationId (string) -- The unique ID of the application associated with the export job.
          • CompletedPieces (integer) -- The number of pieces that have successfully completed as of the time of the request.
          • CompletionDate (string) -- The date the job completed in ISO 8601 format.
          • CreationDate (string) -- The date the job was created in ISO 8601 format.
          • Definition (dict) -- The export job settings.
            • RoleArn (string) -- The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the Amazon S3 location that endpoints will be exported to.
            • S3UrlPrefix (string) -- A URL that points to the location within an Amazon S3 bucket that will receive the export. The location is typically a folder with multiple files. The URL should follow this format: s3://bucket-name/folder-name/ Amazon Pinpoint will export endpoints to this location.
            • SegmentId (string) -- The ID of the segment to export endpoints from. If not present, Amazon Pinpoint exports all of the endpoints that belong to the application.
            • SegmentVersion (integer) -- The version of the segment to export if specified.
          • FailedPieces (integer) -- The number of pieces that failed to be processed as of the time of the request.
          • Failures (list) -- Provides up to 100 of the first failed entries for the job, if any exist.
            • (string) --
          • Id (string) -- The unique ID of the job.
          • JobStatus (string) -- The status of the job. Valid values: CREATED, INITIALIZING, PROCESSING, COMPLETING, COMPLETED, FAILING, FAILED The job status is FAILED if one or more pieces failed.
          • TotalFailures (integer) -- The number of endpoints that were not processed; for example, because of syntax errors.
          • TotalPieces (integer) -- The total number of pieces that must be processed to finish the job. Each piece is an approximately equal portion of the endpoints.
          • TotalProcessed (integer) -- The number of endpoints that were processed by the job.
          • Type (string) -- The job type. Will be 'EXPORT'.
      • NextToken (string) -- The string that you use in a subsequent request to get the next page of results in a paginated response.

get_gcm_channel(**kwargs)

Returns information about the GCM channel for an app.

See also: AWS API Documentation

Request Syntax

response = client.get_gcm_channel(
    ApplicationId='string'
)
Parameters
ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
Return type
dict
Returns
Response Syntax
{
    'GCMChannelResponse': {
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'Credential': 'string',
        'Enabled': True|False,
        'HasCredential': True|False,
        'Id': 'string',
        'IsArchived': True|False,
        'LastModifiedBy': 'string',
        'LastModifiedDate': 'string',
        'Platform': 'string',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response
    • GCMChannelResponse (dict) -- Google Cloud Messaging channel definition
      • ApplicationId (string) -- The ID of the application to which the channel applies.
      • CreationDate (string) -- When was this segment created
      • Credential (string) -- The GCM API key from Google.
      • Enabled (boolean) -- If the channel is enabled for sending messages.
      • HasCredential (boolean) -- Not used. Retained for backwards compatibility.
      • Id (string) -- Channel ID. Not used. Present only for backwards compatibility.
      • IsArchived (boolean) -- Is this channel archived
      • LastModifiedBy (string) -- Who last updated this entry
      • LastModifiedDate (string) -- Last date this was updated
      • Platform (string) -- The platform type. Will be GCM
      • Version (integer) -- Version of channel
get_import_job(**kwargs)

Returns information about an import job.

See also: AWS API Documentation

Request Syntax

response = client.get_import_job(
    ApplicationId='string',
    JobId='string'
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • JobId (string) -- [REQUIRED] The unique ID of the job.
Return type

dict

Returns

Response Syntax

{
    'ImportJobResponse': {
        'ApplicationId': 'string',
        'CompletedPieces': 123,
        'CompletionDate': 'string',
        'CreationDate': 'string',
        'Definition': {
            'DefineSegment': True|False,
            'ExternalId': 'string',
            'Format': 'CSV'|'JSON',
            'RegisterEndpoints': True|False,
            'RoleArn': 'string',
            'S3Url': 'string',
            'SegmentId': 'string',
            'SegmentName': 'string'
        },
        'FailedPieces': 123,
        'Failures': [
            'string',
        ],
        'Id': 'string',
        'JobStatus': 'CREATED'|'INITIALIZING'|'PROCESSING'|'COMPLETING'|'COMPLETED'|'FAILING'|'FAILED',
        'TotalFailures': 123,
        'TotalPieces': 123,
        'TotalProcessed': 123,
        'Type': 'string'
    }
}

Response Structure

  • (dict) -- 200 response
    • ImportJobResponse (dict) -- Import job response.
      • ApplicationId (string) -- The unique ID of the application to which the import job applies.
      • CompletedPieces (integer) -- The number of pieces that have successfully imported as of the time of the request.
      • CompletionDate (string) -- The date the import job completed in ISO 8601 format.
      • CreationDate (string) -- The date the import job was created in ISO 8601 format.
      • Definition (dict) -- The import job settings.
        • DefineSegment (boolean) -- Sets whether the endpoints create a segment when they are imported.
        • ExternalId (string) -- (Deprecated) Your AWS account ID, which you assigned to the ExternalID key in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This requirement is removed, and external IDs are not recommended for IAM roles assumed by Amazon Pinpoint.
        • Format (string) -- The format of the files that contain the endpoint definitions. Valid values: CSV, JSON
        • RegisterEndpoints (boolean) -- Sets whether the endpoints are registered with Amazon Pinpoint when they are imported.
        • RoleArn (string) -- The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the Amazon S3 location that contains the endpoints to import.
        • S3Url (string) -- The URL of the S3 bucket that contains the segment information to import. The location can be a folder or a single file. The URL should use the following format: s3://bucket-name/folder-name/file-name Amazon Pinpoint imports endpoints from this location and any subfolders it contains.
        • SegmentId (string) -- The ID of the segment to update if the import job is meant to update an existing segment.
        • SegmentName (string) -- A custom name for the segment created by the import job. Use if DefineSegment is true.
      • FailedPieces (integer) -- The number of pieces that have failed to import as of the time of the request.
      • Failures (list) -- Provides up to 100 of the first failed entries for the job, if any exist.
        • (string) --
      • Id (string) -- The unique ID of the import job.
      • JobStatus (string) -- The status of the import job. Valid values: CREATED, INITIALIZING, PROCESSING, COMPLETING, COMPLETED, FAILING, FAILED The job status is FAILED if one or more pieces failed to import.
      • TotalFailures (integer) -- The number of endpoints that failed to import; for example, because of syntax errors.
      • TotalPieces (integer) -- The total number of pieces that must be imported to finish the job. Each piece is an approximately equal portion of the endpoints to import.
      • TotalProcessed (integer) -- The number of endpoints that were processed by the import job.
      • Type (string) -- The job type. Will be Import.

get_import_jobs(**kwargs)

Returns information about your import jobs.

See also: AWS API Documentation

Request Syntax

response = client.get_import_jobs(
    ApplicationId='string',
    PageSize='string',
    Token='string'
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • PageSize (string) -- The number of entries you want on each page in the response.
  • Token (string) -- The NextToken string returned on a previous page that you use to get the next page of results in a paginated response.
Return type

dict

Returns

Response Syntax

{
    'ImportJobsResponse': {
        'Item': [
            {
                'ApplicationId': 'string',
                'CompletedPieces': 123,
                'CompletionDate': 'string',
                'CreationDate': 'string',
                'Definition': {
                    'DefineSegment': True|False,
                    'ExternalId': 'string',
                    'Format': 'CSV'|'JSON',
                    'RegisterEndpoints': True|False,
                    'RoleArn': 'string',
                    'S3Url': 'string',
                    'SegmentId': 'string',
                    'SegmentName': 'string'
                },
                'FailedPieces': 123,
                'Failures': [
                    'string',
                ],
                'Id': 'string',
                'JobStatus': 'CREATED'|'INITIALIZING'|'PROCESSING'|'COMPLETING'|'COMPLETED'|'FAILING'|'FAILED',
                'TotalFailures': 123,
                'TotalPieces': 123,
                'TotalProcessed': 123,
                'Type': 'string'
            },
        ],
        'NextToken': 'string'
    }
}

Response Structure

  • (dict) -- 200 response
    • ImportJobsResponse (dict) -- Import job list.
      • Item (list) -- A list of import jobs for the application.
        • (dict) -- Import job response.
          • ApplicationId (string) -- The unique ID of the application to which the import job applies.
          • CompletedPieces (integer) -- The number of pieces that have successfully imported as of the time of the request.
          • CompletionDate (string) -- The date the import job completed in ISO 8601 format.
          • CreationDate (string) -- The date the import job was created in ISO 8601 format.
          • Definition (dict) -- The import job settings.
            • DefineSegment (boolean) -- Sets whether the endpoints create a segment when they are imported.
            • ExternalId (string) -- (Deprecated) Your AWS account ID, which you assigned to the ExternalID key in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This requirement is removed, and external IDs are not recommended for IAM roles assumed by Amazon Pinpoint.
            • Format (string) -- The format of the files that contain the endpoint definitions. Valid values: CSV, JSON
            • RegisterEndpoints (boolean) -- Sets whether the endpoints are registered with Amazon Pinpoint when they are imported.
            • RoleArn (string) -- The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the Amazon S3 location that contains the endpoints to import.
            • S3Url (string) -- The URL of the S3 bucket that contains the segment information to import. The location can be a folder or a single file. The URL should use the following format: s3://bucket-name/folder-name/file-name Amazon Pinpoint imports endpoints from this location and any subfolders it contains.
            • SegmentId (string) -- The ID of the segment to update if the import job is meant to update an existing segment.
            • SegmentName (string) -- A custom name for the segment created by the import job. Use if DefineSegment is true.
          • FailedPieces (integer) -- The number of pieces that have failed to import as of the time of the request.
          • Failures (list) -- Provides up to 100 of the first failed entries for the job, if any exist.
            • (string) --
          • Id (string) -- The unique ID of the import job.
          • JobStatus (string) -- The status of the import job. Valid values: CREATED, INITIALIZING, PROCESSING, COMPLETING, COMPLETED, FAILING, FAILED The job status is FAILED if one or more pieces failed to import.
          • TotalFailures (integer) -- The number of endpoints that failed to import; for example, because of syntax errors.
          • TotalPieces (integer) -- The total number of pieces that must be imported to finish the job. Each piece is an approximately equal portion of the endpoints to import.
          • TotalProcessed (integer) -- The number of endpoints that were processed by the import job.
          • Type (string) -- The job type. Will be Import.
      • NextToken (string) -- The string that you use in a subsequent request to get the next page of results in a paginated response.

get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_segment(**kwargs)

Returns information about a segment.

See also: AWS API Documentation

Request Syntax

response = client.get_segment(
    ApplicationId='string',
    SegmentId='string'
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • SegmentId (string) -- [REQUIRED] The unique ID of the segment.
Return type

dict

Returns

Response Syntax

{
    'SegmentResponse': {
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'Dimensions': {
            'Attributes': {
                'string': {
                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                }
            },
            'Behavior': {
                'Recency': {
                    'Duration': 'HR_24'|'DAY_7'|'DAY_14'|'DAY_30',
                    'RecencyType': 'ACTIVE'|'INACTIVE'
                }
            },
            'Demographic': {
                'AppVersion': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'Channel': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'DeviceType': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'Make': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'Model': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'Platform': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                }
            },
            'Location': {
                'Country': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'GPSPoint': {
                    'Coordinates': {
                        'Latitude': 123.0,
                        'Longitude': 123.0
                    },
                    'RangeInKilometers': 123.0
                }
            },
            'Metrics': {
                'string': {
                    'ComparisonOperator': 'string',
                    'Value': 123.0
                }
            },
            'UserAttributes': {
                'string': {
                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                }
            }
        },
        'Id': 'string',
        'ImportDefinition': {
            'ChannelCounts': {
                'string': 123
            },
            'ExternalId': 'string',
            'Format': 'CSV'|'JSON',
            'RoleArn': 'string',
            'S3Url': 'string',
            'Size': 123
        },
        'LastModifiedDate': 'string',
        'Name': 'string',
        'SegmentGroups': {
            'Groups': [
                {
                    'Dimensions': [
                        {
                            'Attributes': {
                                'string': {
                                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'Behavior': {
                                'Recency': {
                                    'Duration': 'HR_24'|'DAY_7'|'DAY_14'|'DAY_30',
                                    'RecencyType': 'ACTIVE'|'INACTIVE'
                                }
                            },
                            'Demographic': {
                                'AppVersion': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Channel': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'DeviceType': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Make': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Model': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Platform': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'Location': {
                                'Country': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'GPSPoint': {
                                    'Coordinates': {
                                        'Latitude': 123.0,
                                        'Longitude': 123.0
                                    },
                                    'RangeInKilometers': 123.0
                                }
                            },
                            'Metrics': {
                                'string': {
                                    'ComparisonOperator': 'string',
                                    'Value': 123.0
                                }
                            },
                            'UserAttributes': {
                                'string': {
                                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            }
                        },
                    ],
                    'SourceSegments': [
                        {
                            'Id': 'string',
                            'Version': 123
                        },
                    ],
                    'SourceType': 'ALL'|'ANY'|'NONE',
                    'Type': 'ALL'|'ANY'|'NONE'
                },
            ],
            'Include': 'ALL'|'ANY'|'NONE'
        },
        'SegmentType': 'DIMENSIONAL'|'IMPORT',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response
    • SegmentResponse (dict) -- Segment definition.
      • ApplicationId (string) -- The ID of the application that the segment applies to.
      • CreationDate (string) -- The date and time when the segment was created.
      • Dimensions (dict) -- The segment dimensions attributes.
        • Attributes (dict) -- Custom segment attributes.
          • (string) --
            • (dict) -- Custom attibute dimension
              • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
              • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                • (string) --
        • Behavior (dict) -- The segment behaviors attributes.
          • Recency (dict) -- The recency of use.
            • Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
            • RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
        • Demographic (dict) -- The segment demographics attributes.
          • AppVersion (dict) -- The app version criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • Channel (dict) -- The channel criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • DeviceType (dict) -- The device type criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • Make (dict) -- The device make criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • Model (dict) -- The device model criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • Platform (dict) -- The device platform criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
        • Location (dict) -- The segment location attributes.
          • Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • GPSPoint (dict) -- The GPS Point dimension.
            • Coordinates (dict) -- Coordinate to measure distance from.
              • Latitude (float) -- Latitude
              • Longitude (float) -- Longitude
            • RangeInKilometers (float) -- Range in kilometers from the coordinate.
        • Metrics (dict) -- Custom segment metrics.
          • (string) --
            • (dict) -- Custom metric dimension
              • ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
              • Value (float) -- Value to be compared.
        • UserAttributes (dict) -- Custom segment user attributes.
          • (string) --
            • (dict) -- Custom attibute dimension
              • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
              • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                • (string) --
      • Id (string) -- The unique segment ID.
      • ImportDefinition (dict) -- The import job settings.
        • ChannelCounts (dict) -- The number of channel types in the imported segment.
          • (string) --
            • (integer) --
        • ExternalId (string) -- (Deprecated) Your AWS account ID, which you assigned to the ExternalID key in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This requirement is removed, and external IDs are not recommended for IAM roles assumed by Amazon Pinpoint.
        • Format (string) -- The format of the endpoint files that were imported to create this segment. Valid values: CSV, JSON
        • RoleArn (string) -- The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the endpoints in Amazon S3.
        • S3Url (string) -- The URL of the S3 bucket that the segment was imported from.
        • Size (integer) -- The number of endpoints that were successfully imported to create this segment.
      • LastModifiedDate (string) -- The date and time when the segment was last modified.
      • Name (string) -- The name of the segment.
      • SegmentGroups (dict) -- A segment group, which consists of zero or more source segments, plus dimensions that are applied to those source segments.
        • Groups (list) -- A set of segment criteria to evaluate.
          • (dict) -- Segment group definition.
            • Dimensions (list) -- List of dimensions to include or exclude.
              • (dict) -- Segment dimensions
                • Attributes (dict) -- Custom segment attributes.
                  • (string) --
                    • (dict) -- Custom attibute dimension
                      • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                      • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                        • (string) --
                • Behavior (dict) -- The segment behaviors attributes.
                  • Recency (dict) -- The recency of use.
                    • Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
                    • RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
                • Demographic (dict) -- The segment demographics attributes.
                  • AppVersion (dict) -- The app version criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • Channel (dict) -- The channel criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • DeviceType (dict) -- The device type criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • Make (dict) -- The device make criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • Model (dict) -- The device model criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • Platform (dict) -- The device platform criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                • Location (dict) -- The segment location attributes.
                  • Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • GPSPoint (dict) -- The GPS Point dimension.
                    • Coordinates (dict) -- Coordinate to measure distance from.
                      • Latitude (float) -- Latitude
                      • Longitude (float) -- Longitude
                    • RangeInKilometers (float) -- Range in kilometers from the coordinate.
                • Metrics (dict) -- Custom segment metrics.
                  • (string) --
                    • (dict) -- Custom metric dimension
                      • ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
                      • Value (float) -- Value to be compared.
                • UserAttributes (dict) -- Custom segment user attributes.
                  • (string) --
                    • (dict) -- Custom attibute dimension
                      • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                      • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                        • (string) --
            • SourceSegments (list) -- The base segment that you build your segment on. The source segment defines the starting "universe" of endpoints. When you add dimensions to the segment, it filters the source segment based on the dimensions that you specify. You can specify more than one dimensional segment. You can only specify one imported segment.
              • (dict) -- Segment reference.
                • Id (string) -- A unique identifier for the segment.
                • Version (integer) -- If specified contains a specific version of the segment included.
            • SourceType (string) -- Specify how to handle multiple source segments. For example, if you specify three source segments, should the resulting segment be based on any or all of the segments? Acceptable values: ANY or ALL.
            • Type (string) -- Specify how to handle multiple segment dimensions. For example, if you specify three dimensions, should the resulting segment include endpoints that are matched by all, any, or none of the dimensions? Acceptable values: ALL, ANY, or NONE.
        • Include (string) -- Specify how to handle multiple segment groups. For example, if the segment includes three segment groups, should the resulting segment include endpoints that are matched by all, any, or none of the segment groups you created. Acceptable values: ALL, ANY, or NONE.
      • SegmentType (string) -- The segment type: DIMENSIONAL - A dynamic segment built from selection criteria based on endpoint data reported by your app. You create this type of segment by using the segment builder in the Amazon Pinpoint console or by making a POST request to the segments resource. IMPORT - A static segment built from an imported set of endpoint definitions. You create this type of segment by importing a segment in the Amazon Pinpoint console or by making a POST request to the jobs/import resource.
      • Version (integer) -- The segment version number.

get_segment_export_jobs(**kwargs)

Returns a list of export jobs for a specific segment.

See also: AWS API Documentation

Request Syntax

response = client.get_segment_export_jobs(
    ApplicationId='string',
    PageSize='string',
    SegmentId='string',
    Token='string'
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • PageSize (string) -- The number of entries you want on each page in the response.
  • SegmentId (string) -- [REQUIRED] The unique ID of the segment.
  • Token (string) -- The NextToken string returned on a previous page that you use to get the next page of results in a paginated response.
Return type

dict

Returns

Response Syntax

{
    'ExportJobsResponse': {
        'Item': [
            {
                'ApplicationId': 'string',
                'CompletedPieces': 123,
                'CompletionDate': 'string',
                'CreationDate': 'string',
                'Definition': {
                    'RoleArn': 'string',
                    'S3UrlPrefix': 'string',
                    'SegmentId': 'string',
                    'SegmentVersion': 123
                },
                'FailedPieces': 123,
                'Failures': [
                    'string',
                ],
                'Id': 'string',
                'JobStatus': 'CREATED'|'INITIALIZING'|'PROCESSING'|'COMPLETING'|'COMPLETED'|'FAILING'|'FAILED',
                'TotalFailures': 123,
                'TotalPieces': 123,
                'TotalProcessed': 123,
                'Type': 'string'
            },
        ],
        'NextToken': 'string'
    }
}

Response Structure

  • (dict) -- 200 response
    • ExportJobsResponse (dict) -- Export job list.
      • Item (list) -- A list of export jobs for the application.
        • (dict) -- Export job response.
          • ApplicationId (string) -- The unique ID of the application associated with the export job.
          • CompletedPieces (integer) -- The number of pieces that have successfully completed as of the time of the request.
          • CompletionDate (string) -- The date the job completed in ISO 8601 format.
          • CreationDate (string) -- The date the job was created in ISO 8601 format.
          • Definition (dict) -- The export job settings.
            • RoleArn (string) -- The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the Amazon S3 location that endpoints will be exported to.
            • S3UrlPrefix (string) -- A URL that points to the location within an Amazon S3 bucket that will receive the export. The location is typically a folder with multiple files. The URL should follow this format: s3://bucket-name/folder-name/ Amazon Pinpoint will export endpoints to this location.
            • SegmentId (string) -- The ID of the segment to export endpoints from. If not present, Amazon Pinpoint exports all of the endpoints that belong to the application.
            • SegmentVersion (integer) -- The version of the segment to export if specified.
          • FailedPieces (integer) -- The number of pieces that failed to be processed as of the time of the request.
          • Failures (list) -- Provides up to 100 of the first failed entries for the job, if any exist.
            • (string) --
          • Id (string) -- The unique ID of the job.
          • JobStatus (string) -- The status of the job. Valid values: CREATED, INITIALIZING, PROCESSING, COMPLETING, COMPLETED, FAILING, FAILED The job status is FAILED if one or more pieces failed.
          • TotalFailures (integer) -- The number of endpoints that were not processed; for example, because of syntax errors.
          • TotalPieces (integer) -- The total number of pieces that must be processed to finish the job. Each piece is an approximately equal portion of the endpoints.
          • TotalProcessed (integer) -- The number of endpoints that were processed by the job.
          • Type (string) -- The job type. Will be 'EXPORT'.
      • NextToken (string) -- The string that you use in a subsequent request to get the next page of results in a paginated response.

get_segment_import_jobs(**kwargs)

Returns a list of import jobs for a specific segment.

See also: AWS API Documentation

Request Syntax

response = client.get_segment_import_jobs(
    ApplicationId='string',
    PageSize='string',
    SegmentId='string',
    Token='string'
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • PageSize (string) -- The number of entries you want on each page in the response.
  • SegmentId (string) -- [REQUIRED] The unique ID of the segment.
  • Token (string) -- The NextToken string returned on a previous page that you use to get the next page of results in a paginated response.
Return type

dict

Returns

Response Syntax

{
    'ImportJobsResponse': {
        'Item': [
            {
                'ApplicationId': 'string',
                'CompletedPieces': 123,
                'CompletionDate': 'string',
                'CreationDate': 'string',
                'Definition': {
                    'DefineSegment': True|False,
                    'ExternalId': 'string',
                    'Format': 'CSV'|'JSON',
                    'RegisterEndpoints': True|False,
                    'RoleArn': 'string',
                    'S3Url': 'string',
                    'SegmentId': 'string',
                    'SegmentName': 'string'
                },
                'FailedPieces': 123,
                'Failures': [
                    'string',
                ],
                'Id': 'string',
                'JobStatus': 'CREATED'|'INITIALIZING'|'PROCESSING'|'COMPLETING'|'COMPLETED'|'FAILING'|'FAILED',
                'TotalFailures': 123,
                'TotalPieces': 123,
                'TotalProcessed': 123,
                'Type': 'string'
            },
        ],
        'NextToken': 'string'
    }
}

Response Structure

  • (dict) -- 200 response
    • ImportJobsResponse (dict) -- Import job list.
      • Item (list) -- A list of import jobs for the application.
        • (dict) -- Import job response.
          • ApplicationId (string) -- The unique ID of the application to which the import job applies.
          • CompletedPieces (integer) -- The number of pieces that have successfully imported as of the time of the request.
          • CompletionDate (string) -- The date the import job completed in ISO 8601 format.
          • CreationDate (string) -- The date the import job was created in ISO 8601 format.
          • Definition (dict) -- The import job settings.
            • DefineSegment (boolean) -- Sets whether the endpoints create a segment when they are imported.
            • ExternalId (string) -- (Deprecated) Your AWS account ID, which you assigned to the ExternalID key in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This requirement is removed, and external IDs are not recommended for IAM roles assumed by Amazon Pinpoint.
            • Format (string) -- The format of the files that contain the endpoint definitions. Valid values: CSV, JSON
            • RegisterEndpoints (boolean) -- Sets whether the endpoints are registered with Amazon Pinpoint when they are imported.
            • RoleArn (string) -- The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the Amazon S3 location that contains the endpoints to import.
            • S3Url (string) -- The URL of the S3 bucket that contains the segment information to import. The location can be a folder or a single file. The URL should use the following format: s3://bucket-name/folder-name/file-name Amazon Pinpoint imports endpoints from this location and any subfolders it contains.
            • SegmentId (string) -- The ID of the segment to update if the import job is meant to update an existing segment.
            • SegmentName (string) -- A custom name for the segment created by the import job. Use if DefineSegment is true.
          • FailedPieces (integer) -- The number of pieces that have failed to import as of the time of the request.
          • Failures (list) -- Provides up to 100 of the first failed entries for the job, if any exist.
            • (string) --
          • Id (string) -- The unique ID of the import job.
          • JobStatus (string) -- The status of the import job. Valid values: CREATED, INITIALIZING, PROCESSING, COMPLETING, COMPLETED, FAILING, FAILED The job status is FAILED if one or more pieces failed to import.
          • TotalFailures (integer) -- The number of endpoints that failed to import; for example, because of syntax errors.
          • TotalPieces (integer) -- The total number of pieces that must be imported to finish the job. Each piece is an approximately equal portion of the endpoints to import.
          • TotalProcessed (integer) -- The number of endpoints that were processed by the import job.
          • Type (string) -- The job type. Will be Import.
      • NextToken (string) -- The string that you use in a subsequent request to get the next page of results in a paginated response.

get_segment_version(**kwargs)

Returns information about a segment version.

See also: AWS API Documentation

Request Syntax

response = client.get_segment_version(
    ApplicationId='string',
    SegmentId='string',
    Version='string'
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • SegmentId (string) -- [REQUIRED] The unique ID of the segment.
  • Version (string) -- [REQUIRED] The segment version.
Return type

dict

Returns

Response Syntax

{
    'SegmentResponse': {
        'ApplicationId': 'string',
        'CreationDate': 'string',
        'Dimensions': {
            'Attributes': {
                'string': {
                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                }
            },
            'Behavior': {
                'Recency': {
                    'Duration': 'HR_24'|'DAY_7'|'DAY_14'|'DAY_30',
                    'RecencyType': 'ACTIVE'|'INACTIVE'
                }
            },
            'Demographic': {
                'AppVersion': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'Channel': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'DeviceType': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'Make': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'Model': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'Platform': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                }
            },
            'Location': {
                'Country': {
                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                },
                'GPSPoint': {
                    'Coordinates': {
                        'Latitude': 123.0,
                        'Longitude': 123.0
                    },
                    'RangeInKilometers': 123.0
                }
            },
            'Metrics': {
                'string': {
                    'ComparisonOperator': 'string',
                    'Value': 123.0
                }
            },
            'UserAttributes': {
                'string': {
                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                    'Values': [
                        'string',
                    ]
                }
            }
        },
        'Id': 'string',
        'ImportDefinition': {
            'ChannelCounts': {
                'string': 123
            },
            'ExternalId': 'string',
            'Format': 'CSV'|'JSON',
            'RoleArn': 'string',
            'S3Url': 'string',
            'Size': 123
        },
        'LastModifiedDate': 'string',
        'Name': 'string',
        'SegmentGroups': {
            'Groups': [
                {
                    'Dimensions': [
                        {
                            'Attributes': {
                                'string': {
                                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'Behavior': {
                                'Recency': {
                                    'Duration': 'HR_24'|'DAY_7'|'DAY_14'|'DAY_30',
                                    'RecencyType': 'ACTIVE'|'INACTIVE'
                                }
                            },
                            'Demographic': {
                                'AppVersion': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Channel': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'DeviceType': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Make': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Model': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'Platform': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'Location': {
                                'Country': {
                                    'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                },
                                'GPSPoint': {
                                    'Coordinates': {
                                        'Latitude': 123.0,
                                        'Longitude': 123.0
                                    },
                                    'RangeInKilometers': 123.0
                                }
                            },
                            'Metrics': {
                                'string': {
                                    'ComparisonOperator': 'string',
                                    'Value': 123.0
                                }
                            },
                            'UserAttributes': {
                                'string': {
                                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            }
                        },
                    ],
                    'SourceSegments': [
                        {
                            'Id': 'string',
                            'Version': 123
                        },
                    ],
                    'SourceType': 'ALL'|'ANY'|'NONE',
                    'Type': 'ALL'|'ANY'|'NONE'
                },
            ],
            'Include': 'ALL'|'ANY'|'NONE'
        },
        'SegmentType': 'DIMENSIONAL'|'IMPORT',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response
    • SegmentResponse (dict) -- Segment definition.
      • ApplicationId (string) -- The ID of the application that the segment applies to.
      • CreationDate (string) -- The date and time when the segment was created.
      • Dimensions (dict) -- The segment dimensions attributes.
        • Attributes (dict) -- Custom segment attributes.
          • (string) --
            • (dict) -- Custom attibute dimension
              • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
              • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                • (string) --
        • Behavior (dict) -- The segment behaviors attributes.
          • Recency (dict) -- The recency of use.
            • Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
            • RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
        • Demographic (dict) -- The segment demographics attributes.
          • AppVersion (dict) -- The app version criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • Channel (dict) -- The channel criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • DeviceType (dict) -- The device type criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • Make (dict) -- The device make criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • Model (dict) -- The device model criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • Platform (dict) -- The device platform criteria for the segment.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
        • Location (dict) -- The segment location attributes.
          • Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
            • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
            • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
              • (string) --
          • GPSPoint (dict) -- The GPS Point dimension.
            • Coordinates (dict) -- Coordinate to measure distance from.
              • Latitude (float) -- Latitude
              • Longitude (float) -- Longitude
            • RangeInKilometers (float) -- Range in kilometers from the coordinate.
        • Metrics (dict) -- Custom segment metrics.
          • (string) --
            • (dict) -- Custom metric dimension
              • ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
              • Value (float) -- Value to be compared.
        • UserAttributes (dict) -- Custom segment user attributes.
          • (string) --
            • (dict) -- Custom attibute dimension
              • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
              • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                • (string) --
      • Id (string) -- The unique segment ID.
      • ImportDefinition (dict) -- The import job settings.
        • ChannelCounts (dict) -- The number of channel types in the imported segment.
          • (string) --
            • (integer) --
        • ExternalId (string) -- (Deprecated) Your AWS account ID, which you assigned to the ExternalID key in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This requirement is removed, and external IDs are not recommended for IAM roles assumed by Amazon Pinpoint.
        • Format (string) -- The format of the endpoint files that were imported to create this segment. Valid values: CSV, JSON
        • RoleArn (string) -- The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the endpoints in Amazon S3.
        • S3Url (string) -- The URL of the S3 bucket that the segment was imported from.
        • Size (integer) -- The number of endpoints that were successfully imported to create this segment.
      • LastModifiedDate (string) -- The date and time when the segment was last modified.
      • Name (string) -- The name of the segment.
      • SegmentGroups (dict) -- A segment group, which consists of zero or more source segments, plus dimensions that are applied to those source segments.
        • Groups (list) -- A set of segment criteria to evaluate.
          • (dict) -- Segment group definition.
            • Dimensions (list) -- List of dimensions to include or exclude.
              • (dict) -- Segment dimensions
                • Attributes (dict) -- Custom segment attributes.
                  • (string) --
                    • (dict) -- Custom attibute dimension
                      • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                      • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                        • (string) --
                • Behavior (dict) -- The segment behaviors attributes.
                  • Recency (dict) -- The recency of use.
                    • Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
                    • RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
                • Demographic (dict) -- The segment demographics attributes.
                  • AppVersion (dict) -- The app version criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • Channel (dict) -- The channel criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • DeviceType (dict) -- The device type criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • Make (dict) -- The device make criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • Model (dict) -- The device model criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • Platform (dict) -- The device platform criteria for the segment.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                • Location (dict) -- The segment location attributes.
                  • Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
                    • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                    • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                      • (string) --
                  • GPSPoint (dict) -- The GPS Point dimension.
                    • Coordinates (dict) -- Coordinate to measure distance from.
                      • Latitude (float) -- Latitude
                      • Longitude (float) -- Longitude
                    • RangeInKilometers (float) -- Range in kilometers from the coordinate.
                • Metrics (dict) -- Custom segment metrics.
                  • (string) --
                    • (dict) -- Custom metric dimension
                      • ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
                      • Value (float) -- Value to be compared.
                • UserAttributes (dict) -- Custom segment user attributes.
                  • (string) --
                    • (dict) -- Custom attibute dimension
                      • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                      • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                        • (string) --
            • SourceSegments (list) -- The base segment that you build your segment on. The source segment defines the starting "universe" of endpoints. When you add dimensions to the segment, it filters the source segment based on the dimensions that you specify. You can specify more than one dimensional segment. You can only specify one imported segment.
              • (dict) -- Segment reference.
                • Id (string) -- A unique identifier for the segment.
                • Version (integer) -- If specified contains a specific version of the segment included.
            • SourceType (string) -- Specify how to handle multiple source segments. For example, if you specify three source segments, should the resulting segment be based on any or all of the segments? Acceptable values: ANY or ALL.
            • Type (string) -- Specify how to handle multiple segment dimensions. For example, if you specify three dimensions, should the resulting segment include endpoints that are matched by all, any, or none of the dimensions? Acceptable values: ALL, ANY, or NONE.
        • Include (string) -- Specify how to handle multiple segment groups. For example, if the segment includes three segment groups, should the resulting segment include endpoints that are matched by all, any, or none of the segment groups you created. Acceptable values: ALL, ANY, or NONE.
      • SegmentType (string) -- The segment type: DIMENSIONAL - A dynamic segment built from selection criteria based on endpoint data reported by your app. You create this type of segment by using the segment builder in the Amazon Pinpoint console or by making a POST request to the segments resource. IMPORT - A static segment built from an imported set of endpoint definitions. You create this type of segment by importing a segment in the Amazon Pinpoint console or by making a POST request to the jobs/import resource.
      • Version (integer) -- The segment version number.

get_segment_versions(**kwargs)

Returns information about your segment versions.

See also: AWS API Documentation

Request Syntax

response = client.get_segment_versions(
    ApplicationId='string',
    PageSize='string',
    SegmentId='string',
    Token='string'
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • PageSize (string) -- The number of entries you want on each page in the response.
  • SegmentId (string) -- [REQUIRED] The unique ID of the segment.
  • Token (string) -- The NextToken string returned on a previous page that you use to get the next page of results in a paginated response.
Return type

dict

Returns

Response Syntax

{
    'SegmentsResponse': {
        'Item': [
            {
                'ApplicationId': 'string',
                'CreationDate': 'string',
                'Dimensions': {
                    'Attributes': {
                        'string': {
                            'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        }
                    },
                    'Behavior': {
                        'Recency': {
                            'Duration': 'HR_24'|'DAY_7'|'DAY_14'|'DAY_30',
                            'RecencyType': 'ACTIVE'|'INACTIVE'
                        }
                    },
                    'Demographic': {
                        'AppVersion': {
                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        },
                        'Channel': {
                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        },
                        'DeviceType': {
                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        },
                        'Make': {
                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        },
                        'Model': {
                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        },
                        'Platform': {
                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        }
                    },
                    'Location': {
                        'Country': {
                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        },
                        'GPSPoint': {
                            'Coordinates': {
                                'Latitude': 123.0,
                                'Longitude': 123.0
                            },
                            'RangeInKilometers': 123.0
                        }
                    },
                    'Metrics': {
                        'string': {
                            'ComparisonOperator': 'string',
                            'Value': 123.0
                        }
                    },
                    'UserAttributes': {
                        'string': {
                            'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        }
                    }
                },
                'Id': 'string',
                'ImportDefinition': {
                    'ChannelCounts': {
                        'string': 123
                    },
                    'ExternalId': 'string',
                    'Format': 'CSV'|'JSON',
                    'RoleArn': 'string',
                    'S3Url': 'string',
                    'Size': 123
                },
                'LastModifiedDate': 'string',
                'Name': 'string',
                'SegmentGroups': {
                    'Groups': [
                        {
                            'Dimensions': [
                                {
                                    'Attributes': {
                                        'string': {
                                            'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                            'Values': [
                                                'string',
                                            ]
                                        }
                                    },
                                    'Behavior': {
                                        'Recency': {
                                            'Duration': 'HR_24'|'DAY_7'|'DAY_14'|'DAY_30',
                                            'RecencyType': 'ACTIVE'|'INACTIVE'
                                        }
                                    },
                                    'Demographic': {
                                        'AppVersion': {
                                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                            'Values': [
                                                'string',
                                            ]
                                        },
                                        'Channel': {
                                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                            'Values': [
                                                'string',
                                            ]
                                        },
                                        'DeviceType': {
                                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                            'Values': [
                                                'string',
                                            ]
                                        },
                                        'Make': {
                                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                            'Values': [
                                                'string',
                                            ]
                                        },
                                        'Model': {
                                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                            'Values': [
                                                'string',
                                            ]
                                        },
                                        'Platform': {
                                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                            'Values': [
                                                'string',
                                            ]
                                        }
                                    },
                                    'Location': {
                                        'Country': {
                                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                            'Values': [
                                                'string',
                                            ]
                                        },
                                        'GPSPoint': {
                                            'Coordinates': {
                                                'Latitude': 123.0,
                                                'Longitude': 123.0
                                            },
                                            'RangeInKilometers': 123.0
                                        }
                                    },
                                    'Metrics': {
                                        'string': {
                                            'ComparisonOperator': 'string',
                                            'Value': 123.0
                                        }
                                    },
                                    'UserAttributes': {
                                        'string': {
                                            'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                            'Values': [
                                                'string',
                                            ]
                                        }
                                    }
                                },
                            ],
                            'SourceSegments': [
                                {
                                    'Id': 'string',
                                    'Version': 123
                                },
                            ],
                            'SourceType': 'ALL'|'ANY'|'NONE',
                            'Type': 'ALL'|'ANY'|'NONE'
                        },
                    ],
                    'Include': 'ALL'|'ANY'|'NONE'
                },
                'SegmentType': 'DIMENSIONAL'|'IMPORT',
                'Version': 123
            },
        ],
        'NextToken': 'string'
    }
}

Response Structure

  • (dict) -- 200 response
    • SegmentsResponse (dict) -- Segments in your account.
      • Item (list) -- The list of segments.
        • (dict) -- Segment definition.
          • ApplicationId (string) -- The ID of the application that the segment applies to.
          • CreationDate (string) -- The date and time when the segment was created.
          • Dimensions (dict) -- The segment dimensions attributes.
            • Attributes (dict) -- Custom segment attributes.
              • (string) --
                • (dict) -- Custom attibute dimension
                  • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                  • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                    • (string) --
            • Behavior (dict) -- The segment behaviors attributes.
              • Recency (dict) -- The recency of use.
                • Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
                • RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
            • Demographic (dict) -- The segment demographics attributes.
              • AppVersion (dict) -- The app version criteria for the segment.
                • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                  • (string) --
              • Channel (dict) -- The channel criteria for the segment.
                • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                  • (string) --
              • DeviceType (dict) -- The device type criteria for the segment.
                • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                  • (string) --
              • Make (dict) -- The device make criteria for the segment.
                • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                  • (string) --
              • Model (dict) -- The device model criteria for the segment.
                • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                  • (string) --
              • Platform (dict) -- The device platform criteria for the segment.
                • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                  • (string) --
            • Location (dict) -- The segment location attributes.
              • Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
                • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                  • (string) --
              • GPSPoint (dict) -- The GPS Point dimension.
                • Coordinates (dict) -- Coordinate to measure distance from.
                  • Latitude (float) -- Latitude
                  • Longitude (float) -- Longitude
                • RangeInKilometers (float) -- Range in kilometers from the coordinate.
            • Metrics (dict) -- Custom segment metrics.
              • (string) --
                • (dict) -- Custom metric dimension
                  • ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
                  • Value (float) -- Value to be compared.
            • UserAttributes (dict) -- Custom segment user attributes.
              • (string) --
                • (dict) -- Custom attibute dimension
                  • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                  • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                    • (string) --
          • Id (string) -- The unique segment ID.
          • ImportDefinition (dict) -- The import job settings.
            • ChannelCounts (dict) -- The number of channel types in the imported segment.
              • (string) --
                • (integer) --
            • ExternalId (string) -- (Deprecated) Your AWS account ID, which you assigned to the ExternalID key in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This requirement is removed, and external IDs are not recommended for IAM roles assumed by Amazon Pinpoint.
            • Format (string) -- The format of the endpoint files that were imported to create this segment. Valid values: CSV, JSON
            • RoleArn (string) -- The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the endpoints in Amazon S3.
            • S3Url (string) -- The URL of the S3 bucket that the segment was imported from.
            • Size (integer) -- The number of endpoints that were successfully imported to create this segment.
          • LastModifiedDate (string) -- The date and time when the segment was last modified.
          • Name (string) -- The name of the segment.
          • SegmentGroups (dict) -- A segment group, which consists of zero or more source segments, plus dimensions that are applied to those source segments.
            • Groups (list) -- A set of segment criteria to evaluate.
              • (dict) -- Segment group definition.
                • Dimensions (list) -- List of dimensions to include or exclude.
                  • (dict) -- Segment dimensions
                    • Attributes (dict) -- Custom segment attributes.
                      • (string) --
                        • (dict) -- Custom attibute dimension
                          • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                          • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                            • (string) --
                    • Behavior (dict) -- The segment behaviors attributes.
                      • Recency (dict) -- The recency of use.
                        • Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
                        • RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
                    • Demographic (dict) -- The segment demographics attributes.
                      • AppVersion (dict) -- The app version criteria for the segment.
                        • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                        • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                          • (string) --
                      • Channel (dict) -- The channel criteria for the segment.
                        • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                        • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                          • (string) --
                      • DeviceType (dict) -- The device type criteria for the segment.
                        • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                        • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                          • (string) --
                      • Make (dict) -- The device make criteria for the segment.
                        • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                        • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                          • (string) --
                      • Model (dict) -- The device model criteria for the segment.
                        • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                        • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                          • (string) --
                      • Platform (dict) -- The device platform criteria for the segment.
                        • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                        • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                          • (string) --
                    • Location (dict) -- The segment location attributes.
                      • Country (dict) -- The country filter according to ISO 3166-1 Alpha-2 codes.
                        • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                        • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                          • (string) --
                      • GPSPoint (dict) -- The GPS Point dimension.
                        • Coordinates (dict) -- Coordinate to measure distance from.
                          • Latitude (float) -- Latitude
                          • Longitude (float) -- Longitude
                        • RangeInKilometers (float) -- Range in kilometers from the coordinate.
                    • Metrics (dict) -- Custom segment metrics.
                      • (string) --
                        • (dict) -- Custom metric dimension
                          • ComparisonOperator (string) -- GREATER_THAN | LESS_THAN | GREATER_THAN_OR_EQUAL | LESS_THAN_OR_EQUAL | EQUAL
                          • Value (float) -- Value to be compared.
                    • UserAttributes (dict) -- Custom segment user attributes.
                      • (string) --
                        • (dict) -- Custom attibute dimension
                          • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                          • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                            • (string) --
                • SourceSegments (list) -- The base segment that you build your segment on. The source segment defines the starting "universe" of endpoints. When you add dimensions to the segment, it filters the source segment based on the dimensions that you specify. You can specify more than one dimensional segment. You can only specify one imported segment.
                  • (dict) -- Segment reference.
                    • Id (string) -- A unique identifier for the segment.
                    • Version (integer) -- If specified contains a specific version of the segment included.
                • SourceType (string) -- Specify how to handle multiple source segments. For example, if you specify three source segments, should the resulting segment be based on any or all of the segments? Acceptable values: ANY or ALL.
                • Type (string) -- Specify how to handle multiple segment dimensions. For example, if you specify three dimensions, should the resulting segment include endpoints that are matched by all, any, or none of the dimensions? Acceptable values: ALL, ANY, or NONE.
            • Include (string) -- Specify how to handle multiple segment groups. For example, if the segment includes three segment groups, should the resulting segment include endpoints that are matched by all, any, or none of the segment groups you created. Acceptable values: ALL, ANY, or NONE.
          • SegmentType (string) -- The segment type: DIMENSIONAL - A dynamic segment built from selection criteria based on endpoint data reported by your app. You create this type of segment by using the segment builder in the Amazon Pinpoint console or by making a POST request to the segments resource. IMPORT - A static segment built from an imported set of endpoint definitions. You create this type of segment by importing a segment in the Amazon Pinpoint console or by making a POST request to the jobs/import resource.
          • Version (integer) -- The segment version number.
      • NextToken (string) -- An identifier used to retrieve the next page of results. The token is null if no additional pages exist.

get_segments(**kwargs)

Used to get information about your segments.

See also: AWS API Documentation

Request Syntax

response = client.get_segments(
    ApplicationId='string',
    PageSize='string',
    Token='string'
)
Parameters
  • ApplicationId (string) -- [REQUIRED] The unique ID of your Amazon Pinpoint application.
  • PageSize (string) -- The number of entries you want on each page in the response.
  • Token (string) -- The NextToken string returned on a previous page that you use to get the next page of results in a paginated response.
Return type

dict

Returns

Response Syntax

{
    'SegmentsResponse': {
        'Item': [
            {
                'ApplicationId': 'string',
                'CreationDate': 'string',
                'Dimensions': {
                    'Attributes': {
                        'string': {
                            'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        }
                    },
                    'Behavior': {
                        'Recency': {
                            'Duration': 'HR_24'|'DAY_7'|'DAY_14'|'DAY_30',
                            'RecencyType': 'ACTIVE'|'INACTIVE'
                        }
                    },
                    'Demographic': {
                        'AppVersion': {
                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        },
                        'Channel': {
                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        },
                        'DeviceType': {
                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        },
                        'Make': {
                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        },
                        'Model': {
                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        },
                        'Platform': {
                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        }
                    },
                    'Location': {
                        'Country': {
                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        },
                        'GPSPoint': {
                            'Coordinates': {
                                'Latitude': 123.0,
                                'Longitude': 123.0
                            },
                            'RangeInKilometers': 123.0
                        }
                    },
                    'Metrics': {
                        'string': {
                            'ComparisonOperator': 'string',
                            'Value': 123.0
                        }
                    },
                    'UserAttributes': {
                        'string': {
                            'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        }
                    }
                },
                'Id': 'string',
                'ImportDefinition': {
                    'ChannelCounts': {
                        'string': 123
                    },
                    'ExternalId': 'string',
                    'Format': 'CSV'|'JSON',
                    'RoleArn': 'string',
                    'S3Url': 'string',
                    'Size': 123
                },
                'LastModifiedDate': 'string',
                'Name': 'string',
                'SegmentGroups': {
                    'Groups': [
                        {
                            'Dimensions': [
                                {
                                    'Attributes': {
                                        'string': {
                                            'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                            'Values': [
                                                'string',
                                            ]
                                        }
                                    },
                                    'Behavior': {
                                        'Recency': {
                                            'Duration': 'HR_24'|'DAY_7'|'DAY_14'|'DAY_30',
                                            'RecencyType': 'ACTIVE'|'INACTIVE'
                                        }
                                    },
                                    'Demographic': {
                                        'AppVersion': {
                                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                            'Values': [
                                                'string',
                                            ]
                                        },
                                        'Channel': {
                                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                            'Values': [
                                                'string',
                                            ]
                                        },
                                        'DeviceType': {
                                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                            'Values': [
                                                'string',
                                            ]
                                        },
                                        'Make': {
                                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                            'Values': [
                                                'string',
                                            ]
                                        },
                                        'Model': {
                                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                            'Values': [
                                                'string',
                                            ]
                                        },
                                        'Platform': {
                                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                            'Values': [
                                                'string',
                                            ]
                                        }
                                    },
                                    'Location': {
                                        'Country': {
                                            'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                            'Values': [
                                                'string',
                                            ]
                                        },
                                        'GPSPoint': {
                                            'Coordinates': {
                                                'Latitude': 123.0,
                                                'Longitude': 123.0
                                            },
                                            'RangeInKilometers': 123.0
                                        }
                                    },
                                    'Metrics': {
                                        'string': {
                                            'ComparisonOperator': 'string',
                                            'Value': 123.0
                                        }
                                    },
                                    'UserAttributes': {
                                        'string': {
                                            'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                            'Values': [
                                                'string',
                                            ]
                                        }
                                    }
                                },
                            ],
                            'SourceSegments': [
                                {
                                    'Id': 'string',
                                    'Version': 123
                                },
                            ],
                            'SourceType': 'ALL'|'ANY'|'NONE',
                            'Type': 'ALL'|'ANY'|'NONE'
                        },
                    ],
                    'Include': 'ALL'|'ANY'|'NONE'
                },
                'SegmentType': 'DIMENSIONAL'|'IMPORT',
                'Version': 123
            },
        ],
        'NextToken': 'string'
    }
}

Response Structure

  • (dict) -- 200 response
    • SegmentsResponse (dict) -- Segments in your account.
      • Item (list) -- The list of segments.
        • (dict) -- Segment definition.
          • ApplicationId (string) -- The ID of the application that the segment applies to.
          • CreationDate (string) -- The date and time when the segment was created.
          • Dimensions (dict) -- The segment dimensions attributes.
            • Attributes (dict) -- Custom segment attributes.
              • (string) --
                • (dict) -- Custom attibute dimension
                  • AttributeType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                  • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                    • (string) --
            • Behavior (dict) -- The segment behaviors attributes.
              • Recency (dict) -- The recency of use.
                • Duration (string) -- The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30
                • RecencyType (string) -- The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment.
            • Demographic (dict) -- The segment demographics attributes.
              • AppVersion (dict) -- The app version criteria for the segment.
                • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                  • (string) --
              • Channel (dict) -- The channel criteria for the segment.
                • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                  • (string) --
              • DeviceType (dict) -- The device type criteria for the segment.
                • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                  • (string) --
              • Make (dict) -- The device make criteria for the segment.
                • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                  • (string) --
              • Model (dict) -- The device model criteria for the segment.
                • DimensionType (string) -- The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment.
                • Values (list) -- The criteria values for the segment dimension. Endpoints with matching attribute values are included or excluded from the segment, depending on the setting for Type.
                  • (string) --
              • Platform