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: CfnResource

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.

See:

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

CloudformationResource:

AWS::Timestream::ScheduledQuery

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 import 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"
            )
        )
    )
)
Parameters:
  • scope (Construct) – Scope in which this resource is defined.

  • id (str) – Construct identifier for this resource (unique in its scope).

  • error_report_configuration (Union[IResolvable, ErrorReportConfigurationProperty, Dict[str, Any]]) – 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_dependency(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_depends_on(target)

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

Parameters:

target (CfnResource) –

Deprecated:

use addDependency

Stability:

deprecated

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

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.

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 intermediate 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). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

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 resource, please consult that specific resource’s documentation.

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options

Return type:

None

get_att(attribute_name, type_hint=None)

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.

  • type_hint (Optional[ResolutionTypeHint]) –

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

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.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) – tree inspector to collect and process attributes.

Return type:

None

obtain_dependencies()

Retrieves an array of resources this resource depends on.

This assembles dependencies on resources across stacks (including nested stacks) automatically.

Return type:

List[Union[Stack, CfnResource]]

obtain_resource_dependencies()

Get a shallow copy of dependencies between this resource and other resources in the same stack.

Return type:

List[CfnResource]

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

remove_dependency(target)

Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

replace_dependency(target, new_target)

Replaces one dependency with another.

Parameters:
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

attr_sq_error_report_configuration

The scheduled query error reporting configuration.

CloudformationAttribute:

SQErrorReportConfiguration

attr_sq_kms_key_id

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

CloudformationAttribute:

SQKmsKeyId

attr_sq_name

The scheduled query name.

CloudformationAttribute:

SQName

attr_sq_notification_configuration

The scheduled query notification configuration.

CloudformationAttribute:

SQNotificationConfiguration

attr_sq_query_string

The scheduled query string..

CloudformationAttribute:

SQQueryString

attr_sq_schedule_configuration

The scheduled query schedule configuration.

CloudformationAttribute:

SQScheduleConfiguration

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

attr_sq_target_configuration

The configuration for query output.

CloudformationAttribute:

SQTargetConfiguration

cfn_options

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

cfn_resource_type

AWS resource type.

client_token

Using a ClientToken makes the call to CreateScheduledQuery idempotent, in other words, making the same request repeatedly will produce the same result.

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.

error_report_configuration

Configuration for error reporting.

kms_key_id

The Amazon KMS key used to encrypt the scheduled query resource, at-rest.

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

Returns:

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

node

The tree node.

notification_configuration

Notification configuration for the scheduled query.

query_string

The query string to run.

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 }).

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.

stack

The stack in which this element is defined.

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

tags

Tag Manager which manages the tags for this resource.

tags_raw

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

target_configuration

Scheduled query target store configuration.

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(x)

Check whether the given object is a CfnResource.

Parameters:

x (Any) –

Return type:

bool

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.

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: VARCHAR.

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

See:

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.
from aws_cdk import aws_timestream as timestream

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

Attributes

dimension_value_type

VARCHAR.

See:

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

Type:

Type for the dimension

name

Column name from query result.

See:

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

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.

See:

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.
from aws_cdk import 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.

See:

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

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.

See:

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.
from aws_cdk import 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.

See:

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

measure_value_type

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

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

See:

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

multi_measure_attribute_mappings

Required when measureValueType is MULTI.

Attribute mappings for MULTI value measures.

See:

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

source_column

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

See:

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

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.

See:

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

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.

See:

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.
from aws_cdk import 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.

See:

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

source_column

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

See:

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

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.

See:

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

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.

See:

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.
from aws_cdk import 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.

See:

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

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.

See:

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

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.

See:

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.
from aws_cdk import 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.

See:

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

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.

See:

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.
from aws_cdk import 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.

See:

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

encryption_option

Encryption at rest options for the error reports.

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

See:

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

object_key_prefix

Prefix for the error report key.

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

See:

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

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.

See:

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.
from aws_cdk import 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.

See:

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

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.

See:

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.
from aws_cdk import 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.

See:

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

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.

See:

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.
from aws_cdk import 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.

See:

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

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. Also see MultiMeasureMappings and MixedMeasureMappings for how measure name properties on those relate to MeasureNameColumn .

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

See:

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.
from aws_cdk import 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.

See:

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

dimension_mappings

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

See:

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

measure_name_column

Name of the measure column.

Also see MultiMeasureMappings and MixedMeasureMappings for how measure name properties on those relate to MeasureNameColumn .

See:

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

mixed_measure_mappings

Specifies how to map measures to multi-measure records.

See:

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

multi_measure_mappings

Multi-measure mappings.

See:

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

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.

See:

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

time_column

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

Column type for this should be TIMESTAMP.

See:

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