CfnScheduledQuery

class aws_cdk.aws_timestream.CfnScheduledQuery(scope, id, *, 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: aws_cdk.core.CfnResource

A CloudFormation AWS::Timestream::ScheduledQuery.

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.

CloudformationResource

AWS::Timestream::ScheduledQuery

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-scheduledquery.html

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 = timestream.CfnScheduledQuery(self, "MyCfnScheduledQuery",
    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"
            )
        )
    )
)

Create a new AWS::Timestream::ScheduledQuery.

Parameters
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

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

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

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters

path (str) – The path of the value to delete.

Return type

None

add_depends_on(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters

target (CfnResource) –

Return type

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters
  • key (str) –

  • value (Any) –

See

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

Return type

None

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
   "GlobalSecondaryIndexes": [
     {
       "Projection": {
         "NonKeyAttributes": [ "myattribute" ]
         ...
       }
       ...
     },
     {
       "ProjectionType": "INCLUDE"
       ...
     },
   ]
   ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters

property_path (str) – The path to the property.

Return type

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.

Return type

None

get_att(attribute_name)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters

attribute_name (str) – The name of the attribute.

Return type

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters

key (str) –

See

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

Return type

Any

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type

None

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters

new_logical_id (str) – The new logical ID to use for this stack element.

Return type

None

to_string()

Returns a string representation of this construct.

Return type

str

Returns

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::Timestream::ScheduledQuery'
attr_arn

The ARN of the scheduled query.

CloudformationAttribute

Arn

Return type

str

attr_sq_error_report_configuration

The scheduled query error reporting configuration.

CloudformationAttribute

SQErrorReportConfiguration

Return type

str

attr_sq_kms_key_id

The KMS key used to encrypt the query resource, if a customer managed KMS key was provided.

CloudformationAttribute

SQKmsKeyId

Return type

str

attr_sq_name

The scheduled query name.

CloudformationAttribute

SQName

Return type

str

attr_sq_notification_configuration

The scheduled query notification configuration.

CloudformationAttribute

SQNotificationConfiguration

Return type

str

attr_sq_query_string

The scheduled query string..

CloudformationAttribute

SQQueryString

Return type

str

attr_sq_schedule_configuration

The scheduled query schedule configuration.

CloudformationAttribute

SQScheduleConfiguration

Return type

str

attr_sq_scheduled_query_execution_role_arn

The ARN of the IAM role that will be used by Timestream to run the query.

CloudformationAttribute

SQScheduledQueryExecutionRoleArn

Return type

str

attr_sq_target_configuration

The configuration for query output.

CloudformationAttribute

SQTargetConfiguration

Return type

str

cfn_options

Options for this resource, such as condition, update policy etc.

Return type

ICfnResourceOptions

cfn_resource_type

AWS resource type.

Return type

str

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 a ClientToken on your behalf.

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-scheduledquery.html#cfn-timestream-scheduledquery-clienttoken

Return type

Optional[str]

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

Return type

List[str]

error_report_configuration

Configuration for error reporting.

Error reports will be generated when a problem is encountered when writing the query results.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-scheduledquery.html#cfn-timestream-scheduledquery-errorreportconfiguration

Return type

Union[ErrorReportConfigurationProperty, IResolvable]

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-scheduledquery.html#cfn-timestream-scheduledquery-kmskeyid

Return type

Optional[str]

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Return type

str

Returns

the logical ID as a stringified token. This value will only get resolved during synthesis.

node

The construct tree node associated with this construct.

Return type

ConstructNode

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-scheduledquery.html#cfn-timestream-scheduledquery-notificationconfiguration

Return type

Union[IResolvable, NotificationConfigurationProperty]

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-scheduledquery.html#cfn-timestream-scheduledquery-querystring

Return type

str

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

Return type

str

schedule_configuration

Schedule configuration.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-scheduledquery.html#cfn-timestream-scheduledquery-scheduleconfiguration

Return type

Union[IResolvable, ScheduleConfigurationProperty]

scheduled_query_execution_role_arn

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-scheduledquery.html#cfn-timestream-scheduledquery-scheduledqueryexecutionrolearn

Return type

str

scheduled_query_name

A name for the query.

Scheduled query names must be unique within each Region.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-scheduledquery.html#cfn-timestream-scheduledquery-scheduledqueryname

Return type

Optional[str]

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

Return type

Stack

tags

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-scheduledquery.html#cfn-timestream-scheduledquery-tags

Return type

TagManager

target_configuration

Scheduled query target store configuration.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-scheduledquery.html#cfn-timestream-scheduledquery-targetconfiguration

Return type

Union[IResolvable, TargetConfigurationProperty, None]

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters

x (Any) –

Return type

bool

Returns

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(construct)

Check whether the given construct is a CfnResource.

Parameters

construct (IConstruct) –

Return type

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool

DimensionMappingProperty

class CfnScheduledQuery.DimensionMappingProperty(*, dimension_value_type, name)

Bases: object

This type is used to map column(s) from the query result to a dimension in the destination table.

Parameters
  • dimension_value_type (str) – Type for the dimension.

  • name (str) – Column name from query result.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-dimensionmapping.html

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

dimension_mapping_property = timestream.CfnScheduledQuery.DimensionMappingProperty(
    dimension_value_type="dimensionValueType",
    name="name"
)

Attributes

dimension_value_type

Type for the dimension.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-dimensionmapping.html#cfn-timestream-scheduledquery-dimensionmapping-dimensionvaluetype

Return type

str

name

Column name from query result.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-dimensionmapping.html#cfn-timestream-scheduledquery-dimensionmapping-name

Return type

str

ErrorReportConfigurationProperty

class CfnScheduledQuery.ErrorReportConfigurationProperty(*, s3_configuration)

Bases: object

Configuration required for error reporting.

Parameters

s3_configuration (Union[IResolvable, S3ConfigurationProperty, Dict[str, Any]]) – The S3 configuration for the error reports.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-errorreportconfiguration.html

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

error_report_configuration_property = timestream.CfnScheduledQuery.ErrorReportConfigurationProperty(
    s3_configuration=timestream.CfnScheduledQuery.S3ConfigurationProperty(
        bucket_name="bucketName",

        # the properties below are optional
        encryption_option="encryptionOption",
        object_key_prefix="objectKeyPrefix"
    )
)

Attributes

s3_configuration

The S3 configuration for the error reports.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-errorreportconfiguration.html#cfn-timestream-scheduledquery-errorreportconfiguration-s3configuration

Return type

Union[IResolvable, S3ConfigurationProperty]

MixedMeasureMappingProperty

class CfnScheduledQuery.MixedMeasureMappingProperty(*, measure_value_type, measure_name=None, multi_measure_attribute_mappings=None, source_column=None, target_measure_name=None)

Bases: object

MixedMeasureMappings are mappings that can be used to ingest data into a mixture of narrow and multi measures in the derived table.

Parameters
  • measure_value_type (str) – Type of the value that is to be read from sourceColumn. If the mapping is for MULTI, use MeasureValueType.MULTI.

  • measure_name (Optional[str]) – Refers to the value of measure_name in a result row. This field is required if MeasureNameColumn is provided.

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-mixedmeasuremapping.html

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

mixed_measure_mapping_property = 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"
)

Attributes

measure_name

Refers to the value of measure_name in a result row.

This field is required if MeasureNameColumn is provided.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-mixedmeasuremapping.html#cfn-timestream-scheduledquery-mixedmeasuremapping-measurename

Return type

Optional[str]

measure_value_type

Type of the value that is to be read from sourceColumn.

If the mapping is for MULTI, use MeasureValueType.MULTI.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-mixedmeasuremapping.html#cfn-timestream-scheduledquery-mixedmeasuremapping-measurevaluetype

Return type

str

multi_measure_attribute_mappings

Required when measureValueType is MULTI.

Attribute mappings for MULTI value measures.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-mixedmeasuremapping.html#cfn-timestream-scheduledquery-mixedmeasuremapping-multimeasureattributemappings

Return type

Union[IResolvable, List[Union[IResolvable, MultiMeasureAttributeMappingProperty]], None]

source_column

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-mixedmeasuremapping.html#cfn-timestream-scheduledquery-mixedmeasuremapping-sourcecolumn

Return type

Optional[str]

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-mixedmeasuremapping.html#cfn-timestream-scheduledquery-mixedmeasuremapping-targetmeasurename

Return type

Optional[str]

MultiMeasureAttributeMappingProperty

class CfnScheduledQuery.MultiMeasureAttributeMappingProperty(*, measure_value_type, source_column, target_multi_measure_attribute_name=None)

Bases: object

Attribute mapping for MULTI value measures.

Parameters
  • measure_value_type (str) – Type of the attribute to be read from the source column.

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-multimeasureattributemapping.html

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

multi_measure_attribute_mapping_property = timestream.CfnScheduledQuery.MultiMeasureAttributeMappingProperty(
    measure_value_type="measureValueType",
    source_column="sourceColumn",

    # the properties below are optional
    target_multi_measure_attribute_name="targetMultiMeasureAttributeName"
)

Attributes

measure_value_type

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-multimeasureattributemapping.html#cfn-timestream-scheduledquery-multimeasureattributemapping-measurevaluetype

Return type

str

source_column

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-multimeasureattributemapping.html#cfn-timestream-scheduledquery-multimeasureattributemapping-sourcecolumn

Return type

str

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-multimeasureattributemapping.html#cfn-timestream-scheduledquery-multimeasureattributemapping-targetmultimeasureattributename

Return type

Optional[str]

MultiMeasureMappingsProperty

class CfnScheduledQuery.MultiMeasureMappingsProperty(*, multi_measure_attribute_mappings, target_multi_measure_name=None)

Bases: object

Only 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]]]]) – 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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-multimeasuremappings.html

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

multi_measure_mappings_property = 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

multi_measure_attribute_mappings

Required.

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-multimeasuremappings.html#cfn-timestream-scheduledquery-multimeasuremappings-multimeasureattributemappings

Return type

Union[IResolvable, List[Union[IResolvable, MultiMeasureAttributeMappingProperty]]]

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-multimeasuremappings.html#cfn-timestream-scheduledquery-multimeasuremappings-targetmultimeasurename

Return type

Optional[str]

NotificationConfigurationProperty

class CfnScheduledQuery.NotificationConfigurationProperty(*, sns_configuration)

Bases: object

Notification 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]]) – Details on SNS configuration.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-notificationconfiguration.html

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

notification_configuration_property = timestream.CfnScheduledQuery.NotificationConfigurationProperty(
    sns_configuration=timestream.CfnScheduledQuery.SnsConfigurationProperty(
        topic_arn="topicArn"
    )
)

Attributes

sns_configuration

Details on SNS configuration.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-notificationconfiguration.html#cfn-timestream-scheduledquery-notificationconfiguration-snsconfiguration

Return type

Union[IResolvable, SnsConfigurationProperty]

S3ConfigurationProperty

class CfnScheduledQuery.S3ConfigurationProperty(*, bucket_name, encryption_option=None, object_key_prefix=None)

Bases: object

Details on S3 location for error reports that result from running a query.

Parameters
  • bucket_name (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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-s3configuration.html

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

s3_configuration_property = timestream.CfnScheduledQuery.S3ConfigurationProperty(
    bucket_name="bucketName",

    # the properties below are optional
    encryption_option="encryptionOption",
    object_key_prefix="objectKeyPrefix"
)

Attributes

bucket_name

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-s3configuration.html#cfn-timestream-scheduledquery-s3configuration-bucketname

Return type

str

encryption_option

Encryption at rest options for the error reports.

If no encryption option is specified, Timestream will choose SSE_S3 as default.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-s3configuration.html#cfn-timestream-scheduledquery-s3configuration-encryptionoption

Return type

Optional[str]

object_key_prefix

Prefix for the error report key.

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-s3configuration.html#cfn-timestream-scheduledquery-s3configuration-objectkeyprefix

Return type

Optional[str]

ScheduleConfigurationProperty

class CfnScheduledQuery.ScheduleConfigurationProperty(*, schedule_expression)

Bases: object

Configuration of the schedule of the query.

Parameters

schedule_expression (str) – An expression that denotes when to trigger the scheduled query run. This can be a cron expression or a rate expression.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-scheduleconfiguration.html

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

schedule_configuration_property = timestream.CfnScheduledQuery.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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-scheduleconfiguration.html#cfn-timestream-scheduledquery-scheduleconfiguration-scheduleexpression

Return type

str

SnsConfigurationProperty

class CfnScheduledQuery.SnsConfigurationProperty(*, topic_arn)

Bases: object

Details on SNS that are required to send the notification.

Parameters

topic_arn (str) – SNS topic ARN that the scheduled query status notifications will be sent to.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-snsconfiguration.html

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

sns_configuration_property = timestream.CfnScheduledQuery.SnsConfigurationProperty(
    topic_arn="topicArn"
)

Attributes

topic_arn

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-snsconfiguration.html#cfn-timestream-scheduledquery-snsconfiguration-topicarn

Return type

str

TargetConfigurationProperty

class CfnScheduledQuery.TargetConfigurationProperty(*, timestream_configuration)

Bases: object

Configuration used for writing the output of a query.

Parameters

timestream_configuration (Union[IResolvable, TimestreamConfigurationProperty, Dict[str, Any]]) – Configuration needed to write data into the Timestream database and table.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-targetconfiguration.html

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

target_configuration_property = 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

timestream_configuration

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-targetconfiguration.html#cfn-timestream-scheduledquery-targetconfiguration-timestreamconfiguration

Return type

Union[IResolvable, TimestreamConfigurationProperty]

TimestreamConfigurationProperty

class CfnScheduledQuery.TimestreamConfigurationProperty(*, database_name, dimension_mappings, table_name, time_column, measure_name_column=None, mixed_measure_mappings=None, multi_measure_mappings=None)

Bases: object

Configuration 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 (str) – Name of Timestream database to which the query result will be written.

  • dimension_mappings (Union[IResolvable, Sequence[Union[IResolvable, DimensionMappingProperty, Dict[str, Any]]]]) – This is to allow mapping column(s) from the query result to the dimension in the destination table.

  • table_name (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 (str) – Column from query result that should be used as the time column in destination table. Column type for this should be TIMESTAMP.

  • measure_name_column (Optional[str]) – Name of the measure column.

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-timestreamconfiguration.html

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

timestream_configuration_property = 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

database_name

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-timestreamconfiguration.html#cfn-timestream-scheduledquery-timestreamconfiguration-databasename

Return type

str

dimension_mappings

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-timestreamconfiguration.html#cfn-timestream-scheduledquery-timestreamconfiguration-dimensionmappings

Return type

Union[IResolvable, List[Union[IResolvable, DimensionMappingProperty]]]

measure_name_column

Name of the measure column.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-timestreamconfiguration.html#cfn-timestream-scheduledquery-timestreamconfiguration-measurenamecolumn

Return type

Optional[str]

mixed_measure_mappings

Specifies how to map measures to multi-measure records.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-timestreamconfiguration.html#cfn-timestream-scheduledquery-timestreamconfiguration-mixedmeasuremappings

Return type

Union[IResolvable, List[Union[IResolvable, MixedMeasureMappingProperty]], None]

multi_measure_mappings

Multi-measure mappings.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-timestreamconfiguration.html#cfn-timestream-scheduledquery-timestreamconfiguration-multimeasuremappings

Return type

Union[IResolvable, MultiMeasureMappingsProperty, None]

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-timestreamconfiguration.html#cfn-timestream-scheduledquery-timestreamconfiguration-tablename

Return type

str

time_column

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

Column type for this should be TIMESTAMP.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-timestream-scheduledquery-timestreamconfiguration.html#cfn-timestream-scheduledquery-timestreamconfiguration-timecolumn

Return type

str