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

Inherits:
AWS.Service show all
Identifier:
timestreamwrite
API Version:
2018-11-01
Defined in:
(unknown)

Overview

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

Service Description

Amazon Timestream is a fast, scalable, fully managed time-series database service that makes it easy to store and analyze trillions of time-series data points per day. With Timestream, you can easily store and analyze IoT sensor data to derive insights from your IoT applications. You can analyze industrial telemetry to streamline equipment management and maintenance. You can also store and analyze log data and metrics to improve the performance and availability of your applications.

Timestream is built from the ground up to effectively ingest, process, and store time-series data. It organizes data to optimize query processing. It automatically scales based on the volume of data ingested and on the query volume to ensure you receive optimal performance while inserting and querying data. As your data grows over time, Timestream’s adaptive query processing engine spans across storage tiers to provide fast analysis while reducing costs.

Sending a Request Using TimestreamWrite

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

var timestreamwrite = new AWS.TimestreamWrite({apiVersion: '2018-11-01'});

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

AWS.config.apiVersions = {
  timestreamwrite: '2018-11-01',
  // other service API versions
};

var timestreamwrite = new AWS.TimestreamWrite();

Version:

  • 2018-11-01

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

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

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

Examples:

Constructing a TimestreamWrite object

var timestreamwrite = new AWS.TimestreamWrite({apiVersion: '2018-11-01'});

Options Hash (options):

  • params (map)

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

  • endpoint (String|AWS.Endpoint)

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

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

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

  • credentialProvider (AWS.CredentialProviderChain)

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

  • region (String)

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

  • maxRetries (Integer)

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

  • maxRedirects (Integer)

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

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

Creates a new Timestream batch load task. A batch load task processes data from a CSV source in an S3 location and writes to a Timestream table. A mapping from source to target is defined in a batch load task. Errors and events are written to a report at an S3 location. For the report, if the KMS key is not specified, the report will be encrypted with an S3 managed key when SSE_S3 is the option. Otherwise an error is thrown. For more information, see Amazon Web Services managed keys. Service quotas apply. For details, see code sample.

Service Reference:

Examples:

Calling the createBatchLoadTask operation

var params = {
  DataSourceConfiguration: { /* required */
    DataFormat: CSV, /* required */
    DataSourceS3Configuration: { /* required */
      BucketName: 'STRING_VALUE', /* required */
      ObjectKeyPrefix: 'STRING_VALUE'
    },
    CsvConfiguration: {
      ColumnSeparator: 'STRING_VALUE',
      EscapeChar: 'STRING_VALUE',
      NullValue: 'STRING_VALUE',
      QuoteChar: 'STRING_VALUE',
      TrimWhiteSpace: true || false
    }
  },
  ReportConfiguration: { /* required */
    ReportS3Configuration: {
      BucketName: 'STRING_VALUE', /* required */
      EncryptionOption: SSE_S3 | SSE_KMS,
      KmsKeyId: 'STRING_VALUE',
      ObjectKeyPrefix: 'STRING_VALUE'
    }
  },
  TargetDatabaseName: 'STRING_VALUE', /* required */
  TargetTableName: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  DataModelConfiguration: {
    DataModel: {
      DimensionMappings: [ /* required */
        {
          DestinationColumn: 'STRING_VALUE',
          SourceColumn: 'STRING_VALUE'
        },
        /* more items */
      ],
      MeasureNameColumn: 'STRING_VALUE',
      MixedMeasureMappings: [
        {
          MeasureValueType: DOUBLE | BIGINT | VARCHAR | BOOLEAN | TIMESTAMP | MULTI, /* required */
          MeasureName: 'STRING_VALUE',
          MultiMeasureAttributeMappings: [
            {
              SourceColumn: 'STRING_VALUE', /* required */
              MeasureValueType: DOUBLE | BIGINT | BOOLEAN | VARCHAR | TIMESTAMP,
              TargetMultiMeasureAttributeName: 'STRING_VALUE'
            },
            /* more items */
          ],
          SourceColumn: 'STRING_VALUE',
          TargetMeasureName: 'STRING_VALUE'
        },
        /* more items */
      ],
      MultiMeasureMappings: {
        MultiMeasureAttributeMappings: [ /* required */
          {
            SourceColumn: 'STRING_VALUE', /* required */
            MeasureValueType: DOUBLE | BIGINT | BOOLEAN | VARCHAR | TIMESTAMP,
            TargetMultiMeasureAttributeName: 'STRING_VALUE'
          },
          /* more items */
        ],
        TargetMultiMeasureName: 'STRING_VALUE'
      },
      TimeColumn: 'STRING_VALUE',
      TimeUnit: MILLISECONDS | SECONDS | MICROSECONDS | NANOSECONDS
    },
    DataModelS3Configuration: {
      BucketName: 'STRING_VALUE',
      ObjectKey: 'STRING_VALUE'
    }
  },
  RecordVersion: 'NUMBER_VALUE'
};
timestreamwrite.createBatchLoadTask(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: {})
    • ClientToken — (String)

      If a token is not provided, the SDK will use a version 4 UUID.

    • DataModelConfiguration — (map)

      • DataModel — (map)

        • TimeColumn — (String)

          Source column to be mapped to time.

        • TimeUnit — (String)

          The granularity of the timestamp unit. It indicates if the time value is in seconds, milliseconds, nanoseconds, or other supported values. Default is MILLISECONDS.

          Possible values include:
          • "MILLISECONDS"
          • "SECONDS"
          • "MICROSECONDS"
          • "NANOSECONDS"
        • DimensionMappingsrequired — (Array<map>)

          Source to target mappings for dimensions.

          • SourceColumn — (String)

          • DestinationColumn — (String)

        • MultiMeasureMappings — (map)

          Source to target mappings for multi-measure records.

          • TargetMultiMeasureName — (String)

          • MultiMeasureAttributeMappingsrequired — (Array<map>)

            • SourceColumnrequired — (String)

            • TargetMultiMeasureAttributeName — (String)

            • MeasureValueType — (String)

              Possible values include:

              • "DOUBLE"
              • "BIGINT"
              • "BOOLEAN"
              • "VARCHAR"
              • "TIMESTAMP"
        • MixedMeasureMappings — (Array<map>)

          Source to target mappings for measures.

          • MeasureName — (String)

          • SourceColumn — (String)

          • TargetMeasureName — (String)

          • MeasureValueTyperequired — (String)

            Possible values include:

            • "DOUBLE"
            • "BIGINT"
            • "VARCHAR"
            • "BOOLEAN"
            • "TIMESTAMP"
            • "MULTI"
          • MultiMeasureAttributeMappings — (Array<map>)

            • SourceColumnrequired — (String)

            • TargetMultiMeasureAttributeName — (String)

            • MeasureValueType — (String)

              Possible values include:

              • "DOUBLE"
              • "BIGINT"
              • "BOOLEAN"
              • "VARCHAR"
              • "TIMESTAMP"
        • MeasureNameColumn — (String)

      • DataModelS3Configuration — (map)

        • BucketName — (String)

        • ObjectKey — (String)

    • DataSourceConfiguration — (map)

      Defines configuration details about the data source for a batch load task.

      • DataSourceS3Configurationrequired — (map)

        Configuration of an S3 location for a file which contains data to load.

        • BucketNamerequired — (String)

          The bucket name of the customer S3 bucket.

        • ObjectKeyPrefix — (String)

      • CsvConfiguration — (map)

        A delimited data format where the column separator can be a comma and the record separator is a newline character.

        • ColumnSeparator — (String)

          Column separator can be one of comma (','), pipe ('|), semicolon (';'), tab('/t'), or blank space (' ').

        • EscapeChar — (String)

          Escape character can be one of

        • QuoteChar — (String)

          Can be single quote (') or double quote (").

        • NullValue — (String)

          Can be blank space (' ').

        • TrimWhiteSpace — (Boolean)

          Specifies to trim leading and trailing white space.

      • DataFormatrequired — (String)

        This is currently CSV.

        Possible values include:
        • "CSV"
    • ReportConfiguration — (map)

      Report configuration for a batch load task. This contains details about where error reports are stored.

      • ReportS3Configuration — (map)

        Configuration of an S3 location to write error reports and events for a batch load.

        • BucketNamerequired — (String)

        • ObjectKeyPrefix — (String)

        • EncryptionOption — (String)

          Possible values include:

          • "SSE_S3"
          • "SSE_KMS"
        • KmsKeyId — (String)

    • TargetDatabaseName — (String)

      Target Timestream database for a batch load task.

    • TargetTableName — (String)

      Target Timestream table for a batch load task.

    • RecordVersion — (Integer)

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:

      • TaskId — (String)

        The ID of the batch load task.

Returns:

  • (AWS.Request)

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

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

Creates a new Timestream database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account. For more information, see Amazon Web Services managed keys. Service quotas apply. For details, see code sample.

Service Reference:

Examples:

Calling the createDatabase operation

var params = {
  DatabaseName: 'STRING_VALUE', /* required */
  KmsKeyId: 'STRING_VALUE',
  Tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
timestreamwrite.createDatabase(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: {})
    • DatabaseName — (String)

      The name of the Timestream database.

    • KmsKeyId — (String)

      The KMS key for the database. If the KMS key is not specified, the database will be encrypted with a Timestream managed KMS key located in your account. For more information, see Amazon Web Services managed keys.

    • Tags — (Array<map>)

      A list of key-value pairs to label the table.

      • Keyrequired — (String)

        The key of the tag. Tag keys are case sensitive.

      • Valuerequired — (String)

        The value of the tag. Tag values are case-sensitive and can be null.

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:

      • Database — (map)

        The newly created Timestream database.

        • Arn — (String)

          The Amazon Resource Name that uniquely identifies this database.

        • DatabaseName — (String)

          The name of the Timestream database.

        • TableCount — (Integer)

          The total number of tables found within a Timestream database.

        • KmsKeyId — (String)

          The identifier of the KMS key used to encrypt the data stored in the database.

        • CreationTime — (Date)

          The time when the database was created, calculated from the Unix epoch time.

        • LastUpdatedTime — (Date)

          The last time that this database was updated.

Returns:

  • (AWS.Request)

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

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

Adds a new table to an existing database in your account. In an Amazon Web Services account, table names must be at least unique within each Region if they are in the same database. You might have identical table names in the same Region if the tables are in separate databases. While creating the table, you must specify the table name, database name, and the retention properties. Service quotas apply. See code sample for details.

Service Reference:

Examples:

Calling the createTable operation

var params = {
  DatabaseName: 'STRING_VALUE', /* required */
  TableName: 'STRING_VALUE', /* required */
  MagneticStoreWriteProperties: {
    EnableMagneticStoreWrites: true || false, /* required */
    MagneticStoreRejectedDataLocation: {
      S3Configuration: {
        BucketName: 'STRING_VALUE',
        EncryptionOption: SSE_S3 | SSE_KMS,
        KmsKeyId: 'STRING_VALUE',
        ObjectKeyPrefix: 'STRING_VALUE'
      }
    }
  },
  RetentionProperties: {
    MagneticStoreRetentionPeriodInDays: 'NUMBER_VALUE', /* required */
    MemoryStoreRetentionPeriodInHours: 'NUMBER_VALUE' /* required */
  },
  Schema: {
    CompositePartitionKey: [
      {
        Type: DIMENSION | MEASURE, /* required */
        EnforcementInRecord: REQUIRED | OPTIONAL,
        Name: 'STRING_VALUE'
      },
      /* more items */
    ]
  },
  Tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
timestreamwrite.createTable(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: {})
    • DatabaseName — (String)

      The name of the Timestream database.

    • TableName — (String)

      The name of the Timestream table.

    • RetentionProperties — (map)

      The duration for which your time-series data must be stored in the memory store and the magnetic store.

      • MemoryStoreRetentionPeriodInHoursrequired — (Integer)

        The duration for which data must be stored in the memory store.

      • MagneticStoreRetentionPeriodInDaysrequired — (Integer)

        The duration for which data must be stored in the magnetic store.

    • Tags — (Array<map>)

      A list of key-value pairs to label the table.

      • Keyrequired — (String)

        The key of the tag. Tag keys are case sensitive.

      • Valuerequired — (String)

        The value of the tag. Tag values are case-sensitive and can be null.

    • MagneticStoreWriteProperties — (map)

      Contains properties to set on the table when enabling magnetic store writes.

      • EnableMagneticStoreWritesrequired — (Boolean)

        A flag to enable magnetic store writes.

      • MagneticStoreRejectedDataLocation — (map)

        The location to write error reports for records rejected asynchronously during magnetic store writes.

        • S3Configuration — (map)

          Configuration of an S3 location to write error reports for records rejected, asynchronously, during magnetic store writes.

          • BucketName — (String)

            The bucket name of the customer S3 bucket.

          • ObjectKeyPrefix — (String)

            The object key preview for the customer S3 location.

          • EncryptionOption — (String)

            The encryption option for the customer S3 location. Options are S3 server-side encryption with an S3 managed key or Amazon Web Services managed key.

            Possible values include:
            • "SSE_S3"
            • "SSE_KMS"
          • KmsKeyId — (String)

            The KMS key ID for the customer S3 location when encrypting with an Amazon Web Services managed key.

    • Schema — (map)

      The schema of the table.

      • CompositePartitionKey — (Array<map>)

        A non-empty list of partition keys defining the attributes used to partition the table data. The order of the list determines the partition hierarchy. The name and type of each partition key as well as the partition key order cannot be changed after the table is created. However, the enforcement level of each partition key can be changed.

        • Typerequired — (String)

          The type of the partition key. Options are DIMENSION (dimension key) and MEASURE (measure key).

          Possible values include:
          • "DIMENSION"
          • "MEASURE"
        • Name — (String)

          The name of the attribute used for a dimension key.

        • EnforcementInRecord — (String)

          The level of enforcement for the specification of a dimension key in ingested records. Options are REQUIRED (dimension key must be specified) and OPTIONAL (dimension key does not have to be specified).

          Possible values include:
          • "REQUIRED"
          • "OPTIONAL"

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:

      • Table — (map)

        The newly created Timestream table.

        • Arn — (String)

          The Amazon Resource Name that uniquely identifies this table.

        • TableName — (String)

          The name of the Timestream table.

        • DatabaseName — (String)

          The name of the Timestream database that contains this table.

        • TableStatus — (String)

          The current state of the table:

          • DELETING - The table is being deleted.

          • ACTIVE - The table is ready for use.

          Possible values include:
          • "ACTIVE"
          • "DELETING"
          • "RESTORING"
        • RetentionProperties — (map)

          The retention duration for the memory store and magnetic store.

          • MemoryStoreRetentionPeriodInHoursrequired — (Integer)

            The duration for which data must be stored in the memory store.

          • MagneticStoreRetentionPeriodInDaysrequired — (Integer)

            The duration for which data must be stored in the magnetic store.

        • CreationTime — (Date)

          The time when the Timestream table was created.

        • LastUpdatedTime — (Date)

          The time when the Timestream table was last updated.

        • MagneticStoreWriteProperties — (map)

          Contains properties to set on the table when enabling magnetic store writes.

          • EnableMagneticStoreWritesrequired — (Boolean)

            A flag to enable magnetic store writes.

          • MagneticStoreRejectedDataLocation — (map)

            The location to write error reports for records rejected asynchronously during magnetic store writes.

            • S3Configuration — (map)

              Configuration of an S3 location to write error reports for records rejected, asynchronously, during magnetic store writes.

              • BucketName — (String)

                The bucket name of the customer S3 bucket.

              • ObjectKeyPrefix — (String)

                The object key preview for the customer S3 location.

              • EncryptionOption — (String)

                The encryption option for the customer S3 location. Options are S3 server-side encryption with an S3 managed key or Amazon Web Services managed key.

                Possible values include:
                • "SSE_S3"
                • "SSE_KMS"
              • KmsKeyId — (String)

                The KMS key ID for the customer S3 location when encrypting with an Amazon Web Services managed key.

        • Schema — (map)

          The schema of the table.

          • CompositePartitionKey — (Array<map>)

            A non-empty list of partition keys defining the attributes used to partition the table data. The order of the list determines the partition hierarchy. The name and type of each partition key as well as the partition key order cannot be changed after the table is created. However, the enforcement level of each partition key can be changed.

            • Typerequired — (String)

              The type of the partition key. Options are DIMENSION (dimension key) and MEASURE (measure key).

              Possible values include:
              • "DIMENSION"
              • "MEASURE"
            • Name — (String)

              The name of the attribute used for a dimension key.

            • EnforcementInRecord — (String)

              The level of enforcement for the specification of a dimension key in ingested records. Options are REQUIRED (dimension key must be specified) and OPTIONAL (dimension key does not have to be specified).

              Possible values include:
              • "REQUIRED"
              • "OPTIONAL"

Returns:

  • (AWS.Request)

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

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

Deletes a given Timestream database. This is an irreversible operation. After a database is deleted, the time-series data from its tables cannot be recovered.

Note: All tables in the database must be deleted first, or a ValidationException error will be thrown. Due to the nature of distributed retries, the operation can return either success or a ResourceNotFoundException. Clients should consider them equivalent.

See code sample for details.

Service Reference:

Examples:

Calling the deleteDatabase operation

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

      The name of the Timestream database to be deleted.

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.

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

Deletes a given Timestream table. This is an irreversible operation. After a Timestream database table is deleted, the time-series data stored in the table cannot be recovered.

Note: Due to the nature of distributed retries, the operation can return either success or a ResourceNotFoundException. Clients should consider them equivalent.

See code sample for details.

Service Reference:

Examples:

Calling the deleteTable operation

var params = {
  DatabaseName: 'STRING_VALUE', /* required */
  TableName: 'STRING_VALUE' /* required */
};
timestreamwrite.deleteTable(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: {})
    • DatabaseName — (String)

      The name of the database where the Timestream database is to be deleted.

    • TableName — (String)

      The name of the Timestream table to be deleted.

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.

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

Returns information about the batch load task, including configurations, mappings, progress, and other details. Service quotas apply. See code sample for details.

Service Reference:

Examples:

Calling the describeBatchLoadTask operation

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

      The ID of the batch load task.

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:

      • BatchLoadTaskDescription — (map)

        Description of the batch load task.

        • TaskId — (String)

          The ID of the batch load task.

        • ErrorMessage — (String)

        • DataSourceConfiguration — (map)

          Configuration details about the data source for a batch load task.

          • DataSourceS3Configurationrequired — (map)

            Configuration of an S3 location for a file which contains data to load.

            • BucketNamerequired — (String)

              The bucket name of the customer S3 bucket.

            • ObjectKeyPrefix — (String)

          • CsvConfiguration — (map)

            A delimited data format where the column separator can be a comma and the record separator is a newline character.

            • ColumnSeparator — (String)

              Column separator can be one of comma (','), pipe ('|), semicolon (';'), tab('/t'), or blank space (' ').

            • EscapeChar — (String)

              Escape character can be one of

            • QuoteChar — (String)

              Can be single quote (') or double quote (").

            • NullValue — (String)

              Can be blank space (' ').

            • TrimWhiteSpace — (Boolean)

              Specifies to trim leading and trailing white space.

          • DataFormatrequired — (String)

            This is currently CSV.

            Possible values include:
            • "CSV"
        • ProgressReport — (map)

          • RecordsProcessed — (Integer)

          • RecordsIngested — (Integer)

          • ParseFailures — (Integer)

          • RecordIngestionFailures — (Integer)

          • FileFailures — (Integer)

          • BytesMetered — (Integer)

        • ReportConfiguration — (map)

          Report configuration for a batch load task. This contains details about where error reports are stored.

          • ReportS3Configuration — (map)

            Configuration of an S3 location to write error reports and events for a batch load.

            • BucketNamerequired — (String)

            • ObjectKeyPrefix — (String)

            • EncryptionOption — (String)

              Possible values include:

              • "SSE_S3"
              • "SSE_KMS"
            • KmsKeyId — (String)

        • DataModelConfiguration — (map)

          Data model configuration for a batch load task. This contains details about where a data model for a batch load task is stored.

          • DataModel — (map)

            • TimeColumn — (String)

              Source column to be mapped to time.

            • TimeUnit — (String)

              The granularity of the timestamp unit. It indicates if the time value is in seconds, milliseconds, nanoseconds, or other supported values. Default is MILLISECONDS.

              Possible values include:
              • "MILLISECONDS"
              • "SECONDS"
              • "MICROSECONDS"
              • "NANOSECONDS"
            • DimensionMappingsrequired — (Array<map>)

              Source to target mappings for dimensions.

              • SourceColumn — (String)

              • DestinationColumn — (String)

            • MultiMeasureMappings — (map)

              Source to target mappings for multi-measure records.

              • TargetMultiMeasureName — (String)

              • MultiMeasureAttributeMappingsrequired — (Array<map>)

                • SourceColumnrequired — (String)

                • TargetMultiMeasureAttributeName — (String)

                • MeasureValueType — (String)

                  Possible values include:

                  • "DOUBLE"
                  • "BIGINT"
                  • "BOOLEAN"
                  • "VARCHAR"
                  • "TIMESTAMP"
            • MixedMeasureMappings — (Array<map>)

              Source to target mappings for measures.

              • MeasureName — (String)

              • SourceColumn — (String)

              • TargetMeasureName — (String)

              • MeasureValueTyperequired — (String)

                Possible values include:

                • "DOUBLE"
                • "BIGINT"
                • "VARCHAR"
                • "BOOLEAN"
                • "TIMESTAMP"
                • "MULTI"
              • MultiMeasureAttributeMappings — (Array<map>)

                • SourceColumnrequired — (String)

                • TargetMultiMeasureAttributeName — (String)

                • MeasureValueType — (String)

                  Possible values include:

                  • "DOUBLE"
                  • "BIGINT"
                  • "BOOLEAN"
                  • "VARCHAR"
                  • "TIMESTAMP"
            • MeasureNameColumn — (String)

          • DataModelS3Configuration — (map)

            • BucketName — (String)

            • ObjectKey — (String)

        • TargetDatabaseName — (String)

        • TargetTableName — (String)

        • TaskStatus — (String)

          Status of the batch load task.

          Possible values include:
          • "CREATED"
          • "IN_PROGRESS"
          • "FAILED"
          • "SUCCEEDED"
          • "PROGRESS_STOPPED"
          • "PENDING_RESUME"
        • RecordVersion — (Integer)

        • CreationTime — (Date)

          The time when the Timestream batch load task was created.

        • LastUpdatedTime — (Date)

          The time when the Timestream batch load task was last updated.

        • ResumableUntil — (Date)

Returns:

  • (AWS.Request)

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

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

Returns information about the database, including the database name, time that the database was created, and the total number of tables found within the database. Service quotas apply. See code sample for details.

Service Reference:

Examples:

Calling the describeDatabase operation

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

      The name of the Timestream database.

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:

      • Database — (map)

        The name of the Timestream table.

        • Arn — (String)

          The Amazon Resource Name that uniquely identifies this database.

        • DatabaseName — (String)

          The name of the Timestream database.

        • TableCount — (Integer)

          The total number of tables found within a Timestream database.

        • KmsKeyId — (String)

          The identifier of the KMS key used to encrypt the data stored in the database.

        • CreationTime — (Date)

          The time when the database was created, calculated from the Unix epoch time.

        • LastUpdatedTime — (Date)

          The last time that this database was updated.

Returns:

  • (AWS.Request)

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

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

Returns a list of available endpoints to make Timestream API calls against. This API operation is available through both the Write and Query APIs.

Because the Timestream SDKs are designed to transparently work with the service’s architecture, including the management and mapping of the service endpoints, we don't recommend that you use this API operation unless:

For detailed information on how and when to use and implement DescribeEndpoints, see The Endpoint Discovery Pattern.

Service Reference:

Examples:

Calling the describeEndpoints operation

var params = {
};
timestreamwrite.describeEndpoints(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:

      • Endpoints — (Array<map>)

        An Endpoints object is returned when a DescribeEndpoints request is made.

        • Addressrequired — (String)

          An endpoint address.

        • CachePeriodInMinutesrequired — (Integer)

          The TTL for the endpoint, in minutes.

Returns:

  • (AWS.Request)

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

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

Returns information about the table, including the table name, database name, retention duration of the memory store and the magnetic store. Service quotas apply. See code sample for details.

Service Reference:

Examples:

Calling the describeTable operation

var params = {
  DatabaseName: 'STRING_VALUE', /* required */
  TableName: 'STRING_VALUE' /* required */
};
timestreamwrite.describeTable(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: {})
    • DatabaseName — (String)

      The name of the Timestream database.

    • TableName — (String)

      The name of the Timestream table.

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:

      • Table — (map)

        The Timestream table.

        • Arn — (String)

          The Amazon Resource Name that uniquely identifies this table.

        • TableName — (String)

          The name of the Timestream table.

        • DatabaseName — (String)

          The name of the Timestream database that contains this table.

        • TableStatus — (String)

          The current state of the table:

          • DELETING - The table is being deleted.

          • ACTIVE - The table is ready for use.

          Possible values include:
          • "ACTIVE"
          • "DELETING"
          • "RESTORING"
        • RetentionProperties — (map)

          The retention duration for the memory store and magnetic store.

          • MemoryStoreRetentionPeriodInHoursrequired — (Integer)

            The duration for which data must be stored in the memory store.

          • MagneticStoreRetentionPeriodInDaysrequired — (Integer)

            The duration for which data must be stored in the magnetic store.

        • CreationTime — (Date)

          The time when the Timestream table was created.

        • LastUpdatedTime — (Date)

          The time when the Timestream table was last updated.

        • MagneticStoreWriteProperties — (map)

          Contains properties to set on the table when enabling magnetic store writes.

          • EnableMagneticStoreWritesrequired — (Boolean)

            A flag to enable magnetic store writes.

          • MagneticStoreRejectedDataLocation — (map)

            The location to write error reports for records rejected asynchronously during magnetic store writes.

            • S3Configuration — (map)

              Configuration of an S3 location to write error reports for records rejected, asynchronously, during magnetic store writes.

              • BucketName — (String)

                The bucket name of the customer S3 bucket.

              • ObjectKeyPrefix — (String)

                The object key preview for the customer S3 location.

              • EncryptionOption — (String)

                The encryption option for the customer S3 location. Options are S3 server-side encryption with an S3 managed key or Amazon Web Services managed key.

                Possible values include:
                • "SSE_S3"
                • "SSE_KMS"
              • KmsKeyId — (String)

                The KMS key ID for the customer S3 location when encrypting with an Amazon Web Services managed key.

        • Schema — (map)

          The schema of the table.

          • CompositePartitionKey — (Array<map>)

            A non-empty list of partition keys defining the attributes used to partition the table data. The order of the list determines the partition hierarchy. The name and type of each partition key as well as the partition key order cannot be changed after the table is created. However, the enforcement level of each partition key can be changed.

            • Typerequired — (String)

              The type of the partition key. Options are DIMENSION (dimension key) and MEASURE (measure key).

              Possible values include:
              • "DIMENSION"
              • "MEASURE"
            • Name — (String)

              The name of the attribute used for a dimension key.

            • EnforcementInRecord — (String)

              The level of enforcement for the specification of a dimension key in ingested records. Options are REQUIRED (dimension key must be specified) and OPTIONAL (dimension key does not have to be specified).

              Possible values include:
              • "REQUIRED"
              • "OPTIONAL"

Returns:

  • (AWS.Request)

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

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

Provides a list of batch load tasks, along with the name, status, when the task is resumable until, and other details. See code sample for details.

Service Reference:

Examples:

Calling the listBatchLoadTasks operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  TaskStatus: CREATED | IN_PROGRESS | FAILED | SUCCEEDED | PROGRESS_STOPPED | PENDING_RESUME
};
timestreamwrite.listBatchLoadTasks(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)

      A token to specify where to start paginating. This is the NextToken from a previously truncated response.

    • MaxResults — (Integer)

      The total number of items to return in the output. If the total number of items available is more than the value specified, a NextToken is provided in the output. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.

    • TaskStatus — (String)

      Status of the batch load task.

      Possible values include:
      • "CREATED"
      • "IN_PROGRESS"
      • "FAILED"
      • "SUCCEEDED"
      • "PROGRESS_STOPPED"
      • "PENDING_RESUME"

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:

      • NextToken — (String)

        A token to specify where to start paginating. Provide the next ListBatchLoadTasksRequest.

      • BatchLoadTasks — (Array<map>)

        A list of batch load task details.

        • TaskId — (String)

          The ID of the batch load task.

        • TaskStatus — (String)

          Status of the batch load task.

          Possible values include:
          • "CREATED"
          • "IN_PROGRESS"
          • "FAILED"
          • "SUCCEEDED"
          • "PROGRESS_STOPPED"
          • "PENDING_RESUME"
        • DatabaseName — (String)

          Database name for the database into which a batch load task loads data.

        • TableName — (String)

          Table name for the table into which a batch load task loads data.

        • CreationTime — (Date)

          The time when the Timestream batch load task was created.

        • LastUpdatedTime — (Date)

          The time when the Timestream batch load task was last updated.

        • ResumableUntil — (Date)

Returns:

  • (AWS.Request)

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

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

Returns a list of your Timestream databases. Service quotas apply. See code sample for details.

Service Reference:

Examples:

Calling the listDatabases operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
timestreamwrite.listDatabases(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 pagination token. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.

    • MaxResults — (Integer)

      The total number of items to return in the output. If the total number of items available is more than the value specified, a NextToken is provided in the output. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.

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:

      • Databases — (Array<map>)

        A list of database names.

        • Arn — (String)

          The Amazon Resource Name that uniquely identifies this database.

        • DatabaseName — (String)

          The name of the Timestream database.

        • TableCount — (Integer)

          The total number of tables found within a Timestream database.

        • KmsKeyId — (String)

          The identifier of the KMS key used to encrypt the data stored in the database.

        • CreationTime — (Date)

          The time when the database was created, calculated from the Unix epoch time.

        • LastUpdatedTime — (Date)

          The last time that this database was updated.

      • NextToken — (String)

        The pagination token. This parameter is returned when the response is truncated.

Returns:

  • (AWS.Request)

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

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

Provides a list of tables, along with the name, status, and retention properties of each table. See code sample for details.

Service Reference:

Examples:

Calling the listTables operation

var params = {
  DatabaseName: 'STRING_VALUE',
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
timestreamwrite.listTables(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: {})
    • DatabaseName — (String)

      The name of the Timestream database.

    • NextToken — (String)

      The pagination token. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.

    • MaxResults — (Integer)

      The total number of items to return in the output. If the total number of items available is more than the value specified, a NextToken is provided in the output. To resume pagination, provide the NextToken value as argument of a subsequent API invocation.

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:

      • Tables — (Array<map>)

        A list of tables.

        • Arn — (String)

          The Amazon Resource Name that uniquely identifies this table.

        • TableName — (String)

          The name of the Timestream table.

        • DatabaseName — (String)

          The name of the Timestream database that contains this table.

        • TableStatus — (String)

          The current state of the table:

          • DELETING - The table is being deleted.

          • ACTIVE - The table is ready for use.

          Possible values include:
          • "ACTIVE"
          • "DELETING"
          • "RESTORING"
        • RetentionProperties — (map)

          The retention duration for the memory store and magnetic store.

          • MemoryStoreRetentionPeriodInHoursrequired — (Integer)

            The duration for which data must be stored in the memory store.

          • MagneticStoreRetentionPeriodInDaysrequired — (Integer)

            The duration for which data must be stored in the magnetic store.

        • CreationTime — (Date)

          The time when the Timestream table was created.

        • LastUpdatedTime — (Date)

          The time when the Timestream table was last updated.

        • MagneticStoreWriteProperties — (map)

          Contains properties to set on the table when enabling magnetic store writes.

          • EnableMagneticStoreWritesrequired — (Boolean)

            A flag to enable magnetic store writes.

          • MagneticStoreRejectedDataLocation — (map)

            The location to write error reports for records rejected asynchronously during magnetic store writes.

            • S3Configuration — (map)

              Configuration of an S3 location to write error reports for records rejected, asynchronously, during magnetic store writes.

              • BucketName — (String)

                The bucket name of the customer S3 bucket.

              • ObjectKeyPrefix — (String)

                The object key preview for the customer S3 location.

              • EncryptionOption — (String)

                The encryption option for the customer S3 location. Options are S3 server-side encryption with an S3 managed key or Amazon Web Services managed key.

                Possible values include:
                • "SSE_S3"
                • "SSE_KMS"
              • KmsKeyId — (String)

                The KMS key ID for the customer S3 location when encrypting with an Amazon Web Services managed key.

        • Schema — (map)

          The schema of the table.

          • CompositePartitionKey — (Array<map>)

            A non-empty list of partition keys defining the attributes used to partition the table data. The order of the list determines the partition hierarchy. The name and type of each partition key as well as the partition key order cannot be changed after the table is created. However, the enforcement level of each partition key can be changed.

            • Typerequired — (String)

              The type of the partition key. Options are DIMENSION (dimension key) and MEASURE (measure key).

              Possible values include:
              • "DIMENSION"
              • "MEASURE"
            • Name — (String)

              The name of the attribute used for a dimension key.

            • EnforcementInRecord — (String)

              The level of enforcement for the specification of a dimension key in ingested records. Options are REQUIRED (dimension key must be specified) and OPTIONAL (dimension key does not have to be specified).

              Possible values include:
              • "REQUIRED"
              • "OPTIONAL"
      • NextToken — (String)

        A token to specify where to start paginating. This is the NextToken from a previously truncated response.

Returns:

  • (AWS.Request)

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

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

Lists all tags on a Timestream resource.

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  ResourceARN: 'STRING_VALUE' /* required */
};
timestreamwrite.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 Timestream resource with tags to be listed. This value is an Amazon Resource Name (ARN).

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 currently associated with the Timestream resource.

        • Keyrequired — (String)

          The key of the tag. Tag keys are case sensitive.

        • Valuerequired — (String)

          The value of the tag. Tag values are case-sensitive and can be null.

Returns:

  • (AWS.Request)

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

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

Service Reference:

Examples:

Calling the resumeBatchLoadTask operation

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

      The ID of the batch load task to resume.

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.

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

Associates a set of tags with a Timestream resource. You can then activate these user-defined tags so that they appear on the Billing and Cost Management console for cost allocation tracking.

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 */
  ]
};
timestreamwrite.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)

      Identifies the Timestream resource to which tags should be added. This value is an Amazon Resource Name (ARN).

    • Tags — (Array<map>)

      The tags to be assigned to the Timestream resource.

      • Keyrequired — (String)

        The key of the tag. Tag keys are case sensitive.

      • Valuerequired — (String)

        The value of the tag. Tag values are case-sensitive and can be null.

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 association of tags from a Timestream resource.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  ResourceARN: 'STRING_VALUE', /* required */
  TagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
timestreamwrite.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 Timestream resource that the tags will be removed from. This value is an Amazon Resource Name (ARN).

    • TagKeys — (Array<String>)

      A list of tags keys. Existing tags of the resource whose keys are members of this list will be removed from the Timestream resource.

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.

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

Modifies the KMS key for an existing database. While updating the database, you must specify the database name and the identifier of the new KMS key to be used (KmsKeyId). If there are any concurrent UpdateDatabase requests, first writer wins.

See code sample for details.

Service Reference:

Examples:

Calling the updateDatabase operation

var params = {
  DatabaseName: 'STRING_VALUE', /* required */
  KmsKeyId: 'STRING_VALUE' /* required */
};
timestreamwrite.updateDatabase(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: {})
    • DatabaseName — (String)

      The name of the database.

    • KmsKeyId — (String)

      The identifier of the new KMS key (KmsKeyId) to be used to encrypt the data stored in the database. If the KmsKeyId currently registered with the database is the same as the KmsKeyId in the request, there will not be any update.

      You can specify the KmsKeyId using any of the following:

      • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

      • Key ARN: arn:aws:kms:us-east-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

      • Alias name: alias/ExampleAlias

      • Alias ARN: arn:aws:kms:us-east-1:111122223333:alias/ExampleAlias

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:

      • Database — (map)

        A top-level container for a table. Databases and tables are the fundamental management concepts in Amazon Timestream. All tables in a database are encrypted with the same KMS key.

        • Arn — (String)

          The Amazon Resource Name that uniquely identifies this database.

        • DatabaseName — (String)

          The name of the Timestream database.

        • TableCount — (Integer)

          The total number of tables found within a Timestream database.

        • KmsKeyId — (String)

          The identifier of the KMS key used to encrypt the data stored in the database.

        • CreationTime — (Date)

          The time when the database was created, calculated from the Unix epoch time.

        • LastUpdatedTime — (Date)

          The last time that this database was updated.

Returns:

  • (AWS.Request)

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

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

Modifies the retention duration of the memory store and magnetic store for your Timestream table. Note that the change in retention duration takes effect immediately. For example, if the retention period of the memory store was initially set to 2 hours and then changed to 24 hours, the memory store will be capable of holding 24 hours of data, but will be populated with 24 hours of data 22 hours after this change was made. Timestream does not retrieve data from the magnetic store to populate the memory store.

See code sample for details.

Service Reference:

Examples:

Calling the updateTable operation

var params = {
  DatabaseName: 'STRING_VALUE', /* required */
  TableName: 'STRING_VALUE', /* required */
  MagneticStoreWriteProperties: {
    EnableMagneticStoreWrites: true || false, /* required */
    MagneticStoreRejectedDataLocation: {
      S3Configuration: {
        BucketName: 'STRING_VALUE',
        EncryptionOption: SSE_S3 | SSE_KMS,
        KmsKeyId: 'STRING_VALUE',
        ObjectKeyPrefix: 'STRING_VALUE'
      }
    }
  },
  RetentionProperties: {
    MagneticStoreRetentionPeriodInDays: 'NUMBER_VALUE', /* required */
    MemoryStoreRetentionPeriodInHours: 'NUMBER_VALUE' /* required */
  },
  Schema: {
    CompositePartitionKey: [
      {
        Type: DIMENSION | MEASURE, /* required */
        EnforcementInRecord: REQUIRED | OPTIONAL,
        Name: 'STRING_VALUE'
      },
      /* more items */
    ]
  }
};
timestreamwrite.updateTable(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: {})
    • DatabaseName — (String)

      The name of the Timestream database.

    • TableName — (String)

      The name of the Timestream table.

    • RetentionProperties — (map)

      The retention duration of the memory store and the magnetic store.

      • MemoryStoreRetentionPeriodInHoursrequired — (Integer)

        The duration for which data must be stored in the memory store.

      • MagneticStoreRetentionPeriodInDaysrequired — (Integer)

        The duration for which data must be stored in the magnetic store.

    • MagneticStoreWriteProperties — (map)

      Contains properties to set on the table when enabling magnetic store writes.

      • EnableMagneticStoreWritesrequired — (Boolean)

        A flag to enable magnetic store writes.

      • MagneticStoreRejectedDataLocation — (map)

        The location to write error reports for records rejected asynchronously during magnetic store writes.

        • S3Configuration — (map)

          Configuration of an S3 location to write error reports for records rejected, asynchronously, during magnetic store writes.

          • BucketName — (String)

            The bucket name of the customer S3 bucket.

          • ObjectKeyPrefix — (String)

            The object key preview for the customer S3 location.

          • EncryptionOption — (String)

            The encryption option for the customer S3 location. Options are S3 server-side encryption with an S3 managed key or Amazon Web Services managed key.

            Possible values include:
            • "SSE_S3"
            • "SSE_KMS"
          • KmsKeyId — (String)

            The KMS key ID for the customer S3 location when encrypting with an Amazon Web Services managed key.

    • Schema — (map)

      The schema of the table.

      • CompositePartitionKey — (Array<map>)

        A non-empty list of partition keys defining the attributes used to partition the table data. The order of the list determines the partition hierarchy. The name and type of each partition key as well as the partition key order cannot be changed after the table is created. However, the enforcement level of each partition key can be changed.

        • Typerequired — (String)

          The type of the partition key. Options are DIMENSION (dimension key) and MEASURE (measure key).

          Possible values include:
          • "DIMENSION"
          • "MEASURE"
        • Name — (String)

          The name of the attribute used for a dimension key.

        • EnforcementInRecord — (String)

          The level of enforcement for the specification of a dimension key in ingested records. Options are REQUIRED (dimension key must be specified) and OPTIONAL (dimension key does not have to be specified).

          Possible values include:
          • "REQUIRED"
          • "OPTIONAL"

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:

      • Table — (map)

        The updated Timestream table.

        • Arn — (String)

          The Amazon Resource Name that uniquely identifies this table.

        • TableName — (String)

          The name of the Timestream table.

        • DatabaseName — (String)

          The name of the Timestream database that contains this table.

        • TableStatus — (String)

          The current state of the table:

          • DELETING - The table is being deleted.

          • ACTIVE - The table is ready for use.

          Possible values include:
          • "ACTIVE"
          • "DELETING"
          • "RESTORING"
        • RetentionProperties — (map)

          The retention duration for the memory store and magnetic store.

          • MemoryStoreRetentionPeriodInHoursrequired — (Integer)

            The duration for which data must be stored in the memory store.

          • MagneticStoreRetentionPeriodInDaysrequired — (Integer)

            The duration for which data must be stored in the magnetic store.

        • CreationTime — (Date)

          The time when the Timestream table was created.

        • LastUpdatedTime — (Date)

          The time when the Timestream table was last updated.

        • MagneticStoreWriteProperties — (map)

          Contains properties to set on the table when enabling magnetic store writes.

          • EnableMagneticStoreWritesrequired — (Boolean)

            A flag to enable magnetic store writes.

          • MagneticStoreRejectedDataLocation — (map)

            The location to write error reports for records rejected asynchronously during magnetic store writes.

            • S3Configuration — (map)

              Configuration of an S3 location to write error reports for records rejected, asynchronously, during magnetic store writes.

              • BucketName — (String)

                The bucket name of the customer S3 bucket.

              • ObjectKeyPrefix — (String)

                The object key preview for the customer S3 location.

              • EncryptionOption — (String)

                The encryption option for the customer S3 location. Options are S3 server-side encryption with an S3 managed key or Amazon Web Services managed key.

                Possible values include:
                • "SSE_S3"
                • "SSE_KMS"
              • KmsKeyId — (String)

                The KMS key ID for the customer S3 location when encrypting with an Amazon Web Services managed key.

        • Schema — (map)

          The schema of the table.

          • CompositePartitionKey — (Array<map>)

            A non-empty list of partition keys defining the attributes used to partition the table data. The order of the list determines the partition hierarchy. The name and type of each partition key as well as the partition key order cannot be changed after the table is created. However, the enforcement level of each partition key can be changed.

            • Typerequired — (String)

              The type of the partition key. Options are DIMENSION (dimension key) and MEASURE (measure key).

              Possible values include:
              • "DIMENSION"
              • "MEASURE"
            • Name — (String)

              The name of the attribute used for a dimension key.

            • EnforcementInRecord — (String)

              The level of enforcement for the specification of a dimension key in ingested records. Options are REQUIRED (dimension key must be specified) and OPTIONAL (dimension key does not have to be specified).

              Possible values include:
              • "REQUIRED"
              • "OPTIONAL"

Returns:

  • (AWS.Request)

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

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

Enables you to write your time-series data into Timestream. You can specify a single data point or a batch of data points to be inserted into the system. Timestream offers you a flexible schema that auto detects the column names and data types for your Timestream tables based on the dimension names and data types of the data points you specify when invoking writes into the database.

Timestream supports eventual consistency read semantics. This means that when you query data immediately after writing a batch of data into Timestream, the query results might not reflect the results of a recently completed write operation. The results may also include some stale data. If you repeat the query request after a short time, the results should return the latest data. Service quotas apply.

See code sample for details.

Upserts

You can use the Version parameter in a WriteRecords request to update data points. Timestream tracks a version number with each record. Version defaults to 1 when it's not specified for the record in the request. Timestream updates an existing record’s measure value along with its Version when it receives a write request with a higher Version number for that record. When it receives an update request where the measure value is the same as that of the existing record, Timestream still updates Version, if it is greater than the existing value of Version. You can update a data point as many times as desired, as long as the value of Version continuously increases.

For example, suppose you write a new record without indicating Version in the request. Timestream stores this record, and set Version to 1. Now, suppose you try to update this record with a WriteRecords request of the same record with a different measure value but, like before, do not provide Version. In this case, Timestream will reject this update with a RejectedRecordsException since the updated record’s version is not greater than the existing value of Version.

However, if you were to resend the update request with Version set to 2, Timestream would then succeed in updating the record’s value, and the Version would be set to 2. Next, suppose you sent a WriteRecords request with this same record and an identical measure value, but with Version set to 3. In this case, Timestream would only update Version to 3. Any further updates would need to send a version number greater than 3, or the update requests would receive a RejectedRecordsException.

Service Reference:

Examples:

Calling the writeRecords operation

var params = {
  DatabaseName: 'STRING_VALUE', /* required */
  Records: [ /* required */
    {
      Dimensions: [
        {
          Name: 'STRING_VALUE', /* required */
          Value: 'STRING_VALUE', /* required */
          DimensionValueType: VARCHAR
        },
        /* more items */
      ],
      MeasureName: 'STRING_VALUE',
      MeasureValue: 'STRING_VALUE',
      MeasureValueType: DOUBLE | BIGINT | VARCHAR | BOOLEAN | TIMESTAMP | MULTI,
      MeasureValues: [
        {
          Name: 'STRING_VALUE', /* required */
          Type: DOUBLE | BIGINT | VARCHAR | BOOLEAN | TIMESTAMP | MULTI, /* required */
          Value: 'STRING_VALUE' /* required */
        },
        /* more items */
      ],
      Time: 'STRING_VALUE',
      TimeUnit: MILLISECONDS | SECONDS | MICROSECONDS | NANOSECONDS,
      Version: 'NUMBER_VALUE'
    },
    /* more items */
  ],
  TableName: 'STRING_VALUE', /* required */
  CommonAttributes: {
    Dimensions: [
      {
        Name: 'STRING_VALUE', /* required */
        Value: 'STRING_VALUE', /* required */
        DimensionValueType: VARCHAR
      },
      /* more items */
    ],
    MeasureName: 'STRING_VALUE',
    MeasureValue: 'STRING_VALUE',
    MeasureValueType: DOUBLE | BIGINT | VARCHAR | BOOLEAN | TIMESTAMP | MULTI,
    MeasureValues: [
      {
        Name: 'STRING_VALUE', /* required */
        Type: DOUBLE | BIGINT | VARCHAR | BOOLEAN | TIMESTAMP | MULTI, /* required */
        Value: 'STRING_VALUE' /* required */
      },
      /* more items */
    ],
    Time: 'STRING_VALUE',
    TimeUnit: MILLISECONDS | SECONDS | MICROSECONDS | NANOSECONDS,
    Version: 'NUMBER_VALUE'
  }
};
timestreamwrite.writeRecords(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: {})
    • DatabaseName — (String)

      The name of the Timestream database.

    • TableName — (String)

      The name of the Timestream table.

    • CommonAttributes — (map)

      A record that contains the common measure, dimension, time, and version attributes shared across all the records in the request. The measure and dimension attributes specified will be merged with the measure and dimension attributes in the records object when the data is written into Timestream. Dimensions may not overlap, or a ValidationException will be thrown. In other words, a record must contain dimensions with unique names.

      • Dimensions — (Array<map>)

        Contains the list of dimensions for time-series data points.

        • Namerequired — (String)

          Dimension represents the metadata attributes of the time series. For example, the name and Availability Zone of an EC2 instance or the name of the manufacturer of a wind turbine are dimensions.

          For constraints on dimension names, see Naming Constraints.

        • Valuerequired — (String)

          The value of the dimension.

        • DimensionValueType — (String)

          The data type of the dimension for the time-series data point.

          Possible values include:
          • "VARCHAR"
      • MeasureName — (String)

        Measure represents the data attribute of the time series. For example, the CPU utilization of an EC2 instance or the RPM of a wind turbine are measures.

      • MeasureValue — (String)

        Contains the measure value for the time-series data point.

      • MeasureValueType — (String)

        Contains the data type of the measure value for the time-series data point. Default type is DOUBLE. For more information, see Data types.

        Possible values include:
        • "DOUBLE"
        • "BIGINT"
        • "VARCHAR"
        • "BOOLEAN"
        • "TIMESTAMP"
        • "MULTI"
      • Time — (String)

        Contains the time at which the measure value for the data point was collected. The time value plus the unit provides the time elapsed since the epoch. For example, if the time value is 12345 and the unit is ms, then 12345 ms have elapsed since the epoch.

      • TimeUnit — (String)

        The granularity of the timestamp unit. It indicates if the time value is in seconds, milliseconds, nanoseconds, or other supported values. Default is MILLISECONDS.

        Possible values include:
        • "MILLISECONDS"
        • "SECONDS"
        • "MICROSECONDS"
        • "NANOSECONDS"
      • Version — (Integer)

        64-bit attribute used for record updates. Write requests for duplicate data with a higher version number will update the existing measure value and version. In cases where the measure value is the same, Version will still be updated. Default value is 1.

        Note: Version must be 1 or greater, or you will receive a ValidationException error.
      • MeasureValues — (Array<map>)

        Contains the list of MeasureValue for time-series data points.

        This is only allowed for type MULTI. For scalar values, use MeasureValue attribute of the record directly.

        • Namerequired — (String)

          The name of the MeasureValue.

          For constraints on MeasureValue names, see Naming Constraints in the Amazon Timestream Developer Guide.

        • Valuerequired — (String)

          The value for the MeasureValue. For information, see Data types.

        • Typerequired — (String)

          Contains the data type of the MeasureValue for the time-series data point.

          Possible values include:
          • "DOUBLE"
          • "BIGINT"
          • "VARCHAR"
          • "BOOLEAN"
          • "TIMESTAMP"
          • "MULTI"
    • Records — (Array<map>)

      An array of records that contain the unique measure, dimension, time, and version attributes for each time-series data point.

      • Dimensions — (Array<map>)

        Contains the list of dimensions for time-series data points.

        • Namerequired — (String)

          Dimension represents the metadata attributes of the time series. For example, the name and Availability Zone of an EC2 instance or the name of the manufacturer of a wind turbine are dimensions.

          For constraints on dimension names, see Naming Constraints.

        • Valuerequired — (String)

          The value of the dimension.

        • DimensionValueType — (String)

          The data type of the dimension for the time-series data point.

          Possible values include:
          • "VARCHAR"
      • MeasureName — (String)

        Measure represents the data attribute of the time series. For example, the CPU utilization of an EC2 instance or the RPM of a wind turbine are measures.

      • MeasureValue — (String)

        Contains the measure value for the time-series data point.

      • MeasureValueType — (String)

        Contains the data type of the measure value for the time-series data point. Default type is DOUBLE. For more information, see Data types.

        Possible values include:
        • "DOUBLE"
        • "BIGINT"
        • "VARCHAR"
        • "BOOLEAN"
        • "TIMESTAMP"
        • "MULTI"
      • Time — (String)

        Contains the time at which the measure value for the data point was collected. The time value plus the unit provides the time elapsed since the epoch. For example, if the time value is 12345 and the unit is ms, then 12345 ms have elapsed since the epoch.

      • TimeUnit — (String)

        The granularity of the timestamp unit. It indicates if the time value is in seconds, milliseconds, nanoseconds, or other supported values. Default is MILLISECONDS.

        Possible values include:
        • "MILLISECONDS"
        • "SECONDS"
        • "MICROSECONDS"
        • "NANOSECONDS"
      • Version — (Integer)

        64-bit attribute used for record updates. Write requests for duplicate data with a higher version number will update the existing measure value and version. In cases where the measure value is the same, Version will still be updated. Default value is 1.

        Note: Version must be 1 or greater, or you will receive a ValidationException error.
      • MeasureValues — (Array<map>)

        Contains the list of MeasureValue for time-series data points.

        This is only allowed for type MULTI. For scalar values, use MeasureValue attribute of the record directly.

        • Namerequired — (String)

          The name of the MeasureValue.

          For constraints on MeasureValue names, see Naming Constraints in the Amazon Timestream Developer Guide.

        • Valuerequired — (String)

          The value for the MeasureValue. For information, see Data types.

        • Typerequired — (String)

          Contains the data type of the MeasureValue for the time-series data point.

          Possible values include:
          • "DOUBLE"
          • "BIGINT"
          • "VARCHAR"
          • "BOOLEAN"
          • "TIMESTAMP"
          • "MULTI"

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:

      • RecordsIngested — (map)

        Information on the records ingested by this request.

        • Total — (Integer)

          Total count of successfully ingested records.

        • MemoryStore — (Integer)

          Count of records ingested into the memory store.

        • MagneticStore — (Integer)

          Count of records ingested into the magnetic store.

Returns:

  • (AWS.Request)

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