CfnScheduledQueryPropsMixin
- class aws_cdk.mixins_preview.aws_timestream.mixins.CfnScheduledQueryPropsMixin(props, *, strategy=None)
Bases:
MixinCreate a scheduled query that will be run on your behalf at the configured schedule.
Timestream assumes the execution role provided as part of the
ScheduledQueryExecutionRoleArnparameter to run the query. You can use theNotificationConfigurationparameter to configure notification for your scheduled query operations.- See:
- CloudformationResource:
AWS::Timestream::ScheduledQuery
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_timestream import mixins as timestream_mixins cfn_scheduled_query_props_mixin = timestream_mixins.CfnScheduledQueryPropsMixin(timestream_mixins.CfnScheduledQueryMixinProps( client_token="clientToken", error_report_configuration=timestream_mixins.CfnScheduledQueryPropsMixin.ErrorReportConfigurationProperty( s3_configuration=timestream_mixins.CfnScheduledQueryPropsMixin.S3ConfigurationProperty( bucket_name="bucketName", encryption_option="encryptionOption", object_key_prefix="objectKeyPrefix" ) ), kms_key_id="kmsKeyId", notification_configuration=timestream_mixins.CfnScheduledQueryPropsMixin.NotificationConfigurationProperty( sns_configuration=timestream_mixins.CfnScheduledQueryPropsMixin.SnsConfigurationProperty( topic_arn="topicArn" ) ), query_string="queryString", schedule_configuration=timestream_mixins.CfnScheduledQueryPropsMixin.ScheduleConfigurationProperty( schedule_expression="scheduleExpression" ), scheduled_query_execution_role_arn="scheduledQueryExecutionRoleArn", scheduled_query_name="scheduledQueryName", tags=[CfnTag( key="key", value="value" )], target_configuration=timestream_mixins.CfnScheduledQueryPropsMixin.TargetConfigurationProperty( timestream_configuration=timestream_mixins.CfnScheduledQueryPropsMixin.TimestreamConfigurationProperty( database_name="databaseName", dimension_mappings=[timestream_mixins.CfnScheduledQueryPropsMixin.DimensionMappingProperty( dimension_value_type="dimensionValueType", name="name" )], measure_name_column="measureNameColumn", mixed_measure_mappings=[timestream_mixins.CfnScheduledQueryPropsMixin.MixedMeasureMappingProperty( measure_name="measureName", measure_value_type="measureValueType", multi_measure_attribute_mappings=[timestream_mixins.CfnScheduledQueryPropsMixin.MultiMeasureAttributeMappingProperty( measure_value_type="measureValueType", source_column="sourceColumn", target_multi_measure_attribute_name="targetMultiMeasureAttributeName" )], source_column="sourceColumn", target_measure_name="targetMeasureName" )], multi_measure_mappings=timestream_mixins.CfnScheduledQueryPropsMixin.MultiMeasureMappingsProperty( multi_measure_attribute_mappings=[timestream_mixins.CfnScheduledQueryPropsMixin.MultiMeasureAttributeMappingProperty( measure_value_type="measureValueType", source_column="sourceColumn", target_multi_measure_attribute_name="targetMultiMeasureAttributeName" )], target_multi_measure_name="targetMultiMeasureName" ), table_name="tableName", time_column="timeColumn" ) ) ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::Timestream::ScheduledQuery.- Parameters:
props (
Union[CfnScheduledQueryMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['clientToken', 'errorReportConfiguration', 'kmsKeyId', 'notificationConfiguration', 'queryString', 'scheduleConfiguration', 'scheduledQueryExecutionRoleArn', 'scheduledQueryName', 'tags', 'targetConfiguration']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
DimensionMappingProperty
- class CfnScheduledQueryPropsMixin.DimensionMappingProperty(*, dimension_value_type=None, name=None)
Bases:
objectThis type is used to map column(s) from the query result to a dimension in the destination table.
- Parameters:
dimension_value_type (
Optional[str]) – Type for the dimension: VARCHAR.name (
Optional[str]) – Column name from query result.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_timestream import mixins as timestream_mixins dimension_mapping_property = timestream_mixins.CfnScheduledQueryPropsMixin.DimensionMappingProperty( dimension_value_type="dimensionValueType", name="name" )
Attributes
- dimension_value_type
VARCHAR.
ErrorReportConfigurationProperty
- class CfnScheduledQueryPropsMixin.ErrorReportConfigurationProperty(*, s3_configuration=None)
Bases:
objectConfiguration required for error reporting.
- Parameters:
s3_configuration (
Union[IResolvable,S3ConfigurationProperty,Dict[str,Any],None]) – The S3 configuration for the error reports.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_timestream import mixins as timestream_mixins error_report_configuration_property = timestream_mixins.CfnScheduledQueryPropsMixin.ErrorReportConfigurationProperty( s3_configuration=timestream_mixins.CfnScheduledQueryPropsMixin.S3ConfigurationProperty( bucket_name="bucketName", encryption_option="encryptionOption", object_key_prefix="objectKeyPrefix" ) )
Attributes
- s3_configuration
The S3 configuration for the error reports.
MixedMeasureMappingProperty
- class CfnScheduledQueryPropsMixin.MixedMeasureMappingProperty(*, measure_name=None, measure_value_type=None, multi_measure_attribute_mappings=None, source_column=None, target_measure_name=None)
Bases:
objectMixedMeasureMappings are mappings that can be used to ingest data into a mixture of narrow and multi measures in the derived table.
- Parameters:
measure_name (
Optional[str]) – Refers to the value of measure_name in a result row. This field is required if MeasureNameColumn is provided.measure_value_type (
Optional[str]) – Type of the value that is to be read from sourceColumn. If the mapping is for MULTI, use MeasureValueType.MULTI.multi_measure_attribute_mappings (
Union[IResolvable,Sequence[Union[IResolvable,MultiMeasureAttributeMappingProperty,Dict[str,Any]]],None]) – Required when measureValueType is MULTI. Attribute mappings for MULTI value measures.source_column (
Optional[str]) – This field refers to the source column from which measure-value is to be read for result materialization.target_measure_name (
Optional[str]) – Target measure name to be used. If not provided, the target measure name by default would be measure-name if provided, or sourceColumn otherwise.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_timestream import mixins as timestream_mixins mixed_measure_mapping_property = timestream_mixins.CfnScheduledQueryPropsMixin.MixedMeasureMappingProperty( measure_name="measureName", measure_value_type="measureValueType", multi_measure_attribute_mappings=[timestream_mixins.CfnScheduledQueryPropsMixin.MultiMeasureAttributeMappingProperty( measure_value_type="measureValueType", source_column="sourceColumn", target_multi_measure_attribute_name="targetMultiMeasureAttributeName" )], source_column="sourceColumn", target_measure_name="targetMeasureName" )
Attributes
- measure_name
Refers to the value of measure_name in a result row.
This field is required if MeasureNameColumn is provided.
- measure_value_type
Type of the value that is to be read from sourceColumn.
If the mapping is for MULTI, use MeasureValueType.MULTI.
- multi_measure_attribute_mappings
Required when measureValueType is MULTI.
Attribute mappings for MULTI value measures.
- source_column
This field refers to the source column from which measure-value is to be read for result materialization.
- target_measure_name
Target measure name to be used.
If not provided, the target measure name by default would be measure-name if provided, or sourceColumn otherwise.
MultiMeasureAttributeMappingProperty
- class CfnScheduledQueryPropsMixin.MultiMeasureAttributeMappingProperty(*, measure_value_type=None, source_column=None, target_multi_measure_attribute_name=None)
Bases:
objectAttribute mapping for MULTI value measures.
- Parameters:
measure_value_type (
Optional[str]) – Type of the attribute to be read from the source column.source_column (
Optional[str]) – Source column from where the attribute value is to be read.target_multi_measure_attribute_name (
Optional[str]) – Custom name to be used for attribute name in derived table. If not provided, source column name would be used.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_timestream import mixins as timestream_mixins multi_measure_attribute_mapping_property = timestream_mixins.CfnScheduledQueryPropsMixin.MultiMeasureAttributeMappingProperty( measure_value_type="measureValueType", source_column="sourceColumn", target_multi_measure_attribute_name="targetMultiMeasureAttributeName" )
Attributes
- measure_value_type
Type of the attribute to be read from the source column.
- source_column
Source column from where the attribute value is to be read.
- target_multi_measure_attribute_name
Custom name to be used for attribute name in derived table.
If not provided, source column name would be used.
MultiMeasureMappingsProperty
- class CfnScheduledQueryPropsMixin.MultiMeasureMappingsProperty(*, multi_measure_attribute_mappings=None, target_multi_measure_name=None)
Bases:
objectOnly one of MixedMeasureMappings or MultiMeasureMappings is to be provided.
MultiMeasureMappings can be used to ingest data as multi measures in the derived table.
- Parameters:
multi_measure_attribute_mappings (
Union[IResolvable,Sequence[Union[IResolvable,MultiMeasureAttributeMappingProperty,Dict[str,Any]]],None]) – Required. Attribute mappings to be used for mapping query results to ingest data for multi-measure attributes.target_multi_measure_name (
Optional[str]) – 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.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_timestream import mixins as timestream_mixins multi_measure_mappings_property = timestream_mixins.CfnScheduledQueryPropsMixin.MultiMeasureMappingsProperty( multi_measure_attribute_mappings=[timestream_mixins.CfnScheduledQueryPropsMixin.MultiMeasureAttributeMappingProperty( measure_value_type="measureValueType", source_column="sourceColumn", target_multi_measure_attribute_name="targetMultiMeasureAttributeName" )], target_multi_measure_name="targetMultiMeasureName" )
Attributes
- multi_measure_attribute_mappings
Required.
Attribute mappings to be used for mapping query results to ingest data for multi-measure attributes.
- target_multi_measure_name
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.
NotificationConfigurationProperty
- class CfnScheduledQueryPropsMixin.NotificationConfigurationProperty(*, sns_configuration=None)
Bases:
objectNotification configuration for a scheduled query.
A notification is sent by Timestream when a scheduled query is created, its state is updated or when it is deleted.
- Parameters:
sns_configuration (
Union[IResolvable,SnsConfigurationProperty,Dict[str,Any],None]) – Details on SNS configuration.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_timestream import mixins as timestream_mixins notification_configuration_property = timestream_mixins.CfnScheduledQueryPropsMixin.NotificationConfigurationProperty( sns_configuration=timestream_mixins.CfnScheduledQueryPropsMixin.SnsConfigurationProperty( topic_arn="topicArn" ) )
Attributes
- sns_configuration
Details on SNS configuration.
S3ConfigurationProperty
- class CfnScheduledQueryPropsMixin.S3ConfigurationProperty(*, bucket_name=None, encryption_option=None, object_key_prefix=None)
Bases:
objectDetails on S3 location for error reports that result from running a query.
- Parameters:
bucket_name (
Optional[str]) – Name of the S3 bucket under which error reports will be created.encryption_option (
Optional[str]) – Encryption at rest options for the error reports. If no encryption option is specified, Timestream will choose SSE_S3 as default.object_key_prefix (
Optional[str]) – Prefix for the error report key. Timestream by default adds the following prefix to the error report path.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_timestream import mixins as timestream_mixins s3_configuration_property = timestream_mixins.CfnScheduledQueryPropsMixin.S3ConfigurationProperty( bucket_name="bucketName", encryption_option="encryptionOption", object_key_prefix="objectKeyPrefix" )
Attributes
- bucket_name
Name of the S3 bucket under which error reports will be created.
- encryption_option
Encryption at rest options for the error reports.
If no encryption option is specified, Timestream will choose SSE_S3 as default.
- object_key_prefix
Prefix for the error report key.
Timestream by default adds the following prefix to the error report path.
ScheduleConfigurationProperty
- class CfnScheduledQueryPropsMixin.ScheduleConfigurationProperty(*, schedule_expression=None)
Bases:
objectConfiguration of the schedule of the query.
- Parameters:
schedule_expression (
Optional[str]) – An expression that denotes when to trigger the scheduled query run. This can be a cron expression or a rate expression.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_timestream import mixins as timestream_mixins schedule_configuration_property = timestream_mixins.CfnScheduledQueryPropsMixin.ScheduleConfigurationProperty( schedule_expression="scheduleExpression" )
Attributes
- schedule_expression
An expression that denotes when to trigger the scheduled query run.
This can be a cron expression or a rate expression.
SnsConfigurationProperty
- class CfnScheduledQueryPropsMixin.SnsConfigurationProperty(*, topic_arn=None)
Bases:
objectDetails on SNS that are required to send the notification.
- Parameters:
topic_arn (
Optional[str]) – SNS topic ARN that the scheduled query status notifications will be sent to.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_timestream import mixins as timestream_mixins sns_configuration_property = timestream_mixins.CfnScheduledQueryPropsMixin.SnsConfigurationProperty( topic_arn="topicArn" )
Attributes
- topic_arn
SNS topic ARN that the scheduled query status notifications will be sent to.
TargetConfigurationProperty
- class CfnScheduledQueryPropsMixin.TargetConfigurationProperty(*, timestream_configuration=None)
Bases:
objectConfiguration used for writing the output of a query.
- Parameters:
timestream_configuration (
Union[IResolvable,TimestreamConfigurationProperty,Dict[str,Any],None]) – Configuration needed to write data into the Timestream database and table.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_timestream import mixins as timestream_mixins target_configuration_property = timestream_mixins.CfnScheduledQueryPropsMixin.TargetConfigurationProperty( timestream_configuration=timestream_mixins.CfnScheduledQueryPropsMixin.TimestreamConfigurationProperty( database_name="databaseName", dimension_mappings=[timestream_mixins.CfnScheduledQueryPropsMixin.DimensionMappingProperty( dimension_value_type="dimensionValueType", name="name" )], measure_name_column="measureNameColumn", mixed_measure_mappings=[timestream_mixins.CfnScheduledQueryPropsMixin.MixedMeasureMappingProperty( measure_name="measureName", measure_value_type="measureValueType", multi_measure_attribute_mappings=[timestream_mixins.CfnScheduledQueryPropsMixin.MultiMeasureAttributeMappingProperty( measure_value_type="measureValueType", source_column="sourceColumn", target_multi_measure_attribute_name="targetMultiMeasureAttributeName" )], source_column="sourceColumn", target_measure_name="targetMeasureName" )], multi_measure_mappings=timestream_mixins.CfnScheduledQueryPropsMixin.MultiMeasureMappingsProperty( multi_measure_attribute_mappings=[timestream_mixins.CfnScheduledQueryPropsMixin.MultiMeasureAttributeMappingProperty( measure_value_type="measureValueType", source_column="sourceColumn", target_multi_measure_attribute_name="targetMultiMeasureAttributeName" )], target_multi_measure_name="targetMultiMeasureName" ), table_name="tableName", time_column="timeColumn" ) )
Attributes
- timestream_configuration
Configuration needed to write data into the Timestream database and table.
TimestreamConfigurationProperty
- class CfnScheduledQueryPropsMixin.TimestreamConfigurationProperty(*, database_name=None, dimension_mappings=None, measure_name_column=None, mixed_measure_mappings=None, multi_measure_mappings=None, table_name=None, time_column=None)
Bases:
objectConfiguration to write data into Timestream database and table.
This configuration allows the user to map the query result select columns into the destination table columns.
- Parameters:
database_name (
Optional[str]) – Name of Timestream database to which the query result will be written.dimension_mappings (
Union[IResolvable,Sequence[Union[IResolvable,DimensionMappingProperty,Dict[str,Any]]],None]) – This is to allow mapping column(s) from the query result to the dimension in the destination table.measure_name_column (
Optional[str]) – Name of the measure column. Also seeMultiMeasureMappingsandMixedMeasureMappingsfor how measure name properties on those relate toMeasureNameColumn.mixed_measure_mappings (
Union[IResolvable,Sequence[Union[IResolvable,MixedMeasureMappingProperty,Dict[str,Any]]],None]) – Specifies how to map measures to multi-measure records.multi_measure_mappings (
Union[IResolvable,MultiMeasureMappingsProperty,Dict[str,Any],None]) – Multi-measure mappings.table_name (
Optional[str]) – 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 (
Optional[str]) – Column from query result that should be used as the time column in destination table. Column type for this should be TIMESTAMP.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_timestream import mixins as timestream_mixins timestream_configuration_property = timestream_mixins.CfnScheduledQueryPropsMixin.TimestreamConfigurationProperty( database_name="databaseName", dimension_mappings=[timestream_mixins.CfnScheduledQueryPropsMixin.DimensionMappingProperty( dimension_value_type="dimensionValueType", name="name" )], measure_name_column="measureNameColumn", mixed_measure_mappings=[timestream_mixins.CfnScheduledQueryPropsMixin.MixedMeasureMappingProperty( measure_name="measureName", measure_value_type="measureValueType", multi_measure_attribute_mappings=[timestream_mixins.CfnScheduledQueryPropsMixin.MultiMeasureAttributeMappingProperty( measure_value_type="measureValueType", source_column="sourceColumn", target_multi_measure_attribute_name="targetMultiMeasureAttributeName" )], source_column="sourceColumn", target_measure_name="targetMeasureName" )], multi_measure_mappings=timestream_mixins.CfnScheduledQueryPropsMixin.MultiMeasureMappingsProperty( multi_measure_attribute_mappings=[timestream_mixins.CfnScheduledQueryPropsMixin.MultiMeasureAttributeMappingProperty( measure_value_type="measureValueType", source_column="sourceColumn", target_multi_measure_attribute_name="targetMultiMeasureAttributeName" )], target_multi_measure_name="targetMultiMeasureName" ), table_name="tableName", time_column="timeColumn" )
Attributes
- database_name
Name of Timestream database to which the query result will be written.
- dimension_mappings
This is to allow mapping column(s) from the query result to the dimension in the destination table.
- measure_name_column
Name of the measure column.
Also see
MultiMeasureMappingsandMixedMeasureMappingsfor how measure name properties on those relate toMeasureNameColumn.
- mixed_measure_mappings
Specifies how to map measures to multi-measure records.
- multi_measure_mappings
Multi-measure mappings.
- table_name
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
Column from query result that should be used as the time column in destination table.
Column type for this should be TIMESTAMP.