Amazon Pinpoint

2018/11/15 - Amazon Pinpoint - 3 new 16 updated api methods

Changes  1. With Amazon Pinpoint Voice, you can use text-to-speech technology to deliver personalized voice messages to your customers. Amazon Pinpoint Voice is a great way to deliver transactional messages -- such as one-time passwords and identity confirmations -- to customers. 2. Adding support for Campaign Event Triggers. With Campaign Event Triggers you can now schedule campaigns to execute based on incoming event data and target just the source of the event.

UpdateVoiceChannel (new) Link ¶

Update an Voice channel

See also: AWS API Documentation

Request Syntax

client.update_voice_channel(
    ApplicationId='string',
    VoiceChannelRequest={
        'Enabled': True|False
    }
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

type VoiceChannelRequest

dict

param VoiceChannelRequest

[REQUIRED] Voice Channel Request

  • Enabled (boolean) -- If the channel is enabled for sending messages.

rtype

dict

returns

Response Syntax

{
    'VoiceChannelResponse': {
        '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

    • VoiceChannelResponse (dict) -- Voice Channel Response.

      • ApplicationId (string) -- Application id

      • 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) --

      • 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) -- Platform type. Will be "Voice"

      • Version (integer) -- Version of channel

DeleteVoiceChannel (new) Link ¶

Delete an Voice channel

See also: AWS API Documentation

Request Syntax

client.delete_voice_channel(
    ApplicationId='string'
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

rtype

dict

returns

Response Syntax

{
    'VoiceChannelResponse': {
        '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

    • VoiceChannelResponse (dict) -- Voice Channel Response.

      • ApplicationId (string) -- Application id

      • 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) --

      • 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) -- Platform type. Will be "Voice"

      • Version (integer) -- Version of channel

GetVoiceChannel (new) Link ¶

Get a Voice Channel

See also: AWS API Documentation

Request Syntax

client.get_voice_channel(
    ApplicationId='string'
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

rtype

dict

returns

Response Syntax

{
    'VoiceChannelResponse': {
        '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

    • VoiceChannelResponse (dict) -- Voice Channel Response.

      • ApplicationId (string) -- Application id

      • 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) --

      • 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) -- Platform type. Will be "Voice"

      • Version (integer) -- Version of channel

CreateCampaign (updated) Link ¶
Changes (request, response)
Request
{'WriteCampaignRequest': {'AdditionalTreatments': {'Schedule': {'EventFilter': {'Dimensions': {'Attributes': {'string': {'AttributeType': 'INCLUSIVE '
                                                                                                                                          '| '
                                                                                                                                          'EXCLUSIVE',
                                                                                                                         'Values': ['string']}},
                                                                                               'EventType': {'DimensionType': 'INCLUSIVE '
                                                                                                                              '| '
                                                                                                                              'EXCLUSIVE',
                                                                                                             'Values': ['string']},
                                                                                               'Metrics': {'string': {'ComparisonOperator': 'string',
                                                                                                                      'Value': 'double'}}},
                                                                                'FilterType': 'SYSTEM '
                                                                                              '| '
                                                                                              'ENDPOINT'},
                                                                'Frequency': ['EVENT']}},
                          'Schedule': {'EventFilter': {'Dimensions': {'Attributes': {'string': {'AttributeType': 'INCLUSIVE '
                                                                                                                 '| '
                                                                                                                 'EXCLUSIVE',
                                                                                                'Values': ['string']}},
                                                                      'EventType': {'DimensionType': 'INCLUSIVE '
                                                                                                     '| '
                                                                                                     'EXCLUSIVE',
                                                                                    'Values': ['string']},
                                                                      'Metrics': {'string': {'ComparisonOperator': 'string',
                                                                                             'Value': 'double'}}},
                                                       'FilterType': 'SYSTEM | '
                                                                     'ENDPOINT'},
                                       'Frequency': ['EVENT']}}}
Response
{'CampaignResponse': {'AdditionalTreatments': {'Schedule': {'EventFilter': {'Dimensions': {'Attributes': {'string': {'AttributeType': 'INCLUSIVE '
                                                                                                                                      '| '
                                                                                                                                      'EXCLUSIVE',
                                                                                                                     'Values': ['string']}},
                                                                                           'EventType': {'DimensionType': 'INCLUSIVE '
                                                                                                                          '| '
                                                                                                                          'EXCLUSIVE',
                                                                                                         'Values': ['string']},
                                                                                           'Metrics': {'string': {'ComparisonOperator': 'string',
                                                                                                                  'Value': 'double'}}},
                                                                            'FilterType': 'SYSTEM '
                                                                                          '| '
                                                                                          'ENDPOINT'},
                                                            'Frequency': ['EVENT']}},
                      'Schedule': {'EventFilter': {'Dimensions': {'Attributes': {'string': {'AttributeType': 'INCLUSIVE '
                                                                                                             '| '
                                                                                                             'EXCLUSIVE',
                                                                                            'Values': ['string']}},
                                                                  'EventType': {'DimensionType': 'INCLUSIVE '
                                                                                                 '| '
                                                                                                 'EXCLUSIVE',
                                                                                'Values': ['string']},
                                                                  'Metrics': {'string': {'ComparisonOperator': 'string',
                                                                                         'Value': 'double'}}},
                                                   'FilterType': 'SYSTEM | '
                                                                 'ENDPOINT'},
                                   'Frequency': ['EVENT']}}}

Creates or updates a campaign.

See also: AWS API Documentation

Request Syntax

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',
                    'EventFilter': {
                        'Dimensions': {
                            'Attributes': {
                                'string': {
                                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'EventType': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                'Values': [
                                    'string',
                                ]
                            },
                            'Metrics': {
                                'string': {
                                    'ComparisonOperator': 'string',
                                    'Value': 123.0
                                }
                            }
                        },
                        'FilterType': 'SYSTEM'|'ENDPOINT'
                    },
                    'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY'|'EVENT',
                    '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',
            'EventFilter': {
                'Dimensions': {
                    'Attributes': {
                        'string': {
                            'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        }
                    },
                    'EventType': {
                        'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                        'Values': [
                            'string',
                        ]
                    },
                    'Metrics': {
                        'string': {
                            'ComparisonOperator': 'string',
                            'Value': 123.0
                        }
                    }
                },
                'FilterType': 'SYSTEM'|'ENDPOINT'
            },
            'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY'|'EVENT',
            'IsLocalTime': True|False,
            'QuietTime': {
                'End': 'string',
                'Start': 'string'
            },
            'StartTime': 'string',
            'Timezone': 'string'
        },
        'SegmentId': 'string',
        'SegmentVersion': 123,
        'TreatmentDescription': 'string',
        'TreatmentName': 'string'
    }
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

type WriteCampaignRequest

dict

param WriteCampaignRequest

[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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

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

        • EventFilter (dict) -- Defines the type of events that can trigger the campaign. Used when the Frequency is set to EVENT.

          • Dimensions (dict) -- An object that defines the dimensions for the event filter.

            • Attributes (dict) -- Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

              • (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) --

            • EventType (dict) -- The name of the event that causes the campaign to be sent. This can be a standard event type that Amazon Pinpoint generates, such as _session.start, or a custom event that's specific to your app.

              • 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) --

            • Metrics (dict) -- Custom metrics that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

              • (string) --

                • (dict) -- Custom metric dimension

                  • ComparisonOperator (string) -- The operator that you're using to compare metric values. Possible values: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, or EQUAL

                  • Value (float) -- The value to be compared.

          • FilterType (string) -- The type of event that causes the campaign to be sent. Possible values: SYSTEM - Send the campaign when a system event occurs. See the System resource for more information. ENDPOINT - Send the campaign when an endpoint event occurs. See the Event resource for more information.

        • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE HOURLY DAILY WEEKLY MONTHLY EVENT

        • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.

        • QuietTime (dict) -- The default quiet time for the campaign. The campaign doesn't send messages to endpoints during the quiet time. Note: Make sure that your endpoints include the Demographics.Timezone attribute if you plan to enable a quiet time for your campaign. If your endpoints don't include this attribute, they'll receive the messages that you send them, even if quiet time is enabled. When you set up a campaign to use quiet time, the campaign doesn't send messages during the time range you specified, as long as all of the following are true: - The endpoint includes a valid Demographic.Timezone attribute. - The current time in the endpoint's time zone is later than or equal to the time specified in the QuietTime.Start attribute for the campaign. - The current time in the endpoint's time zone is earlier than or equal to the time specified in the QuietTime.End attribute for the campaign.

          • End (string) -- The time at which quiet time should end. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

          • Start (string) -- The time at which quiet time should begin. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

        • 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 each campaign can send to a single endpoint in a 24-hour period.

    • 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 number of messages that an individual campaign can send to a single endpoint over the course of the campaign.

  • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

      • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

      • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

      • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

      • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

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

    • EventFilter (dict) -- Defines the type of events that can trigger the campaign. Used when the Frequency is set to EVENT.

      • Dimensions (dict) -- An object that defines the dimensions for the event filter.

        • Attributes (dict) -- Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

          • (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) --

        • EventType (dict) -- The name of the event that causes the campaign to be sent. This can be a standard event type that Amazon Pinpoint generates, such as _session.start, or a custom event that's specific to your app.

          • 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) --

        • Metrics (dict) -- Custom metrics that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

          • (string) --

            • (dict) -- Custom metric dimension

              • ComparisonOperator (string) -- The operator that you're using to compare metric values. Possible values: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, or EQUAL

              • Value (float) -- The value to be compared.

      • FilterType (string) -- The type of event that causes the campaign to be sent. Possible values: SYSTEM - Send the campaign when a system event occurs. See the System resource for more information. ENDPOINT - Send the campaign when an endpoint event occurs. See the Event resource for more information.

    • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE HOURLY DAILY WEEKLY MONTHLY EVENT

    • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.

    • QuietTime (dict) -- The default quiet time for the campaign. The campaign doesn't send messages to endpoints during the quiet time. Note: Make sure that your endpoints include the Demographics.Timezone attribute if you plan to enable a quiet time for your campaign. If your endpoints don't include this attribute, they'll receive the messages that you send them, even if quiet time is enabled. When you set up a campaign to use quiet time, the campaign doesn't send messages during the time range you specified, as long as all of the following are true: - The endpoint includes a valid Demographic.Timezone attribute. - The current time in the endpoint's time zone is later than or equal to the time specified in the QuietTime.Start attribute for the campaign. - The current time in the endpoint's time zone is earlier than or equal to the time specified in the QuietTime.End attribute for the campaign.

      • End (string) -- The time at which quiet time should end. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

      • Start (string) -- The time at which quiet time should begin. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

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

rtype

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',
                    'EventFilter': {
                        'Dimensions': {
                            'Attributes': {
                                'string': {
                                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'EventType': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                'Values': [
                                    'string',
                                ]
                            },
                            'Metrics': {
                                'string': {
                                    'ComparisonOperator': 'string',
                                    'Value': 123.0
                                }
                            }
                        },
                        'FilterType': 'SYSTEM'|'ENDPOINT'
                    },
                    'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY'|'EVENT',
                    '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',
            'EventFilter': {
                'Dimensions': {
                    'Attributes': {
                        'string': {
                            'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        }
                    },
                    'EventType': {
                        'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                        'Values': [
                            'string',
                        ]
                    },
                    'Metrics': {
                        'string': {
                            'ComparisonOperator': 'string',
                            'Value': 123.0
                        }
                    }
                },
                'FilterType': 'SYSTEM'|'ENDPOINT'
            },
            'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY'|'EVENT',
            '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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

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

            • EventFilter (dict) -- Defines the type of events that can trigger the campaign. Used when the Frequency is set to EVENT.

              • Dimensions (dict) -- An object that defines the dimensions for the event filter.

                • Attributes (dict) -- Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

                  • (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) --

                • EventType (dict) -- The name of the event that causes the campaign to be sent. This can be a standard event type that Amazon Pinpoint generates, such as _session.start, or a custom event that's specific to your app.

                  • 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) --

                • Metrics (dict) -- Custom metrics that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

                  • (string) --

                    • (dict) -- Custom metric dimension

                      • ComparisonOperator (string) -- The operator that you're using to compare metric values. Possible values: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, or EQUAL

                      • Value (float) -- The value to be compared.

              • FilterType (string) -- The type of event that causes the campaign to be sent. Possible values: SYSTEM - Send the campaign when a system event occurs. See the System resource for more information. ENDPOINT - Send the campaign when an endpoint event occurs. See the Event resource for more information.

            • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE HOURLY DAILY WEEKLY MONTHLY EVENT

            • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.

            • QuietTime (dict) -- The default quiet time for the campaign. The campaign doesn't send messages to endpoints during the quiet time. Note: Make sure that your endpoints include the Demographics.Timezone attribute if you plan to enable a quiet time for your campaign. If your endpoints don't include this attribute, they'll receive the messages that you send them, even if quiet time is enabled. When you set up a campaign to use quiet time, the campaign doesn't send messages during the time range you specified, as long as all of the following are true: - The endpoint includes a valid Demographic.Timezone attribute. - The current time in the endpoint's time zone is later than or equal to the time specified in the QuietTime.Start attribute for the campaign. - The current time in the endpoint's time zone is earlier than or equal to the time specified in the QuietTime.End attribute for the campaign.

              • End (string) -- The time at which quiet time should end. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

              • Start (string) -- The time at which quiet time should begin. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

            • 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 each campaign can send to a single endpoint in a 24-hour period.

        • 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 number of messages that an individual campaign can send to a single endpoint over the course of the campaign.

      • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

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

        • EventFilter (dict) -- Defines the type of events that can trigger the campaign. Used when the Frequency is set to EVENT.

          • Dimensions (dict) -- An object that defines the dimensions for the event filter.

            • Attributes (dict) -- Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

              • (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) --

            • EventType (dict) -- The name of the event that causes the campaign to be sent. This can be a standard event type that Amazon Pinpoint generates, such as _session.start, or a custom event that's specific to your app.

              • 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) --

            • Metrics (dict) -- Custom metrics that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

              • (string) --

                • (dict) -- Custom metric dimension

                  • ComparisonOperator (string) -- The operator that you're using to compare metric values. Possible values: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, or EQUAL

                  • Value (float) -- The value to be compared.

          • FilterType (string) -- The type of event that causes the campaign to be sent. Possible values: SYSTEM - Send the campaign when a system event occurs. See the System resource for more information. ENDPOINT - Send the campaign when an endpoint event occurs. See the Event resource for more information.

        • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE HOURLY DAILY WEEKLY MONTHLY EVENT

        • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.

        • QuietTime (dict) -- The default quiet time for the campaign. The campaign doesn't send messages to endpoints during the quiet time. Note: Make sure that your endpoints include the Demographics.Timezone attribute if you plan to enable a quiet time for your campaign. If your endpoints don't include this attribute, they'll receive the messages that you send them, even if quiet time is enabled. When you set up a campaign to use quiet time, the campaign doesn't send messages during the time range you specified, as long as all of the following are true: - The endpoint includes a valid Demographic.Timezone attribute. - The current time in the endpoint's time zone is later than or equal to the time specified in the QuietTime.Start attribute for the campaign. - The current time in the endpoint's time zone is earlier than or equal to the time specified in the QuietTime.End attribute for the campaign.

          • End (string) -- The time at which quiet time should end. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

          • Start (string) -- The time at which quiet time should begin. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

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

DeleteCampaign (updated) Link ¶
Changes (response)
{'CampaignResponse': {'AdditionalTreatments': {'Schedule': {'EventFilter': {'Dimensions': {'Attributes': {'string': {'AttributeType': 'INCLUSIVE '
                                                                                                                                      '| '
                                                                                                                                      'EXCLUSIVE',
                                                                                                                     'Values': ['string']}},
                                                                                           'EventType': {'DimensionType': 'INCLUSIVE '
                                                                                                                          '| '
                                                                                                                          'EXCLUSIVE',
                                                                                                         'Values': ['string']},
                                                                                           'Metrics': {'string': {'ComparisonOperator': 'string',
                                                                                                                  'Value': 'double'}}},
                                                                            'FilterType': 'SYSTEM '
                                                                                          '| '
                                                                                          'ENDPOINT'},
                                                            'Frequency': ['EVENT']}},
                      'Schedule': {'EventFilter': {'Dimensions': {'Attributes': {'string': {'AttributeType': 'INCLUSIVE '
                                                                                                             '| '
                                                                                                             'EXCLUSIVE',
                                                                                            'Values': ['string']}},
                                                                  'EventType': {'DimensionType': 'INCLUSIVE '
                                                                                                 '| '
                                                                                                 'EXCLUSIVE',
                                                                                'Values': ['string']},
                                                                  'Metrics': {'string': {'ComparisonOperator': 'string',
                                                                                         'Value': 'double'}}},
                                                   'FilterType': 'SYSTEM | '
                                                                 'ENDPOINT'},
                                   'Frequency': ['EVENT']}}}

Deletes a campaign.

See also: AWS API Documentation

Request Syntax

client.delete_campaign(
    ApplicationId='string',
    CampaignId='string'
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

type CampaignId

string

param CampaignId

[REQUIRED] The unique ID of the campaign.

rtype

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',
                    'EventFilter': {
                        'Dimensions': {
                            'Attributes': {
                                'string': {
                                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'EventType': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                'Values': [
                                    'string',
                                ]
                            },
                            'Metrics': {
                                'string': {
                                    'ComparisonOperator': 'string',
                                    'Value': 123.0
                                }
                            }
                        },
                        'FilterType': 'SYSTEM'|'ENDPOINT'
                    },
                    'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY'|'EVENT',
                    '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',
            'EventFilter': {
                'Dimensions': {
                    'Attributes': {
                        'string': {
                            'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        }
                    },
                    'EventType': {
                        'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                        'Values': [
                            'string',
                        ]
                    },
                    'Metrics': {
                        'string': {
                            'ComparisonOperator': 'string',
                            'Value': 123.0
                        }
                    }
                },
                'FilterType': 'SYSTEM'|'ENDPOINT'
            },
            'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY'|'EVENT',
            '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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

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

            • EventFilter (dict) -- Defines the type of events that can trigger the campaign. Used when the Frequency is set to EVENT.

              • Dimensions (dict) -- An object that defines the dimensions for the event filter.

                • Attributes (dict) -- Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

                  • (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) --

                • EventType (dict) -- The name of the event that causes the campaign to be sent. This can be a standard event type that Amazon Pinpoint generates, such as _session.start, or a custom event that's specific to your app.

                  • 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) --

                • Metrics (dict) -- Custom metrics that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

                  • (string) --

                    • (dict) -- Custom metric dimension

                      • ComparisonOperator (string) -- The operator that you're using to compare metric values. Possible values: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, or EQUAL

                      • Value (float) -- The value to be compared.

              • FilterType (string) -- The type of event that causes the campaign to be sent. Possible values: SYSTEM - Send the campaign when a system event occurs. See the System resource for more information. ENDPOINT - Send the campaign when an endpoint event occurs. See the Event resource for more information.

            • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE HOURLY DAILY WEEKLY MONTHLY EVENT

            • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.

            • QuietTime (dict) -- The default quiet time for the campaign. The campaign doesn't send messages to endpoints during the quiet time. Note: Make sure that your endpoints include the Demographics.Timezone attribute if you plan to enable a quiet time for your campaign. If your endpoints don't include this attribute, they'll receive the messages that you send them, even if quiet time is enabled. When you set up a campaign to use quiet time, the campaign doesn't send messages during the time range you specified, as long as all of the following are true: - The endpoint includes a valid Demographic.Timezone attribute. - The current time in the endpoint's time zone is later than or equal to the time specified in the QuietTime.Start attribute for the campaign. - The current time in the endpoint's time zone is earlier than or equal to the time specified in the QuietTime.End attribute for the campaign.

              • End (string) -- The time at which quiet time should end. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

              • Start (string) -- The time at which quiet time should begin. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

            • 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 each campaign can send to a single endpoint in a 24-hour period.

        • 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 number of messages that an individual campaign can send to a single endpoint over the course of the campaign.

      • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

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

        • EventFilter (dict) -- Defines the type of events that can trigger the campaign. Used when the Frequency is set to EVENT.

          • Dimensions (dict) -- An object that defines the dimensions for the event filter.

            • Attributes (dict) -- Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

              • (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) --

            • EventType (dict) -- The name of the event that causes the campaign to be sent. This can be a standard event type that Amazon Pinpoint generates, such as _session.start, or a custom event that's specific to your app.

              • 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) --

            • Metrics (dict) -- Custom metrics that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

              • (string) --

                • (dict) -- Custom metric dimension

                  • ComparisonOperator (string) -- The operator that you're using to compare metric values. Possible values: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, or EQUAL

                  • Value (float) -- The value to be compared.

          • FilterType (string) -- The type of event that causes the campaign to be sent. Possible values: SYSTEM - Send the campaign when a system event occurs. See the System resource for more information. ENDPOINT - Send the campaign when an endpoint event occurs. See the Event resource for more information.

        • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE HOURLY DAILY WEEKLY MONTHLY EVENT

        • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.

        • QuietTime (dict) -- The default quiet time for the campaign. The campaign doesn't send messages to endpoints during the quiet time. Note: Make sure that your endpoints include the Demographics.Timezone attribute if you plan to enable a quiet time for your campaign. If your endpoints don't include this attribute, they'll receive the messages that you send them, even if quiet time is enabled. When you set up a campaign to use quiet time, the campaign doesn't send messages during the time range you specified, as long as all of the following are true: - The endpoint includes a valid Demographic.Timezone attribute. - The current time in the endpoint's time zone is later than or equal to the time specified in the QuietTime.Start attribute for the campaign. - The current time in the endpoint's time zone is earlier than or equal to the time specified in the QuietTime.End attribute for the campaign.

          • End (string) -- The time at which quiet time should end. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

          • Start (string) -- The time at which quiet time should begin. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

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

DeleteEndpoint (updated) Link ¶
Changes (response)
{'EndpointResponse': {'ChannelType': ['VOICE']}}

Deletes an endpoint.

See also: AWS API Documentation

Request Syntax

client.delete_endpoint(
    ApplicationId='string',
    EndpointId='string'
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

type EndpointId

string

param EndpointId

[REQUIRED] The unique ID of the endpoint.

rtype

dict

returns

Response Syntax

{
    'EndpointResponse': {
        'Address': 'string',
        'ApplicationId': 'string',
        'Attributes': {
            'string': [
                'string',
            ]
        },
        'ChannelType': 'GCM'|'APNS'|'APNS_SANDBOX'|'APNS_VOIP'|'APNS_VOIP_SANDBOX'|'ADM'|'SMS'|'VOICE'|'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.

DeleteUserEndpoints (updated) Link ¶
Changes (response)
{'EndpointsResponse': {'Item': {'ChannelType': ['VOICE']}}}

Deletes endpoints that are associated with a User ID.

See also: AWS API Documentation

Request Syntax

client.delete_user_endpoints(
    ApplicationId='string',
    UserId='string'
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

type UserId

string

param UserId

[REQUIRED] The unique ID of the user.

rtype

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

GetCampaign (updated) Link ¶
Changes (response)
{'CampaignResponse': {'AdditionalTreatments': {'Schedule': {'EventFilter': {'Dimensions': {'Attributes': {'string': {'AttributeType': 'INCLUSIVE '
                                                                                                                                      '| '
                                                                                                                                      'EXCLUSIVE',
                                                                                                                     'Values': ['string']}},
                                                                                           'EventType': {'DimensionType': 'INCLUSIVE '
                                                                                                                          '| '
                                                                                                                          'EXCLUSIVE',
                                                                                                         'Values': ['string']},
                                                                                           'Metrics': {'string': {'ComparisonOperator': 'string',
                                                                                                                  'Value': 'double'}}},
                                                                            'FilterType': 'SYSTEM '
                                                                                          '| '
                                                                                          'ENDPOINT'},
                                                            'Frequency': ['EVENT']}},
                      'Schedule': {'EventFilter': {'Dimensions': {'Attributes': {'string': {'AttributeType': 'INCLUSIVE '
                                                                                                             '| '
                                                                                                             'EXCLUSIVE',
                                                                                            'Values': ['string']}},
                                                                  'EventType': {'DimensionType': 'INCLUSIVE '
                                                                                                 '| '
                                                                                                 'EXCLUSIVE',
                                                                                'Values': ['string']},
                                                                  'Metrics': {'string': {'ComparisonOperator': 'string',
                                                                                         'Value': 'double'}}},
                                                   'FilterType': 'SYSTEM | '
                                                                 'ENDPOINT'},
                                   'Frequency': ['EVENT']}}}

Returns information about a campaign.

See also: AWS API Documentation

Request Syntax

client.get_campaign(
    ApplicationId='string',
    CampaignId='string'
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

type CampaignId

string

param CampaignId

[REQUIRED] The unique ID of the campaign.

rtype

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',
                    'EventFilter': {
                        'Dimensions': {
                            'Attributes': {
                                'string': {
                                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'EventType': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                'Values': [
                                    'string',
                                ]
                            },
                            'Metrics': {
                                'string': {
                                    'ComparisonOperator': 'string',
                                    'Value': 123.0
                                }
                            }
                        },
                        'FilterType': 'SYSTEM'|'ENDPOINT'
                    },
                    'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY'|'EVENT',
                    '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',
            'EventFilter': {
                'Dimensions': {
                    'Attributes': {
                        'string': {
                            'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        }
                    },
                    'EventType': {
                        'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                        'Values': [
                            'string',
                        ]
                    },
                    'Metrics': {
                        'string': {
                            'ComparisonOperator': 'string',
                            'Value': 123.0
                        }
                    }
                },
                'FilterType': 'SYSTEM'|'ENDPOINT'
            },
            'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY'|'EVENT',
            '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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

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

            • EventFilter (dict) -- Defines the type of events that can trigger the campaign. Used when the Frequency is set to EVENT.

              • Dimensions (dict) -- An object that defines the dimensions for the event filter.

                • Attributes (dict) -- Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

                  • (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) --

                • EventType (dict) -- The name of the event that causes the campaign to be sent. This can be a standard event type that Amazon Pinpoint generates, such as _session.start, or a custom event that's specific to your app.

                  • 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) --

                • Metrics (dict) -- Custom metrics that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

                  • (string) --

                    • (dict) -- Custom metric dimension

                      • ComparisonOperator (string) -- The operator that you're using to compare metric values. Possible values: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, or EQUAL

                      • Value (float) -- The value to be compared.

              • FilterType (string) -- The type of event that causes the campaign to be sent. Possible values: SYSTEM - Send the campaign when a system event occurs. See the System resource for more information. ENDPOINT - Send the campaign when an endpoint event occurs. See the Event resource for more information.

            • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE HOURLY DAILY WEEKLY MONTHLY EVENT

            • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.

            • QuietTime (dict) -- The default quiet time for the campaign. The campaign doesn't send messages to endpoints during the quiet time. Note: Make sure that your endpoints include the Demographics.Timezone attribute if you plan to enable a quiet time for your campaign. If your endpoints don't include this attribute, they'll receive the messages that you send them, even if quiet time is enabled. When you set up a campaign to use quiet time, the campaign doesn't send messages during the time range you specified, as long as all of the following are true: - The endpoint includes a valid Demographic.Timezone attribute. - The current time in the endpoint's time zone is later than or equal to the time specified in the QuietTime.Start attribute for the campaign. - The current time in the endpoint's time zone is earlier than or equal to the time specified in the QuietTime.End attribute for the campaign.

              • End (string) -- The time at which quiet time should end. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

              • Start (string) -- The time at which quiet time should begin. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

            • 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 each campaign can send to a single endpoint in a 24-hour period.

        • 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 number of messages that an individual campaign can send to a single endpoint over the course of the campaign.

      • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

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

        • EventFilter (dict) -- Defines the type of events that can trigger the campaign. Used when the Frequency is set to EVENT.

          • Dimensions (dict) -- An object that defines the dimensions for the event filter.

            • Attributes (dict) -- Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

              • (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) --

            • EventType (dict) -- The name of the event that causes the campaign to be sent. This can be a standard event type that Amazon Pinpoint generates, such as _session.start, or a custom event that's specific to your app.

              • 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) --

            • Metrics (dict) -- Custom metrics that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

              • (string) --

                • (dict) -- Custom metric dimension

                  • ComparisonOperator (string) -- The operator that you're using to compare metric values. Possible values: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, or EQUAL

                  • Value (float) -- The value to be compared.

          • FilterType (string) -- The type of event that causes the campaign to be sent. Possible values: SYSTEM - Send the campaign when a system event occurs. See the System resource for more information. ENDPOINT - Send the campaign when an endpoint event occurs. See the Event resource for more information.

        • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE HOURLY DAILY WEEKLY MONTHLY EVENT

        • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.

        • QuietTime (dict) -- The default quiet time for the campaign. The campaign doesn't send messages to endpoints during the quiet time. Note: Make sure that your endpoints include the Demographics.Timezone attribute if you plan to enable a quiet time for your campaign. If your endpoints don't include this attribute, they'll receive the messages that you send them, even if quiet time is enabled. When you set up a campaign to use quiet time, the campaign doesn't send messages during the time range you specified, as long as all of the following are true: - The endpoint includes a valid Demographic.Timezone attribute. - The current time in the endpoint's time zone is later than or equal to the time specified in the QuietTime.Start attribute for the campaign. - The current time in the endpoint's time zone is earlier than or equal to the time specified in the QuietTime.End attribute for the campaign.

          • End (string) -- The time at which quiet time should end. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

          • Start (string) -- The time at which quiet time should begin. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

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

GetCampaignVersion (updated) Link ¶
Changes (response)
{'CampaignResponse': {'AdditionalTreatments': {'Schedule': {'EventFilter': {'Dimensions': {'Attributes': {'string': {'AttributeType': 'INCLUSIVE '
                                                                                                                                      '| '
                                                                                                                                      'EXCLUSIVE',
                                                                                                                     'Values': ['string']}},
                                                                                           'EventType': {'DimensionType': 'INCLUSIVE '
                                                                                                                          '| '
                                                                                                                          'EXCLUSIVE',
                                                                                                         'Values': ['string']},
                                                                                           'Metrics': {'string': {'ComparisonOperator': 'string',
                                                                                                                  'Value': 'double'}}},
                                                                            'FilterType': 'SYSTEM '
                                                                                          '| '
                                                                                          'ENDPOINT'},
                                                            'Frequency': ['EVENT']}},
                      'Schedule': {'EventFilter': {'Dimensions': {'Attributes': {'string': {'AttributeType': 'INCLUSIVE '
                                                                                                             '| '
                                                                                                             'EXCLUSIVE',
                                                                                            'Values': ['string']}},
                                                                  'EventType': {'DimensionType': 'INCLUSIVE '
                                                                                                 '| '
                                                                                                 'EXCLUSIVE',
                                                                                'Values': ['string']},
                                                                  'Metrics': {'string': {'ComparisonOperator': 'string',
                                                                                         'Value': 'double'}}},
                                                   'FilterType': 'SYSTEM | '
                                                                 'ENDPOINT'},
                                   'Frequency': ['EVENT']}}}

Returns information about a specific version of a campaign.

See also: AWS API Documentation

Request Syntax

client.get_campaign_version(
    ApplicationId='string',
    CampaignId='string',
    Version='string'
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

type CampaignId

string

param CampaignId

[REQUIRED] The unique ID of the campaign.

type Version

string

param Version

[REQUIRED] The version of the campaign.

rtype

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',
                    'EventFilter': {
                        'Dimensions': {
                            'Attributes': {
                                'string': {
                                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'EventType': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                'Values': [
                                    'string',
                                ]
                            },
                            'Metrics': {
                                'string': {
                                    'ComparisonOperator': 'string',
                                    'Value': 123.0
                                }
                            }
                        },
                        'FilterType': 'SYSTEM'|'ENDPOINT'
                    },
                    'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY'|'EVENT',
                    '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',
            'EventFilter': {
                'Dimensions': {
                    'Attributes': {
                        'string': {
                            'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        }
                    },
                    'EventType': {
                        'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                        'Values': [
                            'string',
                        ]
                    },
                    'Metrics': {
                        'string': {
                            'ComparisonOperator': 'string',
                            'Value': 123.0
                        }
                    }
                },
                'FilterType': 'SYSTEM'|'ENDPOINT'
            },
            'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY'|'EVENT',
            '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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

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

            • EventFilter (dict) -- Defines the type of events that can trigger the campaign. Used when the Frequency is set to EVENT.

              • Dimensions (dict) -- An object that defines the dimensions for the event filter.

                • Attributes (dict) -- Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

                  • (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) --

                • EventType (dict) -- The name of the event that causes the campaign to be sent. This can be a standard event type that Amazon Pinpoint generates, such as _session.start, or a custom event that's specific to your app.

                  • 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) --

                • Metrics (dict) -- Custom metrics that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

                  • (string) --

                    • (dict) -- Custom metric dimension

                      • ComparisonOperator (string) -- The operator that you're using to compare metric values. Possible values: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, or EQUAL

                      • Value (float) -- The value to be compared.

              • FilterType (string) -- The type of event that causes the campaign to be sent. Possible values: SYSTEM - Send the campaign when a system event occurs. See the System resource for more information. ENDPOINT - Send the campaign when an endpoint event occurs. See the Event resource for more information.

            • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE HOURLY DAILY WEEKLY MONTHLY EVENT

            • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.

            • QuietTime (dict) -- The default quiet time for the campaign. The campaign doesn't send messages to endpoints during the quiet time. Note: Make sure that your endpoints include the Demographics.Timezone attribute if you plan to enable a quiet time for your campaign. If your endpoints don't include this attribute, they'll receive the messages that you send them, even if quiet time is enabled. When you set up a campaign to use quiet time, the campaign doesn't send messages during the time range you specified, as long as all of the following are true: - The endpoint includes a valid Demographic.Timezone attribute. - The current time in the endpoint's time zone is later than or equal to the time specified in the QuietTime.Start attribute for the campaign. - The current time in the endpoint's time zone is earlier than or equal to the time specified in the QuietTime.End attribute for the campaign.

              • End (string) -- The time at which quiet time should end. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

              • Start (string) -- The time at which quiet time should begin. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

            • 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 each campaign can send to a single endpoint in a 24-hour period.

        • 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 number of messages that an individual campaign can send to a single endpoint over the course of the campaign.

      • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

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

        • EventFilter (dict) -- Defines the type of events that can trigger the campaign. Used when the Frequency is set to EVENT.

          • Dimensions (dict) -- An object that defines the dimensions for the event filter.

            • Attributes (dict) -- Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

              • (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) --

            • EventType (dict) -- The name of the event that causes the campaign to be sent. This can be a standard event type that Amazon Pinpoint generates, such as _session.start, or a custom event that's specific to your app.

              • 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) --

            • Metrics (dict) -- Custom metrics that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

              • (string) --

                • (dict) -- Custom metric dimension

                  • ComparisonOperator (string) -- The operator that you're using to compare metric values. Possible values: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, or EQUAL

                  • Value (float) -- The value to be compared.

          • FilterType (string) -- The type of event that causes the campaign to be sent. Possible values: SYSTEM - Send the campaign when a system event occurs. See the System resource for more information. ENDPOINT - Send the campaign when an endpoint event occurs. See the Event resource for more information.

        • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE HOURLY DAILY WEEKLY MONTHLY EVENT

        • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.

        • QuietTime (dict) -- The default quiet time for the campaign. The campaign doesn't send messages to endpoints during the quiet time. Note: Make sure that your endpoints include the Demographics.Timezone attribute if you plan to enable a quiet time for your campaign. If your endpoints don't include this attribute, they'll receive the messages that you send them, even if quiet time is enabled. When you set up a campaign to use quiet time, the campaign doesn't send messages during the time range you specified, as long as all of the following are true: - The endpoint includes a valid Demographic.Timezone attribute. - The current time in the endpoint's time zone is later than or equal to the time specified in the QuietTime.Start attribute for the campaign. - The current time in the endpoint's time zone is earlier than or equal to the time specified in the QuietTime.End attribute for the campaign.

          • End (string) -- The time at which quiet time should end. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

          • Start (string) -- The time at which quiet time should begin. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

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

GetCampaignVersions (updated) Link ¶
Changes (response)
{'CampaignsResponse': {'Item': {'AdditionalTreatments': {'Schedule': {'EventFilter': {'Dimensions': {'Attributes': {'string': {'AttributeType': 'INCLUSIVE '
                                                                                                                                                '| '
                                                                                                                                                'EXCLUSIVE',
                                                                                                                               'Values': ['string']}},
                                                                                                     'EventType': {'DimensionType': 'INCLUSIVE '
                                                                                                                                    '| '
                                                                                                                                    'EXCLUSIVE',
                                                                                                                   'Values': ['string']},
                                                                                                     'Metrics': {'string': {'ComparisonOperator': 'string',
                                                                                                                            'Value': 'double'}}},
                                                                                      'FilterType': 'SYSTEM '
                                                                                                    '| '
                                                                                                    'ENDPOINT'},
                                                                      'Frequency': ['EVENT']}},
                                'Schedule': {'EventFilter': {'Dimensions': {'Attributes': {'string': {'AttributeType': 'INCLUSIVE '
                                                                                                                       '| '
                                                                                                                       'EXCLUSIVE',
                                                                                                      'Values': ['string']}},
                                                                            'EventType': {'DimensionType': 'INCLUSIVE '
                                                                                                           '| '
                                                                                                           'EXCLUSIVE',
                                                                                          'Values': ['string']},
                                                                            'Metrics': {'string': {'ComparisonOperator': 'string',
                                                                                                   'Value': 'double'}}},
                                                             'FilterType': 'SYSTEM '
                                                                           '| '
                                                                           'ENDPOINT'},
                                             'Frequency': ['EVENT']}}}}

Returns information about your campaign versions.

See also: AWS API Documentation

Request Syntax

client.get_campaign_versions(
    ApplicationId='string',
    CampaignId='string',
    PageSize='string',
    Token='string'
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

type CampaignId

string

param CampaignId

[REQUIRED] The unique ID of the campaign.

type PageSize

string

param PageSize

The number of entries you want on each page in the response.

type Token

string

param Token

The NextToken string returned on a previous page that you use to get the next page of results in a paginated response.

rtype

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',
                            'EventFilter': {
                                'Dimensions': {
                                    'Attributes': {
                                        'string': {
                                            'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                            'Values': [
                                                'string',
                                            ]
                                        }
                                    },
                                    'EventType': {
                                        'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                        'Values': [
                                            'string',
                                        ]
                                    },
                                    'Metrics': {
                                        'string': {
                                            'ComparisonOperator': 'string',
                                            'Value': 123.0
                                        }
                                    }
                                },
                                'FilterType': 'SYSTEM'|'ENDPOINT'
                            },
                            'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY'|'EVENT',
                            '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',
                    'EventFilter': {
                        'Dimensions': {
                            'Attributes': {
                                'string': {
                                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'EventType': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                'Values': [
                                    'string',
                                ]
                            },
                            'Metrics': {
                                'string': {
                                    'ComparisonOperator': 'string',
                                    'Value': 123.0
                                }
                            }
                        },
                        'FilterType': 'SYSTEM'|'ENDPOINT'
                    },
                    'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY'|'EVENT',
                    '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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

                  • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

                  • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

                  • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

                  • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

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

                • EventFilter (dict) -- Defines the type of events that can trigger the campaign. Used when the Frequency is set to EVENT.

                  • Dimensions (dict) -- An object that defines the dimensions for the event filter.

                    • Attributes (dict) -- Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

                      • (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) --

                    • EventType (dict) -- The name of the event that causes the campaign to be sent. This can be a standard event type that Amazon Pinpoint generates, such as _session.start, or a custom event that's specific to your app.

                      • 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) --

                    • Metrics (dict) -- Custom metrics that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

                      • (string) --

                        • (dict) -- Custom metric dimension

                          • ComparisonOperator (string) -- The operator that you're using to compare metric values. Possible values: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, or EQUAL

                          • Value (float) -- The value to be compared.

                  • FilterType (string) -- The type of event that causes the campaign to be sent. Possible values: SYSTEM - Send the campaign when a system event occurs. See the System resource for more information. ENDPOINT - Send the campaign when an endpoint event occurs. See the Event resource for more information.

                • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE HOURLY DAILY WEEKLY MONTHLY EVENT

                • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.

                • QuietTime (dict) -- The default quiet time for the campaign. The campaign doesn't send messages to endpoints during the quiet time. Note: Make sure that your endpoints include the Demographics.Timezone attribute if you plan to enable a quiet time for your campaign. If your endpoints don't include this attribute, they'll receive the messages that you send them, even if quiet time is enabled. When you set up a campaign to use quiet time, the campaign doesn't send messages during the time range you specified, as long as all of the following are true: - The endpoint includes a valid Demographic.Timezone attribute. - The current time in the endpoint's time zone is later than or equal to the time specified in the QuietTime.Start attribute for the campaign. - The current time in the endpoint's time zone is earlier than or equal to the time specified in the QuietTime.End attribute for the campaign.

                  • End (string) -- The time at which quiet time should end. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

                  • Start (string) -- The time at which quiet time should begin. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

                • 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 each campaign can send to a single endpoint in a 24-hour period.

            • 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 number of messages that an individual campaign can send to a single endpoint over the course of the campaign.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

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

            • EventFilter (dict) -- Defines the type of events that can trigger the campaign. Used when the Frequency is set to EVENT.

              • Dimensions (dict) -- An object that defines the dimensions for the event filter.

                • Attributes (dict) -- Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

                  • (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) --

                • EventType (dict) -- The name of the event that causes the campaign to be sent. This can be a standard event type that Amazon Pinpoint generates, such as _session.start, or a custom event that's specific to your app.

                  • 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) --

                • Metrics (dict) -- Custom metrics that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

                  • (string) --

                    • (dict) -- Custom metric dimension

                      • ComparisonOperator (string) -- The operator that you're using to compare metric values. Possible values: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, or EQUAL

                      • Value (float) -- The value to be compared.

              • FilterType (string) -- The type of event that causes the campaign to be sent. Possible values: SYSTEM - Send the campaign when a system event occurs. See the System resource for more information. ENDPOINT - Send the campaign when an endpoint event occurs. See the Event resource for more information.

            • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE HOURLY DAILY WEEKLY MONTHLY EVENT

            • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.

            • QuietTime (dict) -- The default quiet time for the campaign. The campaign doesn't send messages to endpoints during the quiet time. Note: Make sure that your endpoints include the Demographics.Timezone attribute if you plan to enable a quiet time for your campaign. If your endpoints don't include this attribute, they'll receive the messages that you send them, even if quiet time is enabled. When you set up a campaign to use quiet time, the campaign doesn't send messages during the time range you specified, as long as all of the following are true: - The endpoint includes a valid Demographic.Timezone attribute. - The current time in the endpoint's time zone is later than or equal to the time specified in the QuietTime.Start attribute for the campaign. - The current time in the endpoint's time zone is earlier than or equal to the time specified in the QuietTime.End attribute for the campaign.

              • End (string) -- The time at which quiet time should end. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

              • Start (string) -- The time at which quiet time should begin. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

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

GetCampaigns (updated) Link ¶
Changes (response)
{'CampaignsResponse': {'Item': {'AdditionalTreatments': {'Schedule': {'EventFilter': {'Dimensions': {'Attributes': {'string': {'AttributeType': 'INCLUSIVE '
                                                                                                                                                '| '
                                                                                                                                                'EXCLUSIVE',
                                                                                                                               'Values': ['string']}},
                                                                                                     'EventType': {'DimensionType': 'INCLUSIVE '
                                                                                                                                    '| '
                                                                                                                                    'EXCLUSIVE',
                                                                                                                   'Values': ['string']},
                                                                                                     'Metrics': {'string': {'ComparisonOperator': 'string',
                                                                                                                            'Value': 'double'}}},
                                                                                      'FilterType': 'SYSTEM '
                                                                                                    '| '
                                                                                                    'ENDPOINT'},
                                                                      'Frequency': ['EVENT']}},
                                'Schedule': {'EventFilter': {'Dimensions': {'Attributes': {'string': {'AttributeType': 'INCLUSIVE '
                                                                                                                       '| '
                                                                                                                       'EXCLUSIVE',
                                                                                                      'Values': ['string']}},
                                                                            'EventType': {'DimensionType': 'INCLUSIVE '
                                                                                                           '| '
                                                                                                           'EXCLUSIVE',
                                                                                          'Values': ['string']},
                                                                            'Metrics': {'string': {'ComparisonOperator': 'string',
                                                                                                   'Value': 'double'}}},
                                                             'FilterType': 'SYSTEM '
                                                                           '| '
                                                                           'ENDPOINT'},
                                             'Frequency': ['EVENT']}}}}

Returns information about your campaigns.

See also: AWS API Documentation

Request Syntax

client.get_campaigns(
    ApplicationId='string',
    PageSize='string',
    Token='string'
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

type PageSize

string

param PageSize

The number of entries you want on each page in the response.

type Token

string

param Token

The NextToken string returned on a previous page that you use to get the next page of results in a paginated response.

rtype

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',
                            'EventFilter': {
                                'Dimensions': {
                                    'Attributes': {
                                        'string': {
                                            'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                            'Values': [
                                                'string',
                                            ]
                                        }
                                    },
                                    'EventType': {
                                        'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                        'Values': [
                                            'string',
                                        ]
                                    },
                                    'Metrics': {
                                        'string': {
                                            'ComparisonOperator': 'string',
                                            'Value': 123.0
                                        }
                                    }
                                },
                                'FilterType': 'SYSTEM'|'ENDPOINT'
                            },
                            'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY'|'EVENT',
                            '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',
                    'EventFilter': {
                        'Dimensions': {
                            'Attributes': {
                                'string': {
                                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'EventType': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                'Values': [
                                    'string',
                                ]
                            },
                            'Metrics': {
                                'string': {
                                    'ComparisonOperator': 'string',
                                    'Value': 123.0
                                }
                            }
                        },
                        'FilterType': 'SYSTEM'|'ENDPOINT'
                    },
                    'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY'|'EVENT',
                    '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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

                  • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

                  • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

                  • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

                  • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

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

                • EventFilter (dict) -- Defines the type of events that can trigger the campaign. Used when the Frequency is set to EVENT.

                  • Dimensions (dict) -- An object that defines the dimensions for the event filter.

                    • Attributes (dict) -- Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

                      • (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) --

                    • EventType (dict) -- The name of the event that causes the campaign to be sent. This can be a standard event type that Amazon Pinpoint generates, such as _session.start, or a custom event that's specific to your app.

                      • 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) --

                    • Metrics (dict) -- Custom metrics that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

                      • (string) --

                        • (dict) -- Custom metric dimension

                          • ComparisonOperator (string) -- The operator that you're using to compare metric values. Possible values: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, or EQUAL

                          • Value (float) -- The value to be compared.

                  • FilterType (string) -- The type of event that causes the campaign to be sent. Possible values: SYSTEM - Send the campaign when a system event occurs. See the System resource for more information. ENDPOINT - Send the campaign when an endpoint event occurs. See the Event resource for more information.

                • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE HOURLY DAILY WEEKLY MONTHLY EVENT

                • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.

                • QuietTime (dict) -- The default quiet time for the campaign. The campaign doesn't send messages to endpoints during the quiet time. Note: Make sure that your endpoints include the Demographics.Timezone attribute if you plan to enable a quiet time for your campaign. If your endpoints don't include this attribute, they'll receive the messages that you send them, even if quiet time is enabled. When you set up a campaign to use quiet time, the campaign doesn't send messages during the time range you specified, as long as all of the following are true: - The endpoint includes a valid Demographic.Timezone attribute. - The current time in the endpoint's time zone is later than or equal to the time specified in the QuietTime.Start attribute for the campaign. - The current time in the endpoint's time zone is earlier than or equal to the time specified in the QuietTime.End attribute for the campaign.

                  • End (string) -- The time at which quiet time should end. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

                  • Start (string) -- The time at which quiet time should begin. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

                • 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 each campaign can send to a single endpoint in a 24-hour period.

            • 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 number of messages that an individual campaign can send to a single endpoint over the course of the campaign.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

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

            • EventFilter (dict) -- Defines the type of events that can trigger the campaign. Used when the Frequency is set to EVENT.

              • Dimensions (dict) -- An object that defines the dimensions for the event filter.

                • Attributes (dict) -- Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

                  • (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) --

                • EventType (dict) -- The name of the event that causes the campaign to be sent. This can be a standard event type that Amazon Pinpoint generates, such as _session.start, or a custom event that's specific to your app.

                  • 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) --

                • Metrics (dict) -- Custom metrics that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

                  • (string) --

                    • (dict) -- Custom metric dimension

                      • ComparisonOperator (string) -- The operator that you're using to compare metric values. Possible values: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, or EQUAL

                      • Value (float) -- The value to be compared.

              • FilterType (string) -- The type of event that causes the campaign to be sent. Possible values: SYSTEM - Send the campaign when a system event occurs. See the System resource for more information. ENDPOINT - Send the campaign when an endpoint event occurs. See the Event resource for more information.

            • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE HOURLY DAILY WEEKLY MONTHLY EVENT

            • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.

            • QuietTime (dict) -- The default quiet time for the campaign. The campaign doesn't send messages to endpoints during the quiet time. Note: Make sure that your endpoints include the Demographics.Timezone attribute if you plan to enable a quiet time for your campaign. If your endpoints don't include this attribute, they'll receive the messages that you send them, even if quiet time is enabled. When you set up a campaign to use quiet time, the campaign doesn't send messages during the time range you specified, as long as all of the following are true: - The endpoint includes a valid Demographic.Timezone attribute. - The current time in the endpoint's time zone is later than or equal to the time specified in the QuietTime.Start attribute for the campaign. - The current time in the endpoint's time zone is earlier than or equal to the time specified in the QuietTime.End attribute for the campaign.

              • End (string) -- The time at which quiet time should end. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

              • Start (string) -- The time at which quiet time should begin. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

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

GetEndpoint (updated) Link ¶
Changes (response)
{'EndpointResponse': {'ChannelType': ['VOICE']}}

Returns information about an endpoint.

See also: AWS API Documentation

Request Syntax

client.get_endpoint(
    ApplicationId='string',
    EndpointId='string'
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

type EndpointId

string

param EndpointId

[REQUIRED] The unique ID of the endpoint.

rtype

dict

returns

Response Syntax

{
    'EndpointResponse': {
        'Address': 'string',
        'ApplicationId': 'string',
        'Attributes': {
            'string': [
                'string',
            ]
        },
        'ChannelType': 'GCM'|'APNS'|'APNS_SANDBOX'|'APNS_VOIP'|'APNS_VOIP_SANDBOX'|'ADM'|'SMS'|'VOICE'|'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.

GetUserEndpoints (updated) Link ¶
Changes (response)
{'EndpointsResponse': {'Item': {'ChannelType': ['VOICE']}}}

Returns information about the endpoints that are associated with a User ID.

See also: AWS API Documentation

Request Syntax

client.get_user_endpoints(
    ApplicationId='string',
    UserId='string'
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

type UserId

string

param UserId

[REQUIRED] The unique ID of the user.

rtype

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'|'VOICE'|'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

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

PutEvents (updated) Link ¶
Changes (request)
{'EventsRequest': {'BatchItem': {'Endpoint': {'ChannelType': ['VOICE']}}}}

Use to record events for endpoints. This method creates events and creates or updates the endpoints that those events are associated with.

See also: AWS API Documentation

Request Syntax

client.put_events(
    ApplicationId='string',
    EventsRequest={
        'BatchItem': {
            'string': {
                'Endpoint': {
                    'Address': 'string',
                    'Attributes': {
                        'string': [
                            'string',
                        ]
                    },
                    'ChannelType': 'GCM'|'APNS'|'APNS_SANDBOX'|'APNS_VOIP'|'APNS_VOIP_SANDBOX'|'ADM'|'SMS'|'VOICE'|'EMAIL'|'BAIDU'|'CUSTOM',
                    'Demographic': {
                        'AppVersion': 'string',
                        'Locale': 'string',
                        'Make': 'string',
                        'Model': 'string',
                        'ModelVersion': 'string',
                        'Platform': 'string',
                        'PlatformVersion': 'string',
                        'Timezone': 'string'
                    },
                    'EffectiveDate': 'string',
                    'EndpointStatus': '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'
                    }
                },
                'Events': {
                    'string': {
                        'Attributes': {
                            'string': 'string'
                        },
                        'ClientSdkVersion': 'string',
                        'EventType': 'string',
                        'Metrics': {
                            'string': 123.0
                        },
                        'Session': {
                            'Duration': 123,
                            'Id': 'string',
                            'StartTimestamp': 'string',
                            'StopTimestamp': 'string'
                        },
                        'Timestamp': 'string'
                    }
                }
            }
        }
    }
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

type EventsRequest

dict

param EventsRequest

[REQUIRED] A set of events to process.

  • BatchItem (dict) -- A batch of events to process. Each BatchItem consists of an endpoint ID as the key, and an EventsBatch object as the value.

    • (string) --

      • (dict) -- A batch of PublicEndpoints and Events to process.

        • Endpoint (dict) -- The PublicEndpoint attached to the EndpointId from the request.

          • Address (string) -- The unique identifier for the recipient. For example, an address could be a device token, email address, or mobile phone number.

          • Attributes (dict) -- Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create a segment.

            • (string) --

              • (list) --

                • (string) --

          • ChannelType (string) -- The channel type. Valid values: APNS, GCM

          • 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, in ISO 8601 format.

          • EndpointStatus (string) -- The status of the endpoint. If the update fails, the value is INACTIVE. If the endpoint is updated successfully, the value is ACTIVE.

          • 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) -- A unique identifier that is generated each time the endpoint is updated.

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

        • Events (dict) -- An object that contains a set of events associated with the endpoint.

          • (string) --

            • (dict) -- Model for creating or updating events.

              • Attributes (dict) -- Custom attributes that are associated with the event you're adding or updating.

                • (string) --

                  • (string) --

              • ClientSdkVersion (string) -- The version of the SDK that's running on the client device.

              • EventType (string) -- The name of the custom event that you're recording.

              • Metrics (dict) -- Custom metrics related to the event.

                • (string) --

                  • (float) --

              • Session (dict) -- Information about the session in which the event occurred.

                • Duration (integer) -- The duration of the session, in milliseconds.

                • Id (string) -- A unique identifier for the session.

                • StartTimestamp (string) -- The date and time when the session began.

                • StopTimestamp (string) -- The date and time when the session ended.

              • Timestamp (string) -- The date and time when the event occurred, in ISO 8601 format.

rtype

dict

returns

Response Syntax

{
    'EventsResponse': {
        'Results': {
            'string': {
                'EndpointItemResponse': {
                    'Message': 'string',
                    'StatusCode': 123
                },
                'EventsItemResponse': {
                    'string': {
                        'Message': 'string',
                        'StatusCode': 123
                    }
                }
            }
        }
    }
}

Response Structure

  • (dict) -- 202 response

    • EventsResponse (dict) -- Custom messages associated with events.

      • Results (dict) -- A map that contains a multipart response for each endpoint. Each item in this object uses the endpoint ID as the key, and the item response as the value. If no item response exists, the value can also be one of the following: 202 (if the request was processed successfully) or 400 (if the payload was invalid, or required fields were missing).

        • (string) --

          • (dict) -- The response that's provided after registering the endpoint.

            • EndpointItemResponse (dict) -- The response received after the endpoint was accepted.

              • Message (string) -- A custom message associated with the registration of an endpoint when issuing a response.

              • StatusCode (integer) -- The status code associated with the merging of an endpoint when issuing a response.

            • EventsItemResponse (dict) -- A multipart response object that contains a key and value for each event ID in the request. In each object, the event ID is the key, and an EventItemResponse object is the value.

              • (string) --

                • (dict) -- A complex object that holds the status code and message as a result of processing an event.

                  • Message (string) -- A custom message that is associated with the processing of an event.

                  • StatusCode (integer) -- The status returned in the response as a result of processing the event. Possible values: 400 (for invalid events) and 202 (for events that were accepted).

SendMessages (updated) Link ¶
Changes (request)
{'MessageRequest': {'Addresses': {'ChannelType': ['VOICE']},
                    'MessageConfiguration': {'VoiceMessage': {'Body': 'string',
                                                              'LanguageCode': 'string',
                                                              'OriginationNumber': 'string',
                                                              'Substitutions': {'string': ['string']},
                                                              'VoiceId': 'string'}}}}

Used to send a direct message.

See also: AWS API Documentation

Request Syntax

client.send_messages(
    ApplicationId='string',
    MessageRequest={
        'Addresses': {
            'string': {
                'BodyOverride': 'string',
                'ChannelType': 'GCM'|'APNS'|'APNS_SANDBOX'|'APNS_VOIP'|'APNS_VOIP_SANDBOX'|'ADM'|'SMS'|'VOICE'|'EMAIL'|'BAIDU'|'CUSTOM',
                'Context': {
                    'string': 'string'
                },
                'RawContent': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'TitleOverride': 'string'
            }
        },
        'Context': {
            'string': 'string'
        },
        'Endpoints': {
            'string': {
                'BodyOverride': 'string',
                'Context': {
                    'string': 'string'
                },
                'RawContent': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'TitleOverride': 'string'
            }
        },
        'MessageConfiguration': {
            'ADMMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ConsolidationKey': 'string',
                'Data': {
                    'string': 'string'
                },
                'ExpiresAfter': 'string',
                'IconReference': 'string',
                'ImageIconUrl': 'string',
                'ImageUrl': 'string',
                'MD5': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'SmallImageIconUrl': 'string',
                'Sound': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'Title': 'string',
                'Url': 'string'
            },
            'APNSMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Badge': 123,
                'Body': 'string',
                'Category': 'string',
                'CollapseId': 'string',
                'Data': {
                    'string': 'string'
                },
                'MediaUrl': 'string',
                'PreferredAuthenticationMethod': 'string',
                'Priority': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'Sound': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'ThreadId': 'string',
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'BaiduMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'Data': {
                    'string': 'string'
                },
                'IconReference': 'string',
                'ImageIconUrl': 'string',
                'ImageUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'SmallImageIconUrl': 'string',
                'Sound': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'DefaultMessage': {
                'Body': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                }
            },
            'DefaultPushNotificationMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'Data': {
                    'string': 'string'
                },
                'SilentPush': True|False,
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'Title': 'string',
                'Url': 'string'
            },
            'EmailMessage': {
                'Body': 'string',
                'FeedbackForwardingAddress': 'string',
                'FromAddress': 'string',
                'RawEmail': {
                    'Data': b'bytes'
                },
                'ReplyToAddresses': [
                    'string',
                ],
                'SimpleEmail': {
                    'HtmlPart': {
                        'Charset': 'string',
                        'Data': 'string'
                    },
                    'Subject': {
                        'Charset': 'string',
                        'Data': 'string'
                    },
                    'TextPart': {
                        'Charset': 'string',
                        'Data': 'string'
                    }
                },
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                }
            },
            'GCMMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'CollapseKey': 'string',
                'Data': {
                    'string': 'string'
                },
                'IconReference': 'string',
                'ImageIconUrl': 'string',
                'ImageUrl': 'string',
                'Priority': 'string',
                'RawContent': 'string',
                'RestrictedPackageName': 'string',
                'SilentPush': True|False,
                'SmallImageIconUrl': 'string',
                'Sound': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'SMSMessage': {
                'Body': 'string',
                'Keyword': 'string',
                'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL',
                'OriginationNumber': 'string',
                'SenderId': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                }
            },
            'VoiceMessage': {
                'Body': 'string',
                'LanguageCode': 'string',
                'OriginationNumber': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'VoiceId': 'string'
            }
        },
        'TraceId': 'string'
    }
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

type MessageRequest

dict

param MessageRequest

[REQUIRED] Send message request.

  • Addresses (dict) -- A map of key-value pairs, where each key is an address and each value is an AddressConfiguration object. An address can be a push notification token, a phone number, or an email address.

    • (string) --

      • (dict) -- Address configuration.

        • BodyOverride (string) -- Body override. If specified will override default body.

        • ChannelType (string) -- The channel type. Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX | ADM | SMS | EMAIL | BAIDU

        • Context (dict) -- A map of custom attributes to attributes to be attached to the message for this address. This payload is added to the push notification's 'data.pinpoint' object or added to the email/sms delivery receipt event attributes.

          • (string) --

            • (string) --

        • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.

        • Substitutions (dict) -- A map of substitution values for the message to be merged with the DefaultMessage's substitutions. Substitutions on this map take precedence over the all other substitutions.

          • (string) --

            • (list) --

              • (string) --

        • TitleOverride (string) -- Title override. If specified will override default title if applicable.

  • Context (dict) -- A map of custom attributes to attributes to be attached to the message. This payload is added to the push notification's 'data.pinpoint' object or added to the email/sms delivery receipt event attributes.

    • (string) --

      • (string) --

  • Endpoints (dict) -- A map of key-value pairs, where each key is an endpoint ID and each value is an EndpointSendConfiguration object. Within an EndpointSendConfiguration object, you can tailor the message for an endpoint by specifying message overrides or substitutions.

    • (string) --

      • (dict) -- Endpoint send configuration.

        • BodyOverride (string) -- Body override. If specified will override default body.

        • Context (dict) -- A map of custom attributes to attributes to be attached to the message for this address. This payload is added to the push notification's 'data.pinpoint' object or added to the email/sms delivery receipt event attributes.

          • (string) --

            • (string) --

        • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.

        • Substitutions (dict) -- A map of substitution values for the message to be merged with the DefaultMessage's substitutions. Substitutions on this map take precedence over the all other substitutions.

          • (string) --

            • (list) --

              • (string) --

        • TitleOverride (string) -- Title override. If specified will override default title if applicable.

  • MessageConfiguration (dict) -- Message configuration.

    • ADMMessage (dict) -- The message to ADM channels. Overrides the default push notification 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. Possible values include: OPEN_APP | DEEP_LINK | URL

      • Body (string) -- The message body of the notification.

      • ConsolidationKey (string) -- Optional. Arbitrary string used to indicate multiple messages are logically the same and that ADM is allowed to drop previously enqueued messages in favor of this one.

      • Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object

        • (string) --

          • (string) --

      • ExpiresAfter (string) -- Optional. Number of seconds ADM should retain the message if the device is offline

      • IconReference (string) -- The icon image name of the asset saved in your application.

      • ImageIconUrl (string) -- The URL that points to an image used as the large icon to the notification content view.

      • ImageUrl (string) -- The URL that points to an image used in the push notification.

      • MD5 (string) -- Optional. Base-64-encoded MD5 checksum of the data parameter. Used to verify data integrity

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

      • SmallImageIconUrl (string) -- The URL that points to an image used as the small icon for the notification which will be used to represent the notification in the status bar and content view

      • Sound (string) -- Indicates a sound to play when the device receives the notification. Supports default, or the filename of a sound resource bundled in the app. Android sound files must reside in /res/raw/

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

      • 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 to APNS channels. Overrides the default push notification 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. Possible values include: OPEN_APP | DEEP_LINK | URL

      • Badge (integer) -- Include this key when you want the system to modify the badge of your app icon. If this key is not included in the dictionary, the badge is not changed. To remove the badge, set the value of this key to 0.

      • Body (string) -- The message body of the notification.

      • Category (string) -- Provide this key with a string value that represents the notification's type. This value corresponds to the value in the identifier property of one of your app's registered categories.

      • CollapseId (string) -- An ID that, if assigned to multiple messages, causes APNs to coalesce the messages into a single push notification instead of delivering each message individually. The value must not exceed 64 bytes. Amazon Pinpoint uses this value to set the apns-collapse-id request header when it sends the message to APNs.

      • Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object

        • (string) --

          • (string) --

      • MediaUrl (string) -- A URL that refers to the location of an image or video that you want to display in the push notification.

      • PreferredAuthenticationMethod (string) -- The preferred authentication method, either "CERTIFICATE" or "TOKEN"

      • Priority (string) -- The message priority. Amazon Pinpoint uses this value to set the apns-priority request header when it sends the message to APNs. Accepts the following values: "5" - Low priority. Messages might be delayed, delivered in groups, and throttled. "10" - High priority. Messages are sent immediately. High priority messages must cause an alert, sound, or badge on the receiving device. The default value is "10". The equivalent values for FCM or GCM messages are "normal" and "high". Amazon Pinpoint accepts these values for APNs messages and converts them. For more information about the apns-priority parameter, see Communicating with APNs in the APNs Local and Remote Notification Programming Guide.

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

      • Sound (string) -- Include this key when you want the system to play a sound. The value of this key is the name of a sound file in your app's main bundle or in the Library/Sounds folder of your app's data container. If the sound file cannot be found, or if you specify defaultfor the value, the system plays the default alert sound.

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

      • ThreadId (string) -- Provide this key with a string value that represents the app-specific identifier for grouping notifications. If you provide a Notification Content app extension, you can use this value to group your notifications together.

      • TimeToLive (integer) -- The length of time (in seconds) that APNs stores and attempts to deliver the message. If the value is 0, APNs does not store the message or attempt to deliver it more than once. Amazon Pinpoint uses this value to set the apns-expiration request header when it sends the message to APNs.

      • 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 to Baidu GCM channels. Overrides the default push notification 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. Possible values include: OPEN_APP | DEEP_LINK | URL

      • Body (string) -- The message body of the notification.

      • Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object

        • (string) --

          • (string) --

      • IconReference (string) -- The icon image name of the asset saved in your application.

      • ImageIconUrl (string) -- The URL that points to an image used as the large icon to the notification content view.

      • ImageUrl (string) -- The URL that points to an image used in the push notification.

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

      • SmallImageIconUrl (string) -- The URL that points to an image used as the small icon for the notification which will be used to represent the notification in the status bar and content view

      • Sound (string) -- Indicates a sound to play when the device receives the notification. Supports default, or the filename of a sound resource bundled in the app. Android sound files must reside in /res/raw/

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

      • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept in Baidu storage if the device is offline. The and the default value and the maximum time to live supported is 7 days (604800 seconds)

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

      • Body (string) -- The message body of the notification, the email body or the text message.

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

    • DefaultPushNotificationMessage (dict) -- The default push notification message for all push 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. Possible values include: OPEN_APP | DEEP_LINK | URL

      • Body (string) -- The message body of the notification.

      • Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object

        • (string) --

          • (string) --

      • SilentPush (boolean) -- Indicates if the message should display on the recipient's device. You can use silent pushes for remote configuration or to deliver messages to in-app notification centers.

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

      • 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 message to Email channels. Overrides the default message.

      • Body (string) -- The body of the email message.

      • FeedbackForwardingAddress (string) -- The email address that bounces and complaints will be forwarded to when feedback forwarding is enabled.

      • FromAddress (string) -- The email address used to send the email from. Defaults to use FromAddress specified in the Email Channel.

      • RawEmail (dict) -- An email represented as a raw MIME message.

        • Data (bytes) -- The raw email message itself. Then entire message must be base64-encoded.

      • ReplyToAddresses (list) -- The reply-to email address(es) for the email. If the recipient replies to the email, each reply-to address will receive the reply.

        • (string) --

      • SimpleEmail (dict) -- An email composed of a subject, a text part and a html part.

        • HtmlPart (dict) -- The content of the message, in HTML format. Use this for email clients that can process HTML. You can include clickable links, formatted text, and much more in an HTML message.

          • Charset (string) -- The character set of the content.

          • Data (string) -- The textual data of the content.

        • Subject (dict) -- The subject of the message: A short summary of the content, which will appear in the recipient's inbox.

          • Charset (string) -- The character set of the content.

          • Data (string) -- The textual data of the content.

        • TextPart (dict) -- The content of the message, in text format. Use this for text-based email clients, or clients on high-latency networks (such as mobile devices).

          • Charset (string) -- The character set of the content.

          • Data (string) -- The textual data of the content.

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

    • GCMMessage (dict) -- The message to GCM channels. Overrides the default push notification 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. Possible values include: OPEN_APP | DEEP_LINK | URL

      • Body (string) -- The message body of the notification.

      • CollapseKey (string) -- This parameter identifies a group of messages (e.g., with collapse_key: "Updates Available") that can be collapsed, so that only the last message gets sent when delivery can be resumed. This is intended to avoid sending too many of the same messages when the device comes back online or becomes active.

      • Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object

        • (string) --

          • (string) --

      • IconReference (string) -- The icon image name of the asset saved in your application.

      • ImageIconUrl (string) -- The URL that points to an image used as the large icon to the notification content view.

      • ImageUrl (string) -- The URL that points to an image used in the push notification.

      • Priority (string) -- The message priority. Amazon Pinpoint uses this value to set the FCM or GCM priority parameter when it sends the message. Accepts the following values: "Normal" - Messages might be delayed. Delivery is optimized for battery usage on the receiving device. Use normal priority unless immediate delivery is required. "High" - Messages are sent immediately and might wake a sleeping device. The equivalent values for APNs messages are "5" and "10". Amazon Pinpoint accepts these values here and converts them. For more information, see About FCM Messages in the Firebase documentation.

      • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.

      • RestrictedPackageName (string) -- This parameter specifies the package name of the application where the registration tokens must match in order to receive 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.

      • SmallImageIconUrl (string) -- The URL that points to an image used as the small icon for the notification which will be used to represent the notification in the status bar and content view

      • Sound (string) -- Indicates a sound to play when the device receives the notification. Supports default, or the filename of a sound resource bundled in the app. Android sound files must reside in /res/raw/

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

      • TimeToLive (integer) -- The length of time (in seconds) that FCM or GCM stores and attempts to deliver the message. If unspecified, the value defaults to the maximum, which is 2,419,200 seconds (28 days). Amazon Pinpoint uses this value to set the FCM or GCM time_to_live parameter.

      • 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 message to SMS channels. Overrides the default message.

      • Body (string) -- The body of the SMS message.

      • Keyword (string) -- The SMS program name that you provided to AWS Support when you requested your dedicated number.

      • MessageType (string) -- Is this a transaction priority message or lower priority.

      • OriginationNumber (string) -- The phone number that the SMS message originates from. Specify one of the dedicated long codes or short codes that you requested from AWS Support and that is assigned to your account. If this attribute is not specified, Amazon Pinpoint randomly assigns a long code.

      • SenderId (string) -- The sender ID that is shown as the message sender on the recipient's device. Support for sender IDs varies by country or region.

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

    • VoiceMessage (dict) -- The message to Voice channels. Overrides the default message.

      • Body (string) -- The message body of the notification, the email body or the text message.

      • LanguageCode (string) -- Language of sent message

      • OriginationNumber (string) -- Is the number from the pool or messaging service to send from.

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

      • VoiceId (string) -- Voice ID of sent message.

  • TraceId (string) -- A unique ID that you can use to trace a message. This ID is visible to recipients.

rtype

dict

returns

Response Syntax

{
    'MessageResponse': {
        'ApplicationId': 'string',
        'EndpointResult': {
            'string': {
                'Address': 'string',
                'DeliveryStatus': 'SUCCESSFUL'|'THROTTLED'|'TEMPORARY_FAILURE'|'PERMANENT_FAILURE'|'UNKNOWN_FAILURE'|'OPT_OUT'|'DUPLICATE',
                'MessageId': 'string',
                'StatusCode': 123,
                'StatusMessage': 'string',
                'UpdatedToken': 'string'
            }
        },
        'RequestId': 'string',
        'Result': {
            'string': {
                'DeliveryStatus': 'SUCCESSFUL'|'THROTTLED'|'TEMPORARY_FAILURE'|'PERMANENT_FAILURE'|'UNKNOWN_FAILURE'|'OPT_OUT'|'DUPLICATE',
                'MessageId': 'string',
                'StatusCode': 123,
                'StatusMessage': 'string',
                'UpdatedToken': 'string'
            }
        }
    }
}

Response Structure

  • (dict) -- 200 response

    • MessageResponse (dict) -- Send message response.

      • ApplicationId (string) -- Application id of the message.

      • EndpointResult (dict) -- A map containing a multi part response for each address, with the endpointId as the key and the result as the value.

        • (string) --

          • (dict) -- The result from sending a message to an endpoint.

            • Address (string) -- Address that endpoint message was delivered to.

            • DeliveryStatus (string) -- The delivery status of the message. Possible values: SUCCESS - The message was successfully delivered to the endpoint. TRANSIENT_FAILURE - A temporary error occurred. Amazon Pinpoint will attempt to deliver the message again later. FAILURE_PERMANENT - An error occurred when delivering the message to the endpoint. Amazon Pinpoint won't attempt to send the message again. TIMEOUT - The message couldn't be sent within the timeout period. QUIET_TIME - The local time for the endpoint was within the QuietTime for the campaign or app. DAILY_CAP - The endpoint has received the maximum number of messages it can receive within a 24-hour period. HOLDOUT - The endpoint was in a hold out treatment for the campaign. THROTTLED - Amazon Pinpoint throttled sending to this endpoint. EXPIRED - The endpoint address is expired. CAMPAIGN_CAP - The endpoint received the maximum number of messages allowed by the campaign. SERVICE_FAILURE - A service-level failure prevented Amazon Pinpoint from delivering the message. UNKNOWN - An unknown error occurred.

            • MessageId (string) -- Unique message identifier associated with the message that was sent.

            • StatusCode (integer) -- Downstream service status code.

            • StatusMessage (string) -- Status message for message delivery.

            • UpdatedToken (string) -- If token was updated as part of delivery. (This is GCM Specific)

      • RequestId (string) -- Original request Id for which this message was delivered.

      • Result (dict) -- A map containing a multi part response for each address, with the address as the key(Email address, phone number or push token) and the result as the value.

        • (string) --

          • (dict) -- The result from sending a message to an address.

            • DeliveryStatus (string) -- The delivery status of the message. Possible values: SUCCESS - The message was successfully delivered to the endpoint. TRANSIENT_FAILURE - A temporary error occurred. Amazon Pinpoint will attempt to deliver the message again later. FAILURE_PERMANENT - An error occurred when delivering the message to the endpoint. Amazon Pinpoint won't attempt to send the message again. TIMEOUT - The message couldn't be sent within the timeout period. QUIET_TIME - The local time for the endpoint was within the QuietTime for the campaign or app. DAILY_CAP - The endpoint has received the maximum number of messages it can receive within a 24-hour period. HOLDOUT - The endpoint was in a hold out treatment for the campaign. THROTTLED - Amazon Pinpoint throttled sending to this endpoint. EXPIRED - The endpoint address is expired. CAMPAIGN_CAP - The endpoint received the maximum number of messages allowed by the campaign. SERVICE_FAILURE - A service-level failure prevented Amazon Pinpoint from delivering the message. UNKNOWN - An unknown error occurred.

            • MessageId (string) -- Unique message identifier associated with the message that was sent.

            • StatusCode (integer) -- Downstream service status code.

            • StatusMessage (string) -- Status message for message delivery.

            • UpdatedToken (string) -- If token was updated as part of delivery. (This is GCM Specific)

SendUsersMessages (updated) Link ¶
Changes (request)
{'SendUsersMessageRequest': {'MessageConfiguration': {'VoiceMessage': {'Body': 'string',
                                                                       'LanguageCode': 'string',
                                                                       'OriginationNumber': 'string',
                                                                       'Substitutions': {'string': ['string']},
                                                                       'VoiceId': 'string'}}}}

Used to send a message to a list of users.

See also: AWS API Documentation

Request Syntax

client.send_users_messages(
    ApplicationId='string',
    SendUsersMessageRequest={
        'Context': {
            'string': 'string'
        },
        'MessageConfiguration': {
            'ADMMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ConsolidationKey': 'string',
                'Data': {
                    'string': 'string'
                },
                'ExpiresAfter': 'string',
                'IconReference': 'string',
                'ImageIconUrl': 'string',
                'ImageUrl': 'string',
                'MD5': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'SmallImageIconUrl': 'string',
                'Sound': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'Title': 'string',
                'Url': 'string'
            },
            'APNSMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Badge': 123,
                'Body': 'string',
                'Category': 'string',
                'CollapseId': 'string',
                'Data': {
                    'string': 'string'
                },
                'MediaUrl': 'string',
                'PreferredAuthenticationMethod': 'string',
                'Priority': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'Sound': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'ThreadId': 'string',
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'BaiduMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'Data': {
                    'string': 'string'
                },
                'IconReference': 'string',
                'ImageIconUrl': 'string',
                'ImageUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'SmallImageIconUrl': 'string',
                'Sound': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'DefaultMessage': {
                'Body': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                }
            },
            'DefaultPushNotificationMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'Data': {
                    'string': 'string'
                },
                'SilentPush': True|False,
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'Title': 'string',
                'Url': 'string'
            },
            'EmailMessage': {
                'Body': 'string',
                'FeedbackForwardingAddress': 'string',
                'FromAddress': 'string',
                'RawEmail': {
                    'Data': b'bytes'
                },
                'ReplyToAddresses': [
                    'string',
                ],
                'SimpleEmail': {
                    'HtmlPart': {
                        'Charset': 'string',
                        'Data': 'string'
                    },
                    'Subject': {
                        'Charset': 'string',
                        'Data': 'string'
                    },
                    'TextPart': {
                        'Charset': 'string',
                        'Data': 'string'
                    }
                },
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                }
            },
            'GCMMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'CollapseKey': 'string',
                'Data': {
                    'string': 'string'
                },
                'IconReference': 'string',
                'ImageIconUrl': 'string',
                'ImageUrl': 'string',
                'Priority': 'string',
                'RawContent': 'string',
                'RestrictedPackageName': 'string',
                'SilentPush': True|False,
                'SmallImageIconUrl': 'string',
                'Sound': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'SMSMessage': {
                'Body': 'string',
                'Keyword': 'string',
                'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL',
                'OriginationNumber': 'string',
                'SenderId': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                }
            },
            'VoiceMessage': {
                'Body': 'string',
                'LanguageCode': 'string',
                'OriginationNumber': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'VoiceId': 'string'
            }
        },
        'TraceId': 'string',
        'Users': {
            'string': {
                'BodyOverride': 'string',
                'Context': {
                    'string': 'string'
                },
                'RawContent': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'TitleOverride': 'string'
            }
        }
    }
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

type SendUsersMessageRequest

dict

param SendUsersMessageRequest

[REQUIRED] Send message request.

  • Context (dict) -- A map of custom attribute-value pairs. Amazon Pinpoint adds these attributes to the data.pinpoint object in the body of the push notification payload. Amazon Pinpoint also provides these attributes in the events that it generates for users-messages deliveries.

    • (string) --

      • (string) --

  • MessageConfiguration (dict) -- Message definitions for the default message and any messages that are tailored for specific channels.

    • ADMMessage (dict) -- The message to ADM channels. Overrides the default push notification 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. Possible values include: OPEN_APP | DEEP_LINK | URL

      • Body (string) -- The message body of the notification.

      • ConsolidationKey (string) -- Optional. Arbitrary string used to indicate multiple messages are logically the same and that ADM is allowed to drop previously enqueued messages in favor of this one.

      • Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object

        • (string) --

          • (string) --

      • ExpiresAfter (string) -- Optional. Number of seconds ADM should retain the message if the device is offline

      • IconReference (string) -- The icon image name of the asset saved in your application.

      • ImageIconUrl (string) -- The URL that points to an image used as the large icon to the notification content view.

      • ImageUrl (string) -- The URL that points to an image used in the push notification.

      • MD5 (string) -- Optional. Base-64-encoded MD5 checksum of the data parameter. Used to verify data integrity

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

      • SmallImageIconUrl (string) -- The URL that points to an image used as the small icon for the notification which will be used to represent the notification in the status bar and content view

      • Sound (string) -- Indicates a sound to play when the device receives the notification. Supports default, or the filename of a sound resource bundled in the app. Android sound files must reside in /res/raw/

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

      • 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 to APNS channels. Overrides the default push notification 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. Possible values include: OPEN_APP | DEEP_LINK | URL

      • Badge (integer) -- Include this key when you want the system to modify the badge of your app icon. If this key is not included in the dictionary, the badge is not changed. To remove the badge, set the value of this key to 0.

      • Body (string) -- The message body of the notification.

      • Category (string) -- Provide this key with a string value that represents the notification's type. This value corresponds to the value in the identifier property of one of your app's registered categories.

      • CollapseId (string) -- An ID that, if assigned to multiple messages, causes APNs to coalesce the messages into a single push notification instead of delivering each message individually. The value must not exceed 64 bytes. Amazon Pinpoint uses this value to set the apns-collapse-id request header when it sends the message to APNs.

      • Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object

        • (string) --

          • (string) --

      • MediaUrl (string) -- A URL that refers to the location of an image or video that you want to display in the push notification.

      • PreferredAuthenticationMethod (string) -- The preferred authentication method, either "CERTIFICATE" or "TOKEN"

      • Priority (string) -- The message priority. Amazon Pinpoint uses this value to set the apns-priority request header when it sends the message to APNs. Accepts the following values: "5" - Low priority. Messages might be delayed, delivered in groups, and throttled. "10" - High priority. Messages are sent immediately. High priority messages must cause an alert, sound, or badge on the receiving device. The default value is "10". The equivalent values for FCM or GCM messages are "normal" and "high". Amazon Pinpoint accepts these values for APNs messages and converts them. For more information about the apns-priority parameter, see Communicating with APNs in the APNs Local and Remote Notification Programming Guide.

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

      • Sound (string) -- Include this key when you want the system to play a sound. The value of this key is the name of a sound file in your app's main bundle or in the Library/Sounds folder of your app's data container. If the sound file cannot be found, or if you specify defaultfor the value, the system plays the default alert sound.

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

      • ThreadId (string) -- Provide this key with a string value that represents the app-specific identifier for grouping notifications. If you provide a Notification Content app extension, you can use this value to group your notifications together.

      • TimeToLive (integer) -- The length of time (in seconds) that APNs stores and attempts to deliver the message. If the value is 0, APNs does not store the message or attempt to deliver it more than once. Amazon Pinpoint uses this value to set the apns-expiration request header when it sends the message to APNs.

      • 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 to Baidu GCM channels. Overrides the default push notification 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. Possible values include: OPEN_APP | DEEP_LINK | URL

      • Body (string) -- The message body of the notification.

      • Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object

        • (string) --

          • (string) --

      • IconReference (string) -- The icon image name of the asset saved in your application.

      • ImageIconUrl (string) -- The URL that points to an image used as the large icon to the notification content view.

      • ImageUrl (string) -- The URL that points to an image used in the push notification.

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

      • SmallImageIconUrl (string) -- The URL that points to an image used as the small icon for the notification which will be used to represent the notification in the status bar and content view

      • Sound (string) -- Indicates a sound to play when the device receives the notification. Supports default, or the filename of a sound resource bundled in the app. Android sound files must reside in /res/raw/

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

      • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept in Baidu storage if the device is offline. The and the default value and the maximum time to live supported is 7 days (604800 seconds)

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

      • Body (string) -- The message body of the notification, the email body or the text message.

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

    • DefaultPushNotificationMessage (dict) -- The default push notification message for all push 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. Possible values include: OPEN_APP | DEEP_LINK | URL

      • Body (string) -- The message body of the notification.

      • Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object

        • (string) --

          • (string) --

      • SilentPush (boolean) -- Indicates if the message should display on the recipient's device. You can use silent pushes for remote configuration or to deliver messages to in-app notification centers.

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

      • 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 message to Email channels. Overrides the default message.

      • Body (string) -- The body of the email message.

      • FeedbackForwardingAddress (string) -- The email address that bounces and complaints will be forwarded to when feedback forwarding is enabled.

      • FromAddress (string) -- The email address used to send the email from. Defaults to use FromAddress specified in the Email Channel.

      • RawEmail (dict) -- An email represented as a raw MIME message.

        • Data (bytes) -- The raw email message itself. Then entire message must be base64-encoded.

      • ReplyToAddresses (list) -- The reply-to email address(es) for the email. If the recipient replies to the email, each reply-to address will receive the reply.

        • (string) --

      • SimpleEmail (dict) -- An email composed of a subject, a text part and a html part.

        • HtmlPart (dict) -- The content of the message, in HTML format. Use this for email clients that can process HTML. You can include clickable links, formatted text, and much more in an HTML message.

          • Charset (string) -- The character set of the content.

          • Data (string) -- The textual data of the content.

        • Subject (dict) -- The subject of the message: A short summary of the content, which will appear in the recipient's inbox.

          • Charset (string) -- The character set of the content.

          • Data (string) -- The textual data of the content.

        • TextPart (dict) -- The content of the message, in text format. Use this for text-based email clients, or clients on high-latency networks (such as mobile devices).

          • Charset (string) -- The character set of the content.

          • Data (string) -- The textual data of the content.

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

    • GCMMessage (dict) -- The message to GCM channels. Overrides the default push notification 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. Possible values include: OPEN_APP | DEEP_LINK | URL

      • Body (string) -- The message body of the notification.

      • CollapseKey (string) -- This parameter identifies a group of messages (e.g., with collapse_key: "Updates Available") that can be collapsed, so that only the last message gets sent when delivery can be resumed. This is intended to avoid sending too many of the same messages when the device comes back online or becomes active.

      • Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object

        • (string) --

          • (string) --

      • IconReference (string) -- The icon image name of the asset saved in your application.

      • ImageIconUrl (string) -- The URL that points to an image used as the large icon to the notification content view.

      • ImageUrl (string) -- The URL that points to an image used in the push notification.

      • Priority (string) -- The message priority. Amazon Pinpoint uses this value to set the FCM or GCM priority parameter when it sends the message. Accepts the following values: "Normal" - Messages might be delayed. Delivery is optimized for battery usage on the receiving device. Use normal priority unless immediate delivery is required. "High" - Messages are sent immediately and might wake a sleeping device. The equivalent values for APNs messages are "5" and "10". Amazon Pinpoint accepts these values here and converts them. For more information, see About FCM Messages in the Firebase documentation.

      • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.

      • RestrictedPackageName (string) -- This parameter specifies the package name of the application where the registration tokens must match in order to receive 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.

      • SmallImageIconUrl (string) -- The URL that points to an image used as the small icon for the notification which will be used to represent the notification in the status bar and content view

      • Sound (string) -- Indicates a sound to play when the device receives the notification. Supports default, or the filename of a sound resource bundled in the app. Android sound files must reside in /res/raw/

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

      • TimeToLive (integer) -- The length of time (in seconds) that FCM or GCM stores and attempts to deliver the message. If unspecified, the value defaults to the maximum, which is 2,419,200 seconds (28 days). Amazon Pinpoint uses this value to set the FCM or GCM time_to_live parameter.

      • 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 message to SMS channels. Overrides the default message.

      • Body (string) -- The body of the SMS message.

      • Keyword (string) -- The SMS program name that you provided to AWS Support when you requested your dedicated number.

      • MessageType (string) -- Is this a transaction priority message or lower priority.

      • OriginationNumber (string) -- The phone number that the SMS message originates from. Specify one of the dedicated long codes or short codes that you requested from AWS Support and that is assigned to your account. If this attribute is not specified, Amazon Pinpoint randomly assigns a long code.

      • SenderId (string) -- The sender ID that is shown as the message sender on the recipient's device. Support for sender IDs varies by country or region.

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

    • VoiceMessage (dict) -- The message to Voice channels. Overrides the default message.

      • Body (string) -- The message body of the notification, the email body or the text message.

      • LanguageCode (string) -- Language of sent message

      • OriginationNumber (string) -- Is the number from the pool or messaging service to send from.

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

      • VoiceId (string) -- Voice ID of sent message.

  • TraceId (string) -- A unique ID that you can use to trace a message. This ID is visible to recipients.

  • Users (dict) -- A map that associates user IDs with EndpointSendConfiguration objects. Within an EndpointSendConfiguration object, you can tailor the message for a user by specifying message overrides or substitutions.

    • (string) --

      • (dict) -- Endpoint send configuration.

        • BodyOverride (string) -- Body override. If specified will override default body.

        • Context (dict) -- A map of custom attributes to attributes to be attached to the message for this address. This payload is added to the push notification's 'data.pinpoint' object or added to the email/sms delivery receipt event attributes.

          • (string) --

            • (string) --

        • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.

        • Substitutions (dict) -- A map of substitution values for the message to be merged with the DefaultMessage's substitutions. Substitutions on this map take precedence over the all other substitutions.

          • (string) --

            • (list) --

              • (string) --

        • TitleOverride (string) -- Title override. If specified will override default title if applicable.

rtype

dict

returns

Response Syntax

{
    'SendUsersMessageResponse': {
        'ApplicationId': 'string',
        'RequestId': 'string',
        'Result': {
            'string': {
                'string': {
                    'Address': 'string',
                    'DeliveryStatus': 'SUCCESSFUL'|'THROTTLED'|'TEMPORARY_FAILURE'|'PERMANENT_FAILURE'|'UNKNOWN_FAILURE'|'OPT_OUT'|'DUPLICATE',
                    'MessageId': 'string',
                    'StatusCode': 123,
                    'StatusMessage': 'string',
                    'UpdatedToken': 'string'
                }
            }
        }
    }
}

Response Structure

  • (dict) -- 200 response

    • SendUsersMessageResponse (dict) -- User send message response.

      • ApplicationId (string) -- The unique ID of the Amazon Pinpoint project used to send the message.

      • RequestId (string) -- The unique ID assigned to the users-messages request.

      • Result (dict) -- An object that shows the endpoints that were messaged for each user. The object provides a list of user IDs. For each user ID, it provides the endpoint IDs that were messaged. For each endpoint ID, it provides an EndpointMessageResult object.

        • (string) --

          • (dict) --

            • (string) --

              • (dict) -- The result from sending a message to an endpoint.

                • Address (string) -- Address that endpoint message was delivered to.

                • DeliveryStatus (string) -- The delivery status of the message. Possible values: SUCCESS - The message was successfully delivered to the endpoint. TRANSIENT_FAILURE - A temporary error occurred. Amazon Pinpoint will attempt to deliver the message again later. FAILURE_PERMANENT - An error occurred when delivering the message to the endpoint. Amazon Pinpoint won't attempt to send the message again. TIMEOUT - The message couldn't be sent within the timeout period. QUIET_TIME - The local time for the endpoint was within the QuietTime for the campaign or app. DAILY_CAP - The endpoint has received the maximum number of messages it can receive within a 24-hour period. HOLDOUT - The endpoint was in a hold out treatment for the campaign. THROTTLED - Amazon Pinpoint throttled sending to this endpoint. EXPIRED - The endpoint address is expired. CAMPAIGN_CAP - The endpoint received the maximum number of messages allowed by the campaign. SERVICE_FAILURE - A service-level failure prevented Amazon Pinpoint from delivering the message. UNKNOWN - An unknown error occurred.

                • MessageId (string) -- Unique message identifier associated with the message that was sent.

                • StatusCode (integer) -- Downstream service status code.

                • StatusMessage (string) -- Status message for message delivery.

                • UpdatedToken (string) -- If token was updated as part of delivery. (This is GCM Specific)

UpdateCampaign (updated) Link ¶
Changes (request, response)
Request
{'WriteCampaignRequest': {'AdditionalTreatments': {'Schedule': {'EventFilter': {'Dimensions': {'Attributes': {'string': {'AttributeType': 'INCLUSIVE '
                                                                                                                                          '| '
                                                                                                                                          'EXCLUSIVE',
                                                                                                                         'Values': ['string']}},
                                                                                               'EventType': {'DimensionType': 'INCLUSIVE '
                                                                                                                              '| '
                                                                                                                              'EXCLUSIVE',
                                                                                                             'Values': ['string']},
                                                                                               'Metrics': {'string': {'ComparisonOperator': 'string',
                                                                                                                      'Value': 'double'}}},
                                                                                'FilterType': 'SYSTEM '
                                                                                              '| '
                                                                                              'ENDPOINT'},
                                                                'Frequency': ['EVENT']}},
                          'Schedule': {'EventFilter': {'Dimensions': {'Attributes': {'string': {'AttributeType': 'INCLUSIVE '
                                                                                                                 '| '
                                                                                                                 'EXCLUSIVE',
                                                                                                'Values': ['string']}},
                                                                      'EventType': {'DimensionType': 'INCLUSIVE '
                                                                                                     '| '
                                                                                                     'EXCLUSIVE',
                                                                                    'Values': ['string']},
                                                                      'Metrics': {'string': {'ComparisonOperator': 'string',
                                                                                             'Value': 'double'}}},
                                                       'FilterType': 'SYSTEM | '
                                                                     'ENDPOINT'},
                                       'Frequency': ['EVENT']}}}
Response
{'CampaignResponse': {'AdditionalTreatments': {'Schedule': {'EventFilter': {'Dimensions': {'Attributes': {'string': {'AttributeType': 'INCLUSIVE '
                                                                                                                                      '| '
                                                                                                                                      'EXCLUSIVE',
                                                                                                                     'Values': ['string']}},
                                                                                           'EventType': {'DimensionType': 'INCLUSIVE '
                                                                                                                          '| '
                                                                                                                          'EXCLUSIVE',
                                                                                                         'Values': ['string']},
                                                                                           'Metrics': {'string': {'ComparisonOperator': 'string',
                                                                                                                  'Value': 'double'}}},
                                                                            'FilterType': 'SYSTEM '
                                                                                          '| '
                                                                                          'ENDPOINT'},
                                                            'Frequency': ['EVENT']}},
                      'Schedule': {'EventFilter': {'Dimensions': {'Attributes': {'string': {'AttributeType': 'INCLUSIVE '
                                                                                                             '| '
                                                                                                             'EXCLUSIVE',
                                                                                            'Values': ['string']}},
                                                                  'EventType': {'DimensionType': 'INCLUSIVE '
                                                                                                 '| '
                                                                                                 'EXCLUSIVE',
                                                                                'Values': ['string']},
                                                                  'Metrics': {'string': {'ComparisonOperator': 'string',
                                                                                         'Value': 'double'}}},
                                                   'FilterType': 'SYSTEM | '
                                                                 'ENDPOINT'},
                                   'Frequency': ['EVENT']}}}

Use to update a campaign.

See also: AWS API Documentation

Request Syntax

client.update_campaign(
    ApplicationId='string',
    CampaignId='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',
                    'EventFilter': {
                        'Dimensions': {
                            'Attributes': {
                                'string': {
                                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'EventType': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                'Values': [
                                    'string',
                                ]
                            },
                            'Metrics': {
                                'string': {
                                    'ComparisonOperator': 'string',
                                    'Value': 123.0
                                }
                            }
                        },
                        'FilterType': 'SYSTEM'|'ENDPOINT'
                    },
                    'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY'|'EVENT',
                    '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',
            'EventFilter': {
                'Dimensions': {
                    'Attributes': {
                        'string': {
                            'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        }
                    },
                    'EventType': {
                        'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                        'Values': [
                            'string',
                        ]
                    },
                    'Metrics': {
                        'string': {
                            'ComparisonOperator': 'string',
                            'Value': 123.0
                        }
                    }
                },
                'FilterType': 'SYSTEM'|'ENDPOINT'
            },
            'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY'|'EVENT',
            'IsLocalTime': True|False,
            'QuietTime': {
                'End': 'string',
                'Start': 'string'
            },
            'StartTime': 'string',
            'Timezone': 'string'
        },
        'SegmentId': 'string',
        'SegmentVersion': 123,
        'TreatmentDescription': 'string',
        'TreatmentName': 'string'
    }
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

type CampaignId

string

param CampaignId

[REQUIRED] The unique ID of the campaign.

type WriteCampaignRequest

dict

param WriteCampaignRequest

[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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

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

        • EventFilter (dict) -- Defines the type of events that can trigger the campaign. Used when the Frequency is set to EVENT.

          • Dimensions (dict) -- An object that defines the dimensions for the event filter.

            • Attributes (dict) -- Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

              • (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) --

            • EventType (dict) -- The name of the event that causes the campaign to be sent. This can be a standard event type that Amazon Pinpoint generates, such as _session.start, or a custom event that's specific to your app.

              • 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) --

            • Metrics (dict) -- Custom metrics that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

              • (string) --

                • (dict) -- Custom metric dimension

                  • ComparisonOperator (string) -- The operator that you're using to compare metric values. Possible values: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, or EQUAL

                  • Value (float) -- The value to be compared.

          • FilterType (string) -- The type of event that causes the campaign to be sent. Possible values: SYSTEM - Send the campaign when a system event occurs. See the System resource for more information. ENDPOINT - Send the campaign when an endpoint event occurs. See the Event resource for more information.

        • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE HOURLY DAILY WEEKLY MONTHLY EVENT

        • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.

        • QuietTime (dict) -- The default quiet time for the campaign. The campaign doesn't send messages to endpoints during the quiet time. Note: Make sure that your endpoints include the Demographics.Timezone attribute if you plan to enable a quiet time for your campaign. If your endpoints don't include this attribute, they'll receive the messages that you send them, even if quiet time is enabled. When you set up a campaign to use quiet time, the campaign doesn't send messages during the time range you specified, as long as all of the following are true: - The endpoint includes a valid Demographic.Timezone attribute. - The current time in the endpoint's time zone is later than or equal to the time specified in the QuietTime.Start attribute for the campaign. - The current time in the endpoint's time zone is earlier than or equal to the time specified in the QuietTime.End attribute for the campaign.

          • End (string) -- The time at which quiet time should end. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

          • Start (string) -- The time at which quiet time should begin. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

        • 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 each campaign can send to a single endpoint in a 24-hour period.

    • 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 number of messages that an individual campaign can send to a single endpoint over the course of the campaign.

  • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

      • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

      • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

      • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

      • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

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

    • EventFilter (dict) -- Defines the type of events that can trigger the campaign. Used when the Frequency is set to EVENT.

      • Dimensions (dict) -- An object that defines the dimensions for the event filter.

        • Attributes (dict) -- Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

          • (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) --

        • EventType (dict) -- The name of the event that causes the campaign to be sent. This can be a standard event type that Amazon Pinpoint generates, such as _session.start, or a custom event that's specific to your app.

          • 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) --

        • Metrics (dict) -- Custom metrics that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

          • (string) --

            • (dict) -- Custom metric dimension

              • ComparisonOperator (string) -- The operator that you're using to compare metric values. Possible values: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, or EQUAL

              • Value (float) -- The value to be compared.

      • FilterType (string) -- The type of event that causes the campaign to be sent. Possible values: SYSTEM - Send the campaign when a system event occurs. See the System resource for more information. ENDPOINT - Send the campaign when an endpoint event occurs. See the Event resource for more information.

    • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE HOURLY DAILY WEEKLY MONTHLY EVENT

    • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.

    • QuietTime (dict) -- The default quiet time for the campaign. The campaign doesn't send messages to endpoints during the quiet time. Note: Make sure that your endpoints include the Demographics.Timezone attribute if you plan to enable a quiet time for your campaign. If your endpoints don't include this attribute, they'll receive the messages that you send them, even if quiet time is enabled. When you set up a campaign to use quiet time, the campaign doesn't send messages during the time range you specified, as long as all of the following are true: - The endpoint includes a valid Demographic.Timezone attribute. - The current time in the endpoint's time zone is later than or equal to the time specified in the QuietTime.Start attribute for the campaign. - The current time in the endpoint's time zone is earlier than or equal to the time specified in the QuietTime.End attribute for the campaign.

      • End (string) -- The time at which quiet time should end. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

      • Start (string) -- The time at which quiet time should begin. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

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

rtype

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',
                    'EventFilter': {
                        'Dimensions': {
                            'Attributes': {
                                'string': {
                                    'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                                    'Values': [
                                        'string',
                                    ]
                                }
                            },
                            'EventType': {
                                'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                                'Values': [
                                    'string',
                                ]
                            },
                            'Metrics': {
                                'string': {
                                    'ComparisonOperator': 'string',
                                    'Value': 123.0
                                }
                            }
                        },
                        'FilterType': 'SYSTEM'|'ENDPOINT'
                    },
                    'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY'|'EVENT',
                    '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',
            'EventFilter': {
                'Dimensions': {
                    'Attributes': {
                        'string': {
                            'AttributeType': 'INCLUSIVE'|'EXCLUSIVE',
                            'Values': [
                                'string',
                            ]
                        }
                    },
                    'EventType': {
                        'DimensionType': 'INCLUSIVE'|'EXCLUSIVE',
                        'Values': [
                            'string',
                        ]
                    },
                    'Metrics': {
                        'string': {
                            'ComparisonOperator': 'string',
                            'Value': 123.0
                        }
                    }
                },
                'FilterType': 'SYSTEM'|'ENDPOINT'
            },
            'Frequency': 'ONCE'|'HOURLY'|'DAILY'|'WEEKLY'|'MONTHLY'|'EVENT',
            '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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

              • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

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

            • EventFilter (dict) -- Defines the type of events that can trigger the campaign. Used when the Frequency is set to EVENT.

              • Dimensions (dict) -- An object that defines the dimensions for the event filter.

                • Attributes (dict) -- Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

                  • (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) --

                • EventType (dict) -- The name of the event that causes the campaign to be sent. This can be a standard event type that Amazon Pinpoint generates, such as _session.start, or a custom event that's specific to your app.

                  • 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) --

                • Metrics (dict) -- Custom metrics that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

                  • (string) --

                    • (dict) -- Custom metric dimension

                      • ComparisonOperator (string) -- The operator that you're using to compare metric values. Possible values: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, or EQUAL

                      • Value (float) -- The value to be compared.

              • FilterType (string) -- The type of event that causes the campaign to be sent. Possible values: SYSTEM - Send the campaign when a system event occurs. See the System resource for more information. ENDPOINT - Send the campaign when an endpoint event occurs. See the Event resource for more information.

            • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE HOURLY DAILY WEEKLY MONTHLY EVENT

            • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.

            • QuietTime (dict) -- The default quiet time for the campaign. The campaign doesn't send messages to endpoints during the quiet time. Note: Make sure that your endpoints include the Demographics.Timezone attribute if you plan to enable a quiet time for your campaign. If your endpoints don't include this attribute, they'll receive the messages that you send them, even if quiet time is enabled. When you set up a campaign to use quiet time, the campaign doesn't send messages during the time range you specified, as long as all of the following are true: - The endpoint includes a valid Demographic.Timezone attribute. - The current time in the endpoint's time zone is later than or equal to the time specified in the QuietTime.Start attribute for the campaign. - The current time in the endpoint's time zone is earlier than or equal to the time specified in the QuietTime.End attribute for the campaign.

              • End (string) -- The time at which quiet time should end. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

              • Start (string) -- The time at which quiet time should begin. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

            • 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 each campaign can send to a single endpoint in a 24-hour period.

        • 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 number of messages that an individual campaign can send to a single endpoint over the course of the campaign.

      • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

          • 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) -- A URL that refers to the location of an image or video that you want to display in the push notification.

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

        • EventFilter (dict) -- Defines the type of events that can trigger the campaign. Used when the Frequency is set to EVENT.

          • Dimensions (dict) -- An object that defines the dimensions for the event filter.

            • Attributes (dict) -- Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

              • (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) --

            • EventType (dict) -- The name of the event that causes the campaign to be sent. This can be a standard event type that Amazon Pinpoint generates, such as _session.start, or a custom event that's specific to your app.

              • 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) --

            • Metrics (dict) -- Custom metrics that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter.

              • (string) --

                • (dict) -- Custom metric dimension

                  • ComparisonOperator (string) -- The operator that you're using to compare metric values. Possible values: GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, or EQUAL

                  • Value (float) -- The value to be compared.

          • FilterType (string) -- The type of event that causes the campaign to be sent. Possible values: SYSTEM - Send the campaign when a system event occurs. See the System resource for more information. ENDPOINT - Send the campaign when an endpoint event occurs. See the Event resource for more information.

        • Frequency (string) -- How often the campaign delivers messages. Valid values: ONCE HOURLY DAILY WEEKLY MONTHLY EVENT

        • IsLocalTime (boolean) -- Indicates whether the campaign schedule takes effect according to each user's local time.

        • QuietTime (dict) -- The default quiet time for the campaign. The campaign doesn't send messages to endpoints during the quiet time. Note: Make sure that your endpoints include the Demographics.Timezone attribute if you plan to enable a quiet time for your campaign. If your endpoints don't include this attribute, they'll receive the messages that you send them, even if quiet time is enabled. When you set up a campaign to use quiet time, the campaign doesn't send messages during the time range you specified, as long as all of the following are true: - The endpoint includes a valid Demographic.Timezone attribute. - The current time in the endpoint's time zone is later than or equal to the time specified in the QuietTime.Start attribute for the campaign. - The current time in the endpoint's time zone is earlier than or equal to the time specified in the QuietTime.End attribute for the campaign.

          • End (string) -- The time at which quiet time should end. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

          • Start (string) -- The time at which quiet time should begin. The value that you specify has to be in HH:mm format, where HH is the hour in 24-hour format (with a leading zero, if applicable), and mm is the minutes. For example, use 02:30 to represent 2:30 AM, or 14:30 to represent 2:30 PM.

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

UpdateEndpoint (updated) Link ¶
Changes (request)
{'EndpointRequest': {'ChannelType': ['VOICE']}}

Creates or updates an endpoint.

See also: AWS API Documentation

Request Syntax

client.update_endpoint(
    ApplicationId='string',
    EndpointId='string',
    EndpointRequest={
        'Address': 'string',
        'Attributes': {
            'string': [
                'string',
            ]
        },
        'ChannelType': 'GCM'|'APNS'|'APNS_SANDBOX'|'APNS_VOIP'|'APNS_VOIP_SANDBOX'|'ADM'|'SMS'|'VOICE'|'EMAIL'|'BAIDU'|'CUSTOM',
        'Demographic': {
            'AppVersion': 'string',
            'Locale': 'string',
            'Make': 'string',
            'Model': 'string',
            'ModelVersion': 'string',
            'Platform': 'string',
            'PlatformVersion': 'string',
            'Timezone': 'string'
        },
        'EffectiveDate': 'string',
        'EndpointStatus': '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'
        }
    }
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

type EndpointId

string

param EndpointId

[REQUIRED] The unique ID of the endpoint.

type EndpointRequest

dict

param EndpointRequest

[REQUIRED] An endpoint update request.

  • Address (string) -- The destination for messages that you send to this endpoint. The address varies by channel. For mobile push channels, use the token provided by the push notification service, such as the APNs device token or the FCM registration token. For the SMS channel, use a phone number in E.164 format, such as +12065550100. For the email channel, use an email address.

  • 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 values ["science", "politics", "travel"]. You can use these attributes as selection criteria when you create a segment of users to engage with a messaging campaign. The following characters are not recommended in attribute names: # : ? /. The Amazon Pinpoint console does not display attributes that include these characters in the name. This limitation does not apply to attribute values.

    • (string) --

      • (list) --

        • (string) --

  • ChannelType (string) -- The channel type. Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX | ADM | SMS | EMAIL | BAIDU

  • Demographic (dict) -- Demographic attributes for the endpoint.

    • 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 updated, shown in ISO 8601 format.

  • EndpointStatus (string) -- Unused.

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

rtype

dict

returns

Response Syntax

{
    'MessageBody': {
        'Message': 'string',
        'RequestID': 'string'
    }
}

Response Structure

  • (dict) -- 202 response

    • MessageBody (dict) -- Simple message object.

      • Message (string) -- The error message that's returned from the API.

      • RequestID (string) -- The unique message body ID.

UpdateEndpointsBatch (updated) Link ¶
Changes (request)
{'EndpointBatchRequest': {'Item': {'ChannelType': ['VOICE']}}}

Use to update a batch of endpoints.

See also: AWS API Documentation

Request Syntax

client.update_endpoints_batch(
    ApplicationId='string',
    EndpointBatchRequest={
        'Item': [
            {
                'Address': 'string',
                'Attributes': {
                    'string': [
                        'string',
                    ]
                },
                'ChannelType': 'GCM'|'APNS'|'APNS_SANDBOX'|'APNS_VOIP'|'APNS_VOIP_SANDBOX'|'ADM'|'SMS'|'VOICE'|'EMAIL'|'BAIDU'|'CUSTOM',
                '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'
                }
            },
        ]
    }
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

type EndpointBatchRequest

dict

param EndpointBatchRequest

[REQUIRED] Endpoint batch update request.

  • Item (list) -- List of items to update. Maximum 100 items

    • (dict) -- Endpoint update request

      • Address (string) -- The destination for messages that you send to this endpoint. The address varies by channel. For mobile push channels, use the token provided by the push notification service, such as the APNs device token or the FCM registration token. For the SMS channel, use a phone number in E.164 format, such as +12065550100. For the email channel, use an email address.

      • 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 values ["science", "politics", "travel"]. You can use these attributes as selection criteria when you create a segment of users to engage with a messaging campaign. The following characters are not recommended in attribute names: # : ? /. The Amazon Pinpoint console does not display attributes that include these characters in the name. This limitation does not apply to attribute values.

        • (string) --

          • (list) --

            • (string) --

      • ChannelType (string) -- The channel type. Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX | ADM | SMS | EMAIL | BAIDU

      • 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 last time the endpoint was updated. Provided in ISO 8601 format.

      • EndpointStatus (string) -- Unused.

      • Id (string) -- The unique Id for the Endpoint in the batch.

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

rtype

dict

returns

Response Syntax

{
    'MessageBody': {
        'Message': 'string',
        'RequestID': 'string'
    }
}

Response Structure

  • (dict) -- 202 response

    • MessageBody (dict) -- Simple message object.

      • Message (string) -- The error message that's returned from the API.

      • RequestID (string) -- The unique message body ID.