You are viewing the documentation for an older major version of the AWS SDK for JavaScript.
The modular AWS SDK for JavaScript (v3), the latest major version of AWS SDK for JavaScript, is now stable and recommended for general use. For more information, see the Migration Guide and API Reference.

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.

Service Description

Provides AWS Marketplace business intelligence data on-demand.

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|AWS.Endpoint)

    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' or an Endpoint object.

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

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets 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 error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • 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.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

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 | monthly_revenue_field_demonstration_usage | monthly_revenue_flexible_payment_schedule | 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 | disbursed_amount_by_age_of_past_due_funds | disbursed_amount_by_uncollected_funds_breakdown | 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

        From 2017-09-15 to present: Available daily by 24:00 UTC.

      • customer_subscriber_annual_subscriptions

        From 2017-09-15 to present: Available daily by 24:00 UTC.

      • daily_business_usage_by_instance_type

        From 2017-09-15 to present: Available daily by 24:00 UTC.

      • daily_business_fees

        From 2017-09-15 to present: Available daily by 24:00 UTC.

      • daily_business_free_trial_conversions

        From 2017-09-15 to present: Available daily by 24:00 UTC.

      • daily_business_new_instances

        From 2017-09-15 to present: Available daily by 24:00 UTC.

      • daily_business_new_product_subscribers

        From 2017-09-15 to present: Available daily by 24:00 UTC.

      • daily_business_canceled_product_subscribers

        From 2017-09-15 to present: Available daily by 24:00 UTC.

      • monthly_revenue_billing_and_revenue_data

        From 2017-09-15 to present: Available monthly on the 15th day of the month by 24:00 UTC. Data includes metered transactions (e.g. hourly) from one month prior.

      • monthly_revenue_annual_subscriptions

        From 2017-09-15 to present: Available monthly on the 15th day of the month by 24:00 UTC. Data includes up-front software charges (e.g. annual) from one month prior.

      • monthly_revenue_field_demonstration_usage

        From 2018-03-15 to present: Available monthly on the 15th day of the month by 24:00 UTC.

      • monthly_revenue_flexible_payment_schedule

        From 2018-11-15 to present: Available monthly on the 15th day of the month by 24:00 UTC.

      • disbursed_amount_by_product

        From 2017-09-15 to present: Available every 30 days by 24:00 UTC.

      • disbursed_amount_by_instance_hours

        From 2017-09-15 to present: Available every 30 days by 24:00 UTC.

      • disbursed_amount_by_customer_geo

        From 2017-09-15 to present: Available every 30 days by 24:00 UTC.

      • disbursed_amount_by_age_of_uncollected_funds

        From 2017-09-15 to present: Available every 30 days by 24:00 UTC.

      • disbursed_amount_by_age_of_disbursed_funds

        From 2017-09-15 to present: Available every 30 days by 24:00 UTC.

      • disbursed_amount_by_age_of_past_due_funds

        From 2018-04-07 to present: Available every 30 days by 24:00 UTC.

      • disbursed_amount_by_uncollected_funds_breakdown

        From 2019-10-04 to present: Available every 30 days by 24:00 UTC.

      • sales_compensation_billed_revenue

        From 2017-09-15 to present: Available monthly on the 15th day of the month by 24:00 UTC. Data includes metered transactions (e.g. hourly) from one month prior, and up-front software charges (e.g. annual) from one month prior.

      • us_sales_and_use_tax_records

        From 2017-09-15 to present: Available monthly on the 15th day of the month by 24:00 UTC.

      • disbursed_amount_by_product_with_uncollected_funds

        This data set is deprecated. Download related reports from AMMP instead!

      • customer_profile_by_industry

        This data set is deprecated. Download related reports from AMMP instead!

      • customer_profile_by_revenue

        This data set is deprecated. Download related reports from AMMP instead!

      • customer_profile_by_geography

        This data set is deprecated. Download related reports from AMMP instead!

      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"
      • "monthly_revenue_field_demonstration_usage"
      • "monthly_revenue_flexible_payment_schedule"
      • "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"
      • "disbursed_amount_by_age_of_past_due_funds"
      • "disbursed_amount_by_uncollected_funds_breakdown"
      • "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 monthly data sets except those with prefix disbursed_amount, provide a date with month-level granularity for the desired month (the day value will be ignored). For data sets with prefix disbursed_amount, provide a date with day-level granularity for the desired day. For these data sets we will look backwards in time over the range of 31 days until the first data set is found (the latest one).
    • 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.