Class: AWS.MarketplaceCommerceAnalytics

Inherits:
AWS.Service show all
Identifier:
marketplacecommerceanalytics
API Version:
2015-07-01
Defined in:
(unknown)

Overview

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

Sending a Request Using MarketplaceCommerceAnalytics

var marketplacecommerceanalytics = new AWS.MarketplaceCommerceAnalytics();
marketplacecommerceanalytics.generateDataSet(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 MarketplaceCommerceAnalytics object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var marketplacecommerceanalytics = new AWS.MarketplaceCommerceAnalytics({apiVersion: '2015-07-01'});

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

AWS.config.apiVersions = {
  marketplacecommerceanalytics: '2015-07-01',
  // other service API versions
};

var marketplacecommerceanalytics = new AWS.MarketplaceCommerceAnalytics();

Version:

  • 2015-07-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.MarketplaceCommerceAnalytics(options = {}) ⇒ Object

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

Examples:

Constructing a MarketplaceCommerceAnalytics object

var marketplacecommerceanalytics = new AWS.MarketplaceCommerceAnalytics({apiVersion: '2015-07-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.MarketplaceCommerceAnalytics.region for more information.

  • maxRetries (Integer)

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

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.MarketplaceCommerceAnalytics.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 accept 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.

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

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

Given a data set type and data set publication date, asynchronously publishes the requested data set to the specified S3 bucket and notifies the specified SNS topic once the data is available. Returns a unique request identifier that can be used to correlate requests with notifications from the SNS topic. Data sets will be published in comma-separated values (CSV) format with the file name {data_set_type}_YYYY-MM-DD.csv. If a file with the same name already exists (e.g. if the same data set is requested twice), the original file will be overwritten by the new file. Requires a Role with an attached permissions policy providing Allow permissions for the following actions: s3:PutObject, s3:GetBucketLocation, sns:GetTopicAttributes, sns:Publish, iam:GetRolePolicy.

Service Reference:

Examples:

Calling the generateDataSet operation

var params = {
  dataSetPublicationDate: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  dataSetType: customer_subscriber_hourly_monthly_subscriptions | customer_subscriber_annual_subscriptions | daily_business_usage_by_instance_type | daily_business_fees | daily_business_free_trial_conversions | daily_business_new_instances | daily_business_new_product_subscribers | daily_business_canceled_product_subscribers | monthly_revenue_billing_and_revenue_data | monthly_revenue_annual_subscriptions | disbursed_amount_by_product | disbursed_amount_by_product_with_uncollected_funds | disbursed_amount_by_instance_hours | disbursed_amount_by_customer_geo | disbursed_amount_by_age_of_uncollected_funds | disbursed_amount_by_age_of_disbursed_funds | customer_profile_by_industry | customer_profile_by_revenue | customer_profile_by_geography | sales_compensation_billed_revenue | us_sales_and_use_tax_records, /* required */
  destinationS3BucketName: 'STRING_VALUE', /* required */
  roleNameArn: 'STRING_VALUE', /* required */
  snsTopicArn: 'STRING_VALUE', /* required */
  customerDefinedValues: {
    '<OptionalKey>': 'STRING_VALUE',
    /* '<OptionalKey>': ... */
  },
  destinationS3Prefix: 'STRING_VALUE'
};
marketplacecommerceanalytics.generateDataSet(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: {})
    • dataSetType — (String)

      The desired data set type.

      • customer_subscriber_hourly_monthly_subscriptions - Available daily by 5:00 PM Pacific Time since 2014-07-21.
      • customer_subscriber_annual_subscriptions - Available daily by 5:00 PM Pacific Time since 2014-07-21.
      • daily_business_usage_by_instance_type - Available daily by 5:00 PM Pacific Time since 2015-01-26.
      • daily_business_fees - Available daily by 5:00 PM Pacific Time since 2015-01-26.
      • daily_business_free_trial_conversions - Available daily by 5:00 PM Pacific Time since 2015-01-26.
      • daily_business_new_instances - Available daily by 5:00 PM Pacific Time since 2015-01-26.
      • daily_business_new_product_subscribers - Available daily by 5:00 PM Pacific Time since 2015-01-26.
      • daily_business_canceled_product_subscribers - Available daily by 5:00 PM Pacific Time since 2015-01-26.
      • monthly_revenue_billing_and_revenue_data - Available monthly on the 4th day of the month by 5:00 PM Pacific Time since 2015-02.
      • monthly_revenue_annual_subscriptions - Available monthly on the 4th day of the month by 5:00 PM Pacific Time since 2015-02.
      • disbursed_amount_by_product - Available every 30 days by 5:00 PM Pacific Time since 2015-01-26.
      • disbursed_amount_by_product_with_uncollected_funds -This data set is only available from 2012-04-19 until 2015-01-25. After 2015-01-25, this data set was split into three data sets: disbursed_amount_by_product, disbursed_amount_by_age_of_uncollected_funds, and disbursed_amount_by_age_of_disbursed_funds.
      • disbursed_amount_by_instance_hours - Available every 30 days by 5:00 PM Pacific Time since 2012-09-04.
      • disbursed_amount_by_customer_geo - Available every 30 days by 5:00 PM Pacific Time since 2012-04-19.
      • disbursed_amount_by_age_of_uncollected_funds - Available every 30 days by 5:00 PM Pacific Time since 2015-01-26.
      • disbursed_amount_by_age_of_disbursed_funds - Available every 30 days by 5:00 PM Pacific Time since 2015-01-26.
      • customer_profile_by_industry - Available daily by 5:00 PM Pacific Time since 2015-10-01.
      • customer_profile_by_revenue - Available daily by 5:00 PM Pacific Time since 2015-10-01.
      • customer_profile_by_geography - Available daily by 5:00 PM Pacific Time since 2015-10-01.
      • sales_compensation_billed_revenue - Available monthly on the 4th day of the month by 5:00 PM Pacific Time since 2016-12.
      • us_sales_and_use_tax_records - Available monthly on the 15th day of the month by 5:00 PM Pacific Time since 2017-02-15.

      Possible values include:
      • "customer_subscriber_hourly_monthly_subscriptions"
      • "customer_subscriber_annual_subscriptions"
      • "daily_business_usage_by_instance_type"
      • "daily_business_fees"
      • "daily_business_free_trial_conversions"
      • "daily_business_new_instances"
      • "daily_business_new_product_subscribers"
      • "daily_business_canceled_product_subscribers"
      • "monthly_revenue_billing_and_revenue_data"
      • "monthly_revenue_annual_subscriptions"
      • "disbursed_amount_by_product"
      • "disbursed_amount_by_product_with_uncollected_funds"
      • "disbursed_amount_by_instance_hours"
      • "disbursed_amount_by_customer_geo"
      • "disbursed_amount_by_age_of_uncollected_funds"
      • "disbursed_amount_by_age_of_disbursed_funds"
      • "customer_profile_by_industry"
      • "customer_profile_by_revenue"
      • "customer_profile_by_geography"
      • "sales_compensation_billed_revenue"
      • "us_sales_and_use_tax_records"
    • dataSetPublicationDate — (Date) The date a data set was published. For daily data sets, provide a date with day-level granularity for the desired day. For weekly data sets, provide a date with day-level granularity within the desired week (the day value will be ignored). For monthly data sets, provide a date with month-level granularity for the desired month (the day value will be ignored).
    • roleNameArn — (String) The Amazon Resource Name (ARN) of the Role with an attached permissions policy to interact with the provided AWS services.
    • destinationS3BucketName — (String) The name (friendly name, not ARN) of the destination S3 bucket.
    • destinationS3Prefix — (String) (Optional) The desired S3 prefix for the published data set, similar to a directory path in standard file systems. For example, if given the bucket name "mybucket" and the prefix "myprefix/mydatasets", the output file "outputfile" would be published to "s3://mybucket/myprefix/mydatasets/outputfile". If the prefix directory structure does not exist, it will be created. If no prefix is provided, the data set will be published to the S3 bucket root.
    • snsTopicArn — (String) Amazon Resource Name (ARN) for the SNS Topic that will be notified when the data set has been published or if an error has occurred.
    • customerDefinedValues — (map<String>) (Optional) Key-value pairs which will be returned, unmodified, in the Amazon SNS notification message and the data set metadata file. These key-value pairs can be used to correlated responses with tracking information from other systems.

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:

      • dataSetRequestId — (String) A unique identifier representing a specific request to the GenerateDataSet operation. This identifier can be used to correlate a request with notifications from the SNS topic.

Returns:

  • (AWS.Request)

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

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

Given a data set type and a from date, asynchronously publishes the requested customer support data to the specified S3 bucket and notifies the specified SNS topic once the data is available. Returns a unique request identifier that can be used to correlate requests with notifications from the SNS topic. Data sets will be published in comma-separated values (CSV) format with the file name {data_set_type}_YYYY-MM-DD'T'HH-mm-ss'Z'.csv. If a file with the same name already exists (e.g. if the same data set is requested twice), the original file will be overwritten by the new file. Requires a Role with an attached permissions policy providing Allow permissions for the following actions: s3:PutObject, s3:GetBucketLocation, sns:GetTopicAttributes, sns:Publish, iam:GetRolePolicy.

Service Reference:

Examples:

Calling the startSupportDataExport operation

var params = {
  dataSetType: customer_support_contacts_data | test_customer_support_contacts_data, /* required */
  destinationS3BucketName: 'STRING_VALUE', /* required */
  fromDate: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  roleNameArn: 'STRING_VALUE', /* required */
  snsTopicArn: 'STRING_VALUE', /* required */
  customerDefinedValues: {
    '<OptionalKey>': 'STRING_VALUE',
    /* '<OptionalKey>': ... */
  },
  destinationS3Prefix: 'STRING_VALUE'
};
marketplacecommerceanalytics.startSupportDataExport(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: {})
    • dataSetType — (String)

      Specifies the data set type to be written to the output csv file. The data set types customer_support_contacts_data and test_customer_support_contacts_data both result in a csv file containing the following fields: Product Id, Product Code, Customer Guid, Subscription Guid, Subscription Start Date, Organization, AWS Account Id, Given Name, Surname, Telephone Number, Email, Title, Country Code, ZIP Code, Operation Type, and Operation Time.

      • customer_support_contacts_data Customer support contact data. The data set will contain all changes (Creates, Updates, and Deletes) to customer support contact data from the date specified in the from_date parameter.
      • test_customer_support_contacts_data An example data set containing static test data in the same format as customer_support_contacts_data

      Possible values include:
      • "customer_support_contacts_data"
      • "test_customer_support_contacts_data"
    • fromDate — (Date) The start date from which to retrieve the data set in UTC. This parameter only affects the customer_support_contacts_data data set type.
    • roleNameArn — (String) The Amazon Resource Name (ARN) of the Role with an attached permissions policy to interact with the provided AWS services.
    • destinationS3BucketName — (String) The name (friendly name, not ARN) of the destination S3 bucket.
    • destinationS3Prefix — (String) (Optional) The desired S3 prefix for the published data set, similar to a directory path in standard file systems. For example, if given the bucket name "mybucket" and the prefix "myprefix/mydatasets", the output file "outputfile" would be published to "s3://mybucket/myprefix/mydatasets/outputfile". If the prefix directory structure does not exist, it will be created. If no prefix is provided, the data set will be published to the S3 bucket root.
    • snsTopicArn — (String) Amazon Resource Name (ARN) for the SNS Topic that will be notified when the data set has been published or if an error has occurred.
    • customerDefinedValues — (map<String>) (Optional) Key-value pairs which will be returned, unmodified, in the Amazon SNS notification message and the data set metadata file.

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:

      • dataSetRequestId — (String) A unique identifier representing a specific request to the StartSupportDataExport operation. This identifier can be used to correlate a request with notifications from the SNS topic.

Returns:

  • (AWS.Request)

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