amazonka-timestream-query-2.0: Amazon Timestream Query SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.TimeStreamQuery.Lens

Description

 
Synopsis

Operations

CancelQuery

cancelQuery_queryId :: Lens' CancelQuery Text Source #

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

cancelQueryResponse_cancellationMessage :: Lens' CancelQueryResponse (Maybe Text) Source #

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

CreateScheduledQuery

createScheduledQuery_clientToken :: Lens' CreateScheduledQuery (Maybe Text) Source #

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.

createScheduledQuery_kmsKeyId :: Lens' CreateScheduledQuery (Maybe Text) Source #

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.

createScheduledQuery_tags :: Lens' CreateScheduledQuery (Maybe [Tag]) Source #

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

createScheduledQuery_targetConfiguration :: Lens' CreateScheduledQuery (Maybe TargetConfiguration) Source #

Configuration used for writing the result of a query.

createScheduledQuery_queryString :: Lens' CreateScheduledQuery Text Source #

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.

createScheduledQuery_notificationConfiguration :: Lens' CreateScheduledQuery NotificationConfiguration Source #

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.

createScheduledQuery_scheduledQueryExecutionRoleArn :: Lens' CreateScheduledQuery Text Source #

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

createScheduledQuery_errorReportConfiguration :: Lens' CreateScheduledQuery ErrorReportConfiguration Source #

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

DeleteScheduledQuery

DescribeEndpoints

describeEndpointsResponse_endpoints :: Lens' DescribeEndpointsResponse [Endpoint] Source #

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

DescribeScheduledQuery

ExecuteScheduledQuery

executeScheduledQuery_invocationTime :: Lens' ExecuteScheduledQuery UTCTime Source #

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

ListScheduledQueries

listScheduledQueries_maxResults :: Lens' ListScheduledQueries (Maybe Natural) Source #

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.

listScheduledQueries_nextToken :: Lens' ListScheduledQueries (Maybe Text) Source #

A pagination token to resume pagination.

listScheduledQueriesResponse_nextToken :: Lens' ListScheduledQueriesResponse (Maybe Text) Source #

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

ListTagsForResource

listTagsForResource_nextToken :: Lens' ListTagsForResource (Maybe Text) Source #

A pagination token to resume pagination.

listTagsForResource_resourceARN :: Lens' ListTagsForResource Text Source #

The Timestream resource with tags to be listed. This value is an Amazon Resource Name (ARN).

listTagsForResourceResponse_nextToken :: Lens' ListTagsForResourceResponse (Maybe Text) Source #

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

listTagsForResourceResponse_tags :: Lens' ListTagsForResourceResponse [Tag] Source #

The tags currently associated with the Timestream resource.

PrepareQuery

prepareQuery_validateOnly :: Lens' PrepareQuery (Maybe Bool) Source #

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.

prepareQuery_queryString :: Lens' PrepareQuery Text Source #

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.

prepareQueryResponse_queryString :: Lens' PrepareQueryResponse Text Source #

The query string that you want prepare.

prepareQueryResponse_columns :: Lens' PrepareQueryResponse [SelectColumn] Source #

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

prepareQueryResponse_parameters :: Lens' PrepareQueryResponse [ParameterMapping] Source #

A list of parameters used in the submitted query string.

Query

query_clientToken :: Lens' Query (Maybe Text) Source #

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.

query_maxRows :: Lens' Query (Maybe Natural) Source #

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.

query_nextToken :: Lens' Query (Maybe Text) Source #

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.

query_queryString :: Lens' Query Text Source #

The query to be run by Timestream.

queryResponse_nextToken :: Lens' QueryResponse (Maybe Text) Source #

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

queryResponse_queryStatus :: Lens' QueryResponse (Maybe QueryStatus) Source #

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

queryResponse_httpStatus :: Lens' QueryResponse Int Source #

The response's http status code.

queryResponse_queryId :: Lens' QueryResponse Text Source #

A unique ID for the given query.

queryResponse_rows :: Lens' QueryResponse [Row] Source #

The result set rows returned by the query.

queryResponse_columnInfo :: Lens' QueryResponse [ColumnInfo] Source #

The column data types of the returned result set.

TagResource

tagResource_resourceARN :: Lens' TagResource Text Source #

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

tagResource_tags :: Lens' TagResource [Tag] Source #

The tags to be assigned to the Timestream resource.

UntagResource

untagResource_resourceARN :: Lens' UntagResource Text Source #

The Timestream resource that the tags will be removed from. This value is an Amazon Resource Name (ARN).

untagResource_tagKeys :: Lens' UntagResource [Text] Source #

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

UpdateScheduledQuery

Types

ColumnInfo

columnInfo_name :: Lens' ColumnInfo (Maybe Text) Source #

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

columnInfo_type :: Lens' ColumnInfo Type Source #

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.

Datum

datum_arrayValue :: Lens' Datum (Maybe [Datum]) Source #

Indicates if the data point is an array.

datum_nullValue :: Lens' Datum (Maybe Bool) Source #

Indicates if the data point is null.

datum_rowValue :: Lens' Datum (Maybe Row) Source #

Indicates if the data point is a row.

datum_scalarValue :: Lens' Datum (Maybe Text) Source #

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

datum_timeSeriesValue :: Lens' Datum (Maybe [TimeSeriesDataPoint]) Source #

Indicates if the data point is a timeseries data type.

DimensionMapping

dimensionMapping_name :: Lens' DimensionMapping Text Source #

Column name from query result.

Endpoint

endpoint_address :: Lens' Endpoint Text Source #

An endpoint address.

endpoint_cachePeriodInMinutes :: Lens' Endpoint Integer Source #

The TTL for the endpoint, in minutes.

ErrorReportConfiguration

ErrorReportLocation

errorReportLocation_s3ReportLocation :: Lens' ErrorReportLocation (Maybe S3ReportLocation) Source #

The S3 location where error reports are written.

ExecutionStats

executionStats_bytesMetered :: Lens' ExecutionStats (Maybe Integer) Source #

Bytes metered for a single scheduled query run.

executionStats_dataWrites :: Lens' ExecutionStats (Maybe Integer) Source #

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

executionStats_executionTimeInMillis :: Lens' ExecutionStats (Maybe Integer) Source #

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

executionStats_queryResultRows :: Lens' ExecutionStats (Maybe Integer) Source #

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

executionStats_recordsIngested :: Lens' ExecutionStats (Maybe Integer) Source #

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

MixedMeasureMapping

mixedMeasureMapping_measureName :: Lens' MixedMeasureMapping (Maybe Text) Source #

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

mixedMeasureMapping_multiMeasureAttributeMappings :: Lens' MixedMeasureMapping (Maybe (NonEmpty MultiMeasureAttributeMapping)) Source #

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

mixedMeasureMapping_sourceColumn :: Lens' MixedMeasureMapping (Maybe Text) Source #

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

mixedMeasureMapping_targetMeasureName :: Lens' MixedMeasureMapping (Maybe Text) Source #

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

mixedMeasureMapping_measureValueType :: Lens' MixedMeasureMapping MeasureValueType Source #

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

MultiMeasureAttributeMapping

multiMeasureAttributeMapping_targetMultiMeasureAttributeName :: Lens' MultiMeasureAttributeMapping (Maybe Text) Source #

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

multiMeasureAttributeMapping_sourceColumn :: Lens' MultiMeasureAttributeMapping Text Source #

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

MultiMeasureMappings

multiMeasureMappings_targetMultiMeasureName :: Lens' MultiMeasureMappings (Maybe Text) Source #

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.

multiMeasureMappings_multiMeasureAttributeMappings :: Lens' MultiMeasureMappings (NonEmpty MultiMeasureAttributeMapping) Source #

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

NotificationConfiguration

ParameterMapping

QueryStatus

queryStatus_cumulativeBytesMetered :: Lens' QueryStatus (Maybe Integer) Source #

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.

queryStatus_cumulativeBytesScanned :: Lens' QueryStatus (Maybe Integer) Source #

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.

queryStatus_progressPercentage :: Lens' QueryStatus (Maybe Double) Source #

The progress of the query, expressed as a percentage.

Row

row_data :: Lens' Row [Datum] Source #

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

S3Configuration

s3Configuration_encryptionOption :: Lens' S3Configuration (Maybe S3EncryptionOption) Source #

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

s3Configuration_objectKeyPrefix :: Lens' S3Configuration (Maybe Text) Source #

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

s3Configuration_bucketName :: Lens' S3Configuration Text Source #

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

S3ReportLocation

ScheduleConfiguration

scheduleConfiguration_scheduleExpression :: Lens' ScheduleConfiguration Text Source #

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

ScheduledQuery

scheduledQuery_creationTime :: Lens' ScheduledQuery (Maybe UTCTime) Source #

The creation time of the scheduled query.

scheduledQuery_nextInvocationTime :: Lens' ScheduledQuery (Maybe UTCTime) Source #

The next time the scheduled query is to be run.

scheduledQuery_previousInvocationTime :: Lens' ScheduledQuery (Maybe UTCTime) Source #

The last time the scheduled query was run.

scheduledQuery_targetDestination :: Lens' ScheduledQuery (Maybe TargetDestination) Source #

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

scheduledQuery_arn :: Lens' ScheduledQuery Text Source #

The Amazon Resource Name.

scheduledQuery_name :: Lens' ScheduledQuery Text Source #

The name of the scheduled query.

ScheduledQueryDescription

scheduledQueryDescription_kmsKeyId :: Lens' ScheduledQueryDescription (Maybe Text) Source #

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

scheduledQueryDescription_nextInvocationTime :: Lens' ScheduledQueryDescription (Maybe UTCTime) Source #

The next time the scheduled query is scheduled to run.

scheduledQueryDescription_recentlyFailedRuns :: Lens' ScheduledQueryDescription (Maybe [ScheduledQueryRunSummary]) Source #

Runtime summary for the last five failed scheduled query runs.

ScheduledQueryRunSummary

scheduledQueryRunSummary_failureReason :: Lens' ScheduledQueryRunSummary (Maybe Text) Source #

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.

scheduledQueryRunSummary_invocationTime :: Lens' ScheduledQueryRunSummary (Maybe UTCTime) Source #

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.

SelectColumn

selectColumn_aliased :: Lens' SelectColumn (Maybe Bool) Source #

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

selectColumn_databaseName :: Lens' SelectColumn (Maybe Text) Source #

Database that has this column.

selectColumn_tableName :: Lens' SelectColumn (Maybe Text) Source #

Table within the database that has this column.

SnsConfiguration

snsConfiguration_topicArn :: Lens' SnsConfiguration Text Source #

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

Tag

tag_key :: Lens' Tag Text Source #

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

tag_value :: Lens' Tag Text Source #

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

TargetConfiguration

targetConfiguration_timestreamConfiguration :: Lens' TargetConfiguration TimestreamConfiguration Source #

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

TargetDestination

targetDestination_timestreamDestination :: Lens' TargetDestination (Maybe TimestreamDestination) Source #

Query result destination details for Timestream data source.

TimeSeriesDataPoint

timeSeriesDataPoint_time :: Lens' TimeSeriesDataPoint Text Source #

The timestamp when the measure value was collected.

timeSeriesDataPoint_value :: Lens' TimeSeriesDataPoint Datum Source #

The measure value for the data point.

TimestreamConfiguration

timestreamConfiguration_databaseName :: Lens' TimestreamConfiguration Text Source #

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

timestreamConfiguration_tableName :: Lens' TimestreamConfiguration Text Source #

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.

timestreamConfiguration_timeColumn :: Lens' TimestreamConfiguration Text Source #

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

timestreamConfiguration_dimensionMappings :: Lens' TimestreamConfiguration [DimensionMapping] Source #

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

TimestreamDestination

Type

type_arrayColumnInfo :: Lens' Type (Maybe ColumnInfo) Source #

Indicates if the column is an array.

type_rowColumnInfo :: Lens' Type (Maybe [ColumnInfo]) Source #

Indicates if the column is a row.

type_scalarType :: Lens' Type (Maybe ScalarType) Source #

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

type_timeSeriesMeasureValueColumnInfo :: Lens' Type (Maybe ColumnInfo) Source #

Indicates if the column is a timeseries data type.