Class: AWS.Pinpoint

Inherits:
AWS.Service show all
Identifier:
pinpoint
API Version:
2016-12-01
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Sending a Request Using Pinpoint

var pinpoint = new AWS.Pinpoint();
pinpoint.createApp(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the Pinpoint object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var pinpoint = new AWS.Pinpoint({apiVersion: '2016-12-01'});

You can also set the API version globally in AWS.config.apiVersions using the pinpoint service identifier:

AWS.config.apiVersions = {
  pinpoint: '2016-12-01',
  // other service API versions
};

var pinpoint = new AWS.Pinpoint();

Version:

  • 2016-12-01

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.Pinpoint(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a Pinpoint object

var pinpoint = new AWS.Pinpoint({apiVersion: '2016-12-01'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com'.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.Pinpoint.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.Pinpoint.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.Pinpoint.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and returns the amount of time to delay in milliseconds. The base option will be ignored if this option is supplied.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

createApp(params = {}, callback) ⇒ AWS.Request

Used to create an app.

Examples:

Calling the createApp operation

var params = {
  CreateApplicationRequest: { /* required */
    Name: 'STRING_VALUE'
  }
};
pinpoint.createApp(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CreateApplicationRequest — (map) Application Request.
      • Name — (String) The display name of the application. Used in the Amazon Pinpoint console.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApplicationResponse — (map) Application Response.
        • Id — (String) The unique application ID.
        • Name — (String) The display name of the application.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createCampaign(params = {}, callback) ⇒ AWS.Request

Creates or updates a campaign.

Examples:

Calling the createCampaign operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  WriteCampaignRequest: { /* required */
    AdditionalTreatments: [
      {
        MessageConfiguration: {
          APNSMessage: {
            Action: OPEN_APP | DEEP_LINK | URL,
            Body: 'STRING_VALUE',
            ImageIconUrl: 'STRING_VALUE',
            ImageSmallIconUrl: 'STRING_VALUE',
            ImageUrl: 'STRING_VALUE',
            JsonBody: 'STRING_VALUE',
            MediaUrl: 'STRING_VALUE',
            RawContent: 'STRING_VALUE',
            SilentPush: true || false,
            Title: 'STRING_VALUE',
            Url: 'STRING_VALUE'
          },
          DefaultMessage: {
            Action: OPEN_APP | DEEP_LINK | URL,
            Body: 'STRING_VALUE',
            ImageIconUrl: 'STRING_VALUE',
            ImageSmallIconUrl: 'STRING_VALUE',
            ImageUrl: 'STRING_VALUE',
            JsonBody: 'STRING_VALUE',
            MediaUrl: 'STRING_VALUE',
            RawContent: 'STRING_VALUE',
            SilentPush: true || false,
            Title: 'STRING_VALUE',
            Url: 'STRING_VALUE'
          },
          EmailMessage: {
            Body: 'STRING_VALUE',
            FromAddress: 'STRING_VALUE',
            HtmlBody: 'STRING_VALUE',
            Title: 'STRING_VALUE'
          },
          GCMMessage: {
            Action: OPEN_APP | DEEP_LINK | URL,
            Body: 'STRING_VALUE',
            ImageIconUrl: 'STRING_VALUE',
            ImageSmallIconUrl: 'STRING_VALUE',
            ImageUrl: 'STRING_VALUE',
            JsonBody: 'STRING_VALUE',
            MediaUrl: 'STRING_VALUE',
            RawContent: 'STRING_VALUE',
            SilentPush: true || false,
            Title: 'STRING_VALUE',
            Url: 'STRING_VALUE'
          },
          SMSMessage: {
            Body: 'STRING_VALUE',
            MessageType: TRANSACTIONAL | PROMOTIONAL,
            SenderId: 'STRING_VALUE'
          }
        },
        Schedule: {
          EndTime: 'STRING_VALUE',
          Frequency: ONCE | HOURLY | DAILY | WEEKLY | MONTHLY,
          IsLocalTime: true || false,
          QuietTime: {
            End: 'STRING_VALUE',
            Start: 'STRING_VALUE'
          },
          StartTime: 'STRING_VALUE',
          Timezone: 'STRING_VALUE'
        },
        SizePercent: 0,
        TreatmentDescription: 'STRING_VALUE',
        TreatmentName: 'STRING_VALUE'
      },
      /* more items */
    ],
    Description: 'STRING_VALUE',
    HoldoutPercent: 0,
    IsPaused: true || false,
    Limits: {
      Daily: 0,
      Total: 0
    },
    MessageConfiguration: {
      APNSMessage: {
        Action: OPEN_APP | DEEP_LINK | URL,
        Body: 'STRING_VALUE',
        ImageIconUrl: 'STRING_VALUE',
        ImageSmallIconUrl: 'STRING_VALUE',
        ImageUrl: 'STRING_VALUE',
        JsonBody: 'STRING_VALUE',
        MediaUrl: 'STRING_VALUE',
        RawContent: 'STRING_VALUE',
        SilentPush: true || false,
        Title: 'STRING_VALUE',
        Url: 'STRING_VALUE'
      },
      DefaultMessage: {
        Action: OPEN_APP | DEEP_LINK | URL,
        Body: 'STRING_VALUE',
        ImageIconUrl: 'STRING_VALUE',
        ImageSmallIconUrl: 'STRING_VALUE',
        ImageUrl: 'STRING_VALUE',
        JsonBody: 'STRING_VALUE',
        MediaUrl: 'STRING_VALUE',
        RawContent: 'STRING_VALUE',
        SilentPush: true || false,
        Title: 'STRING_VALUE',
        Url: 'STRING_VALUE'
      },
      EmailMessage: {
        Body: 'STRING_VALUE',
        FromAddress: 'STRING_VALUE',
        HtmlBody: 'STRING_VALUE',
        Title: 'STRING_VALUE'
      },
      GCMMessage: {
        Action: OPEN_APP | DEEP_LINK | URL,
        Body: 'STRING_VALUE',
        ImageIconUrl: 'STRING_VALUE',
        ImageSmallIconUrl: 'STRING_VALUE',
        ImageUrl: 'STRING_VALUE',
        JsonBody: 'STRING_VALUE',
        MediaUrl: 'STRING_VALUE',
        RawContent: 'STRING_VALUE',
        SilentPush: true || false,
        Title: 'STRING_VALUE',
        Url: 'STRING_VALUE'
      },
      SMSMessage: {
        Body: 'STRING_VALUE',
        MessageType: TRANSACTIONAL | PROMOTIONAL,
        SenderId: 'STRING_VALUE'
      }
    },
    Name: 'STRING_VALUE',
    Schedule: {
      EndTime: 'STRING_VALUE',
      Frequency: ONCE | HOURLY | DAILY | WEEKLY | MONTHLY,
      IsLocalTime: true || false,
      QuietTime: {
        End: 'STRING_VALUE',
        Start: 'STRING_VALUE'
      },
      StartTime: 'STRING_VALUE',
      Timezone: 'STRING_VALUE'
    },
    SegmentId: 'STRING_VALUE',
    SegmentVersion: 0,
    TreatmentDescription: 'STRING_VALUE',
    TreatmentName: 'STRING_VALUE'
  }
};
pinpoint.createCampaign(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • WriteCampaignRequest — (map) Used to create a campaign.
      • AdditionalTreatments — (Array<map>) Treatments that are defined in addition to the default treatment.
        • MessageConfiguration — (map) The message configuration settings.
          • APNSMessage — (map) 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. Possible values include:
              • "OPEN_APP"
              • "DEEP_LINK"
              • "URL"
            • Body — (String) The message body. Can include up to 140 characters.
            • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl — (String) The URL that points to an image used in the push notification.
            • JsonBody — (String) The JSON payload used for a silent push.
            • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • 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 — (map) 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. Possible values include:
              • "OPEN_APP"
              • "DEEP_LINK"
              • "URL"
            • Body — (String) The message body. Can include up to 140 characters.
            • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl — (String) The URL that points to an image used in the push notification.
            • JsonBody — (String) The JSON payload used for a silent push.
            • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • 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 — (map) 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 — (map) 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. Possible values include:
              • "OPEN_APP"
              • "DEEP_LINK"
              • "URL"
            • Body — (String) The message body. Can include up to 140 characters.
            • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl — (String) The URL that points to an image used in the push notification.
            • JsonBody — (String) The JSON payload used for a silent push.
            • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • 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 — (map) The SMS message configuration.
            • Body — (String) The SMS text body.
            • MessageType — (String) Is this is a transactional SMS message, otherwise a promotional message. Possible values include:
              • "TRANSACTIONAL"
              • "PROMOTIONAL"
            • SenderId — (String) Sender ID of sent message.
        • Schedule — (map) The campaign schedule.
          • EndTime — (String) The scheduled time that the campaign ends in ISO 8601 format.
          • Frequency — (String) How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY Possible values include:
            • "ONCE"
            • "HOURLY"
            • "DAILY"
            • "WEEKLY"
            • "MONTHLY"
          • IsLocalTime — (Boolean) Indicates whether the campaign schedule takes effect according to each user's local time.
          • QuietTime — (map) The time during which the campaign sends no messages.
            • End — (String) The default end time for quiet time in ISO 8601 format.
            • Start — (String) The default start time for quiet time in ISO 8601 format.
          • StartTime — (String) The scheduled time that the campaign begins in ISO 8601 format.
          • Timezone — (String) The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
        • SizePercent — (Integer) The allocated percentage of users for this treatment.
        • TreatmentDescription — (String) A custom description for the treatment.
        • TreatmentName — (String) The custom name of a variation of the campaign used for A/B testing.
      • Description — (String) A description of the campaign.
      • HoldoutPercent — (Integer) The allocated percentage of end users who will not receive messages from this campaign.
      • 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 — (map) The campaign limits settings.
        • Daily — (Integer) The maximum number of messages that the campaign can send daily.
        • Total — (Integer) The maximum total number of messages that the campaign can send.
      • MessageConfiguration — (map) The message configuration settings.
        • APNSMessage — (map) 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. Possible values include:
            • "OPEN_APP"
            • "DEEP_LINK"
            • "URL"
          • Body — (String) The message body. Can include up to 140 characters.
          • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl — (String) The URL that points to an image used in the push notification.
          • JsonBody — (String) The JSON payload used for a silent push.
          • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • 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 — (map) 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. Possible values include:
            • "OPEN_APP"
            • "DEEP_LINK"
            • "URL"
          • Body — (String) The message body. Can include up to 140 characters.
          • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl — (String) The URL that points to an image used in the push notification.
          • JsonBody — (String) The JSON payload used for a silent push.
          • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • 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 — (map) 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 — (map) 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. Possible values include:
            • "OPEN_APP"
            • "DEEP_LINK"
            • "URL"
          • Body — (String) The message body. Can include up to 140 characters.
          • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl — (String) The URL that points to an image used in the push notification.
          • JsonBody — (String) The JSON payload used for a silent push.
          • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • 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 — (map) The SMS message configuration.
          • Body — (String) The SMS text body.
          • MessageType — (String) Is this is a transactional SMS message, otherwise a promotional message. Possible values include:
            • "TRANSACTIONAL"
            • "PROMOTIONAL"
          • SenderId — (String) Sender ID of sent message.
      • Name — (String) The custom name of the campaign.
      • Schedule — (map) The campaign schedule.
        • EndTime — (String) The scheduled time that the campaign ends in ISO 8601 format.
        • Frequency — (String) How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY Possible values include:
          • "ONCE"
          • "HOURLY"
          • "DAILY"
          • "WEEKLY"
          • "MONTHLY"
        • IsLocalTime — (Boolean) Indicates whether the campaign schedule takes effect according to each user's local time.
        • QuietTime — (map) The time during which the campaign sends no messages.
          • End — (String) The default end time for quiet time in ISO 8601 format.
          • Start — (String) The default start time for quiet time in ISO 8601 format.
        • StartTime — (String) The scheduled time that the campaign begins in ISO 8601 format.
        • Timezone — (String) The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
      • SegmentId — (String) The ID of the segment to which the campaign sends messages.
      • SegmentVersion — (Integer) The version of the segment to which the campaign sends messages.
      • TreatmentDescription — (String) A custom description for the treatment.
      • TreatmentName — (String) The custom name of a variation of the campaign used for A/B testing.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CampaignResponse — (map) Campaign definition
        • AdditionalTreatments — (Array<map>) Treatments that are defined in addition to the default treatment.
          • Id — (String) The unique treatment ID.
          • MessageConfiguration — (map) The message configuration settings.
            • APNSMessage — (map) 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. Possible values include:
                • "OPEN_APP"
                • "DEEP_LINK"
                • "URL"
              • Body — (String) The message body. Can include up to 140 characters.
              • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl — (String) The URL that points to an image used in the push notification.
              • JsonBody — (String) The JSON payload used for a silent push.
              • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • 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 — (map) 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. Possible values include:
                • "OPEN_APP"
                • "DEEP_LINK"
                • "URL"
              • Body — (String) The message body. Can include up to 140 characters.
              • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl — (String) The URL that points to an image used in the push notification.
              • JsonBody — (String) The JSON payload used for a silent push.
              • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • 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 — (map) 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 — (map) 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. Possible values include:
                • "OPEN_APP"
                • "DEEP_LINK"
                • "URL"
              • Body — (String) The message body. Can include up to 140 characters.
              • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl — (String) The URL that points to an image used in the push notification.
              • JsonBody — (String) The JSON payload used for a silent push.
              • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • 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 — (map) The SMS message configuration.
              • Body — (String) The SMS text body.
              • MessageType — (String) Is this is a transactional SMS message, otherwise a promotional message. Possible values include:
                • "TRANSACTIONAL"
                • "PROMOTIONAL"
              • SenderId — (String) Sender ID of sent message.
          • Schedule — (map) The campaign schedule.
            • EndTime — (String) The scheduled time that the campaign ends in ISO 8601 format.
            • Frequency — (String) How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY Possible values include:
              • "ONCE"
              • "HOURLY"
              • "DAILY"
              • "WEEKLY"
              • "MONTHLY"
            • IsLocalTime — (Boolean) Indicates whether the campaign schedule takes effect according to each user's local time.
            • QuietTime — (map) The time during which the campaign sends no messages.
              • End — (String) The default end time for quiet time in ISO 8601 format.
              • Start — (String) The default start time for quiet time in ISO 8601 format.
            • StartTime — (String) The scheduled time that the campaign begins in ISO 8601 format.
            • Timezone — (String) The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
          • SizePercent — (Integer) The allocated percentage of users for this treatment.
          • State — (map) 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 Possible values include:
              • "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 — (map) 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 Possible values include:
            • "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.
        • 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 — (map) The campaign limits settings.
          • Daily — (Integer) The maximum number of messages that the campaign can send daily.
          • Total — (Integer) The maximum total number of messages that the campaign can send.
        • MessageConfiguration — (map) The message configuration settings.
          • APNSMessage — (map) 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. Possible values include:
              • "OPEN_APP"
              • "DEEP_LINK"
              • "URL"
            • Body — (String) The message body. Can include up to 140 characters.
            • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl — (String) The URL that points to an image used in the push notification.
            • JsonBody — (String) The JSON payload used for a silent push.
            • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • 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 — (map) 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. Possible values include:
              • "OPEN_APP"
              • "DEEP_LINK"
              • "URL"
            • Body — (String) The message body. Can include up to 140 characters.
            • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl — (String) The URL that points to an image used in the push notification.
            • JsonBody — (String) The JSON payload used for a silent push.
            • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • 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 — (map) 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 — (map) 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. Possible values include:
              • "OPEN_APP"
              • "DEEP_LINK"
              • "URL"
            • Body — (String) The message body. Can include up to 140 characters.
            • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl — (String) The URL that points to an image used in the push notification.
            • JsonBody — (String) The JSON payload used for a silent push.
            • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • 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 — (map) The SMS message configuration.
            • Body — (String) The SMS text body.
            • MessageType — (String) Is this is a transactional SMS message, otherwise a promotional message. Possible values include:
              • "TRANSACTIONAL"
              • "PROMOTIONAL"
            • SenderId — (String) Sender ID of sent message.
        • Name — (String) The custom name of the campaign.
        • Schedule — (map) The campaign schedule.
          • EndTime — (String) The scheduled time that the campaign ends in ISO 8601 format.
          • Frequency — (String) How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY Possible values include:
            • "ONCE"
            • "HOURLY"
            • "DAILY"
            • "WEEKLY"
            • "MONTHLY"
          • IsLocalTime — (Boolean) Indicates whether the campaign schedule takes effect according to each user's local time.
          • QuietTime — (map) The time during which the campaign sends no messages.
            • End — (String) The default end time for quiet time in ISO 8601 format.
            • Start — (String) The default start time for quiet time in ISO 8601 format.
          • StartTime — (String) The scheduled time that the campaign begins in ISO 8601 format.
          • Timezone — (String) The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
        • SegmentId — (String) The ID of the segment to which the campaign sends messages.
        • SegmentVersion — (Integer) The version of the segment to which the campaign sends messages.
        • State — (map) 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 Possible values include:
            • "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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createImportJob(params = {}, callback) ⇒ AWS.Request

Creates or updates an import job.

Examples:

Calling the createImportJob operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  ImportJobRequest: { /* required */
    DefineSegment: true || false,
    ExternalId: 'STRING_VALUE',
    Format: CSV | JSON,
    RegisterEndpoints: true || false,
    RoleArn: 'STRING_VALUE',
    S3Url: 'STRING_VALUE',
    SegmentId: 'STRING_VALUE',
    SegmentName: 'STRING_VALUE'
  }
};
pinpoint.createImportJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • ImportJobRequest — (map)
      • DefineSegment — (Boolean) Sets whether the endpoints create a segment when they are imported.
      • ExternalId — (String) A unique, custom ID assigned to the IAM role that restricts who can assume the role.
      • Format — (String) The format of the files that contain the endpoint definitions. Valid values: CSV, JSON Possible values include:
        • "CSV"
        • "JSON"
      • RegisterEndpoints — (Boolean) Sets whether the endpoints are registered with Amazon Pinpoint when they are imported.
      • RoleArn — (String) The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the Amazon S3 location that contains the endpoints to import.
      • S3Url — (String) A URL that points to the location within an Amazon S3 bucket that contains the endpoints to import. The location can be a folder or a single file. The URL should follow this format: s3://bucket-name/folder-name/file-name Amazon Pinpoint will import endpoints from this location and any subfolders it contains.
      • SegmentId — (String) The ID of the segment to update if the import job is meant to update an existing segment.
      • SegmentName — (String) A custom name for the segment created by the import job. Use if DefineSegment is true.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ImportJobResponse — (map)
        • ApplicationId — (String) The unique ID of the application to which the import job applies.
        • CompletedPieces — (Integer) The number of pieces that have successfully imported as of the time of the request.
        • CompletionDate — (String) The date the import job completed in ISO 8601 format.
        • CreationDate — (String) The date the import job was created in ISO 8601 format.
        • Definition — (map) The import job settings.
          • DefineSegment — (Boolean) Sets whether the endpoints create a segment when they are imported.
          • ExternalId — (String) A unique, custom ID assigned to the IAM role that restricts who can assume the role.
          • Format — (String) The format of the files that contain the endpoint definitions. Valid values: CSV, JSON Possible values include:
            • "CSV"
            • "JSON"
          • RegisterEndpoints — (Boolean) Sets whether the endpoints are registered with Amazon Pinpoint when they are imported.
          • RoleArn — (String) The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the Amazon S3 location that contains the endpoints to import.
          • S3Url — (String) A URL that points to the location within an Amazon S3 bucket that contains the endpoints to import. The location can be a folder or a single file. The URL should follow this format: s3://bucket-name/folder-name/file-name Amazon Pinpoint will import endpoints from this location and any subfolders it contains.
          • SegmentId — (String) The ID of the segment to update if the import job is meant to update an existing segment.
          • SegmentName — (String) A custom name for the segment created by the import job. Use if DefineSegment is true.
        • FailedPieces — (Integer) The number of pieces that have failed to import as of the time of the request.
        • Failures — (Array<String>) Provides up to 100 of the first failed entries for the job, if any exist.
        • Id — (String) The unique ID of the import job.
        • JobStatus — (String) The status of the import job. Valid values: CREATED, INITIALIZING, PROCESSING, COMPLETING, COMPLETED, FAILING, FAILED The job status is FAILED if one or more pieces failed to import. Possible values include:
          • "CREATED"
          • "INITIALIZING"
          • "PROCESSING"
          • "COMPLETING"
          • "COMPLETED"
          • "FAILING"
          • "FAILED"
        • TotalFailures — (Integer) The number of endpoints that failed to import; for example, because of syntax errors.
        • TotalPieces — (Integer) The total number of pieces that must be imported to finish the job. Each piece is an approximately equal portion of the endpoints to import.
        • TotalProcessed — (Integer) The number of endpoints that were processed by the import job.
        • Type — (String) The job type. Will be Import.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createSegment(params = {}, callback) ⇒ AWS.Request

Used to create or update a segment.

Examples:

Calling the createSegment operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  WriteSegmentRequest: { /* required */
    Dimensions: {
      Attributes: {
        '<__string>': {
          AttributeType: INCLUSIVE | EXCLUSIVE,
          Values: [
            'STRING_VALUE',
            /* more items */
          ]
        },
        /* '<__string>': ... */
      },
      Behavior: {
        Recency: {
          Duration: HR_24 | DAY_7 | DAY_14 | DAY_30,
          RecencyType: ACTIVE | INACTIVE
        }
      },
      Demographic: {
        AppVersion: {
          DimensionType: INCLUSIVE | EXCLUSIVE,
          Values: [
            'STRING_VALUE',
            /* more items */
          ]
        },
        Channel: {
          DimensionType: INCLUSIVE | EXCLUSIVE,
          Values: [
            'STRING_VALUE',
            /* more items */
          ]
        },
        DeviceType: {
          DimensionType: INCLUSIVE | EXCLUSIVE,
          Values: [
            'STRING_VALUE',
            /* more items */
          ]
        },
        Make: {
          DimensionType: INCLUSIVE | EXCLUSIVE,
          Values: [
            'STRING_VALUE',
            /* more items */
          ]
        },
        Model: {
          DimensionType: INCLUSIVE | EXCLUSIVE,
          Values: [
            'STRING_VALUE',
            /* more items */
          ]
        },
        Platform: {
          DimensionType: INCLUSIVE | EXCLUSIVE,
          Values: [
            'STRING_VALUE',
            /* more items */
          ]
        }
      },
      Location: {
        Country: {
          DimensionType: INCLUSIVE | EXCLUSIVE,
          Values: [
            'STRING_VALUE',
            /* more items */
          ]
        }
      },
      UserAttributes: {
        '<__string>': {
          AttributeType: INCLUSIVE | EXCLUSIVE,
          Values: [
            'STRING_VALUE',
            /* more items */
          ]
        },
        /* '<__string>': ... */
      }
    },
    Name: 'STRING_VALUE'
  }
};
pinpoint.createSegment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • WriteSegmentRequest — (map) Segment definition.
      • Dimensions — (map) The segment dimensions attributes.
        • Attributes — (map<map>) Custom segment attributes.
          • 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. Possible values include:
            • "INCLUSIVE"
            • "EXCLUSIVE"
          • Values — (Array<String>) 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.
        • Behavior — (map) The segment behaviors attributes.
          • Recency — (map) The recency of use.
            • Duration — (String) The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30 Possible values include:
              • "HR_24"
              • "DAY_7"
              • "DAY_14"
              • "DAY_30"
            • RecencyType — (String) The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment. Possible values include:
              • "ACTIVE"
              • "INACTIVE"
        • Demographic — (map) The segment demographics attributes.
          • AppVersion — (map) The app version criteria for the segment.
            • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
          • Channel — (map) The channel criteria for the segment.
            • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
          • DeviceType — (map) The device type criteria for the segment.
            • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
          • Make — (map) The device make criteria for the segment.
            • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
          • Model — (map) The device model criteria for the segment.
            • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
          • Platform — (map) The device platform criteria for the segment.
            • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
        • Location — (map) The segment location attributes.
          • Country — (map) The country filter according to ISO 3166-1 Alpha-2 codes.
            • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
        • UserAttributes — (map<map>) Custom segment user attributes.
          • 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. Possible values include:
            • "INCLUSIVE"
            • "EXCLUSIVE"
          • Values — (Array<String>) 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.
      • Name — (String) The name of segment

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • SegmentResponse — (map) Segment definition.
        • ApplicationId — (String) The ID of the application to which the segment applies.
        • CreationDate — (String) The date the segment was created in ISO 8601 format.
        • Dimensions — (map) The segment dimensions attributes.
          • Attributes — (map<map>) Custom segment attributes.
            • 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. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
          • Behavior — (map) The segment behaviors attributes.
            • Recency — (map) The recency of use.
              • Duration — (String) The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30 Possible values include:
                • "HR_24"
                • "DAY_7"
                • "DAY_14"
                • "DAY_30"
              • RecencyType — (String) The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment. Possible values include:
                • "ACTIVE"
                • "INACTIVE"
          • Demographic — (map) The segment demographics attributes.
            • AppVersion — (map) The app version criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • Channel — (map) The channel criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • DeviceType — (map) The device type criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • Make — (map) The device make criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • Model — (map) The device model criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • Platform — (map) The device platform criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
          • Location — (map) The segment location attributes.
            • Country — (map) The country filter according to ISO 3166-1 Alpha-2 codes.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
          • UserAttributes — (map<map>) Custom segment user attributes.
            • 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. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
        • Id — (String) The unique segment ID.
        • ImportDefinition — (map) The import job settings.
          • ChannelCounts — (map<Integer>) Channel type counts
          • ExternalId — (String) A unique, custom ID assigned to the IAM role that restricts who can assume the role.
          • Format — (String) The format of the endpoint files that were imported to create this segment. Valid values: CSV, JSON Possible values include:
            • "CSV"
            • "JSON"
          • RoleArn — (String) The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the endpoints in Amazon S3.
          • S3Url — (String) A URL that points to the Amazon S3 location from which the endpoints for this segment were imported.
          • Size — (Integer) The number of endpoints that were successfully imported to create this segment.
        • LastModifiedDate — (String) The date the segment was last updated in ISO 8601 format.
        • Name — (String) The name of segment
        • SegmentType — (String) The segment type: DIMENSIONAL - A dynamic segment built from selection criteria based on endpoint data reported by your app. You create this type of segment by using the segment builder in the Amazon Pinpoint console or by making a POST request to the segments resource. IMPORT - A static segment built from an imported set of endpoint definitions. You create this type of segment by importing a segment in the Amazon Pinpoint console or by making a POST request to the jobs/import resource. Possible values include:
          • "DIMENSIONAL"
          • "IMPORT"
        • Version — (Integer) The segment version number.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteApnsChannel(params = {}, callback) ⇒ AWS.Request

Deletes the APNs channel for an app.

Examples:

Calling the deleteApnsChannel operation

var params = {
  ApplicationId: 'STRING_VALUE' /* required */
};
pinpoint.deleteApnsChannel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • APNSChannelResponse — (map) Apple Distribution Push Notification Service channel definition.
        • ApplicationId — (String) The ID of the application to which the channel applies.
        • CreationDate — (String) When was this segment created
        • Enabled — (Boolean) If the channel is enabled for sending messages.
        • Id — (String) Channel ID. Not used. Present only for backwards compatibility.
        • IsArchived — (Boolean) Is this channel archived
        • LastModifiedBy — (String) Who last updated this entry
        • LastModifiedDate — (String) Last date this was updated
        • Platform — (String) The platform type. Will be APNS.
        • Version — (Integer) Version of channel

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteApnsSandboxChannel(params = {}, callback) ⇒ AWS.Request

Delete an APNS sandbox channel

Examples:

Calling the deleteApnsSandboxChannel operation

var params = {
  ApplicationId: 'STRING_VALUE' /* required */
};
pinpoint.deleteApnsSandboxChannel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • APNSSandboxChannelResponse — (map) Apple Development Push Notification Service channel definition.
        • ApplicationId — (String) Application id
        • CreationDate — (String) When was this segment created
        • Enabled — (Boolean) If the channel is enabled for sending messages.
        • Id — (String) Channel ID. Not used, only for backwards compatibility.
        • IsArchived — (Boolean) Is this channel archived
        • LastModifiedBy — (String) Who last updated this entry
        • LastModifiedDate — (String) Last date this was updated
        • Platform — (String) The platform type. Will be APNS_SANDBOX.
        • Version — (Integer) Version of channel

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteApp(params = {}, callback) ⇒ AWS.Request

Deletes an app.

Examples:

Calling the deleteApp operation

var params = {
  ApplicationId: 'STRING_VALUE' /* required */
};
pinpoint.deleteApp(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApplicationResponse — (map) Application Response.
        • Id — (String) The unique application ID.
        • Name — (String) The display name of the application.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteCampaign(params = {}, callback) ⇒ AWS.Request

Deletes a campaign.

Examples:

Calling the deleteCampaign operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  CampaignId: 'STRING_VALUE' /* required */
};
pinpoint.deleteCampaign(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • CampaignId — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CampaignResponse — (map) Campaign definition
        • AdditionalTreatments — (Array<map>) Treatments that are defined in addition to the default treatment.
          • Id — (String) The unique treatment ID.
          • MessageConfiguration — (map) The message configuration settings.
            • APNSMessage — (map) 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. Possible values include:
                • "OPEN_APP"
                • "DEEP_LINK"
                • "URL"
              • Body — (String) The message body. Can include up to 140 characters.
              • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl — (String) The URL that points to an image used in the push notification.
              • JsonBody — (String) The JSON payload used for a silent push.
              • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • 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 — (map) 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. Possible values include:
                • "OPEN_APP"
                • "DEEP_LINK"
                • "URL"
              • Body — (String) The message body. Can include up to 140 characters.
              • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl — (String) The URL that points to an image used in the push notification.
              • JsonBody — (String) The JSON payload used for a silent push.
              • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • 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 — (map) 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 — (map) 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. Possible values include:
                • "OPEN_APP"
                • "DEEP_LINK"
                • "URL"
              • Body — (String) The message body. Can include up to 140 characters.
              • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl — (String) The URL that points to an image used in the push notification.
              • JsonBody — (String) The JSON payload used for a silent push.
              • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • 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 — (map) The SMS message configuration.
              • Body — (String) The SMS text body.
              • MessageType — (String) Is this is a transactional SMS message, otherwise a promotional message. Possible values include:
                • "TRANSACTIONAL"
                • "PROMOTIONAL"
              • SenderId — (String) Sender ID of sent message.
          • Schedule — (map) The campaign schedule.
            • EndTime — (String) The scheduled time that the campaign ends in ISO 8601 format.
            • Frequency — (String) How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY Possible values include:
              • "ONCE"
              • "HOURLY"
              • "DAILY"
              • "WEEKLY"
              • "MONTHLY"
            • IsLocalTime — (Boolean) Indicates whether the campaign schedule takes effect according to each user's local time.
            • QuietTime — (map) The time during which the campaign sends no messages.
              • End — (String) The default end time for quiet time in ISO 8601 format.
              • Start — (String) The default start time for quiet time in ISO 8601 format.
            • StartTime — (String) The scheduled time that the campaign begins in ISO 8601 format.
            • Timezone — (String) The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
          • SizePercent — (Integer) The allocated percentage of users for this treatment.
          • State — (map) 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 Possible values include:
              • "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 — (map) 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 Possible values include:
            • "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.
        • 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 — (map) The campaign limits settings.
          • Daily — (Integer) The maximum number of messages that the campaign can send daily.
          • Total — (Integer) The maximum total number of messages that the campaign can send.
        • MessageConfiguration — (map) The message configuration settings.
          • APNSMessage — (map) 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. Possible values include:
              • "OPEN_APP"
              • "DEEP_LINK"
              • "URL"
            • Body — (String) The message body. Can include up to 140 characters.
            • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl — (String) The URL that points to an image used in the push notification.
            • JsonBody — (String) The JSON payload used for a silent push.
            • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • 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 — (map) 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. Possible values include:
              • "OPEN_APP"
              • "DEEP_LINK"
              • "URL"
            • Body — (String) The message body. Can include up to 140 characters.
            • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl — (String) The URL that points to an image used in the push notification.
            • JsonBody — (String) The JSON payload used for a silent push.
            • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • 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 — (map) 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 — (map) 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. Possible values include:
              • "OPEN_APP"
              • "DEEP_LINK"
              • "URL"
            • Body — (String) The message body. Can include up to 140 characters.
            • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl — (String) The URL that points to an image used in the push notification.
            • JsonBody — (String) The JSON payload used for a silent push.
            • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • 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 — (map) The SMS message configuration.
            • Body — (String) The SMS text body.
            • MessageType — (String) Is this is a transactional SMS message, otherwise a promotional message. Possible values include:
              • "TRANSACTIONAL"
              • "PROMOTIONAL"
            • SenderId — (String) Sender ID of sent message.
        • Name — (String) The custom name of the campaign.
        • Schedule — (map) The campaign schedule.
          • EndTime — (String) The scheduled time that the campaign ends in ISO 8601 format.
          • Frequency — (String) How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY Possible values include:
            • "ONCE"
            • "HOURLY"
            • "DAILY"
            • "WEEKLY"
            • "MONTHLY"
          • IsLocalTime — (Boolean) Indicates whether the campaign schedule takes effect according to each user's local time.
          • QuietTime — (map) The time during which the campaign sends no messages.
            • End — (String) The default end time for quiet time in ISO 8601 format.
            • Start — (String) The default start time for quiet time in ISO 8601 format.
          • StartTime — (String) The scheduled time that the campaign begins in ISO 8601 format.
          • Timezone — (String) The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
        • SegmentId — (String) The ID of the segment to which the campaign sends messages.
        • SegmentVersion — (Integer) The version of the segment to which the campaign sends messages.
        • State — (map) 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 Possible values include:
            • "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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteEmailChannel(params = {}, callback) ⇒ AWS.Request

Delete an email channel

Examples:

Calling the deleteEmailChannel operation

var params = {
  ApplicationId: 'STRING_VALUE' /* required */
};
pinpoint.deleteEmailChannel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • EmailChannelResponse — (map) Email Channel Response.
        • ApplicationId — (String) The unique ID of the application to which the email channel belongs.
        • CreationDate — (String) The date that the settings were last updated in ISO 8601 format.
        • Enabled — (Boolean) If the channel is enabled for sending messages.
        • FromAddress — (String) The email address used to send emails from.
        • Id — (String) Channel ID. Not used, only for backwards compatibility.
        • Identity — (String) The ARN of an identity verified with SES.
        • IsArchived — (Boolean) Is this channel archived
        • LastModifiedBy — (String) Who last updated this entry
        • LastModifiedDate — (String) Last date this was updated
        • Platform — (String) Platform type. Will be "EMAIL"
        • RoleArn — (String) The ARN of an IAM Role used to submit events to Mobile Analytics' event ingestion service
        • Version — (Integer) Version of channel

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteEventStream(params = {}, callback) ⇒ AWS.Request

Deletes the event stream for an app.

Examples:

Calling the deleteEventStream operation

var params = {
  ApplicationId: 'STRING_VALUE' /* required */
};
pinpoint.deleteEventStream(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String) ApplicationId

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • EventStream — (map) Model for an event publishing subscription export.
        • ApplicationId — (String) The ID of the application from which events should be published.
        • DestinationStreamArn — (String) The Amazon Resource Name (ARN) of the Amazon Kinesis stream or Firehose delivery stream to which you want to publish events. Firehose ARN: arn:aws:firehose:REGION:ACCOUNT_ID:deliverystream/STREAM_NAME Kinesis ARN: arn:aws:kinesis:REGION:ACCOUNT_ID:stream/STREAM_NAME
        • ExternalId — (String) The external ID assigned the IAM role that authorizes Amazon Pinpoint to publish to the stream.
        • LastModifiedDate — (String) The date the event stream was last updated in ISO 8601 format.
        • LastUpdatedBy — (String) The IAM user who last modified the event stream.
        • RoleArn — (String) The IAM role that authorizes Amazon Pinpoint to publish events to the stream in your account.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteGcmChannel(params = {}, callback) ⇒ AWS.Request

Deletes the GCM channel for an app.

Examples:

Calling the deleteGcmChannel operation

var params = {
  ApplicationId: 'STRING_VALUE' /* required */
};
pinpoint.deleteGcmChannel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • GCMChannelResponse — (map) Google Cloud Messaging channel definition
        • ApplicationId — (String) The ID of the application to which the channel applies.
        • CreationDate — (String) When was this segment created
        • Credential — (String) The GCM API key from Google.
        • Enabled — (Boolean) If the channel is enabled for sending messages.
        • Id — (String) Channel ID. Not used. Present only for backwards compatibility.
        • IsArchived — (Boolean) Is this channel archived
        • LastModifiedBy — (String) Who last updated this entry
        • LastModifiedDate — (String) Last date this was updated
        • Platform — (String) The platform type. Will be GCM
        • Version — (Integer) Version of channel

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteSegment(params = {}, callback) ⇒ AWS.Request

Deletes a segment.

Examples:

Calling the deleteSegment operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  SegmentId: 'STRING_VALUE' /* required */
};
pinpoint.deleteSegment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • SegmentId — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • SegmentResponse — (map) Segment definition.
        • ApplicationId — (String) The ID of the application to which the segment applies.
        • CreationDate — (String) The date the segment was created in ISO 8601 format.
        • Dimensions — (map) The segment dimensions attributes.
          • Attributes — (map<map>) Custom segment attributes.
            • 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. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
          • Behavior — (map) The segment behaviors attributes.
            • Recency — (map) The recency of use.
              • Duration — (String) The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30 Possible values include:
                • "HR_24"
                • "DAY_7"
                • "DAY_14"
                • "DAY_30"
              • RecencyType — (String) The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment. Possible values include:
                • "ACTIVE"
                • "INACTIVE"
          • Demographic — (map) The segment demographics attributes.
            • AppVersion — (map) The app version criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • Channel — (map) The channel criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • DeviceType — (map) The device type criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • Make — (map) The device make criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • Model — (map) The device model criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • Platform — (map) The device platform criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
          • Location — (map) The segment location attributes.
            • Country — (map) The country filter according to ISO 3166-1 Alpha-2 codes.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
          • UserAttributes — (map<map>) Custom segment user attributes.
            • 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. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
        • Id — (String) The unique segment ID.
        • ImportDefinition — (map) The import job settings.
          • ChannelCounts — (map<Integer>) Channel type counts
          • ExternalId — (String) A unique, custom ID assigned to the IAM role that restricts who can assume the role.
          • Format — (String) The format of the endpoint files that were imported to create this segment. Valid values: CSV, JSON Possible values include:
            • "CSV"
            • "JSON"
          • RoleArn — (String) The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the endpoints in Amazon S3.
          • S3Url — (String) A URL that points to the Amazon S3 location from which the endpoints for this segment were imported.
          • Size — (Integer) The number of endpoints that were successfully imported to create this segment.
        • LastModifiedDate — (String) The date the segment was last updated in ISO 8601 format.
        • Name — (String) The name of segment
        • SegmentType — (String) The segment type: DIMENSIONAL - A dynamic segment built from selection criteria based on endpoint data reported by your app. You create this type of segment by using the segment builder in the Amazon Pinpoint console or by making a POST request to the segments resource. IMPORT - A static segment built from an imported set of endpoint definitions. You create this type of segment by importing a segment in the Amazon Pinpoint console or by making a POST request to the jobs/import resource. Possible values include:
          • "DIMENSIONAL"
          • "IMPORT"
        • Version — (Integer) The segment version number.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteSmsChannel(params = {}, callback) ⇒ AWS.Request

Delete an SMS channel

Examples:

Calling the deleteSmsChannel operation

var params = {
  ApplicationId: 'STRING_VALUE' /* required */
};
pinpoint.deleteSmsChannel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • SMSChannelResponse — (map) SMS Channel Response.
        • ApplicationId — (String) The unique ID of the application to which the SMS channel belongs.
        • CreationDate — (String) The date that the settings were last updated in ISO 8601 format.
        • Enabled — (Boolean) If the channel is enabled for sending messages.
        • Id — (String) Channel ID. Not used, only for backwards compatibility.
        • IsArchived — (Boolean) Is this channel archived
        • LastModifiedBy — (String) Who last updated this entry
        • LastModifiedDate — (String) Last date this was updated
        • Platform — (String) Platform type. Will be "SMS"
        • SenderId — (String) Sender identifier of your messages.
        • ShortCode — (String) The short code registered with the phone provider.
        • Version — (Integer) Version of channel

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getApnsChannel(params = {}, callback) ⇒ AWS.Request

Returns information about the APNs channel for an app.

Examples:

Calling the getApnsChannel operation

var params = {
  ApplicationId: 'STRING_VALUE' /* required */
};
pinpoint.getApnsChannel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • APNSChannelResponse — (map) Apple Distribution Push Notification Service channel definition.
        • ApplicationId — (String) The ID of the application to which the channel applies.
        • CreationDate — (String) When was this segment created
        • Enabled — (Boolean) If the channel is enabled for sending messages.
        • Id — (String) Channel ID. Not used. Present only for backwards compatibility.
        • IsArchived — (Boolean) Is this channel archived
        • LastModifiedBy — (String) Who last updated this entry
        • LastModifiedDate — (String) Last date this was updated
        • Platform — (String) The platform type. Will be APNS.
        • Version — (Integer) Version of channel

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getApnsSandboxChannel(params = {}, callback) ⇒ AWS.Request

Get an APNS sandbox channel

Examples:

Calling the getApnsSandboxChannel operation

var params = {
  ApplicationId: 'STRING_VALUE' /* required */
};
pinpoint.getApnsSandboxChannel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • APNSSandboxChannelResponse — (map) Apple Development Push Notification Service channel definition.
        • ApplicationId — (String) Application id
        • CreationDate — (String) When was this segment created
        • Enabled — (Boolean) If the channel is enabled for sending messages.
        • Id — (String) Channel ID. Not used, only for backwards compatibility.
        • IsArchived — (Boolean) Is this channel archived
        • LastModifiedBy — (String) Who last updated this entry
        • LastModifiedDate — (String) Last date this was updated
        • Platform — (String) The platform type. Will be APNS_SANDBOX.
        • Version — (Integer) Version of channel

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getApp(params = {}, callback) ⇒ AWS.Request

Returns information about an app.

Examples:

Calling the getApp operation

var params = {
  ApplicationId: 'STRING_VALUE' /* required */
};
pinpoint.getApp(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApplicationResponse — (map) Application Response.
        • Id — (String) The unique application ID.
        • Name — (String) The display name of the application.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getApplicationSettings(params = {}, callback) ⇒ AWS.Request

Used to request the settings for an app.

Examples:

Calling the getApplicationSettings operation

var params = {
  ApplicationId: 'STRING_VALUE' /* required */
};
pinpoint.getApplicationSettings(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApplicationSettingsResource — (map) Application settings.
        • ApplicationId — (String) The unique ID for the application.
        • LastModifiedDate — (String) The date that the settings were last updated in ISO 8601 format.
        • Limits — (map) The default campaign limits for the app. These limits apply to each campaign for the app, unless the campaign overrides the default with limits of its own.
          • Daily — (Integer) The maximum number of messages that the campaign can send daily.
          • Total — (Integer) The maximum total number of messages that the campaign can send.
        • QuietTime — (map) The default quiet time for the app. Each campaign for this app sends no messages during this time unless the campaign overrides the default with a quiet time of its own.
          • End — (String) The default end time for quiet time in ISO 8601 format.
          • Start — (String) The default start time for quiet time in ISO 8601 format.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getApps(params = {}, callback) ⇒ AWS.Request

Returns information about your apps.

Examples:

Calling the getApps operation

var params = {
  PageSize: 'STRING_VALUE',
  Token: 'STRING_VALUE'
};
pinpoint.getApps(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • PageSize — (String)
    • Token — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApplicationsResponse — (map) Get Applications Result.
        • Item — (Array<map>) List of applications returned in this page.
          • Id — (String) The unique application ID.
          • Name — (String) The display name of the application.
        • NextToken — (String) The string that you use in a subsequent request to get the next page of results in a paginated response.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getCampaign(params = {}, callback) ⇒ AWS.Request

Returns information about a campaign.

Examples:

Calling the getCampaign operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  CampaignId: 'STRING_VALUE' /* required */
};
pinpoint.getCampaign(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • CampaignId — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CampaignResponse — (map) Campaign definition
        • AdditionalTreatments — (Array<map>) Treatments that are defined in addition to the default treatment.
          • Id — (String) The unique treatment ID.
          • MessageConfiguration — (map) The message configuration settings.
            • APNSMessage — (map) 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. Possible values include:
                • "OPEN_APP"
                • "DEEP_LINK"
                • "URL"
              • Body — (String) The message body. Can include up to 140 characters.
              • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl — (String) The URL that points to an image used in the push notification.
              • JsonBody — (String) The JSON payload used for a silent push.
              • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • 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 — (map) 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. Possible values include:
                • "OPEN_APP"
                • "DEEP_LINK"
                • "URL"
              • Body — (String) The message body. Can include up to 140 characters.
              • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl — (String) The URL that points to an image used in the push notification.
              • JsonBody — (String) The JSON payload used for a silent push.
              • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • 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 — (map) 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 — (map) 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. Possible values include:
                • "OPEN_APP"
                • "DEEP_LINK"
                • "URL"
              • Body — (String) The message body. Can include up to 140 characters.
              • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl — (String) The URL that points to an image used in the push notification.
              • JsonBody — (String) The JSON payload used for a silent push.
              • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • 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 — (map) The SMS message configuration.
              • Body — (String) The SMS text body.
              • MessageType — (String) Is this is a transactional SMS message, otherwise a promotional message. Possible values include:
                • "TRANSACTIONAL"
                • "PROMOTIONAL"
              • SenderId — (String) Sender ID of sent message.
          • Schedule — (map) The campaign schedule.
            • EndTime — (String) The scheduled time that the campaign ends in ISO 8601 format.
            • Frequency — (String) How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY Possible values include:
              • "ONCE"
              • "HOURLY"
              • "DAILY"
              • "WEEKLY"
              • "MONTHLY"
            • IsLocalTime — (Boolean) Indicates whether the campaign schedule takes effect according to each user's local time.
            • QuietTime — (map) The time during which the campaign sends no messages.
              • End — (String) The default end time for quiet time in ISO 8601 format.
              • Start — (String) The default start time for quiet time in ISO 8601 format.
            • StartTime — (String) The scheduled time that the campaign begins in ISO 8601 format.
            • Timezone — (String) The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
          • SizePercent — (Integer) The allocated percentage of users for this treatment.
          • State — (map) 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 Possible values include:
              • "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 — (map) 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 Possible values include:
            • "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.
        • 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 — (map) The campaign limits settings.
          • Daily — (Integer) The maximum number of messages that the campaign can send daily.
          • Total — (Integer) The maximum total number of messages that the campaign can send.
        • MessageConfiguration — (map) The message configuration settings.
          • APNSMessage — (map) 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. Possible values include:
              • "OPEN_APP"
              • "DEEP_LINK"
              • "URL"
            • Body — (String) The message body. Can include up to 140 characters.
            • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl — (String) The URL that points to an image used in the push notification.
            • JsonBody — (String) The JSON payload used for a silent push.
            • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • 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 — (map) 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. Possible values include:
              • "OPEN_APP"
              • "DEEP_LINK"
              • "URL"
            • Body — (String) The message body. Can include up to 140 characters.
            • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl — (String) The URL that points to an image used in the push notification.
            • JsonBody — (String) The JSON payload used for a silent push.
            • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • 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 — (map) 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 — (map) 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. Possible values include:
              • "OPEN_APP"
              • "DEEP_LINK"
              • "URL"
            • Body — (String) The message body. Can include up to 140 characters.
            • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl — (String) The URL that points to an image used in the push notification.
            • JsonBody — (String) The JSON payload used for a silent push.
            • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • 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 — (map) The SMS message configuration.
            • Body — (String) The SMS text body.
            • MessageType — (String) Is this is a transactional SMS message, otherwise a promotional message. Possible values include:
              • "TRANSACTIONAL"
              • "PROMOTIONAL"
            • SenderId — (String) Sender ID of sent message.
        • Name — (String) The custom name of the campaign.
        • Schedule — (map) The campaign schedule.
          • EndTime — (String) The scheduled time that the campaign ends in ISO 8601 format.
          • Frequency — (String) How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY Possible values include:
            • "ONCE"
            • "HOURLY"
            • "DAILY"
            • "WEEKLY"
            • "MONTHLY"
          • IsLocalTime — (Boolean) Indicates whether the campaign schedule takes effect according to each user's local time.
          • QuietTime — (map) The time during which the campaign sends no messages.
            • End — (String) The default end time for quiet time in ISO 8601 format.
            • Start — (String) The default start time for quiet time in ISO 8601 format.
          • StartTime — (String) The scheduled time that the campaign begins in ISO 8601 format.
          • Timezone — (String) The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
        • SegmentId — (String) The ID of the segment to which the campaign sends messages.
        • SegmentVersion — (Integer) The version of the segment to which the campaign sends messages.
        • State — (map) 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 Possible values include:
            • "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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getCampaignActivities(params = {}, callback) ⇒ AWS.Request

Returns information about the activity performed by a campaign.

Examples:

Calling the getCampaignActivities operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  CampaignId: 'STRING_VALUE', /* required */
  PageSize: 'STRING_VALUE',
  Token: 'STRING_VALUE'
};
pinpoint.getCampaignActivities(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • CampaignId — (String)
    • PageSize — (String) The number of entries you want on each page in the response.
    • Token — (String) The NextToken string returned on a previous page that you use to get the next page of results in a paginated response.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ActivitiesResponse — (map) Activities for campaign.
        • Item — (Array<map>) List of campaign activities
          • ApplicationId — (String) The ID of the application to which the campaign applies.
          • CampaignId — (String) The ID of the campaign to which the activity applies.
          • End — (String) The actual time the activity was marked CANCELLED or COMPLETED. Provided in ISO 8601 format.
          • Id — (String) The unique activity ID.
          • Result — (String) Indicates whether the activity succeeded. Valid values: SUCCESS, FAIL
          • ScheduledStart — (String) The scheduled start time for the activity in ISO 8601 format.
          • Start — (String) The actual start time of the activity in ISO 8601 format.
          • State — (String) The state of the activity. Valid values: PENDING, INITIALIZING, RUNNING, PAUSED, CANCELLED, COMPLETED
          • SuccessfulEndpointCount — (Integer) The total number of endpoints to which the campaign successfully delivered messages.
          • TimezonesCompletedCount — (Integer) The total number of timezones completed.
          • TimezonesTotalCount — (Integer) The total number of unique timezones present in the segment.
          • TotalEndpointCount — (Integer) The total number of endpoints to which the campaign attempts to deliver messages.
          • TreatmentId — (String) The ID of a variation of the campaign used for A/B testing.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getCampaigns(params = {}, callback) ⇒ AWS.Request

Returns information about your campaigns.

Examples:

Calling the getCampaigns operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  PageSize: 'STRING_VALUE',
  Token: 'STRING_VALUE'
};
pinpoint.getCampaigns(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • PageSize — (String) The number of entries you want on each page in the response.
    • Token — (String) The NextToken string returned on a previous page that you use to get the next page of results in a paginated response.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CampaignsResponse — (map) List of available campaigns.
        • Item — (Array<map>) A list of campaigns.
          • AdditionalTreatments — (Array<map>) Treatments that are defined in addition to the default treatment.
            • Id — (String) The unique treatment ID.
            • MessageConfiguration — (map) The message configuration settings.
              • APNSMessage — (map) 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. Possible values include:
                  • "OPEN_APP"
                  • "DEEP_LINK"
                  • "URL"
                • Body — (String) The message body. Can include up to 140 characters.
                • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
                • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
                • ImageUrl — (String) The URL that points to an image used in the push notification.
                • JsonBody — (String) The JSON payload used for a silent push.
                • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
                • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
                • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
                • 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 — (map) 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. Possible values include:
                  • "OPEN_APP"
                  • "DEEP_LINK"
                  • "URL"
                • Body — (String) The message body. Can include up to 140 characters.
                • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
                • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
                • ImageUrl — (String) The URL that points to an image used in the push notification.
                • JsonBody — (String) The JSON payload used for a silent push.
                • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
                • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
                • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
                • 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 — (map) 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 — (map) 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. Possible values include:
                  • "OPEN_APP"
                  • "DEEP_LINK"
                  • "URL"
                • Body — (String) The message body. Can include up to 140 characters.
                • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
                • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
                • ImageUrl — (String) The URL that points to an image used in the push notification.
                • JsonBody — (String) The JSON payload used for a silent push.
                • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
                • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
                • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
                • 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 — (map) The SMS message configuration.
                • Body — (String) The SMS text body.
                • MessageType — (String) Is this is a transactional SMS message, otherwise a promotional message. Possible values include:
                  • "TRANSACTIONAL"
                  • "PROMOTIONAL"
                • SenderId — (String) Sender ID of sent message.
            • Schedule — (map) The campaign schedule.
              • EndTime — (String) The scheduled time that the campaign ends in ISO 8601 format.
              • Frequency — (String) How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY Possible values include:
                • "ONCE"
                • "HOURLY"
                • "DAILY"
                • "WEEKLY"
                • "MONTHLY"
              • IsLocalTime — (Boolean) Indicates whether the campaign schedule takes effect according to each user's local time.
              • QuietTime — (map) The time during which the campaign sends no messages.
                • End — (String) The default end time for quiet time in ISO 8601 format.
                • Start — (String) The default start time for quiet time in ISO 8601 format.
              • StartTime — (String) The scheduled time that the campaign begins in ISO 8601 format.
              • Timezone — (String) The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
            • SizePercent — (Integer) The allocated percentage of users for this treatment.
            • State — (map) 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 Possible values include:
                • "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 — (map) 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 Possible values include:
              • "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.
          • 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 — (map) The campaign limits settings.
            • Daily — (Integer) The maximum number of messages that the campaign can send daily.
            • Total — (Integer) The maximum total number of messages that the campaign can send.
          • MessageConfiguration — (map) The message configuration settings.
            • APNSMessage — (map) 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. Possible values include:
                • "OPEN_APP"
                • "DEEP_LINK"
                • "URL"
              • Body — (String) The message body. Can include up to 140 characters.
              • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl — (String) The URL that points to an image used in the push notification.
              • JsonBody — (String) The JSON payload used for a silent push.
              • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • 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 — (map) 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. Possible values include:
                • "OPEN_APP"
                • "DEEP_LINK"
                • "URL"
              • Body — (String) The message body. Can include up to 140 characters.
              • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl — (String) The URL that points to an image used in the push notification.
              • JsonBody — (String) The JSON payload used for a silent push.
              • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • 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 — (map) 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 — (map) 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. Possible values include:
                • "OPEN_APP"
                • "DEEP_LINK"
                • "URL"
              • Body — (String) The message body. Can include up to 140 characters.
              • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl — (String) The URL that points to an image used in the push notification.
              • JsonBody — (String) The JSON payload used for a silent push.
              • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • 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 — (map) The SMS message configuration.
              • Body — (String) The SMS text body.
              • MessageType — (String) Is this is a transactional SMS message, otherwise a promotional message. Possible values include:
                • "TRANSACTIONAL"
                • "PROMOTIONAL"
              • SenderId — (String) Sender ID of sent message.
          • Name — (String) The custom name of the campaign.
          • Schedule — (map) The campaign schedule.
            • EndTime — (String) The scheduled time that the campaign ends in ISO 8601 format.
            • Frequency — (String) How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY Possible values include:
              • "ONCE"
              • "HOURLY"
              • "DAILY"
              • "WEEKLY"
              • "MONTHLY"
            • IsLocalTime — (Boolean) Indicates whether the campaign schedule takes effect according to each user's local time.
            • QuietTime — (map) The time during which the campaign sends no messages.
              • End — (String) The default end time for quiet time in ISO 8601 format.
              • Start — (String) The default start time for quiet time in ISO 8601 format.
            • StartTime — (String) The scheduled time that the campaign begins in ISO 8601 format.
            • Timezone — (String) The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
          • SegmentId — (String) The ID of the segment to which the campaign sends messages.
          • SegmentVersion — (Integer) The version of the segment to which the campaign sends messages.
          • State — (map) 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 Possible values include:
              • "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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getCampaignVersion(params = {}, callback) ⇒ AWS.Request

Returns information about a specific version of a campaign.

Examples:

Calling the getCampaignVersion operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  CampaignId: 'STRING_VALUE', /* required */
  Version: 'STRING_VALUE' /* required */
};
pinpoint.getCampaignVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • CampaignId — (String)
    • Version — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CampaignResponse — (map) Campaign definition
        • AdditionalTreatments — (Array<map>) Treatments that are defined in addition to the default treatment.
          • Id — (String) The unique treatment ID.
          • MessageConfiguration — (map) The message configuration settings.
            • APNSMessage — (map) 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. Possible values include:
                • "OPEN_APP"
                • "DEEP_LINK"
                • "URL"
              • Body — (String) The message body. Can include up to 140 characters.
              • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl — (String) The URL that points to an image used in the push notification.
              • JsonBody — (String) The JSON payload used for a silent push.
              • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • 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 — (map) 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. Possible values include:
                • "OPEN_APP"
                • "DEEP_LINK"
                • "URL"
              • Body — (String) The message body. Can include up to 140 characters.
              • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl — (String) The URL that points to an image used in the push notification.
              • JsonBody — (String) The JSON payload used for a silent push.
              • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • 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 — (map) 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 — (map) 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. Possible values include:
                • "OPEN_APP"
                • "DEEP_LINK"
                • "URL"
              • Body — (String) The message body. Can include up to 140 characters.
              • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl — (String) The URL that points to an image used in the push notification.
              • JsonBody — (String) The JSON payload used for a silent push.
              • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • 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 — (map) The SMS message configuration.
              • Body — (String) The SMS text body.
              • MessageType — (String) Is this is a transactional SMS message, otherwise a promotional message. Possible values include:
                • "TRANSACTIONAL"
                • "PROMOTIONAL"
              • SenderId — (String) Sender ID of sent message.
          • Schedule — (map) The campaign schedule.
            • EndTime — (String) The scheduled time that the campaign ends in ISO 8601 format.
            • Frequency — (String) How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY Possible values include:
              • "ONCE"
              • "HOURLY"
              • "DAILY"
              • "WEEKLY"
              • "MONTHLY"
            • IsLocalTime — (Boolean) Indicates whether the campaign schedule takes effect according to each user's local time.
            • QuietTime — (map) The time during which the campaign sends no messages.
              • End — (String) The default end time for quiet time in ISO 8601 format.
              • Start — (String) The default start time for quiet time in ISO 8601 format.
            • StartTime — (String) The scheduled time that the campaign begins in ISO 8601 format.
            • Timezone — (String) The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
          • SizePercent — (Integer) The allocated percentage of users for this treatment.
          • State — (map) 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 Possible values include:
              • "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 — (map) 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 Possible values include:
            • "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.
        • 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 — (map) The campaign limits settings.
          • Daily — (Integer) The maximum number of messages that the campaign can send daily.
          • Total — (Integer) The maximum total number of messages that the campaign can send.
        • MessageConfiguration — (map) The message configuration settings.
          • APNSMessage — (map) 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. Possible values include:
              • "OPEN_APP"
              • "DEEP_LINK"
              • "URL"
            • Body — (String) The message body. Can include up to 140 characters.
            • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl — (String) The URL that points to an image used in the push notification.
            • JsonBody — (String) The JSON payload used for a silent push.
            • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • 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 — (map) 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. Possible values include:
              • "OPEN_APP"
              • "DEEP_LINK"
              • "URL"
            • Body — (String) The message body. Can include up to 140 characters.
            • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl — (String) The URL that points to an image used in the push notification.
            • JsonBody — (String) The JSON payload used for a silent push.
            • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • 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 — (map) 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 — (map) 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. Possible values include:
              • "OPEN_APP"
              • "DEEP_LINK"
              • "URL"
            • Body — (String) The message body. Can include up to 140 characters.
            • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl — (String) The URL that points to an image used in the push notification.
            • JsonBody — (String) The JSON payload used for a silent push.
            • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • 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 — (map) The SMS message configuration.
            • Body — (String) The SMS text body.
            • MessageType — (String) Is this is a transactional SMS message, otherwise a promotional message. Possible values include:
              • "TRANSACTIONAL"
              • "PROMOTIONAL"
            • SenderId — (String) Sender ID of sent message.
        • Name — (String) The custom name of the campaign.
        • Schedule — (map) The campaign schedule.
          • EndTime — (String) The scheduled time that the campaign ends in ISO 8601 format.
          • Frequency — (String) How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY Possible values include:
            • "ONCE"
            • "HOURLY"
            • "DAILY"
            • "WEEKLY"
            • "MONTHLY"
          • IsLocalTime — (Boolean) Indicates whether the campaign schedule takes effect according to each user's local time.
          • QuietTime — (map) The time during which the campaign sends no messages.
            • End — (String) The default end time for quiet time in ISO 8601 format.
            • Start — (String) The default start time for quiet time in ISO 8601 format.
          • StartTime — (String) The scheduled time that the campaign begins in ISO 8601 format.
          • Timezone — (String) The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
        • SegmentId — (String) The ID of the segment to which the campaign sends messages.
        • SegmentVersion — (Integer) The version of the segment to which the campaign sends messages.
        • State — (map) 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 Possible values include:
            • "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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getCampaignVersions(params = {}, callback) ⇒ AWS.Request

Returns information about your campaign versions.

Examples:

Calling the getCampaignVersions operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  CampaignId: 'STRING_VALUE', /* required */
  PageSize: 'STRING_VALUE',
  Token: 'STRING_VALUE'
};
pinpoint.getCampaignVersions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • CampaignId — (String)
    • PageSize — (String) The number of entries you want on each page in the response.
    • Token — (String) The NextToken string returned on a previous page that you use to get the next page of results in a paginated response.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CampaignsResponse — (map) List of available campaigns.
        • Item — (Array<map>) A list of campaigns.
          • AdditionalTreatments — (Array<map>) Treatments that are defined in addition to the default treatment.
            • Id — (String) The unique treatment ID.
            • MessageConfiguration — (map) The message configuration settings.
              • APNSMessage — (map) 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. Possible values include:
                  • "OPEN_APP"
                  • "DEEP_LINK"
                  • "URL"
                • Body — (String) The message body. Can include up to 140 characters.
                • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
                • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
                • ImageUrl — (String) The URL that points to an image used in the push notification.
                • JsonBody — (String) The JSON payload used for a silent push.
                • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
                • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
                • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
                • 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 — (map) 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. Possible values include:
                  • "OPEN_APP"
                  • "DEEP_LINK"
                  • "URL"
                • Body — (String) The message body. Can include up to 140 characters.
                • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
                • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
                • ImageUrl — (String) The URL that points to an image used in the push notification.
                • JsonBody — (String) The JSON payload used for a silent push.
                • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
                • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
                • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
                • 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 — (map) 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 — (map) 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. Possible values include:
                  • "OPEN_APP"
                  • "DEEP_LINK"
                  • "URL"
                • Body — (String) The message body. Can include up to 140 characters.
                • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
                • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
                • ImageUrl — (String) The URL that points to an image used in the push notification.
                • JsonBody — (String) The JSON payload used for a silent push.
                • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
                • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
                • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
                • 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 — (map) The SMS message configuration.
                • Body — (String) The SMS text body.
                • MessageType — (String) Is this is a transactional SMS message, otherwise a promotional message. Possible values include:
                  • "TRANSACTIONAL"
                  • "PROMOTIONAL"
                • SenderId — (String) Sender ID of sent message.
            • Schedule — (map) The campaign schedule.
              • EndTime — (String) The scheduled time that the campaign ends in ISO 8601 format.
              • Frequency — (String) How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY Possible values include:
                • "ONCE"
                • "HOURLY"
                • "DAILY"
                • "WEEKLY"
                • "MONTHLY"
              • IsLocalTime — (Boolean) Indicates whether the campaign schedule takes effect according to each user's local time.
              • QuietTime — (map) The time during which the campaign sends no messages.
                • End — (String) The default end time for quiet time in ISO 8601 format.
                • Start — (String) The default start time for quiet time in ISO 8601 format.
              • StartTime — (String) The scheduled time that the campaign begins in ISO 8601 format.
              • Timezone — (String) The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
            • SizePercent — (Integer) The allocated percentage of users for this treatment.
            • State — (map) 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 Possible values include:
                • "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 — (map) 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 Possible values include:
              • "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.
          • 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 — (map) The campaign limits settings.
            • Daily — (Integer) The maximum number of messages that the campaign can send daily.
            • Total — (Integer) The maximum total number of messages that the campaign can send.
          • MessageConfiguration — (map) The message configuration settings.
            • APNSMessage — (map) 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. Possible values include:
                • "OPEN_APP"
                • "DEEP_LINK"
                • "URL"
              • Body — (String) The message body. Can include up to 140 characters.
              • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl — (String) The URL that points to an image used in the push notification.
              • JsonBody — (String) The JSON payload used for a silent push.
              • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • 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 — (map) 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. Possible values include:
                • "OPEN_APP"
                • "DEEP_LINK"
                • "URL"
              • Body — (String) The message body. Can include up to 140 characters.
              • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl — (String) The URL that points to an image used in the push notification.
              • JsonBody — (String) The JSON payload used for a silent push.
              • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • 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 — (map) 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 — (map) 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. Possible values include:
                • "OPEN_APP"
                • "DEEP_LINK"
                • "URL"
              • Body — (String) The message body. Can include up to 140 characters.
              • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl — (String) The URL that points to an image used in the push notification.
              • JsonBody — (String) The JSON payload used for a silent push.
              • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • 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 — (map) The SMS message configuration.
              • Body — (String) The SMS text body.
              • MessageType — (String) Is this is a transactional SMS message, otherwise a promotional message. Possible values include:
                • "TRANSACTIONAL"
                • "PROMOTIONAL"
              • SenderId — (String) Sender ID of sent message.
          • Name — (String) The custom name of the campaign.
          • Schedule — (map) The campaign schedule.
            • EndTime — (String) The scheduled time that the campaign ends in ISO 8601 format.
            • Frequency — (String) How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY Possible values include:
              • "ONCE"
              • "HOURLY"
              • "DAILY"
              • "WEEKLY"
              • "MONTHLY"
            • IsLocalTime — (Boolean) Indicates whether the campaign schedule takes effect according to each user's local time.
            • QuietTime — (map) The time during which the campaign sends no messages.
              • End — (String) The default end time for quiet time in ISO 8601 format.
              • Start — (String) The default start time for quiet time in ISO 8601 format.
            • StartTime — (String) The scheduled time that the campaign begins in ISO 8601 format.
            • Timezone — (String) The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
          • SegmentId — (String) The ID of the segment to which the campaign sends messages.
          • SegmentVersion — (Integer) The version of the segment to which the campaign sends messages.
          • State — (map) 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 Possible values include:
              • "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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getEmailChannel(params = {}, callback) ⇒ AWS.Request

Get an email channel

Examples:

Calling the getEmailChannel operation

var params = {
  ApplicationId: 'STRING_VALUE' /* required */
};
pinpoint.getEmailChannel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • EmailChannelResponse — (map) Email Channel Response.
        • ApplicationId — (String) The unique ID of the application to which the email channel belongs.
        • CreationDate — (String) The date that the settings were last updated in ISO 8601 format.
        • Enabled — (Boolean) If the channel is enabled for sending messages.
        • FromAddress — (String) The email address used to send emails from.
        • Id — (String) Channel ID. Not used, only for backwards compatibility.
        • Identity — (String) The ARN of an identity verified with SES.
        • IsArchived — (Boolean) Is this channel archived
        • LastModifiedBy — (String) Who last updated this entry
        • LastModifiedDate — (String) Last date this was updated
        • Platform — (String) Platform type. Will be "EMAIL"
        • RoleArn — (String) The ARN of an IAM Role used to submit events to Mobile Analytics' event ingestion service
        • Version — (Integer) Version of channel

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getEndpoint(params = {}, callback) ⇒ AWS.Request

Returns information about an endpoint.

Examples:

Calling the getEndpoint operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  EndpointId: 'STRING_VALUE' /* required */
};
pinpoint.getEndpoint(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • EndpointId — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • EndpointResponse — (map) Endpoint response
        • Address — (String) The address or token of the endpoint as provided by your push provider (e.g. DeviceToken or RegistrationId).
        • ApplicationId — (String) The ID of the application associated with the endpoint.
        • Attributes — (map<Array<String>>) Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create a segment.
        • ChannelType — (String) The channel type. Valid values: GCM | APNS | SMS | EMAIL Possible values include:
          • "GCM"
          • "APNS"
          • "APNS_SANDBOX"
          • "ADM"
          • "SMS"
          • "EMAIL"
        • 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 last time the endpoint was created. Provided in ISO 8601 format.
        • Demographic — (map) 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 endpoint make, such as such as Apple or Samsung.
          • Model — (String) The endpoint model, such as iPhone.
          • ModelVersion — (String) The endpoint model version.
          • Platform — (String) The endpoint platform, such as ios or android.
          • PlatformVersion — (String) The endpoint platform version.
          • 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) The endpoint status. Can be either ACTIVE or INACTIVE. Will be set to INACTIVE if a delivery fails. Will be set to ACTIVE if the address is updated.
        • Id — (String) The unique ID that you assigned to the endpoint. The ID should be a globally unique identifier (GUID) to ensure that it is unique compared to all other endpoints for the application.
        • Location — (map) The endpoint location attributes.
          • City — (String) The city where the endpoint is located.
          • Country — (String) Country according to ISO 3166-1 Alpha-2 codes. For example, US.
          • Latitude — (Float) The latitude of the endpoint location. Rounded to one decimal (Roughly corresponding to a mile).
          • Longitude — (Float) The longitude of the endpoint location. Rounded to one decimal (Roughly corresponding to a mile).
          • PostalCode — (String) The postal code or zip code of the endpoint.
          • Region — (String) The region of the endpoint location. For example, corresponds to a state in US.
        • Metrics — (map<Float>) Custom metrics that your app reports to Amazon Pinpoint.
        • 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 — (map) Custom user-specific attributes that your app reports to Amazon Pinpoint.
          • UserAttributes — (map<Array<String>>) Custom attributes specific to the user.
          • UserId — (String) The unique ID of the user.
        • ShardId — (String) The ShardId of endpoint

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getEventStream(params = {}, callback) ⇒ AWS.Request

Returns the event stream for an app.

Examples:

Calling the getEventStream operation

var params = {
  ApplicationId: 'STRING_VALUE' /* required */
};
pinpoint.getEventStream(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String) ApplicationId

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • EventStream — (map) Model for an event publishing subscription export.
        • ApplicationId — (String) The ID of the application from which events should be published.
        • DestinationStreamArn — (String) The Amazon Resource Name (ARN) of the Amazon Kinesis stream or Firehose delivery stream to which you want to publish events. Firehose ARN: arn:aws:firehose:REGION:ACCOUNT_ID:deliverystream/STREAM_NAME Kinesis ARN: arn:aws:kinesis:REGION:ACCOUNT_ID:stream/STREAM_NAME
        • ExternalId — (String) The external ID assigned the IAM role that authorizes Amazon Pinpoint to publish to the stream.
        • LastModifiedDate — (String) The date the event stream was last updated in ISO 8601 format.
        • LastUpdatedBy — (String) The IAM user who last modified the event stream.
        • RoleArn — (String) The IAM role that authorizes Amazon Pinpoint to publish events to the stream in your account.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getGcmChannel(params = {}, callback) ⇒ AWS.Request

Returns information about the GCM channel for an app.

Examples:

Calling the getGcmChannel operation

var params = {
  ApplicationId: 'STRING_VALUE' /* required */
};
pinpoint.getGcmChannel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • GCMChannelResponse — (map) Google Cloud Messaging channel definition
        • ApplicationId — (String) The ID of the application to which the channel applies.
        • CreationDate — (String) When was this segment created
        • Credential — (String) The GCM API key from Google.
        • Enabled — (Boolean) If the channel is enabled for sending messages.
        • Id — (String) Channel ID. Not used. Present only for backwards compatibility.
        • IsArchived — (Boolean) Is this channel archived
        • LastModifiedBy — (String) Who last updated this entry
        • LastModifiedDate — (String) Last date this was updated
        • Platform — (String) The platform type. Will be GCM
        • Version — (Integer) Version of channel

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getImportJob(params = {}, callback) ⇒ AWS.Request

Returns information about an import job.

Examples:

Calling the getImportJob operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  JobId: 'STRING_VALUE' /* required */
};
pinpoint.getImportJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • JobId — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ImportJobResponse — (map)
        • ApplicationId — (String) The unique ID of the application to which the import job applies.
        • CompletedPieces — (Integer) The number of pieces that have successfully imported as of the time of the request.
        • CompletionDate — (String) The date the import job completed in ISO 8601 format.
        • CreationDate — (String) The date the import job was created in ISO 8601 format.
        • Definition — (map) The import job settings.
          • DefineSegment — (Boolean) Sets whether the endpoints create a segment when they are imported.
          • ExternalId — (String) A unique, custom ID assigned to the IAM role that restricts who can assume the role.
          • Format — (String) The format of the files that contain the endpoint definitions. Valid values: CSV, JSON Possible values include:
            • "CSV"
            • "JSON"
          • RegisterEndpoints — (Boolean) Sets whether the endpoints are registered with Amazon Pinpoint when they are imported.
          • RoleArn — (String) The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the Amazon S3 location that contains the endpoints to import.
          • S3Url — (String) A URL that points to the location within an Amazon S3 bucket that contains the endpoints to import. The location can be a folder or a single file. The URL should follow this format: s3://bucket-name/folder-name/file-name Amazon Pinpoint will import endpoints from this location and any subfolders it contains.
          • SegmentId — (String) The ID of the segment to update if the import job is meant to update an existing segment.
          • SegmentName — (String) A custom name for the segment created by the import job. Use if DefineSegment is true.
        • FailedPieces — (Integer) The number of pieces that have failed to import as of the time of the request.
        • Failures — (Array<String>) Provides up to 100 of the first failed entries for the job, if any exist.
        • Id — (String) The unique ID of the import job.
        • JobStatus — (String) The status of the import job. Valid values: CREATED, INITIALIZING, PROCESSING, COMPLETING, COMPLETED, FAILING, FAILED The job status is FAILED if one or more pieces failed to import. Possible values include:
          • "CREATED"
          • "INITIALIZING"
          • "PROCESSING"
          • "COMPLETING"
          • "COMPLETED"
          • "FAILING"
          • "FAILED"
        • TotalFailures — (Integer) The number of endpoints that failed to import; for example, because of syntax errors.
        • TotalPieces — (Integer) The total number of pieces that must be imported to finish the job. Each piece is an approximately equal portion of the endpoints to import.
        • TotalProcessed — (Integer) The number of endpoints that were processed by the import job.
        • Type — (String) The job type. Will be Import.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getImportJobs(params = {}, callback) ⇒ AWS.Request

Returns information about your import jobs.

Examples:

Calling the getImportJobs operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  PageSize: 'STRING_VALUE',
  Token: 'STRING_VALUE'
};
pinpoint.getImportJobs(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • PageSize — (String) The number of entries you want on each page in the response.
    • Token — (String) The NextToken string returned on a previous page that you use to get the next page of results in a paginated response.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getSegment(params = {}, callback) ⇒ AWS.Request

Returns information about a segment.

Examples:

Calling the getSegment operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  SegmentId: 'STRING_VALUE' /* required */
};
pinpoint.getSegment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • SegmentId — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • SegmentResponse — (map) Segment definition.
        • ApplicationId — (String) The ID of the application to which the segment applies.
        • CreationDate — (String) The date the segment was created in ISO 8601 format.
        • Dimensions — (map) The segment dimensions attributes.
          • Attributes — (map<map>) Custom segment attributes.
            • 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. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
          • Behavior — (map) The segment behaviors attributes.
            • Recency — (map) The recency of use.
              • Duration — (String) The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30 Possible values include:
                • "HR_24"
                • "DAY_7"
                • "DAY_14"
                • "DAY_30"
              • RecencyType — (String) The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment. Possible values include:
                • "ACTIVE"
                • "INACTIVE"
          • Demographic — (map) The segment demographics attributes.
            • AppVersion — (map) The app version criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • Channel — (map) The channel criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • DeviceType — (map) The device type criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • Make — (map) The device make criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • Model — (map) The device model criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • Platform — (map) The device platform criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
          • Location — (map) The segment location attributes.
            • Country — (map) The country filter according to ISO 3166-1 Alpha-2 codes.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
          • UserAttributes — (map<map>) Custom segment user attributes.
            • 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. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
        • Id — (String) The unique segment ID.
        • ImportDefinition — (map) The import job settings.
          • ChannelCounts — (map<Integer>) Channel type counts
          • ExternalId — (String) A unique, custom ID assigned to the IAM role that restricts who can assume the role.
          • Format — (String) The format of the endpoint files that were imported to create this segment. Valid values: CSV, JSON Possible values include:
            • "CSV"
            • "JSON"
          • RoleArn — (String) The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the endpoints in Amazon S3.
          • S3Url — (String) A URL that points to the Amazon S3 location from which the endpoints for this segment were imported.
          • Size — (Integer) The number of endpoints that were successfully imported to create this segment.
        • LastModifiedDate — (String) The date the segment was last updated in ISO 8601 format.
        • Name — (String) The name of segment
        • SegmentType — (String) The segment type: DIMENSIONAL - A dynamic segment built from selection criteria based on endpoint data reported by your app. You create this type of segment by using the segment builder in the Amazon Pinpoint console or by making a POST request to the segments resource. IMPORT - A static segment built from an imported set of endpoint definitions. You create this type of segment by importing a segment in the Amazon Pinpoint console or by making a POST request to the jobs/import resource. Possible values include:
          • "DIMENSIONAL"
          • "IMPORT"
        • Version — (Integer) The segment version number.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getSegmentImportJobs(params = {}, callback) ⇒ AWS.Request

Returns a list of import jobs for a specific segment.

Examples:

Calling the getSegmentImportJobs operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  SegmentId: 'STRING_VALUE', /* required */
  PageSize: 'STRING_VALUE',
  Token: 'STRING_VALUE'
};
pinpoint.getSegmentImportJobs(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • PageSize — (String) The number of entries you want on each page in the response.
    • SegmentId — (String)
    • Token — (String) The NextToken string returned on a previous page that you use to get the next page of results in a paginated response.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getSegments(params = {}, callback) ⇒ AWS.Request

Used to get information about your segments.

Examples:

Calling the getSegments operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  PageSize: 'STRING_VALUE',
  Token: 'STRING_VALUE'
};
pinpoint.getSegments(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • PageSize — (String) The number of entries you want on each page in the response.
    • Token — (String) The NextToken string returned on a previous page that you use to get the next page of results in a paginated response.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • SegmentsResponse — (map) Segments in your account.
        • Item — (Array<map>) The list of segments.
          • ApplicationId — (String) The ID of the application to which the segment applies.
          • CreationDate — (String) The date the segment was created in ISO 8601 format.
          • Dimensions — (map) The segment dimensions attributes.
            • Attributes — (map<map>) Custom segment attributes.
              • 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. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • Behavior — (map) The segment behaviors attributes.
              • Recency — (map) The recency of use.
                • Duration — (String) The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30 Possible values include:
                  • "HR_24"
                  • "DAY_7"
                  • "DAY_14"
                  • "DAY_30"
                • RecencyType — (String) The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment. Possible values include:
                  • "ACTIVE"
                  • "INACTIVE"
            • Demographic — (map) The segment demographics attributes.
              • AppVersion — (map) The app version criteria for the segment.
                • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                  • "INCLUSIVE"
                  • "EXCLUSIVE"
                • Values — (Array<String>) 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.
              • Channel — (map) The channel criteria for the segment.
                • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                  • "INCLUSIVE"
                  • "EXCLUSIVE"
                • Values — (Array<String>) 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.
              • DeviceType — (map) The device type criteria for the segment.
                • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                  • "INCLUSIVE"
                  • "EXCLUSIVE"
                • Values — (Array<String>) 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.
              • Make — (map) The device make criteria for the segment.
                • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                  • "INCLUSIVE"
                  • "EXCLUSIVE"
                • Values — (Array<String>) 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.
              • Model — (map) The device model criteria for the segment.
                • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                  • "INCLUSIVE"
                  • "EXCLUSIVE"
                • Values — (Array<String>) 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.
              • Platform — (map) The device platform criteria for the segment.
                • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                  • "INCLUSIVE"
                  • "EXCLUSIVE"
                • Values — (Array<String>) 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.
            • Location — (map) The segment location attributes.
              • Country — (map) The country filter according to ISO 3166-1 Alpha-2 codes.
                • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                  • "INCLUSIVE"
                  • "EXCLUSIVE"
                • Values — (Array<String>) 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.
            • UserAttributes — (map<map>) Custom segment user attributes.
              • 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. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
          • Id — (String) The unique segment ID.
          • ImportDefinition — (map) The import job settings.
            • ChannelCounts — (map<Integer>) Channel type counts
            • ExternalId — (String) A unique, custom ID assigned to the IAM role that restricts who can assume the role.
            • Format — (String) The format of the endpoint files that were imported to create this segment. Valid values: CSV, JSON Possible values include:
              • "CSV"
              • "JSON"
            • RoleArn — (String) The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the endpoints in Amazon S3.
            • S3Url — (String) A URL that points to the Amazon S3 location from which the endpoints for this segment were imported.
            • Size — (Integer) The number of endpoints that were successfully imported to create this segment.
          • LastModifiedDate — (String) The date the segment was last updated in ISO 8601 format.
          • Name — (String) The name of segment
          • SegmentType — (String) The segment type: DIMENSIONAL - A dynamic segment built from selection criteria based on endpoint data reported by your app. You create this type of segment by using the segment builder in the Amazon Pinpoint console or by making a POST request to the segments resource. IMPORT - A static segment built from an imported set of endpoint definitions. You create this type of segment by importing a segment in the Amazon Pinpoint console or by making a POST request to the jobs/import resource. Possible values include:
            • "DIMENSIONAL"
            • "IMPORT"
          • Version — (Integer) The segment version number.
        • NextToken — (String) An identifier used to retrieve the next page of results. The token is null if no additional pages exist.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getSegmentVersion(params = {}, callback) ⇒ AWS.Request

Returns information about a segment version.

Examples:

Calling the getSegmentVersion operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  SegmentId: 'STRING_VALUE', /* required */
  Version: 'STRING_VALUE' /* required */
};
pinpoint.getSegmentVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • SegmentId — (String)
    • Version — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • SegmentResponse — (map) Segment definition.
        • ApplicationId — (String) The ID of the application to which the segment applies.
        • CreationDate — (String) The date the segment was created in ISO 8601 format.
        • Dimensions — (map) The segment dimensions attributes.
          • Attributes — (map<map>) Custom segment attributes.
            • 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. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
          • Behavior — (map) The segment behaviors attributes.
            • Recency — (map) The recency of use.
              • Duration — (String) The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30 Possible values include:
                • "HR_24"
                • "DAY_7"
                • "DAY_14"
                • "DAY_30"
              • RecencyType — (String) The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment. Possible values include:
                • "ACTIVE"
                • "INACTIVE"
          • Demographic — (map) The segment demographics attributes.
            • AppVersion — (map) The app version criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • Channel — (map) The channel criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • DeviceType — (map) The device type criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • Make — (map) The device make criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • Model — (map) The device model criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • Platform — (map) The device platform criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
          • Location — (map) The segment location attributes.
            • Country — (map) The country filter according to ISO 3166-1 Alpha-2 codes.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
          • UserAttributes — (map<map>) Custom segment user attributes.
            • 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. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
        • Id — (String) The unique segment ID.
        • ImportDefinition — (map) The import job settings.
          • ChannelCounts — (map<Integer>) Channel type counts
          • ExternalId — (String) A unique, custom ID assigned to the IAM role that restricts who can assume the role.
          • Format — (String) The format of the endpoint files that were imported to create this segment. Valid values: CSV, JSON Possible values include:
            • "CSV"
            • "JSON"
          • RoleArn — (String) The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the endpoints in Amazon S3.
          • S3Url — (String) A URL that points to the Amazon S3 location from which the endpoints for this segment were imported.
          • Size — (Integer) The number of endpoints that were successfully imported to create this segment.
        • LastModifiedDate — (String) The date the segment was last updated in ISO 8601 format.
        • Name — (String) The name of segment
        • SegmentType — (String) The segment type: DIMENSIONAL - A dynamic segment built from selection criteria based on endpoint data reported by your app. You create this type of segment by using the segment builder in the Amazon Pinpoint console or by making a POST request to the segments resource. IMPORT - A static segment built from an imported set of endpoint definitions. You create this type of segment by importing a segment in the Amazon Pinpoint console or by making a POST request to the jobs/import resource. Possible values include:
          • "DIMENSIONAL"
          • "IMPORT"
        • Version — (Integer) The segment version number.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getSegmentVersions(params = {}, callback) ⇒ AWS.Request

Returns information about your segment versions.

Examples:

Calling the getSegmentVersions operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  SegmentId: 'STRING_VALUE', /* required */
  PageSize: 'STRING_VALUE',
  Token: 'STRING_VALUE'
};
pinpoint.getSegmentVersions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • PageSize — (String) The number of entries you want on each page in the response.
    • SegmentId — (String)
    • Token — (String) The NextToken string returned on a previous page that you use to get the next page of results in a paginated response.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • SegmentsResponse — (map) Segments in your account.
        • Item — (Array<map>) The list of segments.
          • ApplicationId — (String) The ID of the application to which the segment applies.
          • CreationDate — (String) The date the segment was created in ISO 8601 format.
          • Dimensions — (map) The segment dimensions attributes.
            • Attributes — (map<map>) Custom segment attributes.
              • 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. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • Behavior — (map) The segment behaviors attributes.
              • Recency — (map) The recency of use.
                • Duration — (String) The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30 Possible values include:
                  • "HR_24"
                  • "DAY_7"
                  • "DAY_14"
                  • "DAY_30"
                • RecencyType — (String) The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment. Possible values include:
                  • "ACTIVE"
                  • "INACTIVE"
            • Demographic — (map) The segment demographics attributes.
              • AppVersion — (map) The app version criteria for the segment.
                • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                  • "INCLUSIVE"
                  • "EXCLUSIVE"
                • Values — (Array<String>) 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.
              • Channel — (map) The channel criteria for the segment.
                • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                  • "INCLUSIVE"
                  • "EXCLUSIVE"
                • Values — (Array<String>) 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.
              • DeviceType — (map) The device type criteria for the segment.
                • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                  • "INCLUSIVE"
                  • "EXCLUSIVE"
                • Values — (Array<String>) 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.
              • Make — (map) The device make criteria for the segment.
                • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                  • "INCLUSIVE"
                  • "EXCLUSIVE"
                • Values — (Array<String>) 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.
              • Model — (map) The device model criteria for the segment.
                • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                  • "INCLUSIVE"
                  • "EXCLUSIVE"
                • Values — (Array<String>) 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.
              • Platform — (map) The device platform criteria for the segment.
                • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                  • "INCLUSIVE"
                  • "EXCLUSIVE"
                • Values — (Array<String>) 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.
            • Location — (map) The segment location attributes.
              • Country — (map) The country filter according to ISO 3166-1 Alpha-2 codes.
                • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                  • "INCLUSIVE"
                  • "EXCLUSIVE"
                • Values — (Array<String>) 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.
            • UserAttributes — (map<map>) Custom segment user attributes.
              • 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. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
          • Id — (String) The unique segment ID.
          • ImportDefinition — (map) The import job settings.
            • ChannelCounts — (map<Integer>) Channel type counts
            • ExternalId — (String) A unique, custom ID assigned to the IAM role that restricts who can assume the role.
            • Format — (String) The format of the endpoint files that were imported to create this segment. Valid values: CSV, JSON Possible values include:
              • "CSV"
              • "JSON"
            • RoleArn — (String) The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the endpoints in Amazon S3.
            • S3Url — (String) A URL that points to the Amazon S3 location from which the endpoints for this segment were imported.
            • Size — (Integer) The number of endpoints that were successfully imported to create this segment.
          • LastModifiedDate — (String) The date the segment was last updated in ISO 8601 format.
          • Name — (String) The name of segment
          • SegmentType — (String) The segment type: DIMENSIONAL - A dynamic segment built from selection criteria based on endpoint data reported by your app. You create this type of segment by using the segment builder in the Amazon Pinpoint console or by making a POST request to the segments resource. IMPORT - A static segment built from an imported set of endpoint definitions. You create this type of segment by importing a segment in the Amazon Pinpoint console or by making a POST request to the jobs/import resource. Possible values include:
            • "DIMENSIONAL"
            • "IMPORT"
          • Version — (Integer) The segment version number.
        • NextToken — (String) An identifier used to retrieve the next page of results. The token is null if no additional pages exist.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getSmsChannel(params = {}, callback) ⇒ AWS.Request

Get an SMS channel

Examples:

Calling the getSmsChannel operation

var params = {
  ApplicationId: 'STRING_VALUE' /* required */
};
pinpoint.getSmsChannel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • SMSChannelResponse — (map) SMS Channel Response.
        • ApplicationId — (String) The unique ID of the application to which the SMS channel belongs.
        • CreationDate — (String) The date that the settings were last updated in ISO 8601 format.
        • Enabled — (Boolean) If the channel is enabled for sending messages.
        • Id — (String) Channel ID. Not used, only for backwards compatibility.
        • IsArchived — (Boolean) Is this channel archived
        • LastModifiedBy — (String) Who last updated this entry
        • LastModifiedDate — (String) Last date this was updated
        • Platform — (String) Platform type. Will be "SMS"
        • SenderId — (String) Sender identifier of your messages.
        • ShortCode — (String) The short code registered with the phone provider.
        • Version — (Integer) Version of channel

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

putEventStream(params = {}, callback) ⇒ AWS.Request

Use to create or update the event stream for an app.

Examples:

Calling the putEventStream operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  WriteEventStream: { /* required */
    DestinationStreamArn: 'STRING_VALUE',
    ExternalId: 'STRING_VALUE',
    RoleArn: 'STRING_VALUE'
  }
};
pinpoint.putEventStream(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String) ApplicationId
    • WriteEventStream — (map) EventStream to write.
      • DestinationStreamArn — (String) The Amazon Resource Name (ARN) of the Amazon Kinesis stream or Firehose delivery stream to which you want to publish events. Firehose ARN: arn:aws:firehose:REGION:ACCOUNT_ID:deliverystream/STREAM_NAME Kinesis ARN: arn:aws:kinesis:REGION:ACCOUNT_ID:stream/STREAM_NAME
      • ExternalId — (String) The external ID assigned the IAM role that authorizes Amazon Pinpoint to publish to the stream.
      • RoleArn — (String) The IAM role that authorizes Amazon Pinpoint to publish events to the stream in your account.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • EventStream — (map) Model for an event publishing subscription export.
        • ApplicationId — (String) The ID of the application from which events should be published.
        • DestinationStreamArn — (String) The Amazon Resource Name (ARN) of the Amazon Kinesis stream or Firehose delivery stream to which you want to publish events. Firehose ARN: arn:aws:firehose:REGION:ACCOUNT_ID:deliverystream/STREAM_NAME Kinesis ARN: arn:aws:kinesis:REGION:ACCOUNT_ID:stream/STREAM_NAME
        • ExternalId — (String) The external ID assigned the IAM role that authorizes Amazon Pinpoint to publish to the stream.
        • LastModifiedDate — (String) The date the event stream was last updated in ISO 8601 format.
        • LastUpdatedBy — (String) The IAM user who last modified the event stream.
        • RoleArn — (String) The IAM role that authorizes Amazon Pinpoint to publish events to the stream in your account.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

sendMessages(params = {}, callback) ⇒ AWS.Request

Send a batch of messages

Examples:

Calling the sendMessages operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  MessageRequest: { /* required */
    Addresses: {
      '<__string>': {
        BodyOverride: 'STRING_VALUE',
        ChannelType: GCM | APNS | APNS_SANDBOX | ADM | SMS | EMAIL,
        Context: {
          '<__string>': 'STRING_VALUE',
          /* '<__string>': ... */
        },
        RawContent: 'STRING_VALUE',
        Substitutions: {
          '<__string>': [
            'STRING_VALUE',
            /* more items */
          ],
          /* '<__string>': ... */
        },
        TitleOverride: 'STRING_VALUE'
      },
      /* '<__string>': ... */
    },
    Context: {
      '<__string>': 'STRING_VALUE',
      /* '<__string>': ... */
    },
    MessageConfiguration: {
      APNSMessage: {
        Action: OPEN_APP | DEEP_LINK | URL,
        Badge: 0,
        Body: 'STRING_VALUE',
        Category: 'STRING_VALUE',
        Data: {
          '<__string>': 'STRING_VALUE',
          /* '<__string>': ... */
        },
        MediaUrl: 'STRING_VALUE',
        RawContent: 'STRING_VALUE',
        SilentPush: true || false,
        Sound: 'STRING_VALUE',
        Substitutions: {
          '<__string>': [
            'STRING_VALUE',
            /* more items */
          ],
          /* '<__string>': ... */
        },
        ThreadId: 'STRING_VALUE',
        Title: 'STRING_VALUE',
        Url: 'STRING_VALUE'
      },
      DefaultMessage: {
        Body: 'STRING_VALUE',
        Substitutions: {
          '<__string>': [
            'STRING_VALUE',
            /* more items */
          ],
          /* '<__string>': ... */
        }
      },
      DefaultPushNotificationMessage: {
        Action: OPEN_APP | DEEP_LINK | URL,
        Body: 'STRING_VALUE',
        Data: {
          '<__string>': 'STRING_VALUE',
          /* '<__string>': ... */
        },
        SilentPush: true || false,
        Substitutions: {
          '<__string>': [
            'STRING_VALUE',
            /* more items */
          ],
          /* '<__string>': ... */
        },
        Title: 'STRING_VALUE',
        Url: 'STRING_VALUE'
      },
      GCMMessage: {
        Action: OPEN_APP | DEEP_LINK | URL,
        Body: 'STRING_VALUE',
        CollapseKey: 'STRING_VALUE',
        Data: {
          '<__string>': 'STRING_VALUE',
          /* '<__string>': ... */
        },
        IconReference: 'STRING_VALUE',
        ImageIconUrl: 'STRING_VALUE',
        ImageUrl: 'STRING_VALUE',
        RawContent: 'STRING_VALUE',
        RestrictedPackageName: 'STRING_VALUE',
        SilentPush: true || false,
        SmallImageIconUrl: 'STRING_VALUE',
        Sound: 'STRING_VALUE',
        Substitutions: {
          '<__string>': [
            'STRING_VALUE',
            /* more items */
          ],
          /* '<__string>': ... */
        },
        Title: 'STRING_VALUE',
        Url: 'STRING_VALUE'
      },
      SMSMessage: {
        Body: 'STRING_VALUE',
        MessageType: TRANSACTIONAL | PROMOTIONAL,
        SenderId: 'STRING_VALUE',
        Substitutions: {
          '<__string>': [
            'STRING_VALUE',
            /* more items */
          ],
          /* '<__string>': ... */
        }
      }
    }
  }
};
pinpoint.sendMessages(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • MessageRequest — (map) Send message request.
      • Addresses — (map<map>) A map of destination addresses, with the address as the key(Email address, phone number or push token) and the Address Configuration as the value.
        • BodyOverride — (String) Body override. If specified will override default body.
        • ChannelType — (String) The channel type. Valid values: GCM | APNS | SMS | EMAIL Possible values include:
          • "GCM"
          • "APNS"
          • "APNS_SANDBOX"
          • "ADM"
          • "SMS"
          • "EMAIL"
        • Context — (map<String>) 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.
        • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
        • Substitutions — (map<Array<String>>) 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.
        • TitleOverride — (String) Title override. If specified will override default title if applicable.
      • Context — (map<String>) 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.
      • MessageConfiguration — (map) Message configuration.
        • APNSMessage — (map) 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 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, the email body or the text message.
          • 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.
          • Data — (map<String>) The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object
          • MediaUrl — (String) The URL that points to a video 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.
          • 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 — (map<Array<String>>) Default message substitutions. Can be overridden by individual address substitutions.
          • 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.
          • 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 — (map) The default message for all channels.
          • Body — (String) The message body of the notification, the email body or the text message.
          • Substitutions — (map<Array<String>>) Default message substitutions. Can be overridden by individual address substitutions.
        • DefaultPushNotificationMessage — (map) 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 Possible values include:
            • "OPEN_APP"
            • "DEEP_LINK"
            • "URL"
          • Body — (String) The message body of the notification, the email body or the text message.
          • Data — (map<String>) The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object
          • 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.
          • Substitutions — (map<Array<String>>) Default message substitutions. Can be overridden by individual address substitutions.
          • 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.
        • GCMMessage — (map) 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 Possible values include:
            • "OPEN_APP"
            • "DEEP_LINK"
            • "URL"
          • Body — (String) The message body of the notification, the email body or the text message.
          • 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 — (map<String>) The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object
          • 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.
          • 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 — (map<Array<String>>) Default message substitutions. Can be overridden by individual address substitutions.
          • 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 — (map) The message to SMS channels. Overrides the default message.
          • Body — (String) The message body of the notification, the email body or the text message.
          • MessageType — (String) Is this a transaction priority message or lower priority. Possible values include:
            • "TRANSACTIONAL"
            • "PROMOTIONAL"
          • SenderId — (String) Sender ID of sent message.
          • Substitutions — (map<Array<String>>) Default message substitutions. Can be overridden by individual address substitutions.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • MessageResponse — (map) Send message response.
        • ApplicationId — (String) Application id of the message.
        • RequestId — (String) Original request Id for which this message was delivered.
        • Result — (map<map>) 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.
          • DeliveryStatus — (String) Delivery status of message. Possible values include:
            • "SUCCESSFUL"
            • "THROTTLED"
            • "TEMPORARY_FAILURE"
            • "PERMANENT_FAILURE"
          • 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)

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateApnsChannel(params = {}, callback) ⇒ AWS.Request

Use to update the APNs channel for an app.

Examples:

Calling the updateApnsChannel operation

var params = {
  APNSChannelRequest: { /* required */
    Certificate: 'STRING_VALUE',
    Enabled: true || false,
    PrivateKey: 'STRING_VALUE'
  },
  ApplicationId: 'STRING_VALUE' /* required */
};
pinpoint.updateApnsChannel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • APNSChannelRequest — (map) Apple Push Notification Service channel definition.
      • Certificate — (String) The distribution certificate from Apple.
      • Enabled — (Boolean) If the channel is enabled for sending messages.
      • PrivateKey — (String) The certificate private key.
    • ApplicationId — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • APNSChannelResponse — (map) Apple Distribution Push Notification Service channel definition.
        • ApplicationId — (String) The ID of the application to which the channel applies.
        • CreationDate — (String) When was this segment created
        • Enabled — (Boolean) If the channel is enabled for sending messages.
        • Id — (String) Channel ID. Not used. Present only for backwards compatibility.
        • IsArchived — (Boolean) Is this channel archived
        • LastModifiedBy — (String) Who last updated this entry
        • LastModifiedDate — (String) Last date this was updated
        • Platform — (String) The platform type. Will be APNS.
        • Version — (Integer) Version of channel

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateApnsSandboxChannel(params = {}, callback) ⇒ AWS.Request

Update an APNS sandbox channel

Examples:

Calling the updateApnsSandboxChannel operation

var params = {
  APNSSandboxChannelRequest: { /* required */
    Certificate: 'STRING_VALUE',
    Enabled: true || false,
    PrivateKey: 'STRING_VALUE'
  },
  ApplicationId: 'STRING_VALUE' /* required */
};
pinpoint.updateApnsSandboxChannel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • APNSSandboxChannelRequest — (map) Apple Development Push Notification Service channel definition.
      • Certificate — (String) The distribution certificate from Apple.
      • Enabled — (Boolean) If the channel is enabled for sending messages.
      • PrivateKey — (String) The certificate private key.
    • ApplicationId — (String)

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • APNSSandboxChannelResponse — (map) Apple Development Push Notification Service channel definition.
        • ApplicationId — (String) Application id
        • CreationDate — (String) When was this segment created
        • Enabled — (Boolean) If the channel is enabled for sending messages.
        • Id — (String) Channel ID. Not used, only for backwards compatibility.
        • IsArchived — (Boolean) Is this channel archived
        • LastModifiedBy — (String) Who last updated this entry
        • LastModifiedDate — (String) Last date this was updated
        • Platform — (String) The platform type. Will be APNS_SANDBOX.
        • Version — (Integer) Version of channel

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateApplicationSettings(params = {}, callback) ⇒ AWS.Request

Used to update the settings for an app.

Examples:

Calling the updateApplicationSettings operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  WriteApplicationSettingsRequest: { /* required */
    Limits: {
      Daily: 0,
      Total: 0
    },
    QuietTime: {
      End: 'STRING_VALUE',
      Start: 'STRING_VALUE'
    }
  }
};
pinpoint.updateApplicationSettings(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • WriteApplicationSettingsRequest — (map) Creating application setting request
      • Limits — (map) The default campaign limits for the app. These limits apply to each campaign for the app, unless the campaign overrides the default with limits of its own.
        • Daily — (Integer) The maximum number of messages that the campaign can send daily.
        • Total — (Integer) The maximum total number of messages that the campaign can send.
      • QuietTime — (map) The default quiet time for the app. Each campaign for this app sends no messages during this time unless the campaign overrides the default with a quiet time of its own.
        • End — (String) The default end time for quiet time in ISO 8601 format.
        • Start — (String) The default start time for quiet time in ISO 8601 format.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ApplicationSettingsResource — (map) Application settings.
        • ApplicationId — (String) The unique ID for the application.
        • LastModifiedDate — (String) The date that the settings were last updated in ISO 8601 format.
        • Limits — (map) The default campaign limits for the app. These limits apply to each campaign for the app, unless the campaign overrides the default with limits of its own.
          • Daily — (Integer) The maximum number of messages that the campaign can send daily.
          • Total — (Integer) The maximum total number of messages that the campaign can send.
        • QuietTime — (map) The default quiet time for the app. Each campaign for this app sends no messages during this time unless the campaign overrides the default with a quiet time of its own.
          • End — (String) The default end time for quiet time in ISO 8601 format.
          • Start — (String) The default start time for quiet time in ISO 8601 format.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateCampaign(params = {}, callback) ⇒ AWS.Request

Use to update a campaign.

Examples:

Calling the updateCampaign operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  CampaignId: 'STRING_VALUE', /* required */
  WriteCampaignRequest: { /* required */
    AdditionalTreatments: [
      {
        MessageConfiguration: {
          APNSMessage: {
            Action: OPEN_APP | DEEP_LINK | URL,
            Body: 'STRING_VALUE',
            ImageIconUrl: 'STRING_VALUE',
            ImageSmallIconUrl: 'STRING_VALUE',
            ImageUrl: 'STRING_VALUE',
            JsonBody: 'STRING_VALUE',
            MediaUrl: 'STRING_VALUE',
            RawContent: 'STRING_VALUE',
            SilentPush: true || false,
            Title: 'STRING_VALUE',
            Url: 'STRING_VALUE'
          },
          DefaultMessage: {
            Action: OPEN_APP | DEEP_LINK | URL,
            Body: 'STRING_VALUE',
            ImageIconUrl: 'STRING_VALUE',
            ImageSmallIconUrl: 'STRING_VALUE',
            ImageUrl: 'STRING_VALUE',
            JsonBody: 'STRING_VALUE',
            MediaUrl: 'STRING_VALUE',
            RawContent: 'STRING_VALUE',
            SilentPush: true || false,
            Title: 'STRING_VALUE',
            Url: 'STRING_VALUE'
          },
          EmailMessage: {
            Body: 'STRING_VALUE',
            FromAddress: 'STRING_VALUE',
            HtmlBody: 'STRING_VALUE',
            Title: 'STRING_VALUE'
          },
          GCMMessage: {
            Action: OPEN_APP | DEEP_LINK | URL,
            Body: 'STRING_VALUE',
            ImageIconUrl: 'STRING_VALUE',
            ImageSmallIconUrl: 'STRING_VALUE',
            ImageUrl: 'STRING_VALUE',
            JsonBody: 'STRING_VALUE',
            MediaUrl: 'STRING_VALUE',
            RawContent: 'STRING_VALUE',
            SilentPush: true || false,
            Title: 'STRING_VALUE',
            Url: 'STRING_VALUE'
          },
          SMSMessage: {
            Body: 'STRING_VALUE',
            MessageType: TRANSACTIONAL | PROMOTIONAL,
            SenderId: 'STRING_VALUE'
          }
        },
        Schedule: {
          EndTime: 'STRING_VALUE',
          Frequency: ONCE | HOURLY | DAILY | WEEKLY | MONTHLY,
          IsLocalTime: true || false,
          QuietTime: {
            End: 'STRING_VALUE',
            Start: 'STRING_VALUE'
          },
          StartTime: 'STRING_VALUE',
          Timezone: 'STRING_VALUE'
        },
        SizePercent: 0,
        TreatmentDescription: 'STRING_VALUE',
        TreatmentName: 'STRING_VALUE'
      },
      /* more items */
    ],
    Description: 'STRING_VALUE',
    HoldoutPercent: 0,
    IsPaused: true || false,
    Limits: {
      Daily: 0,
      Total: 0
    },
    MessageConfiguration: {
      APNSMessage: {
        Action: OPEN_APP | DEEP_LINK | URL,
        Body: 'STRING_VALUE',
        ImageIconUrl: 'STRING_VALUE',
        ImageSmallIconUrl: 'STRING_VALUE',
        ImageUrl: 'STRING_VALUE',
        JsonBody: 'STRING_VALUE',
        MediaUrl: 'STRING_VALUE',
        RawContent: 'STRING_VALUE',
        SilentPush: true || false,
        Title: 'STRING_VALUE',
        Url: 'STRING_VALUE'
      },
      DefaultMessage: {
        Action: OPEN_APP | DEEP_LINK | URL,
        Body: 'STRING_VALUE',
        ImageIconUrl: 'STRING_VALUE',
        ImageSmallIconUrl: 'STRING_VALUE',
        ImageUrl: 'STRING_VALUE',
        JsonBody: 'STRING_VALUE',
        MediaUrl: 'STRING_VALUE',
        RawContent: 'STRING_VALUE',
        SilentPush: true || false,
        Title: 'STRING_VALUE',
        Url: 'STRING_VALUE'
      },
      EmailMessage: {
        Body: 'STRING_VALUE',
        FromAddress: 'STRING_VALUE',
        HtmlBody: 'STRING_VALUE',
        Title: 'STRING_VALUE'
      },
      GCMMessage: {
        Action: OPEN_APP | DEEP_LINK | URL,
        Body: 'STRING_VALUE',
        ImageIconUrl: 'STRING_VALUE',
        ImageSmallIconUrl: 'STRING_VALUE',
        ImageUrl: 'STRING_VALUE',
        JsonBody: 'STRING_VALUE',
        MediaUrl: 'STRING_VALUE',
        RawContent: 'STRING_VALUE',
        SilentPush: true || false,
        Title: 'STRING_VALUE',
        Url: 'STRING_VALUE'
      },
      SMSMessage: {
        Body: 'STRING_VALUE',
        MessageType: TRANSACTIONAL | PROMOTIONAL,
        SenderId: 'STRING_VALUE'
      }
    },
    Name: 'STRING_VALUE',
    Schedule: {
      EndTime: 'STRING_VALUE',
      Frequency: ONCE | HOURLY | DAILY | WEEKLY | MONTHLY,
      IsLocalTime: true || false,
      QuietTime: {
        End: 'STRING_VALUE',
        Start: 'STRING_VALUE'
      },
      StartTime: 'STRING_VALUE',
      Timezone: 'STRING_VALUE'
    },
    SegmentId: 'STRING_VALUE',
    SegmentVersion: 0,
    TreatmentDescription: 'STRING_VALUE',
    TreatmentName: 'STRING_VALUE'
  }
};
pinpoint.updateCampaign(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • CampaignId — (String)
    • WriteCampaignRequest — (map) Used to create a campaign.
      • AdditionalTreatments — (Array<map>) Treatments that are defined in addition to the default treatment.
        • MessageConfiguration — (map) The message configuration settings.
          • APNSMessage — (map) 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. Possible values include:
              • "OPEN_APP"
              • "DEEP_LINK"
              • "URL"
            • Body — (String) The message body. Can include up to 140 characters.
            • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl — (String) The URL that points to an image used in the push notification.
            • JsonBody — (String) The JSON payload used for a silent push.
            • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • 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 — (map) 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. Possible values include:
              • "OPEN_APP"
              • "DEEP_LINK"
              • "URL"
            • Body — (String) The message body. Can include up to 140 characters.
            • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl — (String) The URL that points to an image used in the push notification.
            • JsonBody — (String) The JSON payload used for a silent push.
            • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • 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 — (map) 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 — (map) 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. Possible values include:
              • "OPEN_APP"
              • "DEEP_LINK"
              • "URL"
            • Body — (String) The message body. Can include up to 140 characters.
            • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl — (String) The URL that points to an image used in the push notification.
            • JsonBody — (String) The JSON payload used for a silent push.
            • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • 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 — (map) The SMS message configuration.
            • Body — (String) The SMS text body.
            • MessageType — (String) Is this is a transactional SMS message, otherwise a promotional message. Possible values include:
              • "TRANSACTIONAL"
              • "PROMOTIONAL"
            • SenderId — (String) Sender ID of sent message.
        • Schedule — (map) The campaign schedule.
          • EndTime — (String) The scheduled time that the campaign ends in ISO 8601 format.
          • Frequency — (String) How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY Possible values include:
            • "ONCE"
            • "HOURLY"
            • "DAILY"
            • "WEEKLY"
            • "MONTHLY"
          • IsLocalTime — (Boolean) Indicates whether the campaign schedule takes effect according to each user's local time.
          • QuietTime — (map) The time during which the campaign sends no messages.
            • End — (String) The default end time for quiet time in ISO 8601 format.
            • Start — (String) The default start time for quiet time in ISO 8601 format.
          • StartTime — (String) The scheduled time that the campaign begins in ISO 8601 format.
          • Timezone — (String) The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
        • SizePercent — (Integer) The allocated percentage of users for this treatment.
        • TreatmentDescription — (String) A custom description for the treatment.
        • TreatmentName — (String) The custom name of a variation of the campaign used for A/B testing.
      • Description — (String) A description of the campaign.
      • HoldoutPercent — (Integer) The allocated percentage of end users who will not receive messages from this campaign.
      • 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 — (map) The campaign limits settings.
        • Daily — (Integer) The maximum number of messages that the campaign can send daily.
        • Total — (Integer) The maximum total number of messages that the campaign can send.
      • MessageConfiguration — (map) The message configuration settings.
        • APNSMessage — (map) 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. Possible values include:
            • "OPEN_APP"
            • "DEEP_LINK"
            • "URL"
          • Body — (String) The message body. Can include up to 140 characters.
          • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl — (String) The URL that points to an image used in the push notification.
          • JsonBody — (String) The JSON payload used for a silent push.
          • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • 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 — (map) 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. Possible values include:
            • "OPEN_APP"
            • "DEEP_LINK"
            • "URL"
          • Body — (String) The message body. Can include up to 140 characters.
          • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl — (String) The URL that points to an image used in the push notification.
          • JsonBody — (String) The JSON payload used for a silent push.
          • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • 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 — (map) 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 — (map) 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. Possible values include:
            • "OPEN_APP"
            • "DEEP_LINK"
            • "URL"
          • Body — (String) The message body. Can include up to 140 characters.
          • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
          • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
          • ImageUrl — (String) The URL that points to an image used in the push notification.
          • JsonBody — (String) The JSON payload used for a silent push.
          • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
          • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
          • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
          • 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 — (map) The SMS message configuration.
          • Body — (String) The SMS text body.
          • MessageType — (String) Is this is a transactional SMS message, otherwise a promotional message. Possible values include:
            • "TRANSACTIONAL"
            • "PROMOTIONAL"
          • SenderId — (String) Sender ID of sent message.
      • Name — (String) The custom name of the campaign.
      • Schedule — (map) The campaign schedule.
        • EndTime — (String) The scheduled time that the campaign ends in ISO 8601 format.
        • Frequency — (String) How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY Possible values include:
          • "ONCE"
          • "HOURLY"
          • "DAILY"
          • "WEEKLY"
          • "MONTHLY"
        • IsLocalTime — (Boolean) Indicates whether the campaign schedule takes effect according to each user's local time.
        • QuietTime — (map) The time during which the campaign sends no messages.
          • End — (String) The default end time for quiet time in ISO 8601 format.
          • Start — (String) The default start time for quiet time in ISO 8601 format.
        • StartTime — (String) The scheduled time that the campaign begins in ISO 8601 format.
        • Timezone — (String) The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
      • SegmentId — (String) The ID of the segment to which the campaign sends messages.
      • SegmentVersion — (Integer) The version of the segment to which the campaign sends messages.
      • TreatmentDescription — (String) A custom description for the treatment.
      • TreatmentName — (String) The custom name of a variation of the campaign used for A/B testing.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CampaignResponse — (map) Campaign definition
        • AdditionalTreatments — (Array<map>) Treatments that are defined in addition to the default treatment.
          • Id — (String) The unique treatment ID.
          • MessageConfiguration — (map) The message configuration settings.
            • APNSMessage — (map) 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. Possible values include:
                • "OPEN_APP"
                • "DEEP_LINK"
                • "URL"
              • Body — (String) The message body. Can include up to 140 characters.
              • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl — (String) The URL that points to an image used in the push notification.
              • JsonBody — (String) The JSON payload used for a silent push.
              • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • 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 — (map) 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. Possible values include:
                • "OPEN_APP"
                • "DEEP_LINK"
                • "URL"
              • Body — (String) The message body. Can include up to 140 characters.
              • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl — (String) The URL that points to an image used in the push notification.
              • JsonBody — (String) The JSON payload used for a silent push.
              • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • 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 — (map) 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 — (map) 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. Possible values include:
                • "OPEN_APP"
                • "DEEP_LINK"
                • "URL"
              • Body — (String) The message body. Can include up to 140 characters.
              • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
              • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
              • ImageUrl — (String) The URL that points to an image used in the push notification.
              • JsonBody — (String) The JSON payload used for a silent push.
              • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
              • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
              • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
              • 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 — (map) The SMS message configuration.
              • Body — (String) The SMS text body.
              • MessageType — (String) Is this is a transactional SMS message, otherwise a promotional message. Possible values include:
                • "TRANSACTIONAL"
                • "PROMOTIONAL"
              • SenderId — (String) Sender ID of sent message.
          • Schedule — (map) The campaign schedule.
            • EndTime — (String) The scheduled time that the campaign ends in ISO 8601 format.
            • Frequency — (String) How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY Possible values include:
              • "ONCE"
              • "HOURLY"
              • "DAILY"
              • "WEEKLY"
              • "MONTHLY"
            • IsLocalTime — (Boolean) Indicates whether the campaign schedule takes effect according to each user's local time.
            • QuietTime — (map) The time during which the campaign sends no messages.
              • End — (String) The default end time for quiet time in ISO 8601 format.
              • Start — (String) The default start time for quiet time in ISO 8601 format.
            • StartTime — (String) The scheduled time that the campaign begins in ISO 8601 format.
            • Timezone — (String) The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
          • SizePercent — (Integer) The allocated percentage of users for this treatment.
          • State — (map) 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 Possible values include:
              • "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 — (map) 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 Possible values include:
            • "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.
        • 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 — (map) The campaign limits settings.
          • Daily — (Integer) The maximum number of messages that the campaign can send daily.
          • Total — (Integer) The maximum total number of messages that the campaign can send.
        • MessageConfiguration — (map) The message configuration settings.
          • APNSMessage — (map) 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. Possible values include:
              • "OPEN_APP"
              • "DEEP_LINK"
              • "URL"
            • Body — (String) The message body. Can include up to 140 characters.
            • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl — (String) The URL that points to an image used in the push notification.
            • JsonBody — (String) The JSON payload used for a silent push.
            • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • 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 — (map) 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. Possible values include:
              • "OPEN_APP"
              • "DEEP_LINK"
              • "URL"
            • Body — (String) The message body. Can include up to 140 characters.
            • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl — (String) The URL that points to an image used in the push notification.
            • JsonBody — (String) The JSON payload used for a silent push.
            • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • 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 — (map) 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 — (map) 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. Possible values include:
              • "OPEN_APP"
              • "DEEP_LINK"
              • "URL"
            • Body — (String) The message body. Can include up to 140 characters.
            • ImageIconUrl — (String) The URL that points to the icon image for the push notification icon, for example, the app icon.
            • ImageSmallIconUrl — (String) The URL that points to the small icon image for the push notification icon, for example, the app icon.
            • ImageUrl — (String) The URL that points to an image used in the push notification.
            • JsonBody — (String) The JSON payload used for a silent push.
            • MediaUrl — (String) The URL that points to the media resource, for example a .mp4 or .gif file.
            • RawContent — (String) The Raw JSON formatted string to be used as the payload. This value overrides the message.
            • SilentPush — (Boolean) Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.
            • 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 — (map) The SMS message configuration.
            • Body — (String) The SMS text body.
            • MessageType — (String) Is this is a transactional SMS message, otherwise a promotional message. Possible values include:
              • "TRANSACTIONAL"
              • "PROMOTIONAL"
            • SenderId — (String) Sender ID of sent message.
        • Name — (String) The custom name of the campaign.
        • Schedule — (map) The campaign schedule.
          • EndTime — (String) The scheduled time that the campaign ends in ISO 8601 format.
          • Frequency — (String) How often the campaign delivers messages. Valid values: ONCE, HOURLY, DAILY, WEEKLY, MONTHLY Possible values include:
            • "ONCE"
            • "HOURLY"
            • "DAILY"
            • "WEEKLY"
            • "MONTHLY"
          • IsLocalTime — (Boolean) Indicates whether the campaign schedule takes effect according to each user's local time.
          • QuietTime — (map) The time during which the campaign sends no messages.
            • End — (String) The default end time for quiet time in ISO 8601 format.
            • Start — (String) The default start time for quiet time in ISO 8601 format.
          • StartTime — (String) The scheduled time that the campaign begins in ISO 8601 format.
          • Timezone — (String) The starting UTC offset for the schedule if the value for isLocalTime is true Valid values: UTC UTC+01 UTC+02 UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07 UTC+08 UTC+09 UTC+09:30 UTC+10 UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05 UTC-06 UTC-07 UTC-08 UTC-09 UTC-10 UTC-11
        • SegmentId — (String) The ID of the segment to which the campaign sends messages.
        • SegmentVersion — (Integer) The version of the segment to which the campaign sends messages.
        • State — (map) 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 Possible values include:
            • "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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateEmailChannel(params = {}, callback) ⇒ AWS.Request

Update an email channel

Examples:

Calling the updateEmailChannel operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  EmailChannelRequest: { /* required */
    Enabled: true || false,
    FromAddress: 'STRING_VALUE',
    Identity: 'STRING_VALUE',
    RoleArn: 'STRING_VALUE'
  }
};
pinpoint.updateEmailChannel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • EmailChannelRequest — (map) Email Channel Request
      • Enabled — (Boolean) If the channel is enabled for sending messages.
      • FromAddress — (String) The email address used to send emails from.
      • Identity — (String) The ARN of an identity verified with SES.
      • RoleArn — (String) The ARN of an IAM Role used to submit events to Mobile Analytics' event ingestion service

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • EmailChannelResponse — (map) Email Channel Response.
        • ApplicationId — (String) The unique ID of the application to which the email channel belongs.
        • CreationDate — (String) The date that the settings were last updated in ISO 8601 format.
        • Enabled — (Boolean) If the channel is enabled for sending messages.
        • FromAddress — (String) The email address used to send emails from.
        • Id — (String) Channel ID. Not used, only for backwards compatibility.
        • Identity — (String) The ARN of an identity verified with SES.
        • IsArchived — (Boolean) Is this channel archived
        • LastModifiedBy — (String) Who last updated this entry
        • LastModifiedDate — (String) Last date this was updated
        • Platform — (String) Platform type. Will be "EMAIL"
        • RoleArn — (String) The ARN of an IAM Role used to submit events to Mobile Analytics' event ingestion service
        • Version — (Integer) Version of channel

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateEndpoint(params = {}, callback) ⇒ AWS.Request

Use to update an endpoint.

Examples:

Calling the updateEndpoint operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  EndpointId: 'STRING_VALUE', /* required */
  EndpointRequest: { /* required */
    Address: 'STRING_VALUE',
    Attributes: {
      '<__string>': [
        'STRING_VALUE',
        /* more items */
      ],
      /* '<__string>': ... */
    },
    ChannelType: GCM | APNS | APNS_SANDBOX | ADM | SMS | EMAIL,
    Demographic: {
      AppVersion: 'STRING_VALUE',
      Locale: 'STRING_VALUE',
      Make: 'STRING_VALUE',
      Model: 'STRING_VALUE',
      ModelVersion: 'STRING_VALUE',
      Platform: 'STRING_VALUE',
      PlatformVersion: 'STRING_VALUE',
      Timezone: 'STRING_VALUE'
    },
    EffectiveDate: 'STRING_VALUE',
    EndpointStatus: 'STRING_VALUE',
    Location: {
      City: 'STRING_VALUE',
      Country: 'STRING_VALUE',
      Latitude: 0.0,
      Longitude: 0.0,
      PostalCode: 'STRING_VALUE',
      Region: 'STRING_VALUE'
    },
    Metrics: {
      '<__string>': 0.0,
      /* '<__string>': ... */
    },
    OptOut: 'STRING_VALUE',
    RequestId: 'STRING_VALUE',
    User: {
      UserAttributes: {
        '<__string>': [
          'STRING_VALUE',
          /* more items */
        ],
        /* '<__string>': ... */
      },
      UserId: 'STRING_VALUE'
    }
  }
};
pinpoint.updateEndpoint(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • EndpointId — (String)
    • EndpointRequest — (map) Endpoint update request
      • Address — (String) The address or token of the endpoint as provided by your push provider (e.g. DeviceToken or RegistrationId).
      • Attributes — (map<Array<String>>) Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create a segment.
      • ChannelType — (String) The channel type. Valid values: GCM | APNS | SMS | EMAIL Possible values include:
        • "GCM"
        • "APNS"
        • "APNS_SANDBOX"
        • "ADM"
        • "SMS"
        • "EMAIL"
      • Demographic — (map) 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 endpoint make, such as such as Apple or Samsung.
        • Model — (String) The endpoint model, such as iPhone.
        • ModelVersion — (String) The endpoint model version.
        • Platform — (String) The endpoint platform, such as ios or android.
        • PlatformVersion — (String) The endpoint platform version.
        • 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) The endpoint status. Can be either ACTIVE or INACTIVE. Will be set to INACTIVE if a delivery fails. Will be set to ACTIVE if the address is updated.
      • Location — (map) The endpoint location attributes.
        • City — (String) The city where the endpoint is located.
        • Country — (String) Country according to ISO 3166-1 Alpha-2 codes. For example, US.
        • Latitude — (Float) The latitude of the endpoint location. Rounded to one decimal (Roughly corresponding to a mile).
        • Longitude — (Float) The longitude of the endpoint location. Rounded to one decimal (Roughly corresponding to a mile).
        • PostalCode — (String) The postal code or zip code of the endpoint.
        • Region — (String) The region of the endpoint location. For example, corresponds to a state in US.
      • Metrics — (map<Float>) Custom metrics that your app reports to Amazon Pinpoint.
      • 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 — (map) Custom user-specific attributes that your app reports to Amazon Pinpoint.
        • UserAttributes — (map<Array<String>>) Custom attributes specific to the user.
        • UserId — (String) The unique ID of the user.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • MessageBody — (map) Simple message object.
        • Message — (String) The error message returned from the API.
        • RequestID — (String) The unique message body ID.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateEndpointsBatch(params = {}, callback) ⇒ AWS.Request

Use to update a batch of endpoints.

Examples:

Calling the updateEndpointsBatch operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  EndpointBatchRequest: { /* required */
    Item: [
      {
        Address: 'STRING_VALUE',
        Attributes: {
          '<__string>': [
            'STRING_VALUE',
            /* more items */
          ],
          /* '<__string>': ... */
        },
        ChannelType: GCM | APNS | APNS_SANDBOX | ADM | SMS | EMAIL,
        Demographic: {
          AppVersion: 'STRING_VALUE',
          Locale: 'STRING_VALUE',
          Make: 'STRING_VALUE',
          Model: 'STRING_VALUE',
          ModelVersion: 'STRING_VALUE',
          Platform: 'STRING_VALUE',
          PlatformVersion: 'STRING_VALUE',
          Timezone: 'STRING_VALUE'
        },
        EffectiveDate: 'STRING_VALUE',
        EndpointStatus: 'STRING_VALUE',
        Id: 'STRING_VALUE',
        Location: {
          City: 'STRING_VALUE',
          Country: 'STRING_VALUE',
          Latitude: 0.0,
          Longitude: 0.0,
          PostalCode: 'STRING_VALUE',
          Region: 'STRING_VALUE'
        },
        Metrics: {
          '<__string>': 0.0,
          /* '<__string>': ... */
        },
        OptOut: 'STRING_VALUE',
        RequestId: 'STRING_VALUE',
        User: {
          UserAttributes: {
            '<__string>': [
              'STRING_VALUE',
              /* more items */
            ],
            /* '<__string>': ... */
          },
          UserId: 'STRING_VALUE'
        }
      },
      /* more items */
    ]
  }
};
pinpoint.updateEndpointsBatch(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • EndpointBatchRequest — (map) Endpoint batch update request.
      • Item — (Array<map>) List of items to update. Maximum 100 items
        • Address — (String) The address or token of the endpoint as provided by your push provider (e.g. DeviceToken or RegistrationId).
        • Attributes — (map<Array<String>>) Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create a segment.
        • ChannelType — (String) The channel type. Valid values: GCM | APNS | SMS | EMAIL Possible values include:
          • "GCM"
          • "APNS"
          • "APNS_SANDBOX"
          • "ADM"
          • "SMS"
          • "EMAIL"
        • Demographic — (map) 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 endpoint make, such as such as Apple or Samsung.
          • Model — (String) The endpoint model, such as iPhone.
          • ModelVersion — (String) The endpoint model version.
          • Platform — (String) The endpoint platform, such as ios or android.
          • PlatformVersion — (String) The endpoint platform version.
          • 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) The endpoint status. Can be either ACTIVE or INACTIVE. Will be set to INACTIVE if a delivery fails. Will be set to ACTIVE if the address is updated.
        • Id — (String) The unique Id for the Endpoint in the batch.
        • Location — (map) The endpoint location attributes.
          • City — (String) The city where the endpoint is located.
          • Country — (String) Country according to ISO 3166-1 Alpha-2 codes. For example, US.
          • Latitude — (Float) The latitude of the endpoint location. Rounded to one decimal (Roughly corresponding to a mile).
          • Longitude — (Float) The longitude of the endpoint location. Rounded to one decimal (Roughly corresponding to a mile).
          • PostalCode — (String) The postal code or zip code of the endpoint.
          • Region — (String) The region of the endpoint location. For example, corresponds to a state in US.
        • Metrics — (map<Float>) Custom metrics that your app reports to Amazon Pinpoint.
        • 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 — (map) Custom user-specific attributes that your app reports to Amazon Pinpoint.
          • UserAttributes — (map<Array<String>>) Custom attributes specific to the user.
          • UserId — (String) The unique ID of the user.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • MessageBody — (map) Simple message object.
        • Message — (String) The error message returned from the API.
        • RequestID — (String) The unique message body ID.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateGcmChannel(params = {}, callback) ⇒ AWS.Request

Use to update the GCM channel for an app.

Examples:

Calling the updateGcmChannel operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  GCMChannelRequest: { /* required */
    ApiKey: 'STRING_VALUE',
    Enabled: true || false
  }
};
pinpoint.updateGcmChannel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • GCMChannelRequest — (map) Google Cloud Messaging credentials
      • ApiKey — (String) Platform credential API key from Google.
      • Enabled — (Boolean) If the channel is enabled for sending messages.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • GCMChannelResponse — (map) Google Cloud Messaging channel definition
        • ApplicationId — (String) The ID of the application to which the channel applies.
        • CreationDate — (String) When was this segment created
        • Credential — (String) The GCM API key from Google.
        • Enabled — (Boolean) If the channel is enabled for sending messages.
        • Id — (String) Channel ID. Not used. Present only for backwards compatibility.
        • IsArchived — (Boolean) Is this channel archived
        • LastModifiedBy — (String) Who last updated this entry
        • LastModifiedDate — (String) Last date this was updated
        • Platform — (String) The platform type. Will be GCM
        • Version — (Integer) Version of channel

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateSegment(params = {}, callback) ⇒ AWS.Request

Use to update a segment.

Examples:

Calling the updateSegment operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  SegmentId: 'STRING_VALUE', /* required */
  WriteSegmentRequest: { /* required */
    Dimensions: {
      Attributes: {
        '<__string>': {
          AttributeType: INCLUSIVE | EXCLUSIVE,
          Values: [
            'STRING_VALUE',
            /* more items */
          ]
        },
        /* '<__string>': ... */
      },
      Behavior: {
        Recency: {
          Duration: HR_24 | DAY_7 | DAY_14 | DAY_30,
          RecencyType: ACTIVE | INACTIVE
        }
      },
      Demographic: {
        AppVersion: {
          DimensionType: INCLUSIVE | EXCLUSIVE,
          Values: [
            'STRING_VALUE',
            /* more items */
          ]
        },
        Channel: {
          DimensionType: INCLUSIVE | EXCLUSIVE,
          Values: [
            'STRING_VALUE',
            /* more items */
          ]
        },
        DeviceType: {
          DimensionType: INCLUSIVE | EXCLUSIVE,
          Values: [
            'STRING_VALUE',
            /* more items */
          ]
        },
        Make: {
          DimensionType: INCLUSIVE | EXCLUSIVE,
          Values: [
            'STRING_VALUE',
            /* more items */
          ]
        },
        Model: {
          DimensionType: INCLUSIVE | EXCLUSIVE,
          Values: [
            'STRING_VALUE',
            /* more items */
          ]
        },
        Platform: {
          DimensionType: INCLUSIVE | EXCLUSIVE,
          Values: [
            'STRING_VALUE',
            /* more items */
          ]
        }
      },
      Location: {
        Country: {
          DimensionType: INCLUSIVE | EXCLUSIVE,
          Values: [
            'STRING_VALUE',
            /* more items */
          ]
        }
      },
      UserAttributes: {
        '<__string>': {
          AttributeType: INCLUSIVE | EXCLUSIVE,
          Values: [
            'STRING_VALUE',
            /* more items */
          ]
        },
        /* '<__string>': ... */
      }
    },
    Name: 'STRING_VALUE'
  }
};
pinpoint.updateSegment(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • SegmentId — (String)
    • WriteSegmentRequest — (map) Segment definition.
      • Dimensions — (map) The segment dimensions attributes.
        • Attributes — (map<map>) Custom segment attributes.
          • 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. Possible values include:
            • "INCLUSIVE"
            • "EXCLUSIVE"
          • Values — (Array<String>) 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.
        • Behavior — (map) The segment behaviors attributes.
          • Recency — (map) The recency of use.
            • Duration — (String) The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30 Possible values include:
              • "HR_24"
              • "DAY_7"
              • "DAY_14"
              • "DAY_30"
            • RecencyType — (String) The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment. Possible values include:
              • "ACTIVE"
              • "INACTIVE"
        • Demographic — (map) The segment demographics attributes.
          • AppVersion — (map) The app version criteria for the segment.
            • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
          • Channel — (map) The channel criteria for the segment.
            • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
          • DeviceType — (map) The device type criteria for the segment.
            • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
          • Make — (map) The device make criteria for the segment.
            • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
          • Model — (map) The device model criteria for the segment.
            • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
          • Platform — (map) The device platform criteria for the segment.
            • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
        • Location — (map) The segment location attributes.
          • Country — (map) The country filter according to ISO 3166-1 Alpha-2 codes.
            • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
        • UserAttributes — (map<map>) Custom segment user attributes.
          • 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. Possible values include:
            • "INCLUSIVE"
            • "EXCLUSIVE"
          • Values — (Array<String>) 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.
      • Name — (String) The name of segment

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • SegmentResponse — (map) Segment definition.
        • ApplicationId — (String) The ID of the application to which the segment applies.
        • CreationDate — (String) The date the segment was created in ISO 8601 format.
        • Dimensions — (map) The segment dimensions attributes.
          • Attributes — (map<map>) Custom segment attributes.
            • 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. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
          • Behavior — (map) The segment behaviors attributes.
            • Recency — (map) The recency of use.
              • Duration — (String) The length of time during which users have been active or inactive with your app. Valid values: HR_24, DAY_7, DAY_14, DAY_30 Possible values include:
                • "HR_24"
                • "DAY_7"
                • "DAY_14"
                • "DAY_30"
              • RecencyType — (String) The recency dimension type: ACTIVE - Users who have used your app within the specified duration are included in the segment. INACTIVE - Users who have not used your app within the specified duration are included in the segment. Possible values include:
                • "ACTIVE"
                • "INACTIVE"
          • Demographic — (map) The segment demographics attributes.
            • AppVersion — (map) The app version criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • Channel — (map) The channel criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • DeviceType — (map) The device type criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • Make — (map) The device make criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • Model — (map) The device model criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
            • Platform — (map) The device platform criteria for the segment.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
          • Location — (map) The segment location attributes.
            • Country — (map) The country filter according to ISO 3166-1 Alpha-2 codes.
              • DimensionType — (String) The type of dimension: INCLUSIVE - Endpoints that match the criteria are included in the segment. EXCLUSIVE - Endpoints that match the criteria are excluded from the segment. Possible values include:
                • "INCLUSIVE"
                • "EXCLUSIVE"
              • Values — (Array<String>) 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.
          • UserAttributes — (map<map>) Custom segment user attributes.
            • 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. Possible values include:
              • "INCLUSIVE"
              • "EXCLUSIVE"
            • Values — (Array<String>) 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.
        • Id — (String) The unique segment ID.
        • ImportDefinition — (map) The import job settings.
          • ChannelCounts — (map<Integer>) Channel type counts
          • ExternalId — (String) A unique, custom ID assigned to the IAM role that restricts who can assume the role.
          • Format — (String) The format of the endpoint files that were imported to create this segment. Valid values: CSV, JSON Possible values include:
            • "CSV"
            • "JSON"
          • RoleArn — (String) The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the endpoints in Amazon S3.
          • S3Url — (String) A URL that points to the Amazon S3 location from which the endpoints for this segment were imported.
          • Size — (Integer) The number of endpoints that were successfully imported to create this segment.
        • LastModifiedDate — (String) The date the segment was last updated in ISO 8601 format.
        • Name — (String) The name of segment
        • SegmentType — (String) The segment type: DIMENSIONAL - A dynamic segment built from selection criteria based on endpoint data reported by your app. You create this type of segment by using the segment builder in the Amazon Pinpoint console or by making a POST request to the segments resource. IMPORT - A static segment built from an imported set of endpoint definitions. You create this type of segment by importing a segment in the Amazon Pinpoint console or by making a POST request to the jobs/import resource. Possible values include:
          • "DIMENSIONAL"
          • "IMPORT"
        • Version — (Integer) The segment version number.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateSmsChannel(params = {}, callback) ⇒ AWS.Request

Update an SMS channel

Examples:

Calling the updateSmsChannel operation

var params = {
  ApplicationId: 'STRING_VALUE', /* required */
  SMSChannelRequest: { /* required */
    Enabled: true || false,
    SenderId: 'STRING_VALUE'
  }
};
pinpoint.updateSmsChannel(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ApplicationId — (String)
    • SMSChannelRequest — (map) SMS Channel Request
      • Enabled — (Boolean) If the channel is enabled for sending messages.
      • SenderId — (String) Sender identifier of your messages.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • SMSChannelResponse — (map) SMS Channel Response.
        • ApplicationId — (String) The unique ID of the application to which the SMS channel belongs.
        • CreationDate — (String) The date that the settings were last updated in ISO 8601 format.
        • Enabled — (Boolean) If the channel is enabled for sending messages.
        • Id — (String) Channel ID. Not used, only for backwards compatibility.
        • IsArchived — (Boolean) Is this channel archived
        • LastModifiedBy — (String) Who last updated this entry
        • LastModifiedDate — (String) Last date this was updated
        • Platform — (String) Platform type. Will be "SMS"
        • SenderId — (String) Sender identifier of your messages.
        • ShortCode — (String) The short code registered with the phone provider.
        • Version — (Integer) Version of channel

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.