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

Class: AWS.TimestreamQuery

Inherits:
AWS.Service show all
Identifier:
timestreamquery
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

Sending a Request Using TimestreamQuery

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

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

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

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

var timestreamquery = new AWS.TimestreamQuery();

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

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

Examples:

Constructing a TimestreamQuery object

var timestreamquery = new AWS.TimestreamQuery({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.TimestreamQuery.region for more information.

  • maxRetries (Integer)

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

  • maxRedirects (Integer)

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

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

Cancels a query that has been issued. Cancellation is provided only if the query has not completed running before the cancellation request was issued. Because cancellation is an idempotent operation, subsequent cancellation requests will return a CancellationMessage, indicating that the query has already been canceled. See code sample for details.

Service Reference:

Examples:

Calling the cancelQuery operation

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

      The ID of the query that needs to be cancelled. QueryID is returned as part of the query result.

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:

      • CancellationMessage — (String)

        A CancellationMessage is returned when a CancelQuery request for the query specified by QueryId has already been issued.

Returns:

  • (AWS.Request)

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

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

Create a scheduled query that will be run on your behalf at the configured schedule. Timestream assumes the execution role provided as part of the ScheduledQueryExecutionRoleArn parameter to run the query. You can use the NotificationConfiguration parameter to configure notification for your scheduled query operations.

Service Reference:

Examples:

Calling the createScheduledQuery operation

var params = {
  ErrorReportConfiguration: { /* required */
    S3Configuration: { /* required */
      BucketName: 'STRING_VALUE', /* required */
      EncryptionOption: SSE_S3 | SSE_KMS,
      ObjectKeyPrefix: 'STRING_VALUE'
    }
  },
  Name: 'STRING_VALUE', /* required */
  NotificationConfiguration: { /* required */
    SnsConfiguration: { /* required */
      TopicArn: 'STRING_VALUE' /* required */
    }
  },
  QueryString: 'STRING_VALUE', /* required */
  ScheduleConfiguration: { /* required */
    ScheduleExpression: 'STRING_VALUE' /* required */
  },
  ScheduledQueryExecutionRoleArn: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  KmsKeyId: 'STRING_VALUE',
  Tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  TargetConfiguration: {
    TimestreamConfiguration: { /* required */
      DatabaseName: 'STRING_VALUE', /* required */
      DimensionMappings: [ /* required */
        {
          DimensionValueType: VARCHAR, /* required */
          Name: 'STRING_VALUE' /* required */
        },
        /* more items */
      ],
      TableName: 'STRING_VALUE', /* required */
      TimeColumn: 'STRING_VALUE', /* required */
      MeasureNameColumn: 'STRING_VALUE',
      MixedMeasureMappings: [
        {
          MeasureValueType: BIGINT | BOOLEAN | DOUBLE | VARCHAR | MULTI, /* required */
          MeasureName: 'STRING_VALUE',
          MultiMeasureAttributeMappings: [
            {
              MeasureValueType: BIGINT | BOOLEAN | DOUBLE | VARCHAR, /* required */
              SourceColumn: 'STRING_VALUE', /* required */
              TargetMultiMeasureAttributeName: 'STRING_VALUE'
            },
            /* more items */
          ],
          SourceColumn: 'STRING_VALUE',
          TargetMeasureName: 'STRING_VALUE'
        },
        /* more items */
      ],
      MultiMeasureMappings: {
        MultiMeasureAttributeMappings: [ /* required */
          {
            MeasureValueType: BIGINT | BOOLEAN | DOUBLE | VARCHAR, /* required */
            SourceColumn: 'STRING_VALUE', /* required */
            TargetMultiMeasureAttributeName: 'STRING_VALUE'
          },
          /* more items */
        ],
        TargetMultiMeasureName: 'STRING_VALUE'
      }
    }
  }
};
timestreamquery.createScheduledQuery(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: {})
    • Name — (String)

      Name of the scheduled query.

    • QueryString — (String)

      The query string to run. Parameter names can be specified in the query string @ character followed by an identifier. The named Parameter @scheduled_runtime is reserved and can be used in the query to get the time at which the query is scheduled to run.

      The timestamp calculated according to the ScheduleConfiguration parameter, will be the value of @scheduled_runtime paramater for each query run. For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the @scheduled_runtime parameter is initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.

    • ScheduleConfiguration — (map)

      The schedule configuration for the query.

      • ScheduleExpressionrequired — (String)

        An expression that denotes when to trigger the scheduled query run. This can be a cron expression or a rate expression.

    • NotificationConfiguration — (map)

      Notification configuration for the scheduled query. A notification is sent by Timestream when a query run finishes, when the state is updated or when you delete it.

      • SnsConfigurationrequired — (map)

        Details on SNS configuration.

        • TopicArnrequired — (String)

          SNS topic ARN that the scheduled query status notifications will be sent to.

    • TargetConfiguration — (map)

      Configuration used for writing the result of a query.

      • TimestreamConfigurationrequired — (map)

        Configuration needed to write data into the Timestream database and table.

        • DatabaseNamerequired — (String)

          Name of Timestream database to which the query result will be written.

        • TableNamerequired — (String)

          Name of Timestream table that the query result will be written to. The table should be within the same database that is provided in Timestream configuration.

        • TimeColumnrequired — (String)

          Column from query result that should be used as the time column in destination table. Column type for this should be TIMESTAMP.

        • DimensionMappingsrequired — (Array<map>)

          This is to allow mapping column(s) from the query result to the dimension in the destination table.

          • Namerequired — (String)

            Column name from query result.

          • DimensionValueTyperequired — (String)

            Type for the dimension.

            Possible values include:
            • "VARCHAR"
        • MultiMeasureMappings — (map)

          Multi-measure mappings.

          • TargetMultiMeasureName — (String)

            The name of the target multi-measure name in the derived table. This input is required when measureNameColumn is not provided. If MeasureNameColumn is provided, then value from that column will be used as multi-measure name.

          • MultiMeasureAttributeMappingsrequired — (Array<map>)

            Required. Attribute mappings to be used for mapping query results to ingest data for multi-measure attributes.

            • SourceColumnrequired — (String)

              Source column from where the attribute value is to be read.

            • TargetMultiMeasureAttributeName — (String)

              Custom name to be used for attribute name in derived table. If not provided, source column name would be used.

            • MeasureValueTyperequired — (String)

              Type of the attribute to be read from the source column.

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

          Specifies how to map measures to multi-measure records.

          • MeasureName — (String)

            Refers to the value of measure_name in a result row. This field is required if MeasureNameColumn is provided.

          • SourceColumn — (String)

            This field refers to the source column from which measure-value is to be read for result materialization.

          • TargetMeasureName — (String)

            Target measure name to be used. If not provided, the target measure name by default would be measure-name if provided, or sourceColumn otherwise.

          • MeasureValueTyperequired — (String)

            Type of the value that is to be read from sourceColumn. If the mapping is for MULTI, use MeasureValueType.MULTI.

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

            Required when measureValueType is MULTI. Attribute mappings for MULTI value measures.

            • SourceColumnrequired — (String)

              Source column from where the attribute value is to be read.

            • TargetMultiMeasureAttributeName — (String)

              Custom name to be used for attribute name in derived table. If not provided, source column name would be used.

            • MeasureValueTyperequired — (String)

              Type of the attribute to be read from the source column.

              Possible values include:
              • "BIGINT"
              • "BOOLEAN"
              • "DOUBLE"
              • "VARCHAR"
        • MeasureNameColumn — (String)

          Name of the measure column.

    • ClientToken — (String)

      Using a ClientToken makes the call to CreateScheduledQuery idempotent, in other words, making the same request repeatedly will produce the same result. Making multiple identical CreateScheduledQuery requests has the same effect as making a single request.

      • If CreateScheduledQuery is called without a ClientToken, the Query SDK generates a ClientToken on your behalf.

      • After 8 hours, any request with the same ClientToken is treated as a new request.

      If a token is not provided, the SDK will use a version 4 UUID.
    • ScheduledQueryExecutionRoleArn — (String)

      The ARN for the IAM role that Timestream will assume when running the scheduled query.

    • Tags — (Array<map>)

      A list of key-value pairs to label the scheduled query.

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

    • KmsKeyId — (String)

      The Amazon KMS key used to encrypt the scheduled query resource, at-rest. If the Amazon KMS key is not specified, the scheduled query resource will be encrypted with a Timestream owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix the name with alias/

      If ErrorReportConfiguration uses SSE_KMS as encryption type, the same KmsKeyId is used to encrypt the error report at rest.

    • ErrorReportConfiguration — (map)

      Configuration for error reporting. Error reports will be generated when a problem is encountered when writing the query results.

      • S3Configurationrequired — (map)

        The S3 configuration for the error reports.

        • BucketNamerequired — (String)

          Name of the S3 bucket under which error reports will be created.

        • ObjectKeyPrefix — (String)

          Prefix for the error report key. Timestream by default adds the following prefix to the error report path.

        • EncryptionOption — (String)

          Encryption at rest options for the error reports. If no encryption option is specified, Timestream will choose SSE_S3 as default.

          Possible values include:
          • "SSE_S3"
          • "SSE_KMS"

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:

      • Arn — (String)

        ARN for the created scheduled query.

Returns:

  • (AWS.Request)

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

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

Deletes a given scheduled query. This is an irreversible operation.

Service Reference:

Examples:

Calling the deleteScheduledQuery operation

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

      The ARN of the scheduled query.

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.

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

DescribeEndpoints returns a list of available endpoints to make Timestream API calls against. This API is available through both Write and Query.

Because the Timestream SDKs are designed to transparently work with the service’s architecture, including the management and mapping of the service endpoints, it is not recommended that you use this API 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 = {
};
timestreamquery.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.

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

Provides detailed information about a scheduled query.

Service Reference:

Examples:

Calling the describeScheduledQuery operation

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

      The ARN of the scheduled query.

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:

      • ScheduledQuery — (map)

        The scheduled query.

        • Arnrequired — (String)

          Scheduled query ARN.

        • Namerequired — (String)

          Name of the scheduled query.

        • QueryStringrequired — (String)

          The query to be run.

        • CreationTime — (Date)

          Creation time of the scheduled query.

        • Staterequired — (String)

          State of the scheduled query.

          Possible values include:
          • "ENABLED"
          • "DISABLED"
        • PreviousInvocationTime — (Date)

          Last time the query was run.

        • NextInvocationTime — (Date)

          The next time the scheduled query is scheduled to run.

        • ScheduleConfigurationrequired — (map)

          Schedule configuration.

          • ScheduleExpressionrequired — (String)

            An expression that denotes when to trigger the scheduled query run. This can be a cron expression or a rate expression.

        • NotificationConfigurationrequired — (map)

          Notification configuration.

          • SnsConfigurationrequired — (map)

            Details on SNS configuration.

            • TopicArnrequired — (String)

              SNS topic ARN that the scheduled query status notifications will be sent to.

        • TargetConfiguration — (map)

          Scheduled query target store configuration.

          • TimestreamConfigurationrequired — (map)

            Configuration needed to write data into the Timestream database and table.

            • DatabaseNamerequired — (String)

              Name of Timestream database to which the query result will be written.

            • TableNamerequired — (String)

              Name of Timestream table that the query result will be written to. The table should be within the same database that is provided in Timestream configuration.

            • TimeColumnrequired — (String)

              Column from query result that should be used as the time column in destination table. Column type for this should be TIMESTAMP.

            • DimensionMappingsrequired — (Array<map>)

              This is to allow mapping column(s) from the query result to the dimension in the destination table.

              • Namerequired — (String)

                Column name from query result.

              • DimensionValueTyperequired — (String)

                Type for the dimension.

                Possible values include:
                • "VARCHAR"
            • MultiMeasureMappings — (map)

              Multi-measure mappings.

              • TargetMultiMeasureName — (String)

                The name of the target multi-measure name in the derived table. This input is required when measureNameColumn is not provided. If MeasureNameColumn is provided, then value from that column will be used as multi-measure name.

              • MultiMeasureAttributeMappingsrequired — (Array<map>)

                Required. Attribute mappings to be used for mapping query results to ingest data for multi-measure attributes.

                • SourceColumnrequired — (String)

                  Source column from where the attribute value is to be read.

                • TargetMultiMeasureAttributeName — (String)

                  Custom name to be used for attribute name in derived table. If not provided, source column name would be used.

                • MeasureValueTyperequired — (String)

                  Type of the attribute to be read from the source column.

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

              Specifies how to map measures to multi-measure records.

              • MeasureName — (String)

                Refers to the value of measure_name in a result row. This field is required if MeasureNameColumn is provided.

              • SourceColumn — (String)

                This field refers to the source column from which measure-value is to be read for result materialization.

              • TargetMeasureName — (String)

                Target measure name to be used. If not provided, the target measure name by default would be measure-name if provided, or sourceColumn otherwise.

              • MeasureValueTyperequired — (String)

                Type of the value that is to be read from sourceColumn. If the mapping is for MULTI, use MeasureValueType.MULTI.

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

                Required when measureValueType is MULTI. Attribute mappings for MULTI value measures.

                • SourceColumnrequired — (String)

                  Source column from where the attribute value is to be read.

                • TargetMultiMeasureAttributeName — (String)

                  Custom name to be used for attribute name in derived table. If not provided, source column name would be used.

                • MeasureValueTyperequired — (String)

                  Type of the attribute to be read from the source column.

                  Possible values include:
                  • "BIGINT"
                  • "BOOLEAN"
                  • "DOUBLE"
                  • "VARCHAR"
            • MeasureNameColumn — (String)

              Name of the measure column.

        • ScheduledQueryExecutionRoleArn — (String)

          IAM role that Timestream uses to run the schedule query.

        • KmsKeyId — (String)

          A customer provided KMS key used to encrypt the scheduled query resource.

        • ErrorReportConfiguration — (map)

          Error-reporting configuration for the scheduled query.

          • S3Configurationrequired — (map)

            The S3 configuration for the error reports.

            • BucketNamerequired — (String)

              Name of the S3 bucket under which error reports will be created.

            • ObjectKeyPrefix — (String)

              Prefix for the error report key. Timestream by default adds the following prefix to the error report path.

            • EncryptionOption — (String)

              Encryption at rest options for the error reports. If no encryption option is specified, Timestream will choose SSE_S3 as default.

              Possible values include:
              • "SSE_S3"
              • "SSE_KMS"
        • LastRunSummary — (map)

          Runtime summary for the last scheduled query run.

          • InvocationTime — (Date)

            InvocationTime for this run. This is the time at which the query is scheduled to run. Parameter @scheduled_runtime can be used in the query to get the value.

          • TriggerTime — (Date)

            The actual time when the query was run.

          • RunStatus — (String)

            The status of a scheduled query run.

            Possible values include:
            • "AUTO_TRIGGER_SUCCESS"
            • "AUTO_TRIGGER_FAILURE"
            • "MANUAL_TRIGGER_SUCCESS"
            • "MANUAL_TRIGGER_FAILURE"
          • ExecutionStats — (map)

            Runtime statistics for a scheduled run.

            • ExecutionTimeInMillis — (Integer)

              Total time, measured in milliseconds, that was needed for the scheduled query run to complete.

            • DataWrites — (Integer)

              Data writes metered for records ingested in a single scheduled query run.

            • BytesMetered — (Integer)

              Bytes metered for a single scheduled query run.

            • RecordsIngested — (Integer)

              The number of records ingested for a single scheduled query run.

            • QueryResultRows — (Integer)

              Number of rows present in the output from running a query before ingestion to destination data source.

          • ErrorReportLocation — (map)

            S3 location for error report.

            • S3ReportLocation — (map)

              The S3 location where error reports are written.

              • BucketName — (String)

                S3 bucket name.

              • ObjectKey — (String)

                S3 key.

          • FailureReason — (String)

            Error message for the scheduled query in case of failure. You might have to look at the error report to get more detailed error reasons.

        • RecentlyFailedRuns — (Array<map>)

          Runtime summary for the last five failed scheduled query runs.

          • InvocationTime — (Date)

            InvocationTime for this run. This is the time at which the query is scheduled to run. Parameter @scheduled_runtime can be used in the query to get the value.

          • TriggerTime — (Date)

            The actual time when the query was run.

          • RunStatus — (String)

            The status of a scheduled query run.

            Possible values include:
            • "AUTO_TRIGGER_SUCCESS"
            • "AUTO_TRIGGER_FAILURE"
            • "MANUAL_TRIGGER_SUCCESS"
            • "MANUAL_TRIGGER_FAILURE"
          • ExecutionStats — (map)

            Runtime statistics for a scheduled run.

            • ExecutionTimeInMillis — (Integer)

              Total time, measured in milliseconds, that was needed for the scheduled query run to complete.

            • DataWrites — (Integer)

              Data writes metered for records ingested in a single scheduled query run.

            • BytesMetered — (Integer)

              Bytes metered for a single scheduled query run.

            • RecordsIngested — (Integer)

              The number of records ingested for a single scheduled query run.

            • QueryResultRows — (Integer)

              Number of rows present in the output from running a query before ingestion to destination data source.

          • ErrorReportLocation — (map)

            S3 location for error report.

            • S3ReportLocation — (map)

              The S3 location where error reports are written.

              • BucketName — (String)

                S3 bucket name.

              • ObjectKey — (String)

                S3 key.

          • FailureReason — (String)

            Error message for the scheduled query in case of failure. You might have to look at the error report to get more detailed error reasons.

Returns:

  • (AWS.Request)

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

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

You can use this API to run a scheduled query manually.

Service Reference:

Examples:

Calling the executeScheduledQuery operation

var params = {
  InvocationTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  ScheduledQueryArn: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE'
};
timestreamquery.executeScheduledQuery(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: {})
    • ScheduledQueryArn — (String)

      ARN of the scheduled query.

    • InvocationTime — (Date)

      The timestamp in UTC. Query will be run as if it was invoked at this timestamp.

    • ClientToken — (String)

      Not used.

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

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.

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

Gets a list of all scheduled queries in the caller's Amazon account and Region. ListScheduledQueries is eventually consistent.

Service Reference:

Examples:

Calling the listScheduledQueries operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
timestreamquery.listScheduledQueries(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: {})
    • MaxResults — (Integer)

      The maximum 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 the argument to the subsequent call to ListScheduledQueriesRequest.

    • NextToken — (String)

      A pagination token to resume pagination.

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:

      • ScheduledQueries — (Array<map>)

        A list of scheduled queries.

        • Arnrequired — (String)

          The Amazon Resource Name.

        • Namerequired — (String)

          The name of the scheduled query.

        • CreationTime — (Date)

          The creation time of the scheduled query.

        • Staterequired — (String)

          State of scheduled query.

          Possible values include:
          • "ENABLED"
          • "DISABLED"
        • PreviousInvocationTime — (Date)

          The last time the scheduled query was run.

        • NextInvocationTime — (Date)

          The next time the scheduled query is to be run.

        • ErrorReportConfiguration — (map)

          Configuration for scheduled query error reporting.

          • S3Configurationrequired — (map)

            The S3 configuration for the error reports.

            • BucketNamerequired — (String)

              Name of the S3 bucket under which error reports will be created.

            • ObjectKeyPrefix — (String)

              Prefix for the error report key. Timestream by default adds the following prefix to the error report path.

            • EncryptionOption — (String)

              Encryption at rest options for the error reports. If no encryption option is specified, Timestream will choose SSE_S3 as default.

              Possible values include:
              • "SSE_S3"
              • "SSE_KMS"
        • TargetDestination — (map)

          Target data source where final scheduled query result will be written.

          • TimestreamDestination — (map)

            Query result destination details for Timestream data source.

            • DatabaseName — (String)

              Timestream database name.

            • TableName — (String)

              Timestream table name.

        • LastRunStatus — (String)

          Status of the last scheduled query run.

          Possible values include:
          • "AUTO_TRIGGER_SUCCESS"
          • "AUTO_TRIGGER_FAILURE"
          • "MANUAL_TRIGGER_SUCCESS"
          • "MANUAL_TRIGGER_FAILURE"
      • 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

List all tags on a Timestream query resource.

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  ResourceARN: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
timestreamquery.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).

    • MaxResults — (Integer)

      The maximum number of tags to return.

    • NextToken — (String)

      A pagination token to resume pagination.

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.

      • NextToken — (String)

        A pagination token to resume pagination with a subsequent call to ListTagsForResourceResponse.

Returns:

  • (AWS.Request)

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

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

A synchronous operation that allows you to submit a query with parameters to be stored by Timestream for later running. Timestream only supports using this operation with the PrepareQueryRequest$ValidateOnly set to true.

Service Reference:

Examples:

Calling the prepareQuery operation

var params = {
  QueryString: 'STRING_VALUE', /* required */
  ValidateOnly: true || false
};
timestreamquery.prepareQuery(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: {})
    • QueryString — (String)

      The Timestream query string that you want to use as a prepared statement. Parameter names can be specified in the query string @ character followed by an identifier.

    • ValidateOnly — (Boolean)

      By setting this value to true, Timestream will only validate that the query string is a valid Timestream query, and not store the prepared query for later use.

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:

      • QueryString — (String)

        The query string that you want prepare.

      • Columns — (Array<map>)

        A list of SELECT clause columns of the submitted query string.

        • Name — (String)

          Name of the column.

        • Type — (map)

          Contains the data type of a column in a query result set. The data type can be scalar or complex. The supported scalar data types are integers, Boolean, string, double, timestamp, date, time, and intervals. The supported complex data types are arrays, rows, and timeseries.

          • ScalarType — (String)

            Indicates if the column is of type string, integer, Boolean, double, timestamp, date, time.

            Possible values include:
            • "VARCHAR"
            • "BOOLEAN"
            • "BIGINT"
            • "DOUBLE"
            • "TIMESTAMP"
            • "DATE"
            • "TIME"
            • "INTERVAL_DAY_TO_SECOND"
            • "INTERVAL_YEAR_TO_MONTH"
            • "UNKNOWN"
            • "INTEGER"
          • ArrayColumnInfo — (map)

            Indicates if the column is an array.

            • Name — (String)

              The name of the result set column. The name of the result set is available for columns of all data types except for arrays.

          • TimeSeriesMeasureValueColumnInfo — (map)

            Indicates if the column is a timeseries data type.

            • Name — (String)

              The name of the result set column. The name of the result set is available for columns of all data types except for arrays.

          • RowColumnInfo — (Array<map>)

            Indicates if the column is a row.

            • Name — (String)

              The name of the result set column. The name of the result set is available for columns of all data types except for arrays.

        • DatabaseName — (String)

          Database that has this column.

        • TableName — (String)

          Table within the database that has this column.

        • Aliased — (Boolean)

          True, if the column name was aliased by the query. False otherwise.

      • Parameters — (Array<map>)

        A list of parameters used in the submitted query string.

        • Namerequired — (String)

          Parameter name.

        • Typerequired — (map)

          Contains the data type of a column in a query result set. The data type can be scalar or complex. The supported scalar data types are integers, Boolean, string, double, timestamp, date, time, and intervals. The supported complex data types are arrays, rows, and timeseries.

          • ScalarType — (String)

            Indicates if the column is of type string, integer, Boolean, double, timestamp, date, time.

            Possible values include:
            • "VARCHAR"
            • "BOOLEAN"
            • "BIGINT"
            • "DOUBLE"
            • "TIMESTAMP"
            • "DATE"
            • "TIME"
            • "INTERVAL_DAY_TO_SECOND"
            • "INTERVAL_YEAR_TO_MONTH"
            • "UNKNOWN"
            • "INTEGER"
          • ArrayColumnInfo — (map)

            Indicates if the column is an array.

            • Name — (String)

              The name of the result set column. The name of the result set is available for columns of all data types except for arrays.

          • TimeSeriesMeasureValueColumnInfo — (map)

            Indicates if the column is a timeseries data type.

            • Name — (String)

              The name of the result set column. The name of the result set is available for columns of all data types except for arrays.

          • RowColumnInfo — (Array<map>)

            Indicates if the column is a row.

            • Name — (String)

              The name of the result set column. The name of the result set is available for columns of all data types except for arrays.

Returns:

  • (AWS.Request)

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

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

Query is a synchronous operation that enables you to run a query against your Amazon Timestream data. Query will time out after 60 seconds. You must update the default timeout in the SDK to support a timeout of 60 seconds. See the code sample for details.

Your query request will fail in the following cases:

  • If you submit a Query request with the same client token outside of the 5-minute idempotency window.

  • If you submit a Query request with the same client token, but change other parameters, within the 5-minute idempotency window.

  • If the size of the row (including the query metadata) exceeds 1 MB, then the query will fail with the following error message:

    Query aborted as max page response size has been exceeded by the output result row

  • If the IAM principal of the query initiator and the result reader are not the same and/or the query initiator and the result reader do not have the same query string in the query requests, the query will fail with an Invalid pagination token error.

Service Reference:

Examples:

Calling the query operation

var params = {
  QueryString: 'STRING_VALUE', /* required */
  ClientToken: 'STRING_VALUE',
  MaxRows: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
timestreamquery.query(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: {})
    • QueryString — (String)

      The query to be run by Timestream.

    • ClientToken — (String)

      Unique, case-sensitive string of up to 64 ASCII characters specified when a Query request is made. Providing a ClientToken makes the call to Query idempotent. This means that running the same query repeatedly will produce the same result. In other words, making multiple identical Query requests has the same effect as making a single request. When using ClientToken in a query, note the following:

      • If the Query API is instantiated without a ClientToken, the Query SDK generates a ClientToken on your behalf.

      • If the Query invocation only contains the ClientToken but does not include a NextToken, that invocation of Query is assumed to be a new query run.

      • If the invocation contains NextToken, that particular invocation is assumed to be a subsequent invocation of a prior call to the Query API, and a result set is returned.

      • After 4 hours, any request with the same ClientToken is treated as a new request.

      If a token is not provided, the SDK will use a version 4 UUID.
    • NextToken — (String)

      A pagination token used to return a set of results. When the Query API is invoked using NextToken, that particular invocation is assumed to be a subsequent invocation of a prior call to Query, and a result set is returned. However, if the Query invocation only contains the ClientToken, that invocation of Query is assumed to be a new query run.

      Note the following when using NextToken in a query:

      • A pagination token can be used for up to five Query invocations, OR for a duration of up to 1 hour – whichever comes first.

      • Using the same NextToken will return the same set of records. To keep paginating through the result set, you must to use the most recent nextToken.

      • Suppose a Query invocation returns two NextToken values, TokenA and TokenB. If TokenB is used in a subsequent Query invocation, then TokenA is invalidated and cannot be reused.

      • To request a previous result set from a query after pagination has begun, you must re-invoke the Query API.

      • The latest NextToken should be used to paginate until null is returned, at which point a new NextToken should be used.

      • If the IAM principal of the query initiator and the result reader are not the same and/or the query initiator and the result reader do not have the same query string in the query requests, the query will fail with an Invalid pagination token error.

    • MaxRows — (Integer)

      The total number of rows to be returned in the Query output. The initial run of Query with a MaxRows value specified will return the result set of the query in two cases:

      • The size of the result is less than 1MB.

      • The number of rows in the result set is less than the value of maxRows.

      Otherwise, the initial invocation of Query only returns a NextToken, which can then be used in subsequent calls to fetch the result set. To resume pagination, provide the NextToken value in the subsequent command.

      If the row size is large (e.g. a row has many columns), Timestream may return fewer rows to keep the response size from exceeding the 1 MB limit. If MaxRows is not provided, Timestream will send the necessary number of rows to meet the 1 MB limit.

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:

      • QueryId — (String)

        A unique ID for the given query.

      • NextToken — (String)

        A pagination token that can be used again on a Query call to get the next set of results.

      • Rows — (Array<map>)

        The result set rows returned by the query.

        • Datarequired — (Array<map>)

          List of data points in a single row of the result set.

          • ScalarValue — (String)

            Indicates if the data point is a scalar value such as integer, string, double, or Boolean.

          • TimeSeriesValue — (Array<map>)

            Indicates if the data point is a timeseries data type.

            • Timerequired — (String)

              The timestamp when the measure value was collected.

          • NullValue — (Boolean)

            Indicates if the data point is null.

      • ColumnInfo — (Array<map>)

        The column data types of the returned result set.

        • Name — (String)

          The name of the result set column. The name of the result set is available for columns of all data types except for arrays.

        • Typerequired — (map)

          The data type of the result set column. The data type can be a scalar or complex. Scalar data types are integers, strings, doubles, Booleans, and others. Complex data types are types such as arrays, rows, and others.

          • ScalarType — (String)

            Indicates if the column is of type string, integer, Boolean, double, timestamp, date, time.

            Possible values include:
            • "VARCHAR"
            • "BOOLEAN"
            • "BIGINT"
            • "DOUBLE"
            • "TIMESTAMP"
            • "DATE"
            • "TIME"
            • "INTERVAL_DAY_TO_SECOND"
            • "INTERVAL_YEAR_TO_MONTH"
            • "UNKNOWN"
            • "INTEGER"
          • RowColumnInfo — (Array<map>)

            Indicates if the column is a row.

      • QueryStatus — (map)

        Information about the status of the query, including progress and bytes scanned.

        • ProgressPercentage — (Float)

          The progress of the query, expressed as a percentage.

        • CumulativeBytesScanned — (Integer)

          The amount of data scanned by the query in bytes. This is a cumulative sum and represents the total amount of bytes scanned since the query was started.

        • CumulativeBytesMetered — (Integer)

          The amount of data scanned by the query in bytes that you will be charged for. This is a cumulative sum and represents the total amount of data that you will be charged for since the query was started. The charge is applied only once and is either applied when the query completes running or when the query is cancelled.

Returns:

  • (AWS.Request)

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

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

Associate 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 */
  ]
};
timestreamquery.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 query resource.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  ResourceARN: 'STRING_VALUE', /* required */
  TagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
timestreamquery.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.

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

Update a scheduled query.

Service Reference:

Examples:

Calling the updateScheduledQuery operation

var params = {
  ScheduledQueryArn: 'STRING_VALUE', /* required */
  State: ENABLED | DISABLED /* required */
};
timestreamquery.updateScheduledQuery(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: {})
    • ScheduledQueryArn — (String)

      ARN of the scheuled query.

    • State — (String)

      State of the scheduled query.

      Possible values include:
      • "ENABLED"
      • "DISABLED"

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.