CfnScheduledQueryProps
- class aws_cdk.aws_timestream.CfnScheduledQueryProps(*, error_report_configuration, notification_configuration, query_string, schedule_configuration, scheduled_query_execution_role_arn, client_token=None, kms_key_id=None, scheduled_query_name=None, tags=None, target_configuration=None)
Bases:
object
Properties for defining a
CfnScheduledQuery
.- Parameters:
error_report_configuration (
Union
[ErrorReportConfigurationProperty
,Dict
[str
,Any
],IResolvable
]) – Configuration for error reporting. Error reports will be generated when a problem is encountered when writing the query results.notification_configuration (
Union
[IResolvable
,NotificationConfigurationProperty
,Dict
[str
,Any
]]) – 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.query_string (
str
) – 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 (
Union
[IResolvable
,ScheduleConfigurationProperty
,Dict
[str
,Any
]]) – Schedule configuration.scheduled_query_execution_role_arn (
str
) – The ARN for the IAM role that Timestream will assume when running the scheduled query.client_token (
Optional
[str
]) – 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 aClientToken
, the Query SDK generates aClientToken
on your behalf. - After 8 hours, any request with the sameClientToken
is treated as a new request.kms_key_id (
Optional
[str
]) – 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 usesSSE_KMS
as encryption type, the same KmsKeyId is used to encrypt the error report at rest.scheduled_query_name (
Optional
[str
]) – A name for the query. Scheduled query names must be unique within each Region.tags (
Optional
[Sequence
[Union
[CfnTag
,Dict
[str
,Any
]]]]) – A list of key-value pairs to label the scheduled query.target_configuration (
Union
[IResolvable
,TargetConfigurationProperty
,Dict
[str
,Any
],None
]) – Scheduled query target store configuration.
- Link:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_timestream as timestream cfn_scheduled_query_props = timestream.CfnScheduledQueryProps( error_report_configuration=timestream.CfnScheduledQuery.ErrorReportConfigurationProperty( s3_configuration=timestream.CfnScheduledQuery.S3ConfigurationProperty( bucket_name="bucketName", # the properties below are optional encryption_option="encryptionOption", object_key_prefix="objectKeyPrefix" ) ), notification_configuration=timestream.CfnScheduledQuery.NotificationConfigurationProperty( sns_configuration=timestream.CfnScheduledQuery.SnsConfigurationProperty( topic_arn="topicArn" ) ), query_string="queryString", schedule_configuration=timestream.CfnScheduledQuery.ScheduleConfigurationProperty( schedule_expression="scheduleExpression" ), scheduled_query_execution_role_arn="scheduledQueryExecutionRoleArn", # the properties below are optional client_token="clientToken", kms_key_id="kmsKeyId", scheduled_query_name="scheduledQueryName", tags=[CfnTag( key="key", value="value" )], target_configuration=timestream.CfnScheduledQuery.TargetConfigurationProperty( timestream_configuration=timestream.CfnScheduledQuery.TimestreamConfigurationProperty( database_name="databaseName", dimension_mappings=[timestream.CfnScheduledQuery.DimensionMappingProperty( dimension_value_type="dimensionValueType", name="name" )], table_name="tableName", time_column="timeColumn", # the properties below are optional measure_name_column="measureNameColumn", mixed_measure_mappings=[timestream.CfnScheduledQuery.MixedMeasureMappingProperty( measure_value_type="measureValueType", # the properties below are optional measure_name="measureName", multi_measure_attribute_mappings=[timestream.CfnScheduledQuery.MultiMeasureAttributeMappingProperty( measure_value_type="measureValueType", source_column="sourceColumn", # the properties below are optional target_multi_measure_attribute_name="targetMultiMeasureAttributeName" )], source_column="sourceColumn", target_measure_name="targetMeasureName" )], multi_measure_mappings=timestream.CfnScheduledQuery.MultiMeasureMappingsProperty( multi_measure_attribute_mappings=[timestream.CfnScheduledQuery.MultiMeasureAttributeMappingProperty( measure_value_type="measureValueType", source_column="sourceColumn", # the properties below are optional target_multi_measure_attribute_name="targetMultiMeasureAttributeName" )], # the properties below are optional target_multi_measure_name="targetMultiMeasureName" ) ) ) )
Attributes
- client_token
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 aClientToken
on your behalf.After 8 hours, any request with the same
ClientToken
is treated as a new request.
- error_report_configuration
Configuration for error reporting.
Error reports will be generated when a problem is encountered when writing the query results.
- kms_key_id
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
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.
- query_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
Schedule configuration.
- scheduled_query_execution_role_arn
The ARN for the IAM role that Timestream will assume when running the scheduled query.
- scheduled_query_name
A name for the query.
Scheduled query names must be unique within each Region.
- tags
A list of key-value pairs to label the scheduled query.
- target_configuration
Scheduled query target store configuration.