We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Class: AWS.IoTAnalytics

Inherits:
AWS.Service show all
Identifier:
iotanalytics
API Version:
2017-11-27
Defined in:
(unknown)

Overview

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

Service Description

IoT Analytics allows you to collect large amounts of device data, process messages, and store them. You can then query the data and run sophisticated analytics on it. IoT Analytics enables advanced data exploration through integration with Jupyter Notebooks and data visualization through integration with Amazon QuickSight.

Traditional analytics and business intelligence tools are designed to process structured data. IoT data often comes from devices that record noisy processes (such as temperature, motion, or sound). As a result the data from these devices can have significant gaps, corrupted messages, and false readings that must be cleaned up before analysis can occur. Also, IoT data is often only meaningful in the context of other data from external sources.

IoT Analytics automates the steps required to analyze data from IoT devices. IoT Analytics filters, transforms, and enriches IoT data before storing it in a time-series data store for analysis. You can set up the service to collect only the data you need from your devices, apply mathematical transforms to process the data, and enrich the data with device-specific metadata such as device type and location before storing it. Then, you can analyze your data by running queries using the built-in SQL query engine, or perform more complex analytics and machine learning inference. IoT Analytics includes pre-built models for common IoT use cases so you can answer questions like which devices are about to fail or which customers are at risk of abandoning their wearable devices.

Sending a Request Using IoTAnalytics

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

var iotanalytics = new AWS.IoTAnalytics({apiVersion: '2017-11-27'});

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

AWS.config.apiVersions = {
  iotanalytics: '2017-11-27',
  // other service API versions
};

var iotanalytics = new AWS.IoTAnalytics();

Version:

  • 2017-11-27

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.IoTAnalytics(options = {}) ⇒ Object

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

Examples:

Constructing a IoTAnalytics object

var iotanalytics = new AWS.IoTAnalytics({apiVersion: '2017-11-27'});

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.IoTAnalytics.region for more information.

  • maxRetries (Integer)

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

  • maxRedirects (Integer)

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

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

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

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

Sends messages to a channel.

Service Reference:

Examples:

Calling the batchPutMessage operation

var params = {
  channelName: 'STRING_VALUE', /* required */
  messages: [ /* required */
    {
      messageId: 'STRING_VALUE', /* required */
      payload: Buffer.from('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */ /* required */
    },
    /* more items */
  ]
};
iotanalytics.batchPutMessage(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: {})
    • channelName — (String)

      The name of the channel where the messages are sent.

    • messages — (Array<map>)

      The list of messages to be sent. Each message has the format: { "messageId": "string", "payload": "string"}.

      The field names of message payloads (data) that you send to IoT Analytics:

      • Must contain only alphanumeric characters and undescores (). No other special characters are allowed.

      • Must begin with an alphabetic character or single underscore ().

      • Cannot contain hyphens (-).

      • In regular expression terms: "^A-Za-z_$".

      • Cannot be more than 255 characters.

      • Are case insensitive. (Fields named foo and FOO in the same payload are considered duplicates.)

      For example, 29 or 29 are valid, but 29, 29 or 29 are invalid in message payloads.

      • messageIdrequired — (String)

        The ID you want to assign to the message. Each messageId must be unique within each batch sent.

      • payloadrequired — (Buffer, Typed Array, Blob, String)

        The payload of the message. This can be a JSON string or a base64-encoded string representing binary data, in which case you must decode it by means of a pipeline activity.

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:

      • batchPutMessageErrorEntries — (Array<map>)

        A list of any errors encountered when sending the messages to the channel.

        • messageId — (String)

          The ID of the message that caused the error. See the value corresponding to the messageId key in the message object.

        • errorCode — (String)

          The code associated with the error.

        • errorMessage — (String)

          The message associated with the error.

Returns:

  • (AWS.Request)

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

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

Cancels the reprocessing of data through the pipeline.

Service Reference:

Examples:

Calling the cancelPipelineReprocessing operation

var params = {
  pipelineName: 'STRING_VALUE', /* required */
  reprocessingId: 'STRING_VALUE' /* required */
};
iotanalytics.cancelPipelineReprocessing(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: {})
    • pipelineName — (String)

      The name of pipeline for which data reprocessing is canceled.

    • reprocessingId — (String)

      The ID of the reprocessing task (returned by StartPipelineReprocessing).

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.

Returns:

  • (AWS.Request)

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

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

Used to create a channel. A channel collects data from an MQTT topic and archives the raw, unprocessed messages before publishing the data to a pipeline.

Service Reference:

Examples:

Calling the createChannel operation

var params = {
  channelName: 'STRING_VALUE', /* required */
  channelStorage: {
    customerManagedS3: {
      bucket: 'STRING_VALUE', /* required */
      roleArn: 'STRING_VALUE', /* required */
      keyPrefix: 'STRING_VALUE'
    },
    serviceManagedS3: {
    }
  },
  retentionPeriod: {
    numberOfDays: 'NUMBER_VALUE',
    unlimited: true || false
  },
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
iotanalytics.createChannel(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: {})
    • channelName — (String)

      The name of the channel.

    • channelStorage — (map)

      Where channel data is stored. You can choose one of serviceManagedS3 or customerManagedS3 storage. If not specified, the default is serviceManagedS3. You can't change this storage option after the channel is created.

      • serviceManagedS3 — (map)

        Used to store channel data in an S3 bucket managed by IoT Analytics. You can't change the choice of S3 storage after the data store is created.

      • customerManagedS3 — (map)

        Used to store channel data in an S3 bucket that you manage. If customer managed storage is selected, the retentionPeriod parameter is ignored. You can't change the choice of S3 storage after the data store is created.

        • bucketrequired — (String)

          The name of the S3 bucket in which channel data is stored.

        • keyPrefix — (String)

          (Optional) The prefix used to create the keys of the channel data objects. Each object in an S3 bucket has a key that is its unique identifier in the bucket. Each object in a bucket has exactly one key. The prefix must end with a forward slash (/).

        • roleArnrequired — (String)

          The ARN of the role that grants IoT Analytics permission to interact with your Amazon S3 resources.

    • retentionPeriod — (map)

      How long, in days, message data is kept for the channel. When customerManagedS3 storage is selected, this parameter is ignored.

      • unlimited — (Boolean)

        If true, message data is kept indefinitely.

      • numberOfDays — (Integer)

        The number of days that message data is kept. The unlimited parameter must be false.

    • tags — (Array<map>)

      Metadata which can be used to manage the channel.

      • keyrequired — (String)

        The tag's key.

      • valuerequired — (String)

        The tag's value.

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:

      • channelName — (String)

        The name of the channel.

      • channelArn — (String)

        The ARN of the channel.

      • retentionPeriod — (map)

        How long, in days, message data is kept for the channel.

        • unlimited — (Boolean)

          If true, message data is kept indefinitely.

        • numberOfDays — (Integer)

          The number of days that message data is kept. The unlimited parameter must be false.

Returns:

  • (AWS.Request)

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

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

Used to create a dataset. A dataset stores data retrieved from a data store by applying a queryAction (a SQL query) or a containerAction (executing a containerized application). This operation creates the skeleton of a dataset. The dataset can be populated manually by calling CreateDatasetContent or automatically according to a trigger you specify.

Service Reference:

Examples:

Calling the createDataset operation

var params = {
  actions: [ /* required */
    {
      actionName: 'STRING_VALUE',
      containerAction: {
        executionRoleArn: 'STRING_VALUE', /* required */
        image: 'STRING_VALUE', /* required */
        resourceConfiguration: { /* required */
          computeType: ACU_1 | ACU_2, /* required */
          volumeSizeInGB: 'NUMBER_VALUE' /* required */
        },
        variables: [
          {
            name: 'STRING_VALUE', /* required */
            datasetContentVersionValue: {
              datasetName: 'STRING_VALUE' /* required */
            },
            doubleValue: 'NUMBER_VALUE',
            outputFileUriValue: {
              fileName: 'STRING_VALUE' /* required */
            },
            stringValue: 'STRING_VALUE'
          },
          /* more items */
        ]
      },
      queryAction: {
        sqlQuery: 'STRING_VALUE', /* required */
        filters: [
          {
            deltaTime: {
              offsetSeconds: 'NUMBER_VALUE', /* required */
              timeExpression: 'STRING_VALUE' /* required */
            }
          },
          /* more items */
        ]
      }
    },
    /* more items */
  ],
  datasetName: 'STRING_VALUE', /* required */
  contentDeliveryRules: [
    {
      destination: { /* required */
        iotEventsDestinationConfiguration: {
          inputName: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE' /* required */
        },
        s3DestinationConfiguration: {
          bucket: 'STRING_VALUE', /* required */
          key: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          glueConfiguration: {
            databaseName: 'STRING_VALUE', /* required */
            tableName: 'STRING_VALUE' /* required */
          }
        }
      },
      entryName: 'STRING_VALUE'
    },
    /* more items */
  ],
  lateDataRules: [
    {
      ruleConfiguration: { /* required */
        deltaTimeSessionWindowConfiguration: {
          timeoutInMinutes: 'NUMBER_VALUE' /* required */
        }
      },
      ruleName: 'STRING_VALUE'
    },
    /* more items */
  ],
  retentionPeriod: {
    numberOfDays: 'NUMBER_VALUE',
    unlimited: true || false
  },
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  triggers: [
    {
      dataset: {
        name: 'STRING_VALUE' /* required */
      },
      schedule: {
        expression: 'STRING_VALUE'
      }
    },
    /* more items */
  ],
  versioningConfiguration: {
    maxVersions: 'NUMBER_VALUE',
    unlimited: true || false
  }
};
iotanalytics.createDataset(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: {})
    • datasetName — (String)

      The name of the dataset.

    • actions — (Array<map>)

      A list of actions that create the dataset contents.

      • actionName — (String)

        The name of the dataset action by which dataset contents are automatically created.

      • queryAction — (map)

        An SqlQueryDatasetAction object that uses an SQL query to automatically create dataset contents.

        • sqlQueryrequired — (String)

          A SQL query string.

        • filters — (Array<map>)

          Prefilters applied to message data.

          • deltaTime — (map)

            Used to limit data to that which has arrived since the last execution of the action.

            • offsetSecondsrequired — (Integer)

              The number of seconds of estimated in-flight lag time of message data. When you create dataset contents using message data from a specified timeframe, some message data might still be in flight when processing begins, and so do not arrive in time to be processed. Use this field to make allowances for the in flight time of your message data, so that data not processed from a previous timeframe is included with the next timeframe. Otherwise, missed message data would be excluded from processing during the next timeframe too, because its timestamp places it within the previous timeframe.

            • timeExpressionrequired — (String)

              An expression by which the time of the message data might be determined. This can be the name of a timestamp field or a SQL expression that is used to derive the time the message data was generated.

      • containerAction — (map)

        Information that allows the system to run a containerized application to create the dataset contents. The application must be in a Docker container along with any required support libraries.

        • imagerequired — (String)

          The ARN of the Docker container stored in your account. The Docker container contains an application and required support libraries and is used to generate dataset contents.

        • executionRoleArnrequired — (String)

          The ARN of the role that gives permission to the system to access required resources to run the containerAction. This includes, at minimum, permission to retrieve the dataset contents that are the input to the containerized application.

        • resourceConfigurationrequired — (map)

          Configuration of the resource that executes the containerAction.

          • computeTyperequired — (String)

            The type of the compute resource used to execute the containerAction. Possible values are: ACU_1 (vCPU=4, memory=16 GiB) or ACU_2 (vCPU=8, memory=32 GiB).

            Possible values include:
            • "ACU_1"
            • "ACU_2"
          • volumeSizeInGBrequired — (Integer)

            The size, in GB, of the persistent storage available to the resource instance used to execute the containerAction (min: 1, max: 50).

        • variables — (Array<map>)

          The values of variables used in the context of the execution of the containerized application (basically, parameters passed to the application). Each variable must have a name and a value given by one of stringValue, datasetContentVersionValue, or outputFileUriValue.

          • namerequired — (String)

            The name of the variable.

          • stringValue — (String)

            The value of the variable as a string.

          • doubleValue — (Float)

            The value of the variable as a double (numeric).

          • datasetContentVersionValue — (map)

            The value of the variable as a structure that specifies a dataset content version.

            • datasetNamerequired — (String)

              The name of the dataset whose latest contents are used as input to the notebook or application.

          • outputFileUriValue — (map)

            The value of the variable as a structure that specifies an output file URI.

            • fileNamerequired — (String)

              The URI of the location where dataset contents are stored, usually the URI of a file in an S3 bucket.

    • triggers — (Array<map>)

      A list of triggers. A trigger causes dataset contents to be populated at a specified time interval or when another dataset's contents are created. The list of triggers can be empty or contain up to five DataSetTrigger objects.

      • schedule — (map)

        The Schedule when the trigger is initiated.

        • expression — (String)

          The expression that defines when to trigger an update. For more information, see Schedule Expressions for Rules in the Amazon CloudWatch Events User Guide.

      • dataset — (map)

        The dataset whose content creation triggers the creation of this dataset's contents.

        • namerequired — (String)

          The name of the dataset whose content generation triggers the new dataset content generation.

    • contentDeliveryRules — (Array<map>)

      When dataset contents are created, they are delivered to destinations specified here.

      • entryName — (String)

        The name of the dataset content delivery rules entry.

      • destinationrequired — (map)

        The destination to which dataset contents are delivered.

        • iotEventsDestinationConfiguration — (map)

          Configuration information for delivery of dataset contents to IoT Events.

          • inputNamerequired — (String)

            The name of the IoT Events input to which dataset contents are delivered.

          • roleArnrequired — (String)

            The ARN of the role that grants IoT Analytics permission to deliver dataset contents to an IoT Events input.

        • s3DestinationConfiguration — (map)

          Configuration information for delivery of dataset contents to Amazon S3.

          • bucketrequired — (String)

            The name of the S3 bucket to which dataset contents are delivered.

          • keyrequired — (String)

            The key of the dataset contents object in an S3 bucket. Each object has a key that is a unique identifier. Each object has exactly one key.

            You can create a unique key with the following options:

            • Use !{iotanalytics:scheduleTime} to insert the time of a scheduled SQL query run.

            • Use !{iotanalytics:versionId} to insert a unique hash that identifies a dataset content.

            • Use !{iotanalytics:creationTime} to insert the creation time of a dataset content.

            The following example creates a unique key for a CSV file: dataset/mydataset/!{iotanalytics:scheduleTime}/!{iotanalytics:versionId}.csv

            Note: If you don't use !{iotanalytics:versionId} to specify the key, you might get duplicate keys. For example, you might have two dataset contents with the same scheduleTime but different versionIds. This means that one dataset content overwrites the other.
          • glueConfiguration — (map)

            Configuration information for coordination with Glue, a fully managed extract, transform and load (ETL) service.

            • tableNamerequired — (String)

              The name of the table in your Glue Data Catalog that is used to perform the ETL operations. An Glue Data Catalog table contains partitioned data and descriptions of data sources and targets.

            • databaseNamerequired — (String)

              The name of the database in your Glue Data Catalog in which the table is located. An Glue Data Catalog database contains metadata tables.

          • roleArnrequired — (String)

            The ARN of the role that grants IoT Analytics permission to interact with your Amazon S3 and Glue resources.

    • retentionPeriod — (map)

      Optional. How long, in days, versions of dataset contents are kept for the dataset. If not specified or set to null, versions of dataset contents are retained for at most 90 days. The number of versions of dataset contents retained is determined by the versioningConfiguration parameter. For more information, see Keeping Multiple Versions of IoT Analytics datasets in the IoT Analytics User Guide.

      • unlimited — (Boolean)

        If true, message data is kept indefinitely.

      • numberOfDays — (Integer)

        The number of days that message data is kept. The unlimited parameter must be false.

    • versioningConfiguration — (map)

      Optional. How many versions of dataset contents are kept. If not specified or set to null, only the latest version plus the latest succeeded version (if they are different) are kept for the time period specified by the retentionPeriod parameter. For more information, see Keeping Multiple Versions of IoT Analytics datasets in the IoT Analytics User Guide.

      • unlimited — (Boolean)

        If true, unlimited versions of dataset contents are kept.

      • maxVersions — (Integer)

        How many versions of dataset contents are kept. The unlimited parameter must be false.

    • tags — (Array<map>)

      Metadata which can be used to manage the dataset.

      • keyrequired — (String)

        The tag's key.

      • valuerequired — (String)

        The tag's value.

    • lateDataRules — (Array<map>)

      A list of data rules that send notifications to CloudWatch, when data arrives late. To specify lateDataRules, the dataset must use a DeltaTimer filter.

      • ruleName — (String)

        The name of the late data rule.

      • ruleConfigurationrequired — (map)

        The information needed to configure the late data rule.

        • deltaTimeSessionWindowConfiguration — (map)

          The information needed to configure a delta time session window.

          • timeoutInMinutesrequired — (Integer)

            A time interval. You can use timeoutInMinutes so that IoT Analytics can batch up late data notifications that have been generated since the last execution. IoT Analytics sends one batch of notifications to Amazon CloudWatch Events at one time.

            For more information about how to write a timestamp expression, see Date and Time Functions and Operators, in the Presto 0.172 Documentation.

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:

      • datasetName — (String)

        The name of the dataset.

      • datasetArn — (String)

        The ARN of the dataset.

      • retentionPeriod — (map)

        How long, in days, dataset contents are kept for the dataset.

        • unlimited — (Boolean)

          If true, message data is kept indefinitely.

        • numberOfDays — (Integer)

          The number of days that message data is kept. The unlimited parameter must be false.

Returns:

  • (AWS.Request)

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

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

Creates the content of a dataset by applying a queryAction (a SQL query) or a containerAction (executing a containerized application).

Service Reference:

Examples:

Calling the createDatasetContent operation

var params = {
  datasetName: 'STRING_VALUE', /* required */
  versionId: 'STRING_VALUE'
};
iotanalytics.createDatasetContent(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: {})
    • datasetName — (String)

      The name of the dataset.

    • versionId — (String)

      The version ID of the dataset content. To specify versionId for a dataset content, the dataset must use a DeltaTimer filter.

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:

      • versionId — (String)

        The version ID of the dataset contents that are being created.

Returns:

  • (AWS.Request)

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

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

Creates a data store, which is a repository for messages.

Service Reference:

Examples:

Calling the createDatastore operation

var params = {
  datastoreName: 'STRING_VALUE', /* required */
  datastorePartitions: {
    partitions: [
      {
        attributePartition: {
          attributeName: 'STRING_VALUE' /* required */
        },
        timestampPartition: {
          attributeName: 'STRING_VALUE', /* required */
          timestampFormat: 'STRING_VALUE'
        }
      },
      /* more items */
    ]
  },
  datastoreStorage: {
    customerManagedS3: {
      bucket: 'STRING_VALUE', /* required */
      roleArn: 'STRING_VALUE', /* required */
      keyPrefix: 'STRING_VALUE'
    },
    iotSiteWiseMultiLayerStorage: {
      customerManagedS3Storage: { /* required */
        bucket: 'STRING_VALUE', /* required */
        keyPrefix: 'STRING_VALUE'
      }
    },
    serviceManagedS3: {
    }
  },
  fileFormatConfiguration: {
    jsonConfiguration: {
    },
    parquetConfiguration: {
      schemaDefinition: {
        columns: [
          {
            name: 'STRING_VALUE', /* required */
            type: 'STRING_VALUE' /* required */
          },
          /* more items */
        ]
      }
    }
  },
  retentionPeriod: {
    numberOfDays: 'NUMBER_VALUE',
    unlimited: true || false
  },
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
iotanalytics.createDatastore(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: {})
    • datastoreName — (String)

      The name of the data store.

    • datastoreStorage — (map)

      Where data in a data store is stored.. You can choose serviceManagedS3 storage, customerManagedS3 storage, or iotSiteWiseMultiLayerStorage storage. The default is serviceManagedS3. You can't change the choice of Amazon S3 storage after your data store is created.

      • serviceManagedS3 — (map)

        Used to store data in an Amazon S3 bucket managed by IoT Analytics. You can't change the choice of Amazon S3 storage after your data store is created.

      • customerManagedS3 — (map)

        S3-customer-managed; When you choose customer-managed storage, the retentionPeriod parameter is ignored. You can't change the choice of Amazon S3 storage after your data store is created.

        • bucketrequired — (String)

          The name of the Amazon S3 bucket where your data is stored.

        • keyPrefix — (String)

          (Optional) The prefix used to create the keys of the data store data objects. Each object in an Amazon S3 bucket has a key that is its unique identifier in the bucket. Each object in a bucket has exactly one key. The prefix must end with a forward slash (/).

        • roleArnrequired — (String)

          The ARN of the role that grants IoT Analytics permission to interact with your Amazon S3 resources.

      • iotSiteWiseMultiLayerStorage — (map)

        Used to store data used by IoT SiteWise in an Amazon S3 bucket that you manage. You can't change the choice of Amazon S3 storage after your data store is created.

        • customerManagedS3Storagerequired — (map)

          Used to store data used by IoT SiteWise in an Amazon S3 bucket that you manage.

          • bucketrequired — (String)

            The name of the Amazon S3 bucket where your data is stored.

          • keyPrefix — (String)

            (Optional) The prefix used to create the keys of the data store data objects. Each object in an Amazon S3 bucket has a key that is its unique identifier in the bucket. Each object in a bucket has exactly one key. The prefix must end with a forward slash (/).

    • retentionPeriod — (map)

      How long, in days, message data is kept for the data store. When customerManagedS3 storage is selected, this parameter is ignored.

      • unlimited — (Boolean)

        If true, message data is kept indefinitely.

      • numberOfDays — (Integer)

        The number of days that message data is kept. The unlimited parameter must be false.

    • tags — (Array<map>)

      Metadata which can be used to manage the data store.

      • keyrequired — (String)

        The tag's key.

      • valuerequired — (String)

        The tag's value.

    • fileFormatConfiguration — (map)

      Contains the configuration information of file formats. IoT Analytics data stores support JSON and Parquet.

      The default file format is JSON. You can specify only one format.

      You can't change the file format after you create the data store.

      • jsonConfiguration — (map)

        Contains the configuration information of the JSON format.

      • parquetConfiguration — (map)

        Contains the configuration information of the Parquet format.

        • schemaDefinition — (map)

          Information needed to define a schema.

          • columns — (Array<map>)

            Specifies one or more columns that store your data.

            Each schema can have up to 100 columns. Each column can have up to 100 nested types.

            • namerequired — (String)

              The name of the column.

            • typerequired — (String)

              The type of data. For more information about the supported data types, see Common data types in the Glue Developer Guide.

    • datastorePartitions — (map)

      Contains information about the partition dimensions in a data store.

      • partitions — (Array<map>)

        A list of partition dimensions in a data store.

        • attributePartition — (map)

          A partition dimension defined by an attributeName.

          • attributeNamerequired — (String)

            The name of the attribute that defines a partition dimension.

        • timestampPartition — (map)

          A partition dimension defined by a timestamp attribute.

          • attributeNamerequired — (String)

            The attribute name of the partition defined by a timestamp.

          • timestampFormat — (String)

            The timestamp format of a partition defined by a timestamp. The default format is seconds since epoch (January 1, 1970 at midnight UTC time).

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:

      • datastoreName — (String)

        The name of the data store.

      • datastoreArn — (String)

        The ARN of the data store.

      • retentionPeriod — (map)

        How long, in days, message data is kept for the data store.

        • unlimited — (Boolean)

          If true, message data is kept indefinitely.

        • numberOfDays — (Integer)

          The number of days that message data is kept. The unlimited parameter must be false.

Returns:

  • (AWS.Request)

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

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

Creates a pipeline. A pipeline consumes messages from a channel and allows you to process the messages before storing them in a data store. You must specify both a channel and a datastore activity and, optionally, as many as 23 additional activities in the pipelineActivities array.

Service Reference:

Examples:

Calling the createPipeline operation

var params = {
  pipelineActivities: [ /* required */
    {
      addAttributes: {
        attributes: { /* required */
          '<AttributeName>': 'STRING_VALUE',
          /* '<AttributeName>': ... */
        },
        name: 'STRING_VALUE', /* required */
        next: 'STRING_VALUE'
      },
      channel: {
        channelName: 'STRING_VALUE', /* required */
        name: 'STRING_VALUE', /* required */
        next: 'STRING_VALUE'
      },
      datastore: {
        datastoreName: 'STRING_VALUE', /* required */
        name: 'STRING_VALUE' /* required */
      },
      deviceRegistryEnrich: {
        attribute: 'STRING_VALUE', /* required */
        name: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        thingName: 'STRING_VALUE', /* required */
        next: 'STRING_VALUE'
      },
      deviceShadowEnrich: {
        attribute: 'STRING_VALUE', /* required */
        name: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        thingName: 'STRING_VALUE', /* required */
        next: 'STRING_VALUE'
      },
      filter: {
        filter: 'STRING_VALUE', /* required */
        name: 'STRING_VALUE', /* required */
        next: 'STRING_VALUE'
      },
      lambda: {
        batchSize: 'NUMBER_VALUE', /* required */
        lambdaName: 'STRING_VALUE', /* required */
        name: 'STRING_VALUE', /* required */
        next: 'STRING_VALUE'
      },
      math: {
        attribute: 'STRING_VALUE', /* required */
        math: 'STRING_VALUE', /* required */
        name: 'STRING_VALUE', /* required */
        next: 'STRING_VALUE'
      },
      removeAttributes: {
        attributes: [ /* required */
          'STRING_VALUE',
          /* more items */
        ],
        name: 'STRING_VALUE', /* required */
        next: 'STRING_VALUE'
      },
      selectAttributes: {
        attributes: [ /* required */
          'STRING_VALUE',
          /* more items */
        ],
        name: 'STRING_VALUE', /* required */
        next: 'STRING_VALUE'
      }
    },
    /* more items */
  ],
  pipelineName: 'STRING_VALUE', /* required */
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
iotanalytics.createPipeline(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: {})
    • pipelineName — (String)

      The name of the pipeline.

    • pipelineActivities — (Array<map>)

      A list of PipelineActivity objects. Activities perform transformations on your messages, such as removing, renaming or adding message attributes; filtering messages based on attribute values; invoking your Lambda unctions on messages for advanced processing; or performing mathematical transformations to normalize device data.

      The list can be 2-25 PipelineActivity objects and must contain both a channel and a datastore activity. Each entry in the list must contain only one activity. For example:

      pipelineActivities = [ { "channel": { ... } }, { "lambda": { ... } }, ... ]

      • channel — (map)

        Determines the source of the messages to be processed.

        • namerequired — (String)

          The name of the channel activity.

        • channelNamerequired — (String)

          The name of the channel from which the messages are processed.

        • next — (String)

          The next activity in the pipeline.

      • lambda — (map)

        Runs a Lambda function to modify the message.

        • namerequired — (String)

          The name of the lambda activity.

        • lambdaNamerequired — (String)

          The name of the Lambda function that is run on the message.

        • batchSizerequired — (Integer)

          The number of messages passed to the Lambda function for processing.

          The Lambda function must be able to process all of these messages within five minutes, which is the maximum timeout duration for Lambda functions.

        • next — (String)

          The next activity in the pipeline.

      • datastore — (map)

        Specifies where to store the processed message data.

        • namerequired — (String)

          The name of the datastore activity.

        • datastoreNamerequired — (String)

          The name of the data store where processed messages are stored.

      • addAttributes — (map)

        Adds other attributes based on existing attributes in the message.

        • namerequired — (String)

          The name of the addAttributes activity.

        • attributesrequired — (map<String>)

          A list of 1-50 AttributeNameMapping objects that map an existing attribute to a new attribute.

          Note: The existing attributes remain in the message, so if you want to remove the originals, use RemoveAttributeActivity.
        • next — (String)

          The next activity in the pipeline.

      • removeAttributes — (map)

        Removes attributes from a message.

        • namerequired — (String)

          The name of the removeAttributes activity.

        • attributesrequired — (Array<String>)

          A list of 1-50 attributes to remove from the message.

        • next — (String)

          The next activity in the pipeline.

      • selectAttributes — (map)

        Used to create a new message using only the specified attributes from the original message.

        • namerequired — (String)

          The name of the selectAttributes activity.

        • attributesrequired — (Array<String>)

          A list of the attributes to select from the message.

        • next — (String)

          The next activity in the pipeline.

      • filter — (map)

        Filters a message based on its attributes.

        • namerequired — (String)

          The name of the filter activity.

        • filterrequired — (String)

          An expression that looks like a SQL WHERE clause that must return a Boolean value. Messages that satisfy the condition are passed to the next activity.

        • next — (String)

          The next activity in the pipeline.

      • math — (map)

        Computes an arithmetic expression using the message's attributes and adds it to the message.

        • namerequired — (String)

          The name of the math activity.

        • attributerequired — (String)

          The name of the attribute that contains the result of the math operation.

        • mathrequired — (String)

          An expression that uses one or more existing attributes and must return an integer value.

        • next — (String)

          The next activity in the pipeline.

      • deviceRegistryEnrich — (map)

        Adds data from the IoT device registry to your message.

        • namerequired — (String)

          The name of the deviceRegistryEnrich activity.

        • attributerequired — (String)

          The name of the attribute that is added to the message.

        • thingNamerequired — (String)

          The name of the IoT device whose registry information is added to the message.

        • roleArnrequired — (String)

          The ARN of the role that allows access to the device's registry information.

        • next — (String)

          The next activity in the pipeline.

      • deviceShadowEnrich — (map)

        Adds information from the IoT Device Shadow service to a message.

        • namerequired — (String)

          The name of the deviceShadowEnrich activity.

        • attributerequired — (String)

          The name of the attribute that is added to the message.

        • thingNamerequired — (String)

          The name of the IoT device whose shadow information is added to the message.

        • roleArnrequired — (String)

          The ARN of the role that allows access to the device's shadow.

        • next — (String)

          The next activity in the pipeline.

    • tags — (Array<map>)

      Metadata which can be used to manage the pipeline.

      • keyrequired — (String)

        The tag's key.

      • valuerequired — (String)

        The tag's value.

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:

      • pipelineName — (String)

        The name of the pipeline.

      • pipelineArn — (String)

        The ARN of the pipeline.

Returns:

  • (AWS.Request)

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

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

Deletes the specified channel.

Service Reference:

Examples:

Calling the deleteChannel operation

var params = {
  channelName: 'STRING_VALUE' /* required */
};
iotanalytics.deleteChannel(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: {})
    • channelName — (String)

      The name of the channel to delete.

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.

Returns:

  • (AWS.Request)

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

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

Deletes the specified dataset.

You do not have to delete the content of the dataset before you perform this operation.

Service Reference:

Examples:

Calling the deleteDataset operation

var params = {
  datasetName: 'STRING_VALUE' /* required */
};
iotanalytics.deleteDataset(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: {})
    • datasetName — (String)

      The name of the dataset to delete.

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.

Returns:

  • (AWS.Request)

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

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

Deletes the content of the specified dataset.

Service Reference:

Examples:

Calling the deleteDatasetContent operation

var params = {
  datasetName: 'STRING_VALUE', /* required */
  versionId: 'STRING_VALUE'
};
iotanalytics.deleteDatasetContent(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: {})
    • datasetName — (String)

      The name of the dataset whose content is deleted.

    • versionId — (String)

      The version of the dataset whose content is deleted. You can also use the strings "$LATEST" or "$LATEST_SUCCEEDED" to delete the latest or latest successfully completed data set. If not specified, "$LATEST_SUCCEEDED" is the default.

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.

Returns:

  • (AWS.Request)

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

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

Deletes the specified data store.

Service Reference:

Examples:

Calling the deleteDatastore operation

var params = {
  datastoreName: 'STRING_VALUE' /* required */
};
iotanalytics.deleteDatastore(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: {})
    • datastoreName — (String)

      The name of the data store to delete.

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.

Returns:

  • (AWS.Request)

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

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

Deletes the specified pipeline.

Service Reference:

Examples:

Calling the deletePipeline operation

var params = {
  pipelineName: 'STRING_VALUE' /* required */
};
iotanalytics.deletePipeline(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: {})
    • pipelineName — (String)

      The name of the pipeline to delete.

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.

Returns:

  • (AWS.Request)

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

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

Retrieves information about a channel.

Service Reference:

Examples:

Calling the describeChannel operation

var params = {
  channelName: 'STRING_VALUE', /* required */
  includeStatistics: true || false
};
iotanalytics.describeChannel(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: {})
    • channelName — (String)

      The name of the channel whose information is retrieved.

    • includeStatistics — (Boolean)

      If true, additional statistical information about the channel is included in the response. This feature can't be used with a channel whose S3 storage is customer-managed.

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:

      • channel — (map)

        An object that contains information about the channel.

        • name — (String)

          The name of the channel.

        • storage — (map)

          Where channel data is stored. You can choose one of serviceManagedS3 or customerManagedS3 storage. If not specified, the default is serviceManagedS3. You can't change this storage option after the channel is created.

          • serviceManagedS3 — (map)

            Used to store channel data in an S3 bucket managed by IoT Analytics. You can't change the choice of S3 storage after the data store is created.

          • customerManagedS3 — (map)

            Used to store channel data in an S3 bucket that you manage. If customer managed storage is selected, the retentionPeriod parameter is ignored. You can't change the choice of S3 storage after the data store is created.

            • bucketrequired — (String)

              The name of the S3 bucket in which channel data is stored.

            • keyPrefix — (String)

              (Optional) The prefix used to create the keys of the channel data objects. Each object in an S3 bucket has a key that is its unique identifier in the bucket. Each object in a bucket has exactly one key. The prefix must end with a forward slash (/).

            • roleArnrequired — (String)

              The ARN of the role that grants IoT Analytics permission to interact with your Amazon S3 resources.

        • arn — (String)

          The ARN of the channel.

        • status — (String)

          The status of the channel.

          Possible values include:
          • "CREATING"
          • "ACTIVE"
          • "DELETING"
        • retentionPeriod — (map)

          How long, in days, message data is kept for the channel.

          • unlimited — (Boolean)

            If true, message data is kept indefinitely.

          • numberOfDays — (Integer)

            The number of days that message data is kept. The unlimited parameter must be false.

        • creationTime — (Date)

          When the channel was created.

        • lastUpdateTime — (Date)

          When the channel was last updated.

        • lastMessageArrivalTime — (Date)

          The last time when a new message arrived in the channel.

          IoT Analytics updates this value at most once per minute for one channel. Hence, the lastMessageArrivalTime value is an approximation.

          This feature only applies to messages that arrived in the data store after October 23, 2020.

      • statistics — (map)

        Statistics about the channel. Included if the includeStatistics parameter is set to true in the request.

        • size — (map)

          The estimated size of the channel.

          • estimatedSizeInBytes — (Float)

            The estimated size of the resource, in bytes.

          • estimatedOn — (Date)

            The time when the estimate of the size of the resource was made.

Returns:

  • (AWS.Request)

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

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

Retrieves information about a dataset.

Service Reference:

Examples:

Calling the describeDataset operation

var params = {
  datasetName: 'STRING_VALUE' /* required */
};
iotanalytics.describeDataset(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: {})
    • datasetName — (String)

      The name of the dataset whose information is retrieved.

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:

      • dataset — (map)

        An object that contains information about the dataset.

        • name — (String)

          The name of the dataset.

        • arn — (String)

          The ARN of the dataset.

        • actions — (Array<map>)

          The DatasetAction objects that automatically create the dataset contents.

          • actionName — (String)

            The name of the dataset action by which dataset contents are automatically created.

          • queryAction — (map)

            An SqlQueryDatasetAction object that uses an SQL query to automatically create dataset contents.

            • sqlQueryrequired — (String)

              A SQL query string.

            • filters — (Array<map>)

              Prefilters applied to message data.

              • deltaTime — (map)

                Used to limit data to that which has arrived since the last execution of the action.

                • offsetSecondsrequired — (Integer)

                  The number of seconds of estimated in-flight lag time of message data. When you create dataset contents using message data from a specified timeframe, some message data might still be in flight when processing begins, and so do not arrive in time to be processed. Use this field to make allowances for the in flight time of your message data, so that data not processed from a previous timeframe is included with the next timeframe. Otherwise, missed message data would be excluded from processing during the next timeframe too, because its timestamp places it within the previous timeframe.

                • timeExpressionrequired — (String)

                  An expression by which the time of the message data might be determined. This can be the name of a timestamp field or a SQL expression that is used to derive the time the message data was generated.

          • containerAction — (map)

            Information that allows the system to run a containerized application to create the dataset contents. The application must be in a Docker container along with any required support libraries.

            • imagerequired — (String)

              The ARN of the Docker container stored in your account. The Docker container contains an application and required support libraries and is used to generate dataset contents.

            • executionRoleArnrequired — (String)

              The ARN of the role that gives permission to the system to access required resources to run the containerAction. This includes, at minimum, permission to retrieve the dataset contents that are the input to the containerized application.

            • resourceConfigurationrequired — (map)

              Configuration of the resource that executes the containerAction.

              • computeTyperequired — (String)

                The type of the compute resource used to execute the containerAction. Possible values are: ACU_1 (vCPU=4, memory=16 GiB) or ACU_2 (vCPU=8, memory=32 GiB).

                Possible values include:
                • "ACU_1"
                • "ACU_2"
              • volumeSizeInGBrequired — (Integer)

                The size, in GB, of the persistent storage available to the resource instance used to execute the containerAction (min: 1, max: 50).

            • variables — (Array<map>)

              The values of variables used in the context of the execution of the containerized application (basically, parameters passed to the application). Each variable must have a name and a value given by one of stringValue, datasetContentVersionValue, or outputFileUriValue.

              • namerequired — (String)

                The name of the variable.

              • stringValue — (String)

                The value of the variable as a string.

              • doubleValue — (Float)

                The value of the variable as a double (numeric).

              • datasetContentVersionValue — (map)

                The value of the variable as a structure that specifies a dataset content version.

                • datasetNamerequired — (String)

                  The name of the dataset whose latest contents are used as input to the notebook or application.

              • outputFileUriValue — (map)

                The value of the variable as a structure that specifies an output file URI.

                • fileNamerequired — (String)

                  The URI of the location where dataset contents are stored, usually the URI of a file in an S3 bucket.

        • triggers — (Array<map>)

          The DatasetTrigger objects that specify when the dataset is automatically updated.

          • schedule — (map)

            The Schedule when the trigger is initiated.

            • expression — (String)

              The expression that defines when to trigger an update. For more information, see Schedule Expressions for Rules in the Amazon CloudWatch Events User Guide.

          • dataset — (map)

            The dataset whose content creation triggers the creation of this dataset's contents.

            • namerequired — (String)

              The name of the dataset whose content generation triggers the new dataset content generation.

        • contentDeliveryRules — (Array<map>)

          When dataset contents are created they are delivered to destinations specified here.

          • entryName — (String)

            The name of the dataset content delivery rules entry.

          • destinationrequired — (map)

            The destination to which dataset contents are delivered.

            • iotEventsDestinationConfiguration — (map)

              Configuration information for delivery of dataset contents to IoT Events.

              • inputNamerequired — (String)

                The name of the IoT Events input to which dataset contents are delivered.

              • roleArnrequired — (String)

                The ARN of the role that grants IoT Analytics permission to deliver dataset contents to an IoT Events input.

            • s3DestinationConfiguration — (map)

              Configuration information for delivery of dataset contents to Amazon S3.

              • bucketrequired — (String)

                The name of the S3 bucket to which dataset contents are delivered.

              • keyrequired — (String)

                The key of the dataset contents object in an S3 bucket. Each object has a key that is a unique identifier. Each object has exactly one key.

                You can create a unique key with the following options:

                • Use !{iotanalytics:scheduleTime} to insert the time of a scheduled SQL query run.

                • Use !{iotanalytics:versionId} to insert a unique hash that identifies a dataset content.

                • Use !{iotanalytics:creationTime} to insert the creation time of a dataset content.

                The following example creates a unique key for a CSV file: dataset/mydataset/!{iotanalytics:scheduleTime}/!{iotanalytics:versionId}.csv

                Note: If you don't use !{iotanalytics:versionId} to specify the key, you might get duplicate keys. For example, you might have two dataset contents with the same scheduleTime but different versionIds. This means that one dataset content overwrites the other.
              • glueConfiguration — (map)

                Configuration information for coordination with Glue, a fully managed extract, transform and load (ETL) service.

                • tableNamerequired — (String)

                  The name of the table in your Glue Data Catalog that is used to perform the ETL operations. An Glue Data Catalog table contains partitioned data and descriptions of data sources and targets.

                • databaseNamerequired — (String)

                  The name of the database in your Glue Data Catalog in which the table is located. An Glue Data Catalog database contains metadata tables.

              • roleArnrequired — (String)

                The ARN of the role that grants IoT Analytics permission to interact with your Amazon S3 and Glue resources.

        • status — (String)

          The status of the dataset.

          Possible values include:
          • "CREATING"
          • "ACTIVE"
          • "DELETING"
        • creationTime — (Date)

          When the dataset was created.

        • lastUpdateTime — (Date)

          The last time the dataset was updated.

        • retentionPeriod — (map)

          Optional. How long, in days, message data is kept for the dataset.

          • unlimited — (Boolean)

            If true, message data is kept indefinitely.

          • numberOfDays — (Integer)

            The number of days that message data is kept. The unlimited parameter must be false.

        • versioningConfiguration — (map)

          Optional. How many versions of dataset contents are kept. If not specified or set to null, only the latest version plus the latest succeeded version (if they are different) are kept for the time period specified by the retentionPeriod parameter. For more information, see Keeping Multiple Versions of IoT Analytics datasets in the IoT Analytics User Guide.

          • unlimited — (Boolean)

            If true, unlimited versions of dataset contents are kept.

          • maxVersions — (Integer)

            How many versions of dataset contents are kept. The unlimited parameter must be false.

        • lateDataRules — (Array<map>)

          A list of data rules that send notifications to CloudWatch, when data arrives late. To specify lateDataRules, the dataset must use a DeltaTimer filter.

          • ruleName — (String)

            The name of the late data rule.

          • ruleConfigurationrequired — (map)

            The information needed to configure the late data rule.

            • deltaTimeSessionWindowConfiguration — (map)

              The information needed to configure a delta time session window.

              • timeoutInMinutesrequired — (Integer)

                A time interval. You can use timeoutInMinutes so that IoT Analytics can batch up late data notifications that have been generated since the last execution. IoT Analytics sends one batch of notifications to Amazon CloudWatch Events at one time.

                For more information about how to write a timestamp expression, see Date and Time Functions and Operators, in the Presto 0.172 Documentation.

Returns:

  • (AWS.Request)

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

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

Retrieves information about a data store.

Service Reference:

Examples:

Calling the describeDatastore operation

var params = {
  datastoreName: 'STRING_VALUE', /* required */
  includeStatistics: true || false
};
iotanalytics.describeDatastore(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: {})
    • datastoreName — (String)

      The name of the data store

    • includeStatistics — (Boolean)

      If true, additional statistical information about the data store is included in the response. This feature can't be used with a data store whose S3 storage is customer-managed.

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:

      • datastore — (map)

        Information about the data store.

        • name — (String)

          The name of the data store.

        • storage — (map)

          Where data in a data store is stored.. You can choose serviceManagedS3 storage, customerManagedS3 storage, or iotSiteWiseMultiLayerStorage storage. The default is serviceManagedS3. You can't change the choice of Amazon S3 storage after your data store is created.

          • serviceManagedS3 — (map)

            Used to store data in an Amazon S3 bucket managed by IoT Analytics. You can't change the choice of Amazon S3 storage after your data store is created.

          • customerManagedS3 — (map)

            S3-customer-managed; When you choose customer-managed storage, the retentionPeriod parameter is ignored. You can't change the choice of Amazon S3 storage after your data store is created.

            • bucketrequired — (String)

              The name of the Amazon S3 bucket where your data is stored.

            • keyPrefix — (String)

              (Optional) The prefix used to create the keys of the data store data objects. Each object in an Amazon S3 bucket has a key that is its unique identifier in the bucket. Each object in a bucket has exactly one key. The prefix must end with a forward slash (/).

            • roleArnrequired — (String)

              The ARN of the role that grants IoT Analytics permission to interact with your Amazon S3 resources.

          • iotSiteWiseMultiLayerStorage — (map)

            Used to store data used by IoT SiteWise in an Amazon S3 bucket that you manage. You can't change the choice of Amazon S3 storage after your data store is created.

            • customerManagedS3Storagerequired — (map)

              Used to store data used by IoT SiteWise in an Amazon S3 bucket that you manage.

              • bucketrequired — (String)

                The name of the Amazon S3 bucket where your data is stored.

              • keyPrefix — (String)

                (Optional) The prefix used to create the keys of the data store data objects. Each object in an Amazon S3 bucket has a key that is its unique identifier in the bucket. Each object in a bucket has exactly one key. The prefix must end with a forward slash (/).

        • arn — (String)

          The ARN of the data store.

        • status — (String)

          The status of a data store:

          CREATING

          The data store is being created.

          ACTIVE

          The data store has been created and can be used.

          DELETING

          The data store is being deleted.

          Possible values include:
          • "CREATING"
          • "ACTIVE"
          • "DELETING"
        • retentionPeriod — (map)

          How long, in days, message data is kept for the data store. When customerManagedS3 storage is selected, this parameter is ignored.

          • unlimited — (Boolean)

            If true, message data is kept indefinitely.

          • numberOfDays — (Integer)

            The number of days that message data is kept. The unlimited parameter must be false.

        • creationTime — (Date)

          When the data store was created.

        • lastUpdateTime — (Date)

          The last time the data store was updated.

        • lastMessageArrivalTime — (Date)

          The last time when a new message arrived in the data store.

          IoT Analytics updates this value at most once per minute for Amazon Simple Storage Service one data store. Hence, the lastMessageArrivalTime value is an approximation.

          This feature only applies to messages that arrived in the data store after October 23, 2020.

        • fileFormatConfiguration — (map)

          Contains the configuration information of file formats. IoT Analytics data stores support JSON and Parquet.

          The default file format is JSON. You can specify only one format.

          You can't change the file format after you create the data store.

          • jsonConfiguration — (map)

            Contains the configuration information of the JSON format.

          • parquetConfiguration — (map)

            Contains the configuration information of the Parquet format.

            • schemaDefinition — (map)

              Information needed to define a schema.

              • columns — (Array<map>)

                Specifies one or more columns that store your data.

                Each schema can have up to 100 columns. Each column can have up to 100 nested types.

                • namerequired — (String)

                  The name of the column.

                • typerequired — (String)

                  The type of data. For more information about the supported data types, see Common data types in the Glue Developer Guide.

        • datastorePartitions — (map)

          Contains information about the partition dimensions in a data store.

          • partitions — (Array<map>)

            A list of partition dimensions in a data store.

            • attributePartition — (map)

              A partition dimension defined by an attributeName.

              • attributeNamerequired — (String)

                The name of the attribute that defines a partition dimension.

            • timestampPartition — (map)

              A partition dimension defined by a timestamp attribute.

              • attributeNamerequired — (String)

                The attribute name of the partition defined by a timestamp.

              • timestampFormat — (String)

                The timestamp format of a partition defined by a timestamp. The default format is seconds since epoch (January 1, 1970 at midnight UTC time).

      • statistics — (map)

        Additional statistical information about the data store. Included if the includeStatistics parameter is set to true in the request.

        • size — (map)

          The estimated size of the data store.

          • estimatedSizeInBytes — (Float)

            The estimated size of the resource, in bytes.

          • estimatedOn — (Date)

            The time when the estimate of the size of the resource was made.

Returns:

  • (AWS.Request)

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

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

Retrieves the current settings of the IoT Analytics logging options.

Service Reference:

Examples:

Calling the describeLoggingOptions operation

var params = {
};
iotanalytics.describeLoggingOptions(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: {})

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:

      • loggingOptions — (map)

        The current settings of the IoT Analytics logging options.

        • roleArnrequired — (String)

          The ARN of the role that grants permission to IoT Analytics to perform logging.

        • levelrequired — (String)

          The logging level. Currently, only ERROR is supported.

          Possible values include:
          • "ERROR"
        • enabledrequired — (Boolean)

          If true, logging is enabled for IoT Analytics.

Returns:

  • (AWS.Request)

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

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

Retrieves information about a pipeline.

Service Reference:

Examples:

Calling the describePipeline operation

var params = {
  pipelineName: 'STRING_VALUE' /* required */
};
iotanalytics.describePipeline(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: {})
    • pipelineName — (String)

      The name of the pipeline whose information is retrieved.

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:

      • pipeline — (map)

        A Pipeline object that contains information about the pipeline.

        • name — (String)

          The name of the pipeline.

        • arn — (String)

          The ARN of the pipeline.

        • activities — (Array<map>)

          The activities that perform transformations on the messages.

          • channel — (map)

            Determines the source of the messages to be processed.

            • namerequired — (String)

              The name of the channel activity.

            • channelNamerequired — (String)

              The name of the channel from which the messages are processed.

            • next — (String)

              The next activity in the pipeline.

          • lambda — (map)

            Runs a Lambda function to modify the message.

            • namerequired — (String)

              The name of the lambda activity.

            • lambdaNamerequired — (String)

              The name of the Lambda function that is run on the message.

            • batchSizerequired — (Integer)

              The number of messages passed to the Lambda function for processing.

              The Lambda function must be able to process all of these messages within five minutes, which is the maximum timeout duration for Lambda functions.

            • next — (String)

              The next activity in the pipeline.

          • datastore — (map)

            Specifies where to store the processed message data.

            • namerequired — (String)

              The name of the datastore activity.

            • datastoreNamerequired — (String)

              The name of the data store where processed messages are stored.

          • addAttributes — (map)

            Adds other attributes based on existing attributes in the message.

            • namerequired — (String)

              The name of the addAttributes activity.

            • attributesrequired — (map<String>)

              A list of 1-50 AttributeNameMapping objects that map an existing attribute to a new attribute.

              Note: The existing attributes remain in the message, so if you want to remove the originals, use RemoveAttributeActivity.
            • next — (String)

              The next activity in the pipeline.

          • removeAttributes — (map)

            Removes attributes from a message.

            • namerequired — (String)

              The name of the removeAttributes activity.

            • attributesrequired — (Array<String>)

              A list of 1-50 attributes to remove from the message.

            • next — (String)

              The next activity in the pipeline.

          • selectAttributes — (map)

            Used to create a new message using only the specified attributes from the original message.

            • namerequired — (String)

              The name of the selectAttributes activity.

            • attributesrequired — (Array<String>)

              A list of the attributes to select from the message.

            • next — (String)

              The next activity in the pipeline.

          • filter — (map)

            Filters a message based on its attributes.

            • namerequired — (String)

              The name of the filter activity.

            • filterrequired — (String)

              An expression that looks like a SQL WHERE clause that must return a Boolean value. Messages that satisfy the condition are passed to the next activity.

            • next — (String)

              The next activity in the pipeline.

          • math — (map)

            Computes an arithmetic expression using the message's attributes and adds it to the message.

            • namerequired — (String)

              The name of the math activity.

            • attributerequired — (String)

              The name of the attribute that contains the result of the math operation.

            • mathrequired — (String)

              An expression that uses one or more existing attributes and must return an integer value.

            • next — (String)

              The next activity in the pipeline.

          • deviceRegistryEnrich — (map)

            Adds data from the IoT device registry to your message.

            • namerequired — (String)

              The name of the deviceRegistryEnrich activity.

            • attributerequired — (String)

              The name of the attribute that is added to the message.

            • thingNamerequired — (String)

              The name of the IoT device whose registry information is added to the message.

            • roleArnrequired — (String)

              The ARN of the role that allows access to the device's registry information.

            • next — (String)

              The next activity in the pipeline.

          • deviceShadowEnrich — (map)

            Adds information from the IoT Device Shadow service to a message.

            • namerequired — (String)

              The name of the deviceShadowEnrich activity.

            • attributerequired — (String)

              The name of the attribute that is added to the message.

            • thingNamerequired — (String)

              The name of the IoT device whose shadow information is added to the message.

            • roleArnrequired — (String)

              The ARN of the role that allows access to the device's shadow.

            • next — (String)

              The next activity in the pipeline.

        • reprocessingSummaries — (Array<map>)

          A summary of information about the pipeline reprocessing.

          • id — (String)

            The reprocessingId returned by StartPipelineReprocessing.

          • status — (String)

            The status of the pipeline reprocessing.

            Possible values include:
            • "RUNNING"
            • "SUCCEEDED"
            • "CANCELLED"
            • "FAILED"
          • creationTime — (Date)

            The time the pipeline reprocessing was created.

        • creationTime — (Date)

          When the pipeline was created.

        • lastUpdateTime — (Date)

          The last time the pipeline was updated.

Returns:

  • (AWS.Request)

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

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

Retrieves the contents of a dataset as presigned URIs.

Service Reference:

Examples:

Calling the getDatasetContent operation

var params = {
  datasetName: 'STRING_VALUE', /* required */
  versionId: 'STRING_VALUE'
};
iotanalytics.getDatasetContent(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: {})
    • datasetName — (String)

      The name of the dataset whose contents are retrieved.

    • versionId — (String)

      The version of the dataset whose contents are retrieved. You can also use the strings "$LATEST" or "$LATEST_SUCCEEDED" to retrieve the contents of the latest or latest successfully completed dataset. If not specified, "$LATEST_SUCCEEDED" is the default.

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:

      • entries — (Array<map>)

        A list of DatasetEntry objects.

        • entryName — (String)

          The name of the dataset item.

        • dataURI — (String)

          The presigned URI of the dataset item.

      • timestamp — (Date)

        The time when the request was made.

      • status — (map)

        The status of the dataset content.

        • state — (String)

          The state of the dataset contents. Can be one of READY, CREATING, SUCCEEDED, or FAILED.

          Possible values include:
          • "CREATING"
          • "SUCCEEDED"
          • "FAILED"
        • reason — (String)

          The reason the dataset contents are in this state.

Returns:

  • (AWS.Request)

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

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

Retrieves a list of channels.

Service Reference:

Examples:

Calling the listChannels operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iotanalytics.listChannels(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: {})
    • nextToken — (String)

      The token for the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return in this request.

      The default value is 100.

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:

      • channelSummaries — (Array<map>)

        A list of ChannelSummary objects.

        • channelName — (String)

          The name of the channel.

        • channelStorage — (map)

          Where channel data is stored.

          • serviceManagedS3 — (map)

            Used to store channel data in an S3 bucket managed by IoT Analytics.

          • customerManagedS3 — (map)

            Used to store channel data in an S3 bucket that you manage.

            • bucket — (String)

              The name of the S3 bucket in which channel data is stored.

            • keyPrefix — (String)

              (Optional) The prefix used to create the keys of the channel data objects. Each object in an S3 bucket has a key that is its unique identifier within the bucket (each object in a bucket has exactly one key). The prefix must end with a forward slash (/).

            • roleArn — (String)

              The ARN of the role that grants IoT Analytics permission to interact with your Amazon S3 resources.

        • status — (String)

          The status of the channel.

          Possible values include:
          • "CREATING"
          • "ACTIVE"
          • "DELETING"
        • creationTime — (Date)

          When the channel was created.

        • lastUpdateTime — (Date)

          The last time the channel was updated.

        • lastMessageArrivalTime — (Date)

          The last time when a new message arrived in the channel.

          IoT Analytics updates this value at most once per minute for one channel. Hence, the lastMessageArrivalTime value is an approximation.

          This feature only applies to messages that arrived in the data store after October 23, 2020.

      • nextToken — (String)

        The token to retrieve the next set of results, or null if there are no more results.

Returns:

  • (AWS.Request)

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

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

Lists information about dataset contents that have been created.

Service Reference:

Examples:

Calling the listDatasetContents operation

var params = {
  datasetName: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  scheduledBefore: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  scheduledOnOrAfter: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
};
iotanalytics.listDatasetContents(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: {})
    • datasetName — (String)

      The name of the dataset whose contents information you want to list.

    • nextToken — (String)

      The token for the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return in this request.

    • scheduledOnOrAfter — (Date)

      A filter to limit results to those dataset contents whose creation is scheduled on or after the given time. See the field triggers.schedule in the CreateDataset request. (timestamp)

    • scheduledBefore — (Date)

      A filter to limit results to those dataset contents whose creation is scheduled before the given time. See the field triggers.schedule in the CreateDataset request. (timestamp)

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:

      • datasetContentSummaries — (Array<map>)

        Summary information about dataset contents that have been created.

        • version — (String)

          The version of the dataset contents.

        • status — (map)

          The status of the dataset contents.

          • state — (String)

            The state of the dataset contents. Can be one of READY, CREATING, SUCCEEDED, or FAILED.

            Possible values include:
            • "CREATING"
            • "SUCCEEDED"
            • "FAILED"
          • reason — (String)

            The reason the dataset contents are in this state.

        • creationTime — (Date)

          The actual time the creation of the dataset contents was started.

        • scheduleTime — (Date)

          The time the creation of the dataset contents was scheduled to start.

        • completionTime — (Date)

          The time the dataset content status was updated to SUCCEEDED or FAILED.

      • nextToken — (String)

        The token to retrieve the next set of results, or null if there are no more results.

Returns:

  • (AWS.Request)

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

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

Retrieves information about datasets.

Service Reference:

Examples:

Calling the listDatasets operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iotanalytics.listDatasets(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: {})
    • nextToken — (String)

      The token for the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return in this request.

      The default value is 100.

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:

      • datasetSummaries — (Array<map>)

        A list of DatasetSummary objects.

        • datasetName — (String)

          The name of the dataset.

        • status — (String)

          The status of the dataset.

          Possible values include:
          • "CREATING"
          • "ACTIVE"
          • "DELETING"
        • creationTime — (Date)

          The time the dataset was created.

        • lastUpdateTime — (Date)

          The last time the dataset was updated.

        • triggers — (Array<map>)

          A list of triggers. A trigger causes dataset content to be populated at a specified time interval or when another dataset is populated. The list of triggers can be empty or contain up to five DataSetTrigger objects

          • schedule — (map)

            The Schedule when the trigger is initiated.

            • expression — (String)

              The expression that defines when to trigger an update. For more information, see Schedule Expressions for Rules in the Amazon CloudWatch Events User Guide.

          • dataset — (map)

            The dataset whose content creation triggers the creation of this dataset's contents.

            • namerequired — (String)

              The name of the dataset whose content generation triggers the new dataset content generation.

        • actions — (Array<map>)

          A list of DataActionSummary objects.

          • actionName — (String)

            The name of the action that automatically creates the dataset's contents.

          • actionType — (String)

            The type of action by which the dataset's contents are automatically created.

            Possible values include:
            • "QUERY"
            • "CONTAINER"
      • nextToken — (String)

        The token to retrieve the next set of results, or null if there are no more results.

Returns:

  • (AWS.Request)

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

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

Retrieves a list of data stores.

Service Reference:

Examples:

Calling the listDatastores operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iotanalytics.listDatastores(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: {})
    • nextToken — (String)

      The token for the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return in this request.

      The default value is 100.

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:

      • datastoreSummaries — (Array<map>)

        A list of DatastoreSummary objects.

        • datastoreName — (String)

          The name of the data store.

        • datastoreStorage — (map)

          Where data in a data store is stored.

          • serviceManagedS3 — (map)

            Used to store data in an Amazon S3 bucket managed by IoT Analytics.

          • customerManagedS3 — (map)

            Used to store data in an Amazon S3 bucket managed by IoT Analytics.

            • bucket — (String)

              The name of the Amazon S3 bucket where your data is stored.

            • keyPrefix — (String)

              (Optional) The prefix used to create the keys of the data store data objects. Each object in an Amazon S3 bucket has a key that is its unique identifier in the bucket. Each object in a bucket has exactly one key. The prefix must end with a forward slash (/).

            • roleArn — (String)

              The ARN of the role that grants IoT Analytics permission to interact with your Amazon S3 resources.

          • iotSiteWiseMultiLayerStorage — (map)

            Used to store data used by IoT SiteWise in an Amazon S3 bucket that you manage.

            • customerManagedS3Storage — (map)

              Used to store data used by IoT SiteWise in an Amazon S3 bucket that you manage.

              • bucket — (String)

                The name of the Amazon S3 bucket where your data is stored.

              • keyPrefix — (String)

                (Optional) The prefix used to create the keys of the data store data objects. Each object in an Amazon S3 bucket has a key that is its unique identifier in the bucket. Each object in a bucket has exactly one key. The prefix must end with a forward slash (/).

        • status — (String)

          The status of the data store.

          Possible values include:
          • "CREATING"
          • "ACTIVE"
          • "DELETING"
        • creationTime — (Date)

          When the data store was created.

        • lastUpdateTime — (Date)

          The last time the data store was updated.

        • lastMessageArrivalTime — (Date)

          The last time when a new message arrived in the data store.

          IoT Analytics updates this value at most once per minute for Amazon Simple Storage Service one data store. Hence, the lastMessageArrivalTime value is an approximation.

          This feature only applies to messages that arrived in the data store after October 23, 2020.

        • fileFormatType — (String)

          The file format of the data in the data store.

          Possible values include:
          • "JSON"
          • "PARQUET"
        • datastorePartitions — (map)

          Contains information about the partition dimensions in a data store.

          • partitions — (Array<map>)

            A list of partition dimensions in a data store.

            • attributePartition — (map)

              A partition dimension defined by an attributeName.

              • attributeNamerequired — (String)

                The name of the attribute that defines a partition dimension.

            • timestampPartition — (map)

              A partition dimension defined by a timestamp attribute.

              • attributeNamerequired — (String)

                The attribute name of the partition defined by a timestamp.

              • timestampFormat — (String)

                The timestamp format of a partition defined by a timestamp. The default format is seconds since epoch (January 1, 1970 at midnight UTC time).

      • nextToken — (String)

        The token to retrieve the next set of results, or null if there are no more results.

Returns:

  • (AWS.Request)

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

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

Retrieves a list of pipelines.

Service Reference:

Examples:

Calling the listPipelines operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
iotanalytics.listPipelines(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: {})
    • nextToken — (String)

      The token for the next set of results.

    • maxResults — (Integer)

      The maximum number of results to return in this request.

      The default value is 100.

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:

      • pipelineSummaries — (Array<map>)

        A list of PipelineSummary objects.

        • pipelineName — (String)

          The name of the pipeline.

        • reprocessingSummaries — (Array<map>)

          A summary of information about the pipeline reprocessing.

          • id — (String)

            The reprocessingId returned by StartPipelineReprocessing.

          • status — (String)

            The status of the pipeline reprocessing.

            Possible values include:
            • "RUNNING"
            • "SUCCEEDED"
            • "CANCELLED"
            • "FAILED"
          • creationTime — (Date)

            The time the pipeline reprocessing was created.

        • creationTime — (Date)

          When the pipeline was created.

        • lastUpdateTime — (Date)

          When the pipeline was last updated.

      • nextToken — (String)

        The token to retrieve the next set of results, or null if there are no more results.

Returns:

  • (AWS.Request)

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

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

Lists the tags (metadata) that you have assigned to the resource.

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  resourceArn: 'STRING_VALUE' /* required */
};
iotanalytics.listTagsForResource(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: {})
    • resourceArn — (String)

      The ARN of the resource whose tags you want to list.

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:

      • tags — (Array<map>)

        The tags (metadata) that you have assigned to the resource.

        • keyrequired — (String)

          The tag's key.

        • valuerequired — (String)

          The tag's value.

Returns:

  • (AWS.Request)

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

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

Sets or updates the IoT Analytics logging options.

If you update the value of any loggingOptions field, it takes up to one minute for the change to take effect. Also, if you change the policy attached to the role you specified in the roleArn field (for example, to correct an invalid policy), it takes up to five minutes for that change to take effect.

Service Reference:

Examples:

Calling the putLoggingOptions operation

var params = {
  loggingOptions: { /* required */
    enabled: true || false, /* required */
    level: ERROR, /* required */
    roleArn: 'STRING_VALUE' /* required */
  }
};
iotanalytics.putLoggingOptions(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: {})
    • loggingOptions — (map)

      The new values of the IoT Analytics logging options.

      • roleArnrequired — (String)

        The ARN of the role that grants permission to IoT Analytics to perform logging.

      • levelrequired — (String)

        The logging level. Currently, only ERROR is supported.

        Possible values include:
        • "ERROR"
      • enabledrequired — (Boolean)

        If true, logging is enabled for IoT Analytics.

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.

Returns:

  • (AWS.Request)

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

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

Simulates the results of running a pipeline activity on a message payload.

Service Reference:

Examples:

Calling the runPipelineActivity operation

var params = {
  payloads: [ /* required */
    Buffer.from('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */,
    /* more items */
  ],
  pipelineActivity: { /* required */
    addAttributes: {
      attributes: { /* required */
        '<AttributeName>': 'STRING_VALUE',
        /* '<AttributeName>': ... */
      },
      name: 'STRING_VALUE', /* required */
      next: 'STRING_VALUE'
    },
    channel: {
      channelName: 'STRING_VALUE', /* required */
      name: 'STRING_VALUE', /* required */
      next: 'STRING_VALUE'
    },
    datastore: {
      datastoreName: 'STRING_VALUE', /* required */
      name: 'STRING_VALUE' /* required */
    },
    deviceRegistryEnrich: {
      attribute: 'STRING_VALUE', /* required */
      name: 'STRING_VALUE', /* required */
      roleArn: 'STRING_VALUE', /* required */
      thingName: 'STRING_VALUE', /* required */
      next: 'STRING_VALUE'
    },
    deviceShadowEnrich: {
      attribute: 'STRING_VALUE', /* required */
      name: 'STRING_VALUE', /* required */
      roleArn: 'STRING_VALUE', /* required */
      thingName: 'STRING_VALUE', /* required */
      next: 'STRING_VALUE'
    },
    filter: {
      filter: 'STRING_VALUE', /* required */
      name: 'STRING_VALUE', /* required */
      next: 'STRING_VALUE'
    },
    lambda: {
      batchSize: 'NUMBER_VALUE', /* required */
      lambdaName: 'STRING_VALUE', /* required */
      name: 'STRING_VALUE', /* required */
      next: 'STRING_VALUE'
    },
    math: {
      attribute: 'STRING_VALUE', /* required */
      math: 'STRING_VALUE', /* required */
      name: 'STRING_VALUE', /* required */
      next: 'STRING_VALUE'
    },
    removeAttributes: {
      attributes: [ /* required */
        'STRING_VALUE',
        /* more items */
      ],
      name: 'STRING_VALUE', /* required */
      next: 'STRING_VALUE'
    },
    selectAttributes: {
      attributes: [ /* required */
        'STRING_VALUE',
        /* more items */
      ],
      name: 'STRING_VALUE', /* required */
      next: 'STRING_VALUE'
    }
  }
};
iotanalytics.runPipelineActivity(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: {})
    • pipelineActivity — (map)

      The pipeline activity that is run. This must not be a channel activity or a data store activity because these activities are used in a pipeline only to load the original message and to store the (possibly) transformed message. If a Lambda activity is specified, only short-running Lambda functions (those with a timeout of less than 30 seconds or less) can be used.

      • channel — (map)

        Determines the source of the messages to be processed.

        • namerequired — (String)

          The name of the channel activity.

        • channelNamerequired — (String)

          The name of the channel from which the messages are processed.

        • next — (String)

          The next activity in the pipeline.

      • lambda — (map)

        Runs a Lambda function to modify the message.

        • namerequired — (String)

          The name of the lambda activity.

        • lambdaNamerequired — (String)

          The name of the Lambda function that is run on the message.

        • batchSizerequired — (Integer)

          The number of messages passed to the Lambda function for processing.

          The Lambda function must be able to process all of these messages within five minutes, which is the maximum timeout duration for Lambda functions.

        • next — (String)

          The next activity in the pipeline.

      • datastore — (map)

        Specifies where to store the processed message data.

        • namerequired — (String)

          The name of the datastore activity.

        • datastoreNamerequired — (String)

          The name of the data store where processed messages are stored.

      • addAttributes — (map)

        Adds other attributes based on existing attributes in the message.

        • namerequired — (String)

          The name of the addAttributes activity.

        • attributesrequired — (map<String>)

          A list of 1-50 AttributeNameMapping objects that map an existing attribute to a new attribute.

          Note: The existing attributes remain in the message, so if you want to remove the originals, use RemoveAttributeActivity.
        • next — (String)

          The next activity in the pipeline.

      • removeAttributes — (map)

        Removes attributes from a message.

        • namerequired — (String)

          The name of the removeAttributes activity.

        • attributesrequired — (Array<String>)

          A list of 1-50 attributes to remove from the message.

        • next — (String)

          The next activity in the pipeline.

      • selectAttributes — (map)

        Used to create a new message using only the specified attributes from the original message.

        • namerequired — (String)

          The name of the selectAttributes activity.

        • attributesrequired — (Array<String>)

          A list of the attributes to select from the message.

        • next — (String)

          The next activity in the pipeline.

      • filter — (map)

        Filters a message based on its attributes.

        • namerequired — (String)

          The name of the filter activity.

        • filterrequired — (String)

          An expression that looks like a SQL WHERE clause that must return a Boolean value. Messages that satisfy the condition are passed to the next activity.

        • next — (String)

          The next activity in the pipeline.

      • math — (map)

        Computes an arithmetic expression using the message's attributes and adds it to the message.

        • namerequired — (String)

          The name of the math activity.

        • attributerequired — (String)

          The name of the attribute that contains the result of the math operation.

        • mathrequired — (String)

          An expression that uses one or more existing attributes and must return an integer value.

        • next — (String)

          The next activity in the pipeline.

      • deviceRegistryEnrich — (map)

        Adds data from the IoT device registry to your message.

        • namerequired — (String)

          The name of the deviceRegistryEnrich activity.

        • attributerequired — (String)

          The name of the attribute that is added to the message.

        • thingNamerequired — (String)

          The name of the IoT device whose registry information is added to the message.

        • roleArnrequired — (String)

          The ARN of the role that allows access to the device's registry information.

        • next — (String)

          The next activity in the pipeline.

      • deviceShadowEnrich — (map)

        Adds information from the IoT Device Shadow service to a message.

        • namerequired — (String)

          The name of the deviceShadowEnrich activity.

        • attributerequired — (String)

          The name of the attribute that is added to the message.

        • thingNamerequired — (String)

          The name of the IoT device whose shadow information is added to the message.

        • roleArnrequired — (String)

          The ARN of the role that allows access to the device's shadow.

        • next — (String)

          The next activity in the pipeline.

    • payloads — (Array<Buffer, Typed Array, Blob, String>)

      The sample message payloads on which the pipeline activity is run.

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:

      • payloads — (Array<Buffer, Typed Array, Blob, String>)

        The enriched or transformed sample message payloads as base64-encoded strings. (The results of running the pipeline activity on each input sample message payload, encoded in base64.)

      • logResult — (String)

        In case the pipeline activity fails, the log message that is generated.

Returns:

  • (AWS.Request)

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

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

Retrieves a sample of messages from the specified channel ingested during the specified timeframe. Up to 10 messages can be retrieved.

Service Reference:

Examples:

Calling the sampleChannelData operation

var params = {
  channelName: 'STRING_VALUE', /* required */
  endTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  maxMessages: 'NUMBER_VALUE',
  startTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
};
iotanalytics.sampleChannelData(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: {})
    • channelName — (String)

      The name of the channel whose message samples are retrieved.

    • maxMessages — (Integer)

      The number of sample messages to be retrieved. The limit is 10. The default is also 10.

    • startTime — (Date)

      The start of the time window from which sample messages are retrieved.

    • endTime — (Date)

      The end of the time window from which sample messages are retrieved.

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:

      • payloads — (Array<Buffer, Typed Array, Blob, String>)

        The list of message samples. Each sample message is returned as a base64-encoded string.

Returns:

  • (AWS.Request)

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

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

Starts the reprocessing of raw message data through the pipeline.

Service Reference:

Examples:

Calling the startPipelineReprocessing operation

var params = {
  pipelineName: 'STRING_VALUE', /* required */
  channelMessages: {
    s3Paths: [
      'STRING_VALUE',
      /* more items */
    ]
  },
  endTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  startTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
};
iotanalytics.startPipelineReprocessing(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: {})
    • pipelineName — (String)

      The name of the pipeline on which to start reprocessing.

    • startTime — (Date)

      The start time (inclusive) of raw message data that is reprocessed.

      If you specify a value for the startTime parameter, you must not use the channelMessages object.

    • endTime — (Date)

      The end time (exclusive) of raw message data that is reprocessed.

      If you specify a value for the endTime parameter, you must not use the channelMessages object.

    • channelMessages — (map)

      Specifies one or more sets of channel messages that you want to reprocess.

      If you use the channelMessages object, you must not specify a value for startTime and endTime.

      • s3Paths — (Array<String>)

        Specifies one or more keys that identify the Amazon Simple Storage Service (Amazon S3) objects that save your channel messages.

        You must use the full path for the key.

        Example path: channel/mychannel/__dt=2020-02-29 00:00:00/1582940490000_1582940520000_123456789012_mychannel_0_2118.0.json.gz

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:

      • reprocessingId — (String)

        The ID of the pipeline reprocessing activity that was started.

Returns:

  • (AWS.Request)

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

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

Adds to or modifies the tags of the given resource. Tags are metadata that can be used to manage a resource.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tags: [ /* required */
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
iotanalytics.tagResource(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: {})
    • resourceArn — (String)

      The ARN of the resource whose tags you want to modify.

    • tags — (Array<map>)

      The new or modified tags for the resource.

      • keyrequired — (String)

        The tag's key.

      • valuerequired — (String)

        The tag's value.

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.

Returns:

  • (AWS.Request)

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

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

Removes the given tags (metadata) from the resource.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
iotanalytics.untagResource(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: {})
    • resourceArn — (String)

      The ARN of the resource whose tags you want to remove.

    • tagKeys — (Array<String>)

      The keys of those tags which you want to remove.

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.

Returns:

  • (AWS.Request)

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

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

Used to update the settings of a channel.

Service Reference:

Examples:

Calling the updateChannel operation

var params = {
  channelName: 'STRING_VALUE', /* required */
  channelStorage: {
    customerManagedS3: {
      bucket: 'STRING_VALUE', /* required */
      roleArn: 'STRING_VALUE', /* required */
      keyPrefix: 'STRING_VALUE'
    },
    serviceManagedS3: {
    }
  },
  retentionPeriod: {
    numberOfDays: 'NUMBER_VALUE',
    unlimited: true || false
  }
};
iotanalytics.updateChannel(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: {})
    • channelName — (String)

      The name of the channel to be updated.

    • channelStorage — (map)

      Where channel data is stored. You can choose one of serviceManagedS3 or customerManagedS3 storage. If not specified, the default is serviceManagedS3. You can't change this storage option after the channel is created.

      • serviceManagedS3 — (map)

        Used to store channel data in an S3 bucket managed by IoT Analytics. You can't change the choice of S3 storage after the data store is created.

      • customerManagedS3 — (map)

        Used to store channel data in an S3 bucket that you manage. If customer managed storage is selected, the retentionPeriod parameter is ignored. You can't change the choice of S3 storage after the data store is created.

        • bucketrequired — (String)

          The name of the S3 bucket in which channel data is stored.

        • keyPrefix — (String)

          (Optional) The prefix used to create the keys of the channel data objects. Each object in an S3 bucket has a key that is its unique identifier in the bucket. Each object in a bucket has exactly one key. The prefix must end with a forward slash (/).

        • roleArnrequired — (String)

          The ARN of the role that grants IoT Analytics permission to interact with your Amazon S3 resources.

    • retentionPeriod — (map)

      How long, in days, message data is kept for the channel. The retention period can't be updated if the channel's Amazon S3 storage is customer-managed.

      • unlimited — (Boolean)

        If true, message data is kept indefinitely.

      • numberOfDays — (Integer)

        The number of days that message data is kept. The unlimited parameter must be false.

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.

Returns:

  • (AWS.Request)

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

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

Updates the settings of a dataset.

Service Reference:

Examples:

Calling the updateDataset operation

var params = {
  actions: [ /* required */
    {
      actionName: 'STRING_VALUE',
      containerAction: {
        executionRoleArn: 'STRING_VALUE', /* required */
        image: 'STRING_VALUE', /* required */
        resourceConfiguration: { /* required */
          computeType: ACU_1 | ACU_2, /* required */
          volumeSizeInGB: 'NUMBER_VALUE' /* required */
        },
        variables: [
          {
            name: 'STRING_VALUE', /* required */
            datasetContentVersionValue: {
              datasetName: 'STRING_VALUE' /* required */
            },
            doubleValue: 'NUMBER_VALUE',
            outputFileUriValue: {
              fileName: 'STRING_VALUE' /* required */
            },
            stringValue: 'STRING_VALUE'
          },
          /* more items */
        ]
      },
      queryAction: {
        sqlQuery: 'STRING_VALUE', /* required */
        filters: [
          {
            deltaTime: {
              offsetSeconds: 'NUMBER_VALUE', /* required */
              timeExpression: 'STRING_VALUE' /* required */
            }
          },
          /* more items */
        ]
      }
    },
    /* more items */
  ],
  datasetName: 'STRING_VALUE', /* required */
  contentDeliveryRules: [
    {
      destination: { /* required */
        iotEventsDestinationConfiguration: {
          inputName: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE' /* required */
        },
        s3DestinationConfiguration: {
          bucket: 'STRING_VALUE', /* required */
          key: 'STRING_VALUE', /* required */
          roleArn: 'STRING_VALUE', /* required */
          glueConfiguration: {
            databaseName: 'STRING_VALUE', /* required */
            tableName: 'STRING_VALUE' /* required */
          }
        }
      },
      entryName: 'STRING_VALUE'
    },
    /* more items */
  ],
  lateDataRules: [
    {
      ruleConfiguration: { /* required */
        deltaTimeSessionWindowConfiguration: {
          timeoutInMinutes: 'NUMBER_VALUE' /* required */
        }
      },
      ruleName: 'STRING_VALUE'
    },
    /* more items */
  ],
  retentionPeriod: {
    numberOfDays: 'NUMBER_VALUE',
    unlimited: true || false
  },
  triggers: [
    {
      dataset: {
        name: 'STRING_VALUE' /* required */
      },
      schedule: {
        expression: 'STRING_VALUE'
      }
    },
    /* more items */
  ],
  versioningConfiguration: {
    maxVersions: 'NUMBER_VALUE',
    unlimited: true || false
  }
};
iotanalytics.updateDataset(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: {})
    • datasetName — (String)

      The name of the dataset to update.

    • actions — (Array<map>)

      A list of DatasetAction objects.

      • actionName — (String)

        The name of the dataset action by which dataset contents are automatically created.

      • queryAction — (map)

        An SqlQueryDatasetAction object that uses an SQL query to automatically create dataset contents.

        • sqlQueryrequired — (String)

          A SQL query string.

        • filters — (Array<map>)

          Prefilters applied to message data.

          • deltaTime — (map)

            Used to limit data to that which has arrived since the last execution of the action.

            • offsetSecondsrequired — (Integer)

              The number of seconds of estimated in-flight lag time of message data. When you create dataset contents using message data from a specified timeframe, some message data might still be in flight when processing begins, and so do not arrive in time to be processed. Use this field to make allowances for the in flight time of your message data, so that data not processed from a previous timeframe is included with the next timeframe. Otherwise, missed message data would be excluded from processing during the next timeframe too, because its timestamp places it within the previous timeframe.

            • timeExpressionrequired — (String)

              An expression by which the time of the message data might be determined. This can be the name of a timestamp field or a SQL expression that is used to derive the time the message data was generated.

      • containerAction — (map)

        Information that allows the system to run a containerized application to create the dataset contents. The application must be in a Docker container along with any required support libraries.

        • imagerequired — (String)

          The ARN of the Docker container stored in your account. The Docker container contains an application and required support libraries and is used to generate dataset contents.

        • executionRoleArnrequired — (String)

          The ARN of the role that gives permission to the system to access required resources to run the containerAction. This includes, at minimum, permission to retrieve the dataset contents that are the input to the containerized application.

        • resourceConfigurationrequired — (map)

          Configuration of the resource that executes the containerAction.

          • computeTyperequired — (String)

            The type of the compute resource used to execute the containerAction. Possible values are: ACU_1 (vCPU=4, memory=16 GiB) or ACU_2 (vCPU=8, memory=32 GiB).

            Possible values include:
            • "ACU_1"
            • "ACU_2"
          • volumeSizeInGBrequired — (Integer)

            The size, in GB, of the persistent storage available to the resource instance used to execute the containerAction (min: 1, max: 50).

        • variables — (Array<map>)

          The values of variables used in the context of the execution of the containerized application (basically, parameters passed to the application). Each variable must have a name and a value given by one of stringValue, datasetContentVersionValue, or outputFileUriValue.

          • namerequired — (String)

            The name of the variable.

          • stringValue — (String)

            The value of the variable as a string.

          • doubleValue — (Float)

            The value of the variable as a double (numeric).

          • datasetContentVersionValue — (map)

            The value of the variable as a structure that specifies a dataset content version.

            • datasetNamerequired — (String)

              The name of the dataset whose latest contents are used as input to the notebook or application.

          • outputFileUriValue — (map)

            The value of the variable as a structure that specifies an output file URI.

            • fileNamerequired — (String)

              The URI of the location where dataset contents are stored, usually the URI of a file in an S3 bucket.

    • triggers — (Array<map>)

      A list of DatasetTrigger objects. The list can be empty or can contain up to five DatasetTrigger objects.

      • schedule — (map)

        The Schedule when the trigger is initiated.

        • expression — (String)

          The expression that defines when to trigger an update. For more information, see Schedule Expressions for Rules in the Amazon CloudWatch Events User Guide.

      • dataset — (map)

        The dataset whose content creation triggers the creation of this dataset's contents.

        • namerequired — (String)

          The name of the dataset whose content generation triggers the new dataset content generation.

    • contentDeliveryRules — (Array<map>)

      When dataset contents are created, they are delivered to destinations specified here.

      • entryName — (String)

        The name of the dataset content delivery rules entry.

      • destinationrequired — (map)

        The destination to which dataset contents are delivered.

        • iotEventsDestinationConfiguration — (map)

          Configuration information for delivery of dataset contents to IoT Events.

          • inputNamerequired — (String)

            The name of the IoT Events input to which dataset contents are delivered.

          • roleArnrequired — (String)

            The ARN of the role that grants IoT Analytics permission to deliver dataset contents to an IoT Events input.

        • s3DestinationConfiguration — (map)

          Configuration information for delivery of dataset contents to Amazon S3.

          • bucketrequired — (String)

            The name of the S3 bucket to which dataset contents are delivered.

          • keyrequired — (String)

            The key of the dataset contents object in an S3 bucket. Each object has a key that is a unique identifier. Each object has exactly one key.

            You can create a unique key with the following options:

            • Use !{iotanalytics:scheduleTime} to insert the time of a scheduled SQL query run.

            • Use !{iotanalytics:versionId} to insert a unique hash that identifies a dataset content.

            • Use !{iotanalytics:creationTime} to insert the creation time of a dataset content.

            The following example creates a unique key for a CSV file: dataset/mydataset/!{iotanalytics:scheduleTime}/!{iotanalytics:versionId}.csv

            Note: If you don't use !{iotanalytics:versionId} to specify the key, you might get duplicate keys. For example, you might have two dataset contents with the same scheduleTime but different versionIds. This means that one dataset content overwrites the other.
          • glueConfiguration — (map)

            Configuration information for coordination with Glue, a fully managed extract, transform and load (ETL) service.

            • tableNamerequired — (String)

              The name of the table in your Glue Data Catalog that is used to perform the ETL operations. An Glue Data Catalog table contains partitioned data and descriptions of data sources and targets.

            • databaseNamerequired — (String)

              The name of the database in your Glue Data Catalog in which the table is located. An Glue Data Catalog database contains metadata tables.

          • roleArnrequired — (String)

            The ARN of the role that grants IoT Analytics permission to interact with your Amazon S3 and Glue resources.

    • retentionPeriod — (map)

      How long, in days, dataset contents are kept for the dataset.

      • unlimited — (Boolean)

        If true, message data is kept indefinitely.

      • numberOfDays — (Integer)

        The number of days that message data is kept. The unlimited parameter must be false.

    • versioningConfiguration — (map)

      Optional. How many versions of dataset contents are kept. If not specified or set to null, only the latest version plus the latest succeeded version (if they are different) are kept for the time period specified by the retentionPeriod parameter. For more information, see Keeping Multiple Versions of IoT Analytics datasets in the IoT Analytics User Guide.

      • unlimited — (Boolean)

        If true, unlimited versions of dataset contents are kept.

      • maxVersions — (Integer)

        How many versions of dataset contents are kept. The unlimited parameter must be false.

    • lateDataRules — (Array<map>)

      A list of data rules that send notifications to CloudWatch, when data arrives late. To specify lateDataRules, the dataset must use a DeltaTimer filter.

      • ruleName — (String)

        The name of the late data rule.

      • ruleConfigurationrequired — (map)

        The information needed to configure the late data rule.

        • deltaTimeSessionWindowConfiguration — (map)

          The information needed to configure a delta time session window.

          • timeoutInMinutesrequired — (Integer)

            A time interval. You can use timeoutInMinutes so that IoT Analytics can batch up late data notifications that have been generated since the last execution. IoT Analytics sends one batch of notifications to Amazon CloudWatch Events at one time.

            For more information about how to write a timestamp expression, see Date and Time Functions and Operators, in the Presto 0.172 Documentation.

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.

Returns:

  • (AWS.Request)

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

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

Used to update the settings of a data store.

Service Reference:

Examples:

Calling the updateDatastore operation

var params = {
  datastoreName: 'STRING_VALUE', /* required */
  datastoreStorage: {
    customerManagedS3: {
      bucket: 'STRING_VALUE', /* required */
      roleArn: 'STRING_VALUE', /* required */
      keyPrefix: 'STRING_VALUE'
    },
    iotSiteWiseMultiLayerStorage: {
      customerManagedS3Storage: { /* required */
        bucket: 'STRING_VALUE', /* required */
        keyPrefix: 'STRING_VALUE'
      }
    },
    serviceManagedS3: {
    }
  },
  fileFormatConfiguration: {
    jsonConfiguration: {
    },
    parquetConfiguration: {
      schemaDefinition: {
        columns: [
          {
            name: 'STRING_VALUE', /* required */
            type: 'STRING_VALUE' /* required */
          },
          /* more items */
        ]
      }
    }
  },
  retentionPeriod: {
    numberOfDays: 'NUMBER_VALUE',
    unlimited: true || false
  }
};
iotanalytics.updateDatastore(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: {})
    • datastoreName — (String)

      The name of the data store to be updated.

    • retentionPeriod — (map)

      How long, in days, message data is kept for the data store. The retention period can't be updated if the data store's Amazon S3 storage is customer-managed.

      • unlimited — (Boolean)

        If true, message data is kept indefinitely.

      • numberOfDays — (Integer)

        The number of days that message data is kept. The unlimited parameter must be false.

    • datastoreStorage — (map)

      Where data in a data store is stored.. You can choose serviceManagedS3 storage, customerManagedS3 storage, or iotSiteWiseMultiLayerStorage storage. The default is serviceManagedS3. You can't change the choice of Amazon S3 storage after your data store is created.

      • serviceManagedS3 — (map)

        Used to store data in an Amazon S3 bucket managed by IoT Analytics. You can't change the choice of Amazon S3 storage after your data store is created.

      • customerManagedS3 — (map)

        S3-customer-managed; When you choose customer-managed storage, the retentionPeriod parameter is ignored. You can't change the choice of Amazon S3 storage after your data store is created.

        • bucketrequired — (String)

          The name of the Amazon S3 bucket where your data is stored.

        • keyPrefix — (String)

          (Optional) The prefix used to create the keys of the data store data objects. Each object in an Amazon S3 bucket has a key that is its unique identifier in the bucket. Each object in a bucket has exactly one key. The prefix must end with a forward slash (/).

        • roleArnrequired — (String)

          The ARN of the role that grants IoT Analytics permission to interact with your Amazon S3 resources.

      • iotSiteWiseMultiLayerStorage — (map)

        Used to store data used by IoT SiteWise in an Amazon S3 bucket that you manage. You can't change the choice of Amazon S3 storage after your data store is created.

        • customerManagedS3Storagerequired — (map)

          Used to store data used by IoT SiteWise in an Amazon S3 bucket that you manage.

          • bucketrequired — (String)

            The name of the Amazon S3 bucket where your data is stored.

          • keyPrefix — (String)

            (Optional) The prefix used to create the keys of the data store data objects. Each object in an Amazon S3 bucket has a key that is its unique identifier in the bucket. Each object in a bucket has exactly one key. The prefix must end with a forward slash (/).

    • fileFormatConfiguration — (map)

      Contains the configuration information of file formats. IoT Analytics data stores support JSON and Parquet.

      The default file format is JSON. You can specify only one format.

      You can't change the file format after you create the data store.

      • jsonConfiguration — (map)

        Contains the configuration information of the JSON format.

      • parquetConfiguration — (map)

        Contains the configuration information of the Parquet format.

        • schemaDefinition — (map)

          Information needed to define a schema.

          • columns — (Array<map>)

            Specifies one or more columns that store your data.

            Each schema can have up to 100 columns. Each column can have up to 100 nested types.

            • namerequired — (String)

              The name of the column.

            • typerequired — (String)

              The type of data. For more information about the supported data types, see Common data types in the Glue Developer Guide.

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.

Returns:

  • (AWS.Request)

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

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

Updates the settings of a pipeline. You must specify both a channel and a datastore activity and, optionally, as many as 23 additional activities in the pipelineActivities array.

Service Reference:

Examples:

Calling the updatePipeline operation

var params = {
  pipelineActivities: [ /* required */
    {
      addAttributes: {
        attributes: { /* required */
          '<AttributeName>': 'STRING_VALUE',
          /* '<AttributeName>': ... */
        },
        name: 'STRING_VALUE', /* required */
        next: 'STRING_VALUE'
      },
      channel: {
        channelName: 'STRING_VALUE', /* required */
        name: 'STRING_VALUE', /* required */
        next: 'STRING_VALUE'
      },
      datastore: {
        datastoreName: 'STRING_VALUE', /* required */
        name: 'STRING_VALUE' /* required */
      },
      deviceRegistryEnrich: {
        attribute: 'STRING_VALUE', /* required */
        name: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        thingName: 'STRING_VALUE', /* required */
        next: 'STRING_VALUE'
      },
      deviceShadowEnrich: {
        attribute: 'STRING_VALUE', /* required */
        name: 'STRING_VALUE', /* required */
        roleArn: 'STRING_VALUE', /* required */
        thingName: 'STRING_VALUE', /* required */
        next: 'STRING_VALUE'
      },
      filter: {
        filter: 'STRING_VALUE', /* required */
        name: 'STRING_VALUE', /* required */
        next: 'STRING_VALUE'
      },
      lambda: {
        batchSize: 'NUMBER_VALUE', /* required */
        lambdaName: 'STRING_VALUE', /* required */
        name: 'STRING_VALUE', /* required */
        next: 'STRING_VALUE'
      },
      math: {
        attribute: 'STRING_VALUE', /* required */
        math: 'STRING_VALUE', /* required */
        name: 'STRING_VALUE', /* required */
        next: 'STRING_VALUE'
      },
      removeAttributes: {
        attributes: [ /* required */
          'STRING_VALUE',
          /* more items */
        ],
        name: 'STRING_VALUE', /* required */
        next: 'STRING_VALUE'
      },
      selectAttributes: {
        attributes: [ /* required */
          'STRING_VALUE',
          /* more items */
        ],
        name: 'STRING_VALUE', /* required */
        next: 'STRING_VALUE'
      }
    },
    /* more items */
  ],
  pipelineName: 'STRING_VALUE' /* required */
};
iotanalytics.updatePipeline(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: {})
    • pipelineName — (String)

      The name of the pipeline to update.

    • pipelineActivities — (Array<map>)

      A list of PipelineActivity objects. Activities perform transformations on your messages, such as removing, renaming or adding message attributes; filtering messages based on attribute values; invoking your Lambda functions on messages for advanced processing; or performing mathematical transformations to normalize device data.

      The list can be 2-25 PipelineActivity objects and must contain both a channel and a datastore activity. Each entry in the list must contain only one activity. For example:

      pipelineActivities = [ { "channel": { ... } }, { "lambda": { ... } }, ... ]

      • channel — (map)

        Determines the source of the messages to be processed.

        • namerequired — (String)

          The name of the channel activity.

        • channelNamerequired — (String)

          The name of the channel from which the messages are processed.

        • next — (String)

          The next activity in the pipeline.

      • lambda — (map)

        Runs a Lambda function to modify the message.

        • namerequired — (String)

          The name of the lambda activity.

        • lambdaNamerequired — (String)

          The name of the Lambda function that is run on the message.

        • batchSizerequired — (Integer)

          The number of messages passed to the Lambda function for processing.

          The Lambda function must be able to process all of these messages within five minutes, which is the maximum timeout duration for Lambda functions.

        • next — (String)

          The next activity in the pipeline.

      • datastore — (map)

        Specifies where to store the processed message data.

        • namerequired — (String)

          The name of the datastore activity.

        • datastoreNamerequired — (String)

          The name of the data store where processed messages are stored.

      • addAttributes — (map)

        Adds other attributes based on existing attributes in the message.

        • namerequired — (String)

          The name of the addAttributes activity.

        • attributesrequired — (map<String>)

          A list of 1-50 AttributeNameMapping objects that map an existing attribute to a new attribute.

          Note: The existing attributes remain in the message, so if you want to remove the originals, use RemoveAttributeActivity.
        • next — (String)

          The next activity in the pipeline.

      • removeAttributes — (map)

        Removes attributes from a message.

        • namerequired — (String)

          The name of the removeAttributes activity.

        • attributesrequired — (Array<String>)

          A list of 1-50 attributes to remove from the message.

        • next — (String)

          The next activity in the pipeline.

      • selectAttributes — (map)

        Used to create a new message using only the specified attributes from the original message.

        • namerequired — (String)

          The name of the selectAttributes activity.

        • attributesrequired — (Array<String>)

          A list of the attributes to select from the message.

        • next — (String)

          The next activity in the pipeline.

      • filter — (map)

        Filters a message based on its attributes.

        • namerequired — (String)

          The name of the filter activity.

        • filterrequired — (String)

          An expression that looks like a SQL WHERE clause that must return a Boolean value. Messages that satisfy the condition are passed to the next activity.

        • next — (String)

          The next activity in the pipeline.

      • math — (map)

        Computes an arithmetic expression using the message's attributes and adds it to the message.

        • namerequired — (String)

          The name of the math activity.

        • attributerequired — (String)

          The name of the attribute that contains the result of the math operation.

        • mathrequired — (String)

          An expression that uses one or more existing attributes and must return an integer value.

        • next — (String)

          The next activity in the pipeline.

      • deviceRegistryEnrich — (map)

        Adds data from the IoT device registry to your message.

        • namerequired — (String)

          The name of the deviceRegistryEnrich activity.

        • attributerequired — (String)

          The name of the attribute that is added to the message.

        • thingNamerequired — (String)

          The name of the IoT device whose registry information is added to the message.

        • roleArnrequired — (String)

          The ARN of the role that allows access to the device's registry information.

        • next — (String)

          The next activity in the pipeline.

      • deviceShadowEnrich — (map)

        Adds information from the IoT Device Shadow service to a message.

        • namerequired — (String)

          The name of the deviceShadowEnrich activity.

        • attributerequired — (String)

          The name of the attribute that is added to the message.

        • thingNamerequired — (String)

          The name of the IoT device whose shadow information is added to the message.

        • roleArnrequired — (String)

          The ARN of the role that allows access to the device's shadow.

        • next — (String)

          The next activity in the pipeline.

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.

Returns:

  • (AWS.Request)

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