--- # generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "awscc_timestream_scheduled_query Data Source - terraform-provider-awscc" subcategory: "" description: |- Data Source schema for AWS::Timestream::ScheduledQuery --- # awscc_timestream_scheduled_query (Data Source) Data Source schema for AWS::Timestream::ScheduledQuery ## Schema ### Required - `id` (String) Uniquely identifies the resource. ### Read-Only - `arn` (String) Amazon Resource Name of the scheduled query that is generated upon creation. - `client_token` (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. - `error_report_configuration` (Attributes) Configuration for error reporting. Error reports will be generated when a problem is encountered when writing the query results. (see [below for nested schema](#nestedatt--error_report_configuration)) - `kms_key_id` (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. - `notification_configuration` (Attributes) 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. (see [below for nested schema](#nestedatt--notification_configuration)) - `query_string` (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. - `schedule_configuration` (Attributes) Configuration for when the scheduled query is executed. (see [below for nested schema](#nestedatt--schedule_configuration)) - `scheduled_query_execution_role_arn` (String) The ARN for the IAM role that Timestream will assume when running the scheduled query. - `scheduled_query_name` (String) The name of the scheduled query. Scheduled query names must be unique within each Region. - `sq_error_report_configuration` (String) Configuration for error reporting. Error reports will be generated when a problem is encountered when writing the query results. - `sq_kms_key_id` (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. - `sq_name` (String) The name of the scheduled query. Scheduled query names must be unique within each Region. - `sq_notification_configuration` (String) 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. - `sq_query_string` (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. - `sq_schedule_configuration` (String) Configuration for when the scheduled query is executed. - `sq_scheduled_query_execution_role_arn` (String) The ARN for the IAM role that Timestream will assume when running the scheduled query. - `sq_target_configuration` (String) Configuration of target store where scheduled query results are written to. - `tags` (Attributes List) A list of key-value pairs to label the scheduled query. (see [below for nested schema](#nestedatt--tags)) - `target_configuration` (Attributes) Configuration of target store where scheduled query results are written to. (see [below for nested schema](#nestedatt--target_configuration)) ### Nested Schema for `error_report_configuration` Read-Only: - `s3_configuration` (Attributes) Details on S3 location for error reports that result from running a query. (see [below for nested schema](#nestedatt--error_report_configuration--s3_configuration)) ### Nested Schema for `error_report_configuration.s3_configuration` Read-Only: - `bucket_name` (String) Name of the S3 bucket under which error reports will be created. - `encryption_option` (String) Encryption at rest options for the error reports. If no encryption option is specified, Timestream will choose SSE_S3 as default. - `object_key_prefix` (String) Prefix for error report keys. ### Nested Schema for `notification_configuration` Read-Only: - `sns_configuration` (Attributes) SNS configuration for notification upon scheduled query execution. (see [below for nested schema](#nestedatt--notification_configuration--sns_configuration)) ### Nested Schema for `notification_configuration.sns_configuration` Read-Only: - `topic_arn` (String) SNS topic ARN that the scheduled query status notifications will be sent to. ### Nested Schema for `schedule_configuration` Read-Only: - `schedule_expression` (String) An expression that denotes when to trigger the scheduled query run. This can be a cron expression or a rate expression. ### Nested Schema for `tags` Read-Only: - `key` (String) The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. - `value` (String) The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ### Nested Schema for `target_configuration` Read-Only: - `timestream_configuration` (Attributes) Configuration needed to write data into the Timestream database and table. (see [below for nested schema](#nestedatt--target_configuration--timestream_configuration)) ### Nested Schema for `target_configuration.timestream_configuration` Read-Only: - `database_name` (String) Name of Timestream database to which the query result will be written. - `dimension_mappings` (Attributes List) This is to allow mapping column(s) from the query result to the dimension in the destination table. (see [below for nested schema](#nestedatt--target_configuration--timestream_configuration--dimension_mappings)) - `measure_name_column` (String) Name of the measure name column from the query result. - `mixed_measure_mappings` (Attributes List) Specifies how to map measures to multi-measure records. (see [below for nested schema](#nestedatt--target_configuration--timestream_configuration--mixed_measure_mappings)) - `multi_measure_mappings` (Attributes) Only one of MixedMeasureMappings or MultiMeasureMappings is to be provided. MultiMeasureMappings can be used to ingest data as multi measures in the derived table. (see [below for nested schema](#nestedatt--target_configuration--timestream_configuration--multi_measure_mappings)) - `table_name` (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. - `time_column` (String) Column from query result that should be used as the time column in destination table. Column type for this should be TIMESTAMP. ### Nested Schema for `target_configuration.timestream_configuration.dimension_mappings` Read-Only: - `dimension_value_type` (String) Type for the dimension. - `name` (String) Column name from query result. ### Nested Schema for `target_configuration.timestream_configuration.mixed_measure_mappings` Read-Only: - `measure_name` (String) Refers to the value of the measure name in a result row. This field is required if MeasureNameColumn is provided. - `measure_value_type` (String) Type of the value that is to be read from SourceColumn. If the mapping is for MULTI, use MeasureValueType.MULTI. - `multi_measure_attribute_mappings` (Attributes List) Required. Attribute mappings to be used for mapping query results to ingest data for multi-measure attributes. (see [below for nested schema](#nestedatt--target_configuration--timestream_configuration--mixed_measure_mappings--multi_measure_attribute_mappings)) - `source_column` (String) This field refers to the source column from which the measure value is to be read for result materialization. - `target_measure_name` (String) Target measure name to be used. If not provided, the target measure name by default would be MeasureName if provided, or SourceColumn otherwise. ### Nested Schema for `target_configuration.timestream_configuration.mixed_measure_mappings.target_measure_name` Read-Only: - `measure_value_type` (String) Value type of the measure value column to be read from the query result. - `source_column` (String) Source measure value column in the query result where the attribute value is to be read. - `target_multi_measure_attribute_name` (String) Custom name to be used for attribute name in derived table. If not provided, source column name would be used. ### Nested Schema for `target_configuration.timestream_configuration.multi_measure_mappings` Read-Only: - `multi_measure_attribute_mappings` (Attributes List) Required. Attribute mappings to be used for mapping query results to ingest data for multi-measure attributes. (see [below for nested schema](#nestedatt--target_configuration--timestream_configuration--multi_measure_mappings--multi_measure_attribute_mappings)) - `target_multi_measure_name` (String) Name of the target multi-measure in the derived table. Required if MeasureNameColumn is not provided. If MeasureNameColumn is provided then the value from that column will be used as the multi-measure name. ### Nested Schema for `target_configuration.timestream_configuration.multi_measure_mappings.target_multi_measure_name` Read-Only: - `measure_value_type` (String) Value type of the measure value column to be read from the query result. - `source_column` (String) Source measure value column in the query result where the attribute value is to be read. - `target_multi_measure_attribute_name` (String) Custom name to be used for attribute name in derived table. If not provided, source column name would be used.