CfnTopicRule

class aws_cdk.aws_iot.CfnTopicRule(scope, id, *, topic_rule_payload, rule_name=None, tags=None)

Bases: aws_cdk.core.CfnResource

A CloudFormation AWS::IoT::TopicRule.

Use the AWS::IoT::TopicRule resource to declare an AWS IoT rule. For information about working with AWS IoT rules, see Rules for AWS IoT in the AWS IoT Developer Guide .

CloudformationResource

AWS::IoT::TopicRule

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-topicrule.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_iot as iot

cfn_topic_rule = iot.CfnTopicRule(self, "MyCfnTopicRule",
    topic_rule_payload=iot.CfnTopicRule.TopicRulePayloadProperty(
        actions=[iot.CfnTopicRule.ActionProperty(
            cloudwatch_alarm=iot.CfnTopicRule.CloudwatchAlarmActionProperty(
                alarm_name="alarmName",
                role_arn="roleArn",
                state_reason="stateReason",
                state_value="stateValue"
            ),
            cloudwatch_logs=iot.CfnTopicRule.CloudwatchLogsActionProperty(
                log_group_name="logGroupName",
                role_arn="roleArn"
            ),
            cloudwatch_metric=iot.CfnTopicRule.CloudwatchMetricActionProperty(
                metric_name="metricName",
                metric_namespace="metricNamespace",
                metric_unit="metricUnit",
                metric_value="metricValue",
                role_arn="roleArn",

                # the properties below are optional
                metric_timestamp="metricTimestamp"
            ),
            dynamo_db=iot.CfnTopicRule.DynamoDBActionProperty(
                hash_key_field="hashKeyField",
                hash_key_value="hashKeyValue",
                role_arn="roleArn",
                table_name="tableName",

                # the properties below are optional
                hash_key_type="hashKeyType",
                payload_field="payloadField",
                range_key_field="rangeKeyField",
                range_key_type="rangeKeyType",
                range_key_value="rangeKeyValue"
            ),
            dynamo_dBv2=iot.CfnTopicRule.DynamoDBv2ActionProperty(
                put_item=iot.CfnTopicRule.PutItemInputProperty(
                    table_name="tableName"
                ),
                role_arn="roleArn"
            ),
            elasticsearch=iot.CfnTopicRule.ElasticsearchActionProperty(
                endpoint="endpoint",
                id="id",
                index="index",
                role_arn="roleArn",
                type="type"
            ),
            firehose=iot.CfnTopicRule.FirehoseActionProperty(
                delivery_stream_name="deliveryStreamName",
                role_arn="roleArn",

                # the properties below are optional
                batch_mode=False,
                separator="separator"
            ),
            http=iot.CfnTopicRule.HttpActionProperty(
                url="url",

                # the properties below are optional
                auth=iot.CfnTopicRule.HttpAuthorizationProperty(
                    sigv4=iot.CfnTopicRule.SigV4AuthorizationProperty(
                        role_arn="roleArn",
                        service_name="serviceName",
                        signing_region="signingRegion"
                    )
                ),
                confirmation_url="confirmationUrl",
                headers=[iot.CfnTopicRule.HttpActionHeaderProperty(
                    key="key",
                    value="value"
                )]
            ),
            iot_analytics=iot.CfnTopicRule.IotAnalyticsActionProperty(
                channel_name="channelName",
                role_arn="roleArn",

                # the properties below are optional
                batch_mode=False
            ),
            iot_events=iot.CfnTopicRule.IotEventsActionProperty(
                input_name="inputName",
                role_arn="roleArn",

                # the properties below are optional
                batch_mode=False,
                message_id="messageId"
            ),
            iot_site_wise=iot.CfnTopicRule.IotSiteWiseActionProperty(
                put_asset_property_value_entries=[iot.CfnTopicRule.PutAssetPropertyValueEntryProperty(
                    property_values=[iot.CfnTopicRule.AssetPropertyValueProperty(
                        timestamp=iot.CfnTopicRule.AssetPropertyTimestampProperty(
                            time_in_seconds="timeInSeconds",

                            # the properties below are optional
                            offset_in_nanos="offsetInNanos"
                        ),
                        value=iot.CfnTopicRule.AssetPropertyVariantProperty(
                            boolean_value="booleanValue",
                            double_value="doubleValue",
                            integer_value="integerValue",
                            string_value="stringValue"
                        ),

                        # the properties below are optional
                        quality="quality"
                    )],

                    # the properties below are optional
                    asset_id="assetId",
                    entry_id="entryId",
                    property_alias="propertyAlias",
                    property_id="propertyId"
                )],
                role_arn="roleArn"
            ),
            kafka=iot.CfnTopicRule.KafkaActionProperty(
                client_properties={
                    "client_properties_key": "clientProperties"
                },
                destination_arn="destinationArn",
                topic="topic",

                # the properties below are optional
                key="key",
                partition="partition"
            ),
            kinesis=iot.CfnTopicRule.KinesisActionProperty(
                role_arn="roleArn",
                stream_name="streamName",

                # the properties below are optional
                partition_key="partitionKey"
            ),
            lambda_=iot.CfnTopicRule.LambdaActionProperty(
                function_arn="functionArn"
            ),
            open_search=iot.CfnTopicRule.OpenSearchActionProperty(
                endpoint="endpoint",
                id="id",
                index="index",
                role_arn="roleArn",
                type="type"
            ),
            republish=iot.CfnTopicRule.RepublishActionProperty(
                role_arn="roleArn",
                topic="topic",

                # the properties below are optional
                qos=123
            ),
            s3=iot.CfnTopicRule.S3ActionProperty(
                bucket_name="bucketName",
                key="key",
                role_arn="roleArn",

                # the properties below are optional
                canned_acl="cannedAcl"
            ),
            sns=iot.CfnTopicRule.SnsActionProperty(
                role_arn="roleArn",
                target_arn="targetArn",

                # the properties below are optional
                message_format="messageFormat"
            ),
            sqs=iot.CfnTopicRule.SqsActionProperty(
                queue_url="queueUrl",
                role_arn="roleArn",

                # the properties below are optional
                use_base64=False
            ),
            step_functions=iot.CfnTopicRule.StepFunctionsActionProperty(
                role_arn="roleArn",
                state_machine_name="stateMachineName",

                # the properties below are optional
                execution_name_prefix="executionNamePrefix"
            ),
            timestream=iot.CfnTopicRule.TimestreamActionProperty(
                database_name="databaseName",
                dimensions=[iot.CfnTopicRule.TimestreamDimensionProperty(
                    name="name",
                    value="value"
                )],
                role_arn="roleArn",
                table_name="tableName",

                # the properties below are optional
                batch_mode=False,
                timestamp=iot.CfnTopicRule.TimestreamTimestampProperty(
                    unit="unit",
                    value="value"
                )
            )
        )],
        sql="sql",

        # the properties below are optional
        aws_iot_sql_version="awsIotSqlVersion",
        description="description",
        error_action=iot.CfnTopicRule.ActionProperty(
            cloudwatch_alarm=iot.CfnTopicRule.CloudwatchAlarmActionProperty(
                alarm_name="alarmName",
                role_arn="roleArn",
                state_reason="stateReason",
                state_value="stateValue"
            ),
            cloudwatch_logs=iot.CfnTopicRule.CloudwatchLogsActionProperty(
                log_group_name="logGroupName",
                role_arn="roleArn"
            ),
            cloudwatch_metric=iot.CfnTopicRule.CloudwatchMetricActionProperty(
                metric_name="metricName",
                metric_namespace="metricNamespace",
                metric_unit="metricUnit",
                metric_value="metricValue",
                role_arn="roleArn",

                # the properties below are optional
                metric_timestamp="metricTimestamp"
            ),
            dynamo_db=iot.CfnTopicRule.DynamoDBActionProperty(
                hash_key_field="hashKeyField",
                hash_key_value="hashKeyValue",
                role_arn="roleArn",
                table_name="tableName",

                # the properties below are optional
                hash_key_type="hashKeyType",
                payload_field="payloadField",
                range_key_field="rangeKeyField",
                range_key_type="rangeKeyType",
                range_key_value="rangeKeyValue"
            ),
            dynamo_dBv2=iot.CfnTopicRule.DynamoDBv2ActionProperty(
                put_item=iot.CfnTopicRule.PutItemInputProperty(
                    table_name="tableName"
                ),
                role_arn="roleArn"
            ),
            elasticsearch=iot.CfnTopicRule.ElasticsearchActionProperty(
                endpoint="endpoint",
                id="id",
                index="index",
                role_arn="roleArn",
                type="type"
            ),
            firehose=iot.CfnTopicRule.FirehoseActionProperty(
                delivery_stream_name="deliveryStreamName",
                role_arn="roleArn",

                # the properties below are optional
                batch_mode=False,
                separator="separator"
            ),
            http=iot.CfnTopicRule.HttpActionProperty(
                url="url",

                # the properties below are optional
                auth=iot.CfnTopicRule.HttpAuthorizationProperty(
                    sigv4=iot.CfnTopicRule.SigV4AuthorizationProperty(
                        role_arn="roleArn",
                        service_name="serviceName",
                        signing_region="signingRegion"
                    )
                ),
                confirmation_url="confirmationUrl",
                headers=[iot.CfnTopicRule.HttpActionHeaderProperty(
                    key="key",
                    value="value"
                )]
            ),
            iot_analytics=iot.CfnTopicRule.IotAnalyticsActionProperty(
                channel_name="channelName",
                role_arn="roleArn",

                # the properties below are optional
                batch_mode=False
            ),
            iot_events=iot.CfnTopicRule.IotEventsActionProperty(
                input_name="inputName",
                role_arn="roleArn",

                # the properties below are optional
                batch_mode=False,
                message_id="messageId"
            ),
            iot_site_wise=iot.CfnTopicRule.IotSiteWiseActionProperty(
                put_asset_property_value_entries=[iot.CfnTopicRule.PutAssetPropertyValueEntryProperty(
                    property_values=[iot.CfnTopicRule.AssetPropertyValueProperty(
                        timestamp=iot.CfnTopicRule.AssetPropertyTimestampProperty(
                            time_in_seconds="timeInSeconds",

                            # the properties below are optional
                            offset_in_nanos="offsetInNanos"
                        ),
                        value=iot.CfnTopicRule.AssetPropertyVariantProperty(
                            boolean_value="booleanValue",
                            double_value="doubleValue",
                            integer_value="integerValue",
                            string_value="stringValue"
                        ),

                        # the properties below are optional
                        quality="quality"
                    )],

                    # the properties below are optional
                    asset_id="assetId",
                    entry_id="entryId",
                    property_alias="propertyAlias",
                    property_id="propertyId"
                )],
                role_arn="roleArn"
            ),
            kafka=iot.CfnTopicRule.KafkaActionProperty(
                client_properties={
                    "client_properties_key": "clientProperties"
                },
                destination_arn="destinationArn",
                topic="topic",

                # the properties below are optional
                key="key",
                partition="partition"
            ),
            kinesis=iot.CfnTopicRule.KinesisActionProperty(
                role_arn="roleArn",
                stream_name="streamName",

                # the properties below are optional
                partition_key="partitionKey"
            ),
            lambda_=iot.CfnTopicRule.LambdaActionProperty(
                function_arn="functionArn"
            ),
            open_search=iot.CfnTopicRule.OpenSearchActionProperty(
                endpoint="endpoint",
                id="id",
                index="index",
                role_arn="roleArn",
                type="type"
            ),
            republish=iot.CfnTopicRule.RepublishActionProperty(
                role_arn="roleArn",
                topic="topic",

                # the properties below are optional
                qos=123
            ),
            s3=iot.CfnTopicRule.S3ActionProperty(
                bucket_name="bucketName",
                key="key",
                role_arn="roleArn",

                # the properties below are optional
                canned_acl="cannedAcl"
            ),
            sns=iot.CfnTopicRule.SnsActionProperty(
                role_arn="roleArn",
                target_arn="targetArn",

                # the properties below are optional
                message_format="messageFormat"
            ),
            sqs=iot.CfnTopicRule.SqsActionProperty(
                queue_url="queueUrl",
                role_arn="roleArn",

                # the properties below are optional
                use_base64=False
            ),
            step_functions=iot.CfnTopicRule.StepFunctionsActionProperty(
                role_arn="roleArn",
                state_machine_name="stateMachineName",

                # the properties below are optional
                execution_name_prefix="executionNamePrefix"
            ),
            timestream=iot.CfnTopicRule.TimestreamActionProperty(
                database_name="databaseName",
                dimensions=[iot.CfnTopicRule.TimestreamDimensionProperty(
                    name="name",
                    value="value"
                )],
                role_arn="roleArn",
                table_name="tableName",

                # the properties below are optional
                batch_mode=False,
                timestamp=iot.CfnTopicRule.TimestreamTimestampProperty(
                    unit="unit",
                    value="value"
                )
            )
        ),
        rule_disabled=False
    ),

    # the properties below are optional
    rule_name="ruleName",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Create a new AWS::IoT::TopicRule.

Parameters
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • topic_rule_payload (Union[IResolvable, TopicRulePayloadProperty, Dict[str, Any]]) – The rule payload.

  • rule_name (Optional[str]) – The name of the rule.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – Metadata which can be used to manage the topic rule. .. epigraph:: For URI Request parameters use format: …key1=value1&key2=value2… For the CLI command-line parameter use format: –tags “key1=value1&key2=value2…” For the cli-input-json file use format: “tags”: “key1=value1&key2=value2…”

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::IoT::TopicRule'
attr_arn

The Amazon Resource Name (ARN) of the AWS IoT rule, such as arn:aws:iot:us-east-2:123456789012:rule/MyIoTRule .

CloudformationAttribute

Arn

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

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]

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

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

rule_name

The name of the rule.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-topicrule.html#cfn-iot-topicrule-rulename

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

Metadata which can be used to manage the topic rule.

For URI Request parameters use format: …key1=value1&key2=value2…

For the CLI command-line parameter use format: –tags “key1=value1&key2=value2…”

For the cli-input-json file use format: “tags”: “key1=value1&key2=value2…”

Link

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

Return type

TagManager

topic_rule_payload

The rule payload.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-topicrule.html#cfn-iot-topicrule-topicrulepayload

Return type

Union[IResolvable, TopicRulePayloadProperty]

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

ActionProperty

class CfnTopicRule.ActionProperty(*, cloudwatch_alarm=None, cloudwatch_logs=None, cloudwatch_metric=None, dynamo_db=None, dynamo_d_bv2=None, elasticsearch=None, firehose=None, http=None, iot_analytics=None, iot_events=None, iot_site_wise=None, kafka=None, kinesis=None, lambda_=None, open_search=None, republish=None, s3=None, sns=None, sqs=None, step_functions=None, timestream=None)

Bases: object

Describes the actions associated with a rule.

Parameters
Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.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_iot as iot

action_property = iot.CfnTopicRule.ActionProperty(
    cloudwatch_alarm=iot.CfnTopicRule.CloudwatchAlarmActionProperty(
        alarm_name="alarmName",
        role_arn="roleArn",
        state_reason="stateReason",
        state_value="stateValue"
    ),
    cloudwatch_logs=iot.CfnTopicRule.CloudwatchLogsActionProperty(
        log_group_name="logGroupName",
        role_arn="roleArn"
    ),
    cloudwatch_metric=iot.CfnTopicRule.CloudwatchMetricActionProperty(
        metric_name="metricName",
        metric_namespace="metricNamespace",
        metric_unit="metricUnit",
        metric_value="metricValue",
        role_arn="roleArn",

        # the properties below are optional
        metric_timestamp="metricTimestamp"
    ),
    dynamo_db=iot.CfnTopicRule.DynamoDBActionProperty(
        hash_key_field="hashKeyField",
        hash_key_value="hashKeyValue",
        role_arn="roleArn",
        table_name="tableName",

        # the properties below are optional
        hash_key_type="hashKeyType",
        payload_field="payloadField",
        range_key_field="rangeKeyField",
        range_key_type="rangeKeyType",
        range_key_value="rangeKeyValue"
    ),
    dynamo_dBv2=iot.CfnTopicRule.DynamoDBv2ActionProperty(
        put_item=iot.CfnTopicRule.PutItemInputProperty(
            table_name="tableName"
        ),
        role_arn="roleArn"
    ),
    elasticsearch=iot.CfnTopicRule.ElasticsearchActionProperty(
        endpoint="endpoint",
        id="id",
        index="index",
        role_arn="roleArn",
        type="type"
    ),
    firehose=iot.CfnTopicRule.FirehoseActionProperty(
        delivery_stream_name="deliveryStreamName",
        role_arn="roleArn",

        # the properties below are optional
        batch_mode=False,
        separator="separator"
    ),
    http=iot.CfnTopicRule.HttpActionProperty(
        url="url",

        # the properties below are optional
        auth=iot.CfnTopicRule.HttpAuthorizationProperty(
            sigv4=iot.CfnTopicRule.SigV4AuthorizationProperty(
                role_arn="roleArn",
                service_name="serviceName",
                signing_region="signingRegion"
            )
        ),
        confirmation_url="confirmationUrl",
        headers=[iot.CfnTopicRule.HttpActionHeaderProperty(
            key="key",
            value="value"
        )]
    ),
    iot_analytics=iot.CfnTopicRule.IotAnalyticsActionProperty(
        channel_name="channelName",
        role_arn="roleArn",

        # the properties below are optional
        batch_mode=False
    ),
    iot_events=iot.CfnTopicRule.IotEventsActionProperty(
        input_name="inputName",
        role_arn="roleArn",

        # the properties below are optional
        batch_mode=False,
        message_id="messageId"
    ),
    iot_site_wise=iot.CfnTopicRule.IotSiteWiseActionProperty(
        put_asset_property_value_entries=[iot.CfnTopicRule.PutAssetPropertyValueEntryProperty(
            property_values=[iot.CfnTopicRule.AssetPropertyValueProperty(
                timestamp=iot.CfnTopicRule.AssetPropertyTimestampProperty(
                    time_in_seconds="timeInSeconds",

                    # the properties below are optional
                    offset_in_nanos="offsetInNanos"
                ),
                value=iot.CfnTopicRule.AssetPropertyVariantProperty(
                    boolean_value="booleanValue",
                    double_value="doubleValue",
                    integer_value="integerValue",
                    string_value="stringValue"
                ),

                # the properties below are optional
                quality="quality"
            )],

            # the properties below are optional
            asset_id="assetId",
            entry_id="entryId",
            property_alias="propertyAlias",
            property_id="propertyId"
        )],
        role_arn="roleArn"
    ),
    kafka=iot.CfnTopicRule.KafkaActionProperty(
        client_properties={
            "client_properties_key": "clientProperties"
        },
        destination_arn="destinationArn",
        topic="topic",

        # the properties below are optional
        key="key",
        partition="partition"
    ),
    kinesis=iot.CfnTopicRule.KinesisActionProperty(
        role_arn="roleArn",
        stream_name="streamName",

        # the properties below are optional
        partition_key="partitionKey"
    ),
    lambda_=iot.CfnTopicRule.LambdaActionProperty(
        function_arn="functionArn"
    ),
    open_search=iot.CfnTopicRule.OpenSearchActionProperty(
        endpoint="endpoint",
        id="id",
        index="index",
        role_arn="roleArn",
        type="type"
    ),
    republish=iot.CfnTopicRule.RepublishActionProperty(
        role_arn="roleArn",
        topic="topic",

        # the properties below are optional
        qos=123
    ),
    s3=iot.CfnTopicRule.S3ActionProperty(
        bucket_name="bucketName",
        key="key",
        role_arn="roleArn",

        # the properties below are optional
        canned_acl="cannedAcl"
    ),
    sns=iot.CfnTopicRule.SnsActionProperty(
        role_arn="roleArn",
        target_arn="targetArn",

        # the properties below are optional
        message_format="messageFormat"
    ),
    sqs=iot.CfnTopicRule.SqsActionProperty(
        queue_url="queueUrl",
        role_arn="roleArn",

        # the properties below are optional
        use_base64=False
    ),
    step_functions=iot.CfnTopicRule.StepFunctionsActionProperty(
        role_arn="roleArn",
        state_machine_name="stateMachineName",

        # the properties below are optional
        execution_name_prefix="executionNamePrefix"
    ),
    timestream=iot.CfnTopicRule.TimestreamActionProperty(
        database_name="databaseName",
        dimensions=[iot.CfnTopicRule.TimestreamDimensionProperty(
            name="name",
            value="value"
        )],
        role_arn="roleArn",
        table_name="tableName",

        # the properties below are optional
        batch_mode=False,
        timestamp=iot.CfnTopicRule.TimestreamTimestampProperty(
            unit="unit",
            value="value"
        )
    )
)

Attributes

cloudwatch_alarm

Change the state of a CloudWatch alarm.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-cloudwatchalarm

Return type

Union[IResolvable, CloudwatchAlarmActionProperty, None]

cloudwatch_logs

Sends data to CloudWatch.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-cloudwatchlogs

Return type

Union[IResolvable, CloudwatchLogsActionProperty, None]

cloudwatch_metric

Capture a CloudWatch metric.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-cloudwatchmetric

Return type

Union[IResolvable, CloudwatchMetricActionProperty, None]

dynamo_d_bv2

Write to a DynamoDB table.

This is a new version of the DynamoDB action. It allows you to write each attribute in an MQTT message payload into a separate DynamoDB column.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-dynamodbv2

Return type

Union[IResolvable, DynamoDBv2ActionProperty, None]

dynamo_db

Write to a DynamoDB table.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-dynamodb

Return type

Union[IResolvable, DynamoDBActionProperty, None]

elasticsearch

Write data to an Amazon OpenSearch Service domain.

The Elasticsearch action can only be used by existing rule actions. To create a new rule action or to update an existing rule action, use the OpenSearch rule action instead. For more information, see OpenSearchAction .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-elasticsearch

Return type

Union[IResolvable, ElasticsearchActionProperty, None]

firehose

Write to an Amazon Kinesis Firehose stream.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-firehose

Return type

Union[IResolvable, FirehoseActionProperty, None]

http

Send data to an HTTPS endpoint.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-http

Return type

Union[IResolvable, HttpActionProperty, None]

iot_analytics

Sends message data to an AWS IoT Analytics channel.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-iotanalytics

Return type

Union[IResolvable, IotAnalyticsActionProperty, None]

iot_events

Sends an input to an AWS IoT Events detector.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-iotevents

Return type

Union[IResolvable, IotEventsActionProperty, None]

iot_site_wise

Sends data from the MQTT message that triggered the rule to AWS IoT SiteWise asset properties.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-iotsitewise

Return type

Union[IResolvable, IotSiteWiseActionProperty, None]

kafka

Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon MSK) or self-managed Apache Kafka cluster.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-kafka

Return type

Union[IResolvable, KafkaActionProperty, None]

kinesis

Write data to an Amazon Kinesis stream.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-kinesis

Return type

Union[IResolvable, KinesisActionProperty, None]

lambda_

Invoke a Lambda function.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-lambda

Return type

Union[IResolvable, LambdaActionProperty, None]

Write data to an Amazon OpenSearch Service domain.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-opensearch

Return type

Union[IResolvable, OpenSearchActionProperty, None]

republish

Publish to another MQTT topic.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-republish

Return type

Union[IResolvable, RepublishActionProperty, None]

s3

Write to an Amazon S3 bucket.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-s3

Return type

Union[IResolvable, S3ActionProperty, None]

sns

Publish to an Amazon SNS topic.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-sns

Return type

Union[IResolvable, SnsActionProperty, None]

sqs

Publish to an Amazon SQS queue.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-sqs

Return type

Union[IResolvable, SqsActionProperty, None]

step_functions

Starts execution of a Step Functions state machine.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-stepfunctions

Return type

Union[IResolvable, StepFunctionsActionProperty, None]

timestream

Writes attributes from an MQTT message.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-timestream

Return type

Union[IResolvable, TimestreamActionProperty, None]

AssetPropertyTimestampProperty

class CfnTopicRule.AssetPropertyTimestampProperty(*, time_in_seconds, offset_in_nanos=None)

Bases: object

An asset property timestamp entry containing the following information.

Parameters
  • time_in_seconds (str) – A string that contains the time in seconds since epoch. Accepts substitution templates.

  • offset_in_nanos (Optional[str]) – Optional. A string that contains the nanosecond time offset. Accepts substitution templates.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-assetpropertytimestamp.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_iot as iot

asset_property_timestamp_property = iot.CfnTopicRule.AssetPropertyTimestampProperty(
    time_in_seconds="timeInSeconds",

    # the properties below are optional
    offset_in_nanos="offsetInNanos"
)

Attributes

offset_in_nanos

Optional.

A string that contains the nanosecond time offset. Accepts substitution templates.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-assetpropertytimestamp.html#cfn-iot-topicrule-assetpropertytimestamp-offsetinnanos

Return type

Optional[str]

time_in_seconds

A string that contains the time in seconds since epoch.

Accepts substitution templates.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-assetpropertytimestamp.html#cfn-iot-topicrule-assetpropertytimestamp-timeinseconds

Return type

str

AssetPropertyValueProperty

class CfnTopicRule.AssetPropertyValueProperty(*, timestamp, value, quality=None)

Bases: object

An asset property value entry containing the following information.

Parameters
Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-assetpropertyvalue.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_iot as iot

asset_property_value_property = iot.CfnTopicRule.AssetPropertyValueProperty(
    timestamp=iot.CfnTopicRule.AssetPropertyTimestampProperty(
        time_in_seconds="timeInSeconds",

        # the properties below are optional
        offset_in_nanos="offsetInNanos"
    ),
    value=iot.CfnTopicRule.AssetPropertyVariantProperty(
        boolean_value="booleanValue",
        double_value="doubleValue",
        integer_value="integerValue",
        string_value="stringValue"
    ),

    # the properties below are optional
    quality="quality"
)

Attributes

quality

Optional.

A string that describes the quality of the value. Accepts substitution templates. Must be GOOD , BAD , or UNCERTAIN .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-assetpropertyvalue.html#cfn-iot-topicrule-assetpropertyvalue-quality

Return type

Optional[str]

timestamp

The asset property value timestamp.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-assetpropertyvalue.html#cfn-iot-topicrule-assetpropertyvalue-timestamp

Return type

Union[IResolvable, AssetPropertyTimestampProperty]

value

The value of the asset property.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-assetpropertyvalue.html#cfn-iot-topicrule-assetpropertyvalue-value

Return type

Union[IResolvable, AssetPropertyVariantProperty]

AssetPropertyVariantProperty

class CfnTopicRule.AssetPropertyVariantProperty(*, boolean_value=None, double_value=None, integer_value=None, string_value=None)

Bases: object

Contains an asset property value (of a single type).

Parameters
  • boolean_value (Optional[str]) – Optional. A string that contains the boolean value ( true or false ) of the value entry. Accepts substitution templates.

  • double_value (Optional[str]) – Optional. A string that contains the double value of the value entry. Accepts substitution templates.

  • integer_value (Optional[str]) – Optional. A string that contains the integer value of the value entry. Accepts substitution templates.

  • string_value (Optional[str]) – Optional. The string value of the value entry. Accepts substitution templates.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-assetpropertyvariant.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_iot as iot

asset_property_variant_property = iot.CfnTopicRule.AssetPropertyVariantProperty(
    boolean_value="booleanValue",
    double_value="doubleValue",
    integer_value="integerValue",
    string_value="stringValue"
)

Attributes

boolean_value

Optional.

A string that contains the boolean value ( true or false ) of the value entry. Accepts substitution templates.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-assetpropertyvariant.html#cfn-iot-topicrule-assetpropertyvariant-booleanvalue

Return type

Optional[str]

double_value

Optional.

A string that contains the double value of the value entry. Accepts substitution templates.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-assetpropertyvariant.html#cfn-iot-topicrule-assetpropertyvariant-doublevalue

Return type

Optional[str]

integer_value

Optional.

A string that contains the integer value of the value entry. Accepts substitution templates.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-assetpropertyvariant.html#cfn-iot-topicrule-assetpropertyvariant-integervalue

Return type

Optional[str]

string_value

Optional.

The string value of the value entry. Accepts substitution templates.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-assetpropertyvariant.html#cfn-iot-topicrule-assetpropertyvariant-stringvalue

Return type

Optional[str]

CloudwatchAlarmActionProperty

class CfnTopicRule.CloudwatchAlarmActionProperty(*, alarm_name, role_arn, state_reason, state_value)

Bases: object

Describes an action that updates a CloudWatch alarm.

Parameters
  • alarm_name (str) – The CloudWatch alarm name.

  • role_arn (str) – The IAM role that allows access to the CloudWatch alarm.

  • state_reason (str) – The reason for the alarm change.

  • state_value (str) – The value of the alarm state. Acceptable values are: OK, ALARM, INSUFFICIENT_DATA.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-cloudwatchalarmaction.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_iot as iot

cloudwatch_alarm_action_property = iot.CfnTopicRule.CloudwatchAlarmActionProperty(
    alarm_name="alarmName",
    role_arn="roleArn",
    state_reason="stateReason",
    state_value="stateValue"
)

Attributes

alarm_name

The CloudWatch alarm name.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-cloudwatchalarmaction.html#cfn-iot-topicrule-cloudwatchalarmaction-alarmname

Return type

str

role_arn

The IAM role that allows access to the CloudWatch alarm.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-cloudwatchalarmaction.html#cfn-iot-topicrule-cloudwatchalarmaction-rolearn

Return type

str

state_reason

The reason for the alarm change.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-cloudwatchalarmaction.html#cfn-iot-topicrule-cloudwatchalarmaction-statereason

Return type

str

state_value

The value of the alarm state.

Acceptable values are: OK, ALARM, INSUFFICIENT_DATA.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-cloudwatchalarmaction.html#cfn-iot-topicrule-cloudwatchalarmaction-statevalue

Return type

str

CloudwatchLogsActionProperty

class CfnTopicRule.CloudwatchLogsActionProperty(*, log_group_name, role_arn)

Bases: object

Describes an action that updates a CloudWatch log.

Parameters
  • log_group_name (str) – The CloudWatch log name.

  • role_arn (str) – The IAM role that allows access to the CloudWatch log.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-cloudwatchlogsaction.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_iot as iot

cloudwatch_logs_action_property = iot.CfnTopicRule.CloudwatchLogsActionProperty(
    log_group_name="logGroupName",
    role_arn="roleArn"
)

Attributes

log_group_name

The CloudWatch log name.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-cloudwatchlogsaction.html#cfn-iot-topicrule-cloudwatchlogsaction-loggroupname

Return type

str

role_arn

The IAM role that allows access to the CloudWatch log.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-cloudwatchlogsaction.html#cfn-iot-topicrule-cloudwatchlogsaction-rolearn

Return type

str

CloudwatchMetricActionProperty

class CfnTopicRule.CloudwatchMetricActionProperty(*, metric_name, metric_namespace, metric_unit, metric_value, role_arn, metric_timestamp=None)

Bases: object

Describes an action that captures a CloudWatch metric.

Parameters
  • metric_name (str) – The CloudWatch metric name.

  • metric_namespace (str) – The CloudWatch metric namespace name.

  • metric_unit (str) – The metric unit supported by CloudWatch.

  • metric_value (str) – The CloudWatch metric value.

  • role_arn (str) – The IAM role that allows access to the CloudWatch metric.

  • metric_timestamp (Optional[str]) – An optional Unix timestamp .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-cloudwatchmetricaction.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_iot as iot

cloudwatch_metric_action_property = iot.CfnTopicRule.CloudwatchMetricActionProperty(
    metric_name="metricName",
    metric_namespace="metricNamespace",
    metric_unit="metricUnit",
    metric_value="metricValue",
    role_arn="roleArn",

    # the properties below are optional
    metric_timestamp="metricTimestamp"
)

Attributes

metric_name

The CloudWatch metric name.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-cloudwatchmetricaction.html#cfn-iot-topicrule-cloudwatchmetricaction-metricname

Return type

str

metric_namespace

The CloudWatch metric namespace name.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-cloudwatchmetricaction.html#cfn-iot-topicrule-cloudwatchmetricaction-metricnamespace

Return type

str

metric_timestamp

//docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#about_timestamp>`_ .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-cloudwatchmetricaction.html#cfn-iot-topicrule-cloudwatchmetricaction-metrictimestamp

Type

An optional `Unix timestamp <https

Return type

Optional[str]

metric_unit

//docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#Unit>`_ supported by CloudWatch.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-cloudwatchmetricaction.html#cfn-iot-topicrule-cloudwatchmetricaction-metricunit

Type

The `metric unit <https

Return type

str

metric_value

The CloudWatch metric value.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-cloudwatchmetricaction.html#cfn-iot-topicrule-cloudwatchmetricaction-metricvalue

Return type

str

role_arn

The IAM role that allows access to the CloudWatch metric.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-cloudwatchmetricaction.html#cfn-iot-topicrule-cloudwatchmetricaction-rolearn

Return type

str

DynamoDBActionProperty

class CfnTopicRule.DynamoDBActionProperty(*, hash_key_field, hash_key_value, role_arn, table_name, hash_key_type=None, payload_field=None, range_key_field=None, range_key_type=None, range_key_value=None)

Bases: object

Describes an action to write to a DynamoDB table.

The tableName , hashKeyField , and rangeKeyField values must match the values used when you created the table.

The hashKeyValue and rangeKeyvalue fields use a substitution template syntax. These templates provide data at runtime. The syntax is as follows: ${ sql-expression }.

You can specify any valid expression in a WHERE or SELECT clause, including JSON properties, comparisons, calculations, and functions. For example, the following field uses the third level of the topic:

"hashKeyValue": "${topic(3)}"

The following field uses the timestamp:

"rangeKeyValue": "${timestamp()}"

For more information, see DynamoDBv2 Action in the AWS IoT Developer Guide .

Parameters
  • hash_key_field (str) – The hash key name.

  • hash_key_value (str) – The hash key value.

  • role_arn (str) – The ARN of the IAM role that grants access to the DynamoDB table.

  • table_name (str) – The name of the DynamoDB table.

  • hash_key_type (Optional[str]) – The hash key type. Valid values are “STRING” or “NUMBER”

  • payload_field (Optional[str]) – The action payload. This name can be customized.

  • range_key_field (Optional[str]) – The range key name.

  • range_key_type (Optional[str]) – The range key type. Valid values are “STRING” or “NUMBER”

  • range_key_value (Optional[str]) – The range key value.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-dynamodbaction.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_iot as iot

dynamo_dBAction_property = iot.CfnTopicRule.DynamoDBActionProperty(
    hash_key_field="hashKeyField",
    hash_key_value="hashKeyValue",
    role_arn="roleArn",
    table_name="tableName",

    # the properties below are optional
    hash_key_type="hashKeyType",
    payload_field="payloadField",
    range_key_field="rangeKeyField",
    range_key_type="rangeKeyType",
    range_key_value="rangeKeyValue"
)

Attributes

hash_key_field

The hash key name.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-dynamodbaction.html#cfn-iot-topicrule-dynamodbaction-hashkeyfield

Return type

str

hash_key_type

The hash key type.

Valid values are “STRING” or “NUMBER”

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-dynamodbaction.html#cfn-iot-topicrule-dynamodbaction-hashkeytype

Return type

Optional[str]

hash_key_value

The hash key value.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-dynamodbaction.html#cfn-iot-topicrule-dynamodbaction-hashkeyvalue

Return type

str

payload_field

The action payload.

This name can be customized.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-dynamodbaction.html#cfn-iot-topicrule-dynamodbaction-payloadfield

Return type

Optional[str]

range_key_field

The range key name.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-dynamodbaction.html#cfn-iot-topicrule-dynamodbaction-rangekeyfield

Return type

Optional[str]

range_key_type

The range key type.

Valid values are “STRING” or “NUMBER”

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-dynamodbaction.html#cfn-iot-topicrule-dynamodbaction-rangekeytype

Return type

Optional[str]

range_key_value

The range key value.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-dynamodbaction.html#cfn-iot-topicrule-dynamodbaction-rangekeyvalue

Return type

Optional[str]

role_arn

The ARN of the IAM role that grants access to the DynamoDB table.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-dynamodbaction.html#cfn-iot-topicrule-dynamodbaction-rolearn

Return type

str

table_name

The name of the DynamoDB table.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-dynamodbaction.html#cfn-iot-topicrule-dynamodbaction-tablename

Return type

str

DynamoDBv2ActionProperty

class CfnTopicRule.DynamoDBv2ActionProperty(*, put_item=None, role_arn=None)

Bases: object

Describes an action to write to a DynamoDB table.

This DynamoDB action writes each attribute in the message payload into it’s own column in the DynamoDB table.

Parameters
  • put_item (Union[IResolvable, PutItemInputProperty, Dict[str, Any], None]) – Specifies the DynamoDB table to which the message data will be written. For example:. { "dynamoDBv2": { "roleArn": "aws:iam:12341251:my-role" "putItem": { "tableName": "my-table" } } } Each attribute in the message payload will be written to a separate column in the DynamoDB database.

  • role_arn (Optional[str]) – The ARN of the IAM role that grants access to the DynamoDB table.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-dynamodbv2action.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_iot as iot

dynamo_dBv2_action_property = iot.CfnTopicRule.DynamoDBv2ActionProperty(
    put_item=iot.CfnTopicRule.PutItemInputProperty(
        table_name="tableName"
    ),
    role_arn="roleArn"
)

Attributes

put_item

.

{ "dynamoDBv2": { "roleArn": "aws:iam:12341251:my-role" "putItem": { "tableName": "my-table" } } }

Each attribute in the message payload will be written to a separate column in the DynamoDB database.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-dynamodbv2action.html#cfn-iot-topicrule-dynamodbv2action-putitem

Type

Specifies the DynamoDB table to which the message data will be written. For example

Return type

Union[IResolvable, PutItemInputProperty, None]

role_arn

The ARN of the IAM role that grants access to the DynamoDB table.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-dynamodbv2action.html#cfn-iot-topicrule-dynamodbv2action-rolearn

Return type

Optional[str]

ElasticsearchActionProperty

class CfnTopicRule.ElasticsearchActionProperty(*, endpoint, id, index, role_arn, type)

Bases: object

Describes an action that writes data to an Amazon OpenSearch Service domain.

The Elasticsearch action can only be used by existing rule actions. To create a new rule action or to update an existing rule action, use the OpenSearch rule action instead. For more information, see OpenSearchAction .

Parameters
  • endpoint (str) – The endpoint of your OpenSearch domain.

  • id (str) – The unique identifier for the document you are storing.

  • index (str) – The index where you want to store your data.

  • role_arn (str) – The IAM role ARN that has access to OpenSearch.

  • type (str) – The type of document you are storing.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-elasticsearchaction.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_iot as iot

elasticsearch_action_property = iot.CfnTopicRule.ElasticsearchActionProperty(
    endpoint="endpoint",
    id="id",
    index="index",
    role_arn="roleArn",
    type="type"
)

Attributes

endpoint

The endpoint of your OpenSearch domain.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-elasticsearchaction.html#cfn-iot-topicrule-elasticsearchaction-endpoint

Return type

str

id

The unique identifier for the document you are storing.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-elasticsearchaction.html#cfn-iot-topicrule-elasticsearchaction-id

Return type

str

index

The index where you want to store your data.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-elasticsearchaction.html#cfn-iot-topicrule-elasticsearchaction-index

Return type

str

role_arn

The IAM role ARN that has access to OpenSearch.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-elasticsearchaction.html#cfn-iot-topicrule-elasticsearchaction-rolearn

Return type

str

type

The type of document you are storing.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-elasticsearchaction.html#cfn-iot-topicrule-elasticsearchaction-type

Return type

str

FirehoseActionProperty

class CfnTopicRule.FirehoseActionProperty(*, delivery_stream_name, role_arn, batch_mode=None, separator=None)

Bases: object

Describes an action that writes data to an Amazon Kinesis Firehose stream.

Parameters
  • delivery_stream_name (str) – The delivery stream name.

  • role_arn (str) – The IAM role that grants access to the Amazon Kinesis Firehose stream.

  • batch_mode (Union[bool, IResolvable, None]) – Whether to deliver the Kinesis Data Firehose stream as a batch by using `PutRecordBatch <https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html>`_ . The default value is false . When batchMode is true and the rule’s SQL statement evaluates to an Array, each Array element forms one record in the `PutRecordBatch <https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html>`_ request. The resulting array can’t have more than 500 records.

  • separator (Optional[str]) – A character separator that will be used to separate records written to the Firehose stream. Valid values are: ‘n’ (newline), ‘t’ (tab), ‘rn’ (Windows newline), ‘,’ (comma).

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-firehoseaction.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_iot as iot

firehose_action_property = iot.CfnTopicRule.FirehoseActionProperty(
    delivery_stream_name="deliveryStreamName",
    role_arn="roleArn",

    # the properties below are optional
    batch_mode=False,
    separator="separator"
)

Attributes

batch_mode

//docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html>`_ . The default value is false .

When batchMode is true and the rule’s SQL statement evaluates to an Array, each Array element forms one record in the `PutRecordBatch <https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html>`_ request. The resulting array can’t have more than 500 records.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-firehoseaction.html#cfn-iot-topicrule-firehoseaction-batchmode

Type

Whether to deliver the Kinesis Data Firehose stream as a batch by using `PutRecordBatch <https

Return type

Union[bool, IResolvable, None]

delivery_stream_name

The delivery stream name.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-firehoseaction.html#cfn-iot-topicrule-firehoseaction-deliverystreamname

Return type

str

role_arn

The IAM role that grants access to the Amazon Kinesis Firehose stream.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-firehoseaction.html#cfn-iot-topicrule-firehoseaction-rolearn

Return type

str

separator

A character separator that will be used to separate records written to the Firehose stream.

Valid values are: ‘n’ (newline), ‘t’ (tab), ‘rn’ (Windows newline), ‘,’ (comma).

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-firehoseaction.html#cfn-iot-topicrule-firehoseaction-separator

Return type

Optional[str]

HttpActionHeaderProperty

class CfnTopicRule.HttpActionHeaderProperty(*, key, value)

Bases: object

The HTTP action header.

Parameters
  • key (str) – The HTTP header key.

  • value (str) – The HTTP header value. Substitution templates are supported.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-httpactionheader.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_iot as iot

http_action_header_property = iot.CfnTopicRule.HttpActionHeaderProperty(
    key="key",
    value="value"
)

Attributes

key

The HTTP header key.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-httpactionheader.html#cfn-iot-topicrule-httpactionheader-key

Return type

str

value

The HTTP header value.

Substitution templates are supported.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-httpactionheader.html#cfn-iot-topicrule-httpactionheader-value

Return type

str

HttpActionProperty

class CfnTopicRule.HttpActionProperty(*, url, auth=None, confirmation_url=None, headers=None)

Bases: object

Send data to an HTTPS endpoint.

Parameters
  • url (str) – The endpoint URL. If substitution templates are used in the URL, you must also specify a confirmationUrl . If this is a new destination, a new TopicRuleDestination is created if possible.

  • auth (Union[IResolvable, HttpAuthorizationProperty, Dict[str, Any], None]) – The authentication method to use when sending data to an HTTPS endpoint.

  • confirmation_url (Optional[str]) – The URL to which AWS IoT sends a confirmation message. The value of the confirmation URL must be a prefix of the endpoint URL. If you do not specify a confirmation URL AWS IoT uses the endpoint URL as the confirmation URL. If you use substitution templates in the confirmationUrl, you must create and enable topic rule destinations that match each possible value of the substitution template before traffic is allowed to your endpoint URL.

  • headers (Union[IResolvable, Sequence[Union[IResolvable, HttpActionHeaderProperty, Dict[str, Any]]], None]) – The HTTP headers to send with the message data.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-httpaction.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_iot as iot

http_action_property = iot.CfnTopicRule.HttpActionProperty(
    url="url",

    # the properties below are optional
    auth=iot.CfnTopicRule.HttpAuthorizationProperty(
        sigv4=iot.CfnTopicRule.SigV4AuthorizationProperty(
            role_arn="roleArn",
            service_name="serviceName",
            signing_region="signingRegion"
        )
    ),
    confirmation_url="confirmationUrl",
    headers=[iot.CfnTopicRule.HttpActionHeaderProperty(
        key="key",
        value="value"
    )]
)

Attributes

auth

The authentication method to use when sending data to an HTTPS endpoint.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-httpaction.html#cfn-iot-topicrule-httpaction-auth

Return type

Union[IResolvable, HttpAuthorizationProperty, None]

confirmation_url

The URL to which AWS IoT sends a confirmation message.

The value of the confirmation URL must be a prefix of the endpoint URL. If you do not specify a confirmation URL AWS IoT uses the endpoint URL as the confirmation URL. If you use substitution templates in the confirmationUrl, you must create and enable topic rule destinations that match each possible value of the substitution template before traffic is allowed to your endpoint URL.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-httpaction.html#cfn-iot-topicrule-httpaction-confirmationurl

Return type

Optional[str]

headers

The HTTP headers to send with the message data.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-httpaction.html#cfn-iot-topicrule-httpaction-headers

Return type

Union[IResolvable, List[Union[IResolvable, HttpActionHeaderProperty]], None]

url

The endpoint URL.

If substitution templates are used in the URL, you must also specify a confirmationUrl . If this is a new destination, a new TopicRuleDestination is created if possible.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-httpaction.html#cfn-iot-topicrule-httpaction-url

Return type

str

HttpAuthorizationProperty

class CfnTopicRule.HttpAuthorizationProperty(*, sigv4=None)

Bases: object

The authorization method used to send messages.

Parameters

sigv4 (Union[IResolvable, SigV4AuthorizationProperty, Dict[str, Any], None]) – Use Sig V4 authorization. For more information, see Signature Version 4 Signing Process .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-httpauthorization.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_iot as iot

http_authorization_property = iot.CfnTopicRule.HttpAuthorizationProperty(
    sigv4=iot.CfnTopicRule.SigV4AuthorizationProperty(
        role_arn="roleArn",
        service_name="serviceName",
        signing_region="signingRegion"
    )
)

Attributes

sigv4

Use Sig V4 authorization.

For more information, see Signature Version 4 Signing Process .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-httpauthorization.html#cfn-iot-topicrule-httpauthorization-sigv4

Return type

Union[IResolvable, SigV4AuthorizationProperty, None]

IotAnalyticsActionProperty

class CfnTopicRule.IotAnalyticsActionProperty(*, channel_name, role_arn, batch_mode=None)

Bases: object

Sends message data to an AWS IoT Analytics channel.

Parameters
  • channel_name (str) – The name of the IoT Analytics channel to which message data will be sent.

  • role_arn (str) – The ARN of the role which has a policy that grants IoT Analytics permission to send message data via IoT Analytics (iotanalytics:BatchPutMessage).

  • batch_mode (Union[bool, IResolvable, None]) – Whether to process the action as a batch. The default value is false . When batchMode is true and the rule SQL statement evaluates to an Array, each Array element is delivered as a separate message when passed by `BatchPutMessage <https://docs.aws.amazon.com/iotanalytics/latest/APIReference/API_BatchPutMessage.html>`_ The resulting array can’t have more than 100 messages.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-iotanalyticsaction.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_iot as iot

iot_analytics_action_property = iot.CfnTopicRule.IotAnalyticsActionProperty(
    channel_name="channelName",
    role_arn="roleArn",

    # the properties below are optional
    batch_mode=False
)

Attributes

batch_mode

Whether to process the action as a batch. The default value is false .

When batchMode is true and the rule SQL statement evaluates to an Array, each Array element is delivered as a separate message when passed by `BatchPutMessage <https://docs.aws.amazon.com/iotanalytics/latest/APIReference/API_BatchPutMessage.html>`_ The resulting array can’t have more than 100 messages.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-iotanalyticsaction.html#cfn-iot-topicrule-iotanalyticsaction-batchmode

Return type

Union[bool, IResolvable, None]

channel_name

The name of the IoT Analytics channel to which message data will be sent.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-iotanalyticsaction.html#cfn-iot-topicrule-iotanalyticsaction-channelname

Return type

str

role_arn

BatchPutMessage).

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-iotanalyticsaction.html#cfn-iot-topicrule-iotanalyticsaction-rolearn

Type

The ARN of the role which has a policy that grants IoT Analytics permission to send message data via IoT Analytics (iotanalytics

Return type

str

IotEventsActionProperty

class CfnTopicRule.IotEventsActionProperty(*, input_name, role_arn, batch_mode=None, message_id=None)

Bases: object

Sends an input to an AWS IoT Events detector.

Parameters
  • input_name (str) – The name of the AWS IoT Events input.

  • role_arn (str) – The ARN of the role that grants AWS IoT permission to send an input to an AWS IoT Events detector. (“Action”:”iotevents:BatchPutMessage”).

  • batch_mode (Union[bool, IResolvable, None]) – Whether to process the event actions as a batch. The default value is false . When batchMode is true , you can’t specify a messageId . When batchMode is true and the rule SQL statement evaluates to an Array, each Array element is treated as a separate message when Events by calling `BatchPutMessage <https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_BatchPutMessage.html>`_ . The resulting array can’t have more than 10 messages.

  • message_id (Optional[str]) – The ID of the message. The default messageId is a new UUID value. When batchMode is true , you can’t specify a messageId –a new UUID value will be assigned. Assign a value to this property to ensure that only one input (message) with a given messageId will be processed by an AWS IoT Events detector.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-ioteventsaction.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_iot as iot

iot_events_action_property = iot.CfnTopicRule.IotEventsActionProperty(
    input_name="inputName",
    role_arn="roleArn",

    # the properties below are optional
    batch_mode=False,
    message_id="messageId"
)

Attributes

batch_mode

Whether to process the event actions as a batch. The default value is false .

When batchMode is true , you can’t specify a messageId .

When batchMode is true and the rule SQL statement evaluates to an Array, each Array element is treated as a separate message when Events by calling `BatchPutMessage <https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_BatchPutMessage.html>`_ . The resulting array can’t have more than 10 messages.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-ioteventsaction.html#cfn-iot-topicrule-ioteventsaction-batchmode

Return type

Union[bool, IResolvable, None]

input_name

The name of the AWS IoT Events input.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-ioteventsaction.html#cfn-iot-topicrule-ioteventsaction-inputname

Return type

str

message_id

The ID of the message. The default messageId is a new UUID value.

When batchMode is true , you can’t specify a messageId –a new UUID value will be assigned.

Assign a value to this property to ensure that only one input (message) with a given messageId will be processed by an AWS IoT Events detector.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-ioteventsaction.html#cfn-iot-topicrule-ioteventsaction-messageid

Return type

Optional[str]

role_arn

The ARN of the role that grants AWS IoT permission to send an input to an AWS IoT Events detector.

(“Action”:”iotevents:BatchPutMessage”).

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-ioteventsaction.html#cfn-iot-topicrule-ioteventsaction-rolearn

Return type

str

IotSiteWiseActionProperty

class CfnTopicRule.IotSiteWiseActionProperty(*, put_asset_property_value_entries, role_arn)

Bases: object

Describes an action to send data from an MQTT message that triggered the rule to AWS IoT SiteWise asset properties.

Parameters
  • put_asset_property_value_entries (Union[IResolvable, Sequence[Union[IResolvable, PutAssetPropertyValueEntryProperty, Dict[str, Any]]]]) – A list of asset property value entries.

  • role_arn (str) – The ARN of the role that grants AWS IoT permission to send an asset property value to AWS IoT SiteWise. ( "Action": "iotsitewise:BatchPutAssetPropertyValue" ). The trust policy can restrict access to specific asset hierarchy paths.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-iotsitewiseaction.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_iot as iot

iot_site_wise_action_property = iot.CfnTopicRule.IotSiteWiseActionProperty(
    put_asset_property_value_entries=[iot.CfnTopicRule.PutAssetPropertyValueEntryProperty(
        property_values=[iot.CfnTopicRule.AssetPropertyValueProperty(
            timestamp=iot.CfnTopicRule.AssetPropertyTimestampProperty(
                time_in_seconds="timeInSeconds",

                # the properties below are optional
                offset_in_nanos="offsetInNanos"
            ),
            value=iot.CfnTopicRule.AssetPropertyVariantProperty(
                boolean_value="booleanValue",
                double_value="doubleValue",
                integer_value="integerValue",
                string_value="stringValue"
            ),

            # the properties below are optional
            quality="quality"
        )],

        # the properties below are optional
        asset_id="assetId",
        entry_id="entryId",
        property_alias="propertyAlias",
        property_id="propertyId"
    )],
    role_arn="roleArn"
)

Attributes

put_asset_property_value_entries

A list of asset property value entries.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-iotsitewiseaction.html#cfn-iot-topicrule-iotsitewiseaction-putassetpropertyvalueentries

Return type

Union[IResolvable, List[Union[IResolvable, PutAssetPropertyValueEntryProperty]]]

role_arn

The ARN of the role that grants AWS IoT permission to send an asset property value to AWS IoT SiteWise.

( "Action": "iotsitewise:BatchPutAssetPropertyValue" ). The trust policy can restrict access to specific asset hierarchy paths.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-iotsitewiseaction.html#cfn-iot-topicrule-iotsitewiseaction-rolearn

Return type

str

KafkaActionProperty

class CfnTopicRule.KafkaActionProperty(*, client_properties, destination_arn, topic, key=None, partition=None)

Bases: object

Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon MSK) or self-managed Apache Kafka cluster.

Parameters
  • client_properties (Union[IResolvable, Mapping[str, str]]) – Properties of the Apache Kafka producer client.

  • destination_arn (str) – The ARN of Kafka action’s VPC TopicRuleDestination .

  • topic (str) – The Kafka topic for messages to be sent to the Kafka broker.

  • key (Optional[str]) – The Kafka message key.

  • partition (Optional[str]) – The Kafka message partition.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-kafkaaction.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_iot as iot

kafka_action_property = iot.CfnTopicRule.KafkaActionProperty(
    client_properties={
        "client_properties_key": "clientProperties"
    },
    destination_arn="destinationArn",
    topic="topic",

    # the properties below are optional
    key="key",
    partition="partition"
)

Attributes

client_properties

Properties of the Apache Kafka producer client.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-kafkaaction.html#cfn-iot-topicrule-kafkaaction-clientproperties

Return type

Union[IResolvable, Mapping[str, str]]

destination_arn

The ARN of Kafka action’s VPC TopicRuleDestination .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-kafkaaction.html#cfn-iot-topicrule-kafkaaction-destinationarn

Return type

str

key

The Kafka message key.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-kafkaaction.html#cfn-iot-topicrule-kafkaaction-key

Return type

Optional[str]

partition

The Kafka message partition.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-kafkaaction.html#cfn-iot-topicrule-kafkaaction-partition

Return type

Optional[str]

topic

The Kafka topic for messages to be sent to the Kafka broker.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-kafkaaction.html#cfn-iot-topicrule-kafkaaction-topic

Return type

str

KinesisActionProperty

class CfnTopicRule.KinesisActionProperty(*, role_arn, stream_name, partition_key=None)

Bases: object

Describes an action to write data to an Amazon Kinesis stream.

Parameters
  • role_arn (str) – The ARN of the IAM role that grants access to the Amazon Kinesis stream.

  • stream_name (str) – The name of the Amazon Kinesis stream.

  • partition_key (Optional[str]) – The partition key.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-kinesisaction.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_iot as iot

kinesis_action_property = iot.CfnTopicRule.KinesisActionProperty(
    role_arn="roleArn",
    stream_name="streamName",

    # the properties below are optional
    partition_key="partitionKey"
)

Attributes

partition_key

The partition key.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-kinesisaction.html#cfn-iot-topicrule-kinesisaction-partitionkey

Return type

Optional[str]

role_arn

The ARN of the IAM role that grants access to the Amazon Kinesis stream.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-kinesisaction.html#cfn-iot-topicrule-kinesisaction-rolearn

Return type

str

stream_name

The name of the Amazon Kinesis stream.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-kinesisaction.html#cfn-iot-topicrule-kinesisaction-streamname

Return type

str

LambdaActionProperty

class CfnTopicRule.LambdaActionProperty(*, function_arn=None)

Bases: object

Describes an action to invoke a Lambda function.

Parameters

function_arn (Optional[str]) – The ARN of the Lambda function.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-lambdaaction.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_iot as iot

lambda_action_property = iot.CfnTopicRule.LambdaActionProperty(
    function_arn="functionArn"
)

Attributes

function_arn

The ARN of the Lambda function.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-lambdaaction.html#cfn-iot-topicrule-lambdaaction-functionarn

Return type

Optional[str]

OpenSearchActionProperty

class CfnTopicRule.OpenSearchActionProperty(*, endpoint, id, index, role_arn, type)

Bases: object

Describes an action that writes data to an Amazon OpenSearch Service domain.

Parameters
  • endpoint (str) – The endpoint of your OpenSearch domain.

  • id (str) – The unique identifier for the document you are storing.

  • index (str) – The OpenSearch index where you want to store your data.

  • role_arn (str) – The IAM role ARN that has access to OpenSearch.

  • type (str) – The type of document you are storing.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-opensearchaction.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_iot as iot

open_search_action_property = iot.CfnTopicRule.OpenSearchActionProperty(
    endpoint="endpoint",
    id="id",
    index="index",
    role_arn="roleArn",
    type="type"
)

Attributes

endpoint

The endpoint of your OpenSearch domain.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-opensearchaction.html#cfn-iot-topicrule-opensearchaction-endpoint

Return type

str

id

The unique identifier for the document you are storing.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-opensearchaction.html#cfn-iot-topicrule-opensearchaction-id

Return type

str

index

The OpenSearch index where you want to store your data.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-opensearchaction.html#cfn-iot-topicrule-opensearchaction-index

Return type

str

role_arn

The IAM role ARN that has access to OpenSearch.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-opensearchaction.html#cfn-iot-topicrule-opensearchaction-rolearn

Return type

str

type

The type of document you are storing.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-opensearchaction.html#cfn-iot-topicrule-opensearchaction-type

Return type

str

PutAssetPropertyValueEntryProperty

class CfnTopicRule.PutAssetPropertyValueEntryProperty(*, property_values, asset_id=None, entry_id=None, property_alias=None, property_id=None)

Bases: object

An asset property value entry containing the following information.

Parameters
  • property_values (Union[IResolvable, Sequence[Union[IResolvable, AssetPropertyValueProperty, Dict[str, Any]]]]) – A list of property values to insert that each contain timestamp, quality, and value (TQV) information.

  • asset_id (Optional[str]) – The ID of the AWS IoT SiteWise asset. You must specify either a propertyAlias or both an aliasId and a propertyId . Accepts substitution templates.

  • entry_id (Optional[str]) – Optional. A unique identifier for this entry that you can define to better track which message caused an error in case of failure. Accepts substitution templates. Defaults to a new UUID.

  • property_alias (Optional[str]) – The name of the property alias associated with your asset property. You must specify either a propertyAlias or both an aliasId and a propertyId . Accepts substitution templates.

  • property_id (Optional[str]) – The ID of the asset’s property. You must specify either a propertyAlias or both an aliasId and a propertyId . Accepts substitution templates.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-putassetpropertyvalueentry.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_iot as iot

put_asset_property_value_entry_property = iot.CfnTopicRule.PutAssetPropertyValueEntryProperty(
    property_values=[iot.CfnTopicRule.AssetPropertyValueProperty(
        timestamp=iot.CfnTopicRule.AssetPropertyTimestampProperty(
            time_in_seconds="timeInSeconds",

            # the properties below are optional
            offset_in_nanos="offsetInNanos"
        ),
        value=iot.CfnTopicRule.AssetPropertyVariantProperty(
            boolean_value="booleanValue",
            double_value="doubleValue",
            integer_value="integerValue",
            string_value="stringValue"
        ),

        # the properties below are optional
        quality="quality"
    )],

    # the properties below are optional
    asset_id="assetId",
    entry_id="entryId",
    property_alias="propertyAlias",
    property_id="propertyId"
)

Attributes

asset_id

The ID of the AWS IoT SiteWise asset.

You must specify either a propertyAlias or both an aliasId and a propertyId . Accepts substitution templates.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-putassetpropertyvalueentry.html#cfn-iot-topicrule-putassetpropertyvalueentry-assetid

Return type

Optional[str]

entry_id

Optional.

A unique identifier for this entry that you can define to better track which message caused an error in case of failure. Accepts substitution templates. Defaults to a new UUID.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-putassetpropertyvalueentry.html#cfn-iot-topicrule-putassetpropertyvalueentry-entryid

Return type

Optional[str]

property_alias

The name of the property alias associated with your asset property.

You must specify either a propertyAlias or both an aliasId and a propertyId . Accepts substitution templates.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-putassetpropertyvalueentry.html#cfn-iot-topicrule-putassetpropertyvalueentry-propertyalias

Return type

Optional[str]

property_id

The ID of the asset’s property.

You must specify either a propertyAlias or both an aliasId and a propertyId . Accepts substitution templates.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-putassetpropertyvalueentry.html#cfn-iot-topicrule-putassetpropertyvalueentry-propertyid

Return type

Optional[str]

property_values

A list of property values to insert that each contain timestamp, quality, and value (TQV) information.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-putassetpropertyvalueentry.html#cfn-iot-topicrule-putassetpropertyvalueentry-propertyvalues

Return type

Union[IResolvable, List[Union[IResolvable, AssetPropertyValueProperty]]]

PutItemInputProperty

class CfnTopicRule.PutItemInputProperty(*, table_name)

Bases: object

The input for the DynamoActionVS action that specifies the DynamoDB table to which the message data will be written.

Parameters

table_name (str) – The table where the message data will be written.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-putiteminput.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_iot as iot

put_item_input_property = iot.CfnTopicRule.PutItemInputProperty(
    table_name="tableName"
)

Attributes

table_name

The table where the message data will be written.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-putiteminput.html#cfn-iot-topicrule-putiteminput-tablename

Return type

str

RepublishActionProperty

class CfnTopicRule.RepublishActionProperty(*, role_arn, topic, qos=None)

Bases: object

Describes an action to republish to another topic.

Parameters
  • role_arn (str) – The ARN of the IAM role that grants access.

  • topic (str) – The name of the MQTT topic.

  • qos (Union[int, float, None]) – The Quality of Service (QoS) level to use when republishing messages. The default value is 0.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-republishaction.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_iot as iot

republish_action_property = iot.CfnTopicRule.RepublishActionProperty(
    role_arn="roleArn",
    topic="topic",

    # the properties below are optional
    qos=123
)

Attributes

qos

The Quality of Service (QoS) level to use when republishing messages.

The default value is 0.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-republishaction.html#cfn-iot-topicrule-republishaction-qos

Return type

Union[int, float, None]

role_arn

The ARN of the IAM role that grants access.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-republishaction.html#cfn-iot-topicrule-republishaction-rolearn

Return type

str

topic

The name of the MQTT topic.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-republishaction.html#cfn-iot-topicrule-republishaction-topic

Return type

str

S3ActionProperty

class CfnTopicRule.S3ActionProperty(*, bucket_name, key, role_arn, canned_acl=None)

Bases: object

Describes an action to write data to an Amazon S3 bucket.

Parameters
  • bucket_name (str) – The Amazon S3 bucket.

  • key (str) – The object key. For more information, see Actions, resources, and condition keys for Amazon S3 .

  • role_arn (str) – The ARN of the IAM role that grants access.

  • canned_acl (Optional[str]) – The Amazon S3 canned ACL that controls access to the object identified by the object key. For more information, see S3 canned ACLs .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-s3action.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_iot as iot

s3_action_property = iot.CfnTopicRule.S3ActionProperty(
    bucket_name="bucketName",
    key="key",
    role_arn="roleArn",

    # the properties below are optional
    canned_acl="cannedAcl"
)

Attributes

bucket_name

The Amazon S3 bucket.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-s3action.html#cfn-iot-topicrule-s3action-bucketname

Return type

str

canned_acl

The Amazon S3 canned ACL that controls access to the object identified by the object key.

For more information, see S3 canned ACLs .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-s3action.html#cfn-iot-topicrule-s3action-cannedacl

Return type

Optional[str]

key

The object key.

For more information, see Actions, resources, and condition keys for Amazon S3 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-s3action.html#cfn-iot-topicrule-s3action-key

Return type

str

role_arn

The ARN of the IAM role that grants access.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-s3action.html#cfn-iot-topicrule-s3action-rolearn

Return type

str

SigV4AuthorizationProperty

class CfnTopicRule.SigV4AuthorizationProperty(*, role_arn, service_name, signing_region)

Bases: object

For more information, see Signature Version 4 signing process .

Parameters
  • role_arn (str) – The ARN of the signing role.

  • service_name (str) – The service name to use while signing with Sig V4.

  • signing_region (str) – The signing region.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-sigv4authorization.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_iot as iot

sig_v4_authorization_property = iot.CfnTopicRule.SigV4AuthorizationProperty(
    role_arn="roleArn",
    service_name="serviceName",
    signing_region="signingRegion"
)

Attributes

role_arn

The ARN of the signing role.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-sigv4authorization.html#cfn-iot-topicrule-sigv4authorization-rolearn

Return type

str

service_name

The service name to use while signing with Sig V4.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-sigv4authorization.html#cfn-iot-topicrule-sigv4authorization-servicename

Return type

str

signing_region

The signing region.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-sigv4authorization.html#cfn-iot-topicrule-sigv4authorization-signingregion

Return type

str

SnsActionProperty

class CfnTopicRule.SnsActionProperty(*, role_arn, target_arn, message_format=None)

Bases: object

Describes an action to publish to an Amazon SNS topic.

Parameters
  • role_arn (str) – The ARN of the IAM role that grants access.

  • target_arn (str) – The ARN of the SNS topic.

  • message_format (Optional[str]) – (Optional) The message format of the message to publish. Accepted values are “JSON” and “RAW”. The default value of the attribute is “RAW”. SNS uses this setting to determine if the payload should be parsed and relevant platform-specific bits of the payload should be extracted. For more information, see Amazon SNS Message and JSON Formats in the Amazon Simple Notification Service Developer Guide .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-snsaction.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_iot as iot

sns_action_property = iot.CfnTopicRule.SnsActionProperty(
    role_arn="roleArn",
    target_arn="targetArn",

    # the properties below are optional
    message_format="messageFormat"
)

Attributes

message_format

(Optional) The message format of the message to publish.

Accepted values are “JSON” and “RAW”. The default value of the attribute is “RAW”. SNS uses this setting to determine if the payload should be parsed and relevant platform-specific bits of the payload should be extracted. For more information, see Amazon SNS Message and JSON Formats in the Amazon Simple Notification Service Developer Guide .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-snsaction.html#cfn-iot-topicrule-snsaction-messageformat

Return type

Optional[str]

role_arn

The ARN of the IAM role that grants access.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-snsaction.html#cfn-iot-topicrule-snsaction-rolearn

Return type

str

target_arn

The ARN of the SNS topic.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-snsaction.html#cfn-iot-topicrule-snsaction-targetarn

Return type

str

SqsActionProperty

class CfnTopicRule.SqsActionProperty(*, queue_url, role_arn, use_base64=None)

Bases: object

Describes an action to publish data to an Amazon SQS queue.

Parameters
  • queue_url (str) – The URL of the Amazon SQS queue.

  • role_arn (str) – The ARN of the IAM role that grants access.

  • use_base64 (Union[bool, IResolvable, None]) – Specifies whether to use Base64 encoding.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-sqsaction.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_iot as iot

sqs_action_property = iot.CfnTopicRule.SqsActionProperty(
    queue_url="queueUrl",
    role_arn="roleArn",

    # the properties below are optional
    use_base64=False
)

Attributes

queue_url

The URL of the Amazon SQS queue.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-sqsaction.html#cfn-iot-topicrule-sqsaction-queueurl

Return type

str

role_arn

The ARN of the IAM role that grants access.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-sqsaction.html#cfn-iot-topicrule-sqsaction-rolearn

Return type

str

use_base64

Specifies whether to use Base64 encoding.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-sqsaction.html#cfn-iot-topicrule-sqsaction-usebase64

Return type

Union[bool, IResolvable, None]

StepFunctionsActionProperty

class CfnTopicRule.StepFunctionsActionProperty(*, role_arn, state_machine_name, execution_name_prefix=None)

Bases: object

Starts execution of a Step Functions state machine.

Parameters
  • role_arn (str) – The ARN of the role that grants IoT permission to start execution of a state machine (“Action”:”states:StartExecution”).

  • state_machine_name (str) – The name of the Step Functions state machine whose execution will be started.

  • execution_name_prefix (Optional[str]) – (Optional) A name will be given to the state machine execution consisting of this prefix followed by a UUID. Step Functions automatically creates a unique name for each state machine execution if one is not provided.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-stepfunctionsaction.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_iot as iot

step_functions_action_property = iot.CfnTopicRule.StepFunctionsActionProperty(
    role_arn="roleArn",
    state_machine_name="stateMachineName",

    # the properties below are optional
    execution_name_prefix="executionNamePrefix"
)

Attributes

execution_name_prefix

(Optional) A name will be given to the state machine execution consisting of this prefix followed by a UUID.

Step Functions automatically creates a unique name for each state machine execution if one is not provided.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-stepfunctionsaction.html#cfn-iot-topicrule-stepfunctionsaction-executionnameprefix

Return type

Optional[str]

role_arn

StartExecution”).

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-stepfunctionsaction.html#cfn-iot-topicrule-stepfunctionsaction-rolearn

Type

The ARN of the role that grants IoT permission to start execution of a state machine (“Action”

Type

“states

Return type

str

state_machine_name

The name of the Step Functions state machine whose execution will be started.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-stepfunctionsaction.html#cfn-iot-topicrule-stepfunctionsaction-statemachinename

Return type

str

TimestreamActionProperty

class CfnTopicRule.TimestreamActionProperty(*, database_name, dimensions, role_arn, table_name, batch_mode=None, timestamp=None)

Bases: object

Describes an action that writes records into an Amazon Timestream table.

Parameters
  • database_name (str) – The name of an Amazon Timestream database that has the table to write records into.

  • dimensions (Union[IResolvable, Sequence[Union[IResolvable, TimestreamDimensionProperty, Dict[str, Any]]]]) – Metadata attributes of the time series that are written in each measure record.

  • role_arn (str) – The Amazon Resource Name (ARN) of the role that grants AWS IoT permission to write to the Timestream database table.

  • table_name (str) – The table where the message data will be written.

  • batch_mode (Union[bool, IResolvable, None]) – Whether to process the action as a batch.

  • timestamp (Union[IResolvable, TimestreamTimestampProperty, Dict[str, Any], None]) – The value to use for the entry’s timestamp. If blank, the time that the entry was processed is used.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-timestreamaction.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_iot as iot

timestream_action_property = iot.CfnTopicRule.TimestreamActionProperty(
    database_name="databaseName",
    dimensions=[iot.CfnTopicRule.TimestreamDimensionProperty(
        name="name",
        value="value"
    )],
    role_arn="roleArn",
    table_name="tableName",

    # the properties below are optional
    batch_mode=False,
    timestamp=iot.CfnTopicRule.TimestreamTimestampProperty(
        unit="unit",
        value="value"
    )
)

Attributes

batch_mode

Whether to process the action as a batch.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-timestreamaction.html#cfn-iot-topicrule-timestreamaction-batchmode

Return type

Union[bool, IResolvable, None]

database_name

The name of an Amazon Timestream database that has the table to write records into.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-timestreamaction.html#cfn-iot-topicrule-timestreamaction-databasename

Return type

str

dimensions

Metadata attributes of the time series that are written in each measure record.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-timestreamaction.html#cfn-iot-topicrule-timestreamaction-dimensions

Return type

Union[IResolvable, List[Union[IResolvable, TimestreamDimensionProperty]]]

role_arn

The Amazon Resource Name (ARN) of the role that grants AWS IoT permission to write to the Timestream database table.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-timestreamaction.html#cfn-iot-topicrule-timestreamaction-rolearn

Return type

str

table_name

The table where the message data will be written.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-timestreamaction.html#cfn-iot-topicrule-timestreamaction-tablename

Return type

str

timestamp

The value to use for the entry’s timestamp.

If blank, the time that the entry was processed is used.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-timestreamaction.html#cfn-iot-topicrule-timestreamaction-timestamp

Return type

Union[IResolvable, TimestreamTimestampProperty, None]

TimestreamDimensionProperty

class CfnTopicRule.TimestreamDimensionProperty(*, name, value)

Bases: object

Metadata attributes of the time series that are written in each measure record.

Parameters
  • name (str) – The metadata dimension name. This is the name of the column in the Amazon Timestream database table record.

  • value (str) – The value to write in this column of the database record.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-timestreamdimension.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_iot as iot

timestream_dimension_property = iot.CfnTopicRule.TimestreamDimensionProperty(
    name="name",
    value="value"
)

Attributes

name

The metadata dimension name.

This is the name of the column in the Amazon Timestream database table record.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-timestreamdimension.html#cfn-iot-topicrule-timestreamdimension-name

Return type

str

value

The value to write in this column of the database record.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-timestreamdimension.html#cfn-iot-topicrule-timestreamdimension-value

Return type

str

TimestreamTimestampProperty

class CfnTopicRule.TimestreamTimestampProperty(*, unit, value)

Bases: object

The value to use for the entry’s timestamp.

If blank, the time that the entry was processed is used.

Parameters
  • unit (str) – The precision of the timestamp value that results from the expression described in value .

  • value (str) – An expression that returns a long epoch time value.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-timestreamtimestamp.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_iot as iot

timestream_timestamp_property = iot.CfnTopicRule.TimestreamTimestampProperty(
    unit="unit",
    value="value"
)

Attributes

unit

The precision of the timestamp value that results from the expression described in value .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-timestreamtimestamp.html#cfn-iot-topicrule-timestreamtimestamp-unit

Return type

str

value

An expression that returns a long epoch time value.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-timestreamtimestamp.html#cfn-iot-topicrule-timestreamtimestamp-value

Return type

str

TopicRulePayloadProperty

class CfnTopicRule.TopicRulePayloadProperty(*, actions, sql, aws_iot_sql_version=None, description=None, error_action=None, rule_disabled=None)

Bases: object

Describes a rule.

Parameters
  • actions (Union[IResolvable, Sequence[Union[ActionProperty, Dict[str, Any], IResolvable]]]) – The actions associated with the rule.

  • sql (str) – The SQL statement used to query the topic. For more information, see AWS IoT SQL Reference in the AWS IoT Developer Guide .

  • aws_iot_sql_version (Optional[str]) – The version of the SQL rules engine to use when evaluating the rule. The default value is 2015-10-08.

  • description (Optional[str]) – The description of the rule.

  • error_action (Union[ActionProperty, Dict[str, Any], IResolvable, None]) – The action to take when an error occurs.

  • rule_disabled (Union[bool, IResolvable, None]) – Specifies whether the rule is disabled.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-topicrulepayload.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_iot as iot

topic_rule_payload_property = iot.CfnTopicRule.TopicRulePayloadProperty(
    actions=[iot.CfnTopicRule.ActionProperty(
        cloudwatch_alarm=iot.CfnTopicRule.CloudwatchAlarmActionProperty(
            alarm_name="alarmName",
            role_arn="roleArn",
            state_reason="stateReason",
            state_value="stateValue"
        ),
        cloudwatch_logs=iot.CfnTopicRule.CloudwatchLogsActionProperty(
            log_group_name="logGroupName",
            role_arn="roleArn"
        ),
        cloudwatch_metric=iot.CfnTopicRule.CloudwatchMetricActionProperty(
            metric_name="metricName",
            metric_namespace="metricNamespace",
            metric_unit="metricUnit",
            metric_value="metricValue",
            role_arn="roleArn",

            # the properties below are optional
            metric_timestamp="metricTimestamp"
        ),
        dynamo_db=iot.CfnTopicRule.DynamoDBActionProperty(
            hash_key_field="hashKeyField",
            hash_key_value="hashKeyValue",
            role_arn="roleArn",
            table_name="tableName",

            # the properties below are optional
            hash_key_type="hashKeyType",
            payload_field="payloadField",
            range_key_field="rangeKeyField",
            range_key_type="rangeKeyType",
            range_key_value="rangeKeyValue"
        ),
        dynamo_dBv2=iot.CfnTopicRule.DynamoDBv2ActionProperty(
            put_item=iot.CfnTopicRule.PutItemInputProperty(
                table_name="tableName"
            ),
            role_arn="roleArn"
        ),
        elasticsearch=iot.CfnTopicRule.ElasticsearchActionProperty(
            endpoint="endpoint",
            id="id",
            index="index",
            role_arn="roleArn",
            type="type"
        ),
        firehose=iot.CfnTopicRule.FirehoseActionProperty(
            delivery_stream_name="deliveryStreamName",
            role_arn="roleArn",

            # the properties below are optional
            batch_mode=False,
            separator="separator"
        ),
        http=iot.CfnTopicRule.HttpActionProperty(
            url="url",

            # the properties below are optional
            auth=iot.CfnTopicRule.HttpAuthorizationProperty(
                sigv4=iot.CfnTopicRule.SigV4AuthorizationProperty(
                    role_arn="roleArn",
                    service_name="serviceName",
                    signing_region="signingRegion"
                )
            ),
            confirmation_url="confirmationUrl",
            headers=[iot.CfnTopicRule.HttpActionHeaderProperty(
                key="key",
                value="value"
            )]
        ),
        iot_analytics=iot.CfnTopicRule.IotAnalyticsActionProperty(
            channel_name="channelName",
            role_arn="roleArn",

            # the properties below are optional
            batch_mode=False
        ),
        iot_events=iot.CfnTopicRule.IotEventsActionProperty(
            input_name="inputName",
            role_arn="roleArn",

            # the properties below are optional
            batch_mode=False,
            message_id="messageId"
        ),
        iot_site_wise=iot.CfnTopicRule.IotSiteWiseActionProperty(
            put_asset_property_value_entries=[iot.CfnTopicRule.PutAssetPropertyValueEntryProperty(
                property_values=[iot.CfnTopicRule.AssetPropertyValueProperty(
                    timestamp=iot.CfnTopicRule.AssetPropertyTimestampProperty(
                        time_in_seconds="timeInSeconds",

                        # the properties below are optional
                        offset_in_nanos="offsetInNanos"
                    ),
                    value=iot.CfnTopicRule.AssetPropertyVariantProperty(
                        boolean_value="booleanValue",
                        double_value="doubleValue",
                        integer_value="integerValue",
                        string_value="stringValue"
                    ),

                    # the properties below are optional
                    quality="quality"
                )],

                # the properties below are optional
                asset_id="assetId",
                entry_id="entryId",
                property_alias="propertyAlias",
                property_id="propertyId"
            )],
            role_arn="roleArn"
        ),
        kafka=iot.CfnTopicRule.KafkaActionProperty(
            client_properties={
                "client_properties_key": "clientProperties"
            },
            destination_arn="destinationArn",
            topic="topic",

            # the properties below are optional
            key="key",
            partition="partition"
        ),
        kinesis=iot.CfnTopicRule.KinesisActionProperty(
            role_arn="roleArn",
            stream_name="streamName",

            # the properties below are optional
            partition_key="partitionKey"
        ),
        lambda_=iot.CfnTopicRule.LambdaActionProperty(
            function_arn="functionArn"
        ),
        open_search=iot.CfnTopicRule.OpenSearchActionProperty(
            endpoint="endpoint",
            id="id",
            index="index",
            role_arn="roleArn",
            type="type"
        ),
        republish=iot.CfnTopicRule.RepublishActionProperty(
            role_arn="roleArn",
            topic="topic",

            # the properties below are optional
            qos=123
        ),
        s3=iot.CfnTopicRule.S3ActionProperty(
            bucket_name="bucketName",
            key="key",
            role_arn="roleArn",

            # the properties below are optional
            canned_acl="cannedAcl"
        ),
        sns=iot.CfnTopicRule.SnsActionProperty(
            role_arn="roleArn",
            target_arn="targetArn",

            # the properties below are optional
            message_format="messageFormat"
        ),
        sqs=iot.CfnTopicRule.SqsActionProperty(
            queue_url="queueUrl",
            role_arn="roleArn",

            # the properties below are optional
            use_base64=False
        ),
        step_functions=iot.CfnTopicRule.StepFunctionsActionProperty(
            role_arn="roleArn",
            state_machine_name="stateMachineName",

            # the properties below are optional
            execution_name_prefix="executionNamePrefix"
        ),
        timestream=iot.CfnTopicRule.TimestreamActionProperty(
            database_name="databaseName",
            dimensions=[iot.CfnTopicRule.TimestreamDimensionProperty(
                name="name",
                value="value"
            )],
            role_arn="roleArn",
            table_name="tableName",

            # the properties below are optional
            batch_mode=False,
            timestamp=iot.CfnTopicRule.TimestreamTimestampProperty(
                unit="unit",
                value="value"
            )
        )
    )],
    sql="sql",

    # the properties below are optional
    aws_iot_sql_version="awsIotSqlVersion",
    description="description",
    error_action=iot.CfnTopicRule.ActionProperty(
        cloudwatch_alarm=iot.CfnTopicRule.CloudwatchAlarmActionProperty(
            alarm_name="alarmName",
            role_arn="roleArn",
            state_reason="stateReason",
            state_value="stateValue"
        ),
        cloudwatch_logs=iot.CfnTopicRule.CloudwatchLogsActionProperty(
            log_group_name="logGroupName",
            role_arn="roleArn"
        ),
        cloudwatch_metric=iot.CfnTopicRule.CloudwatchMetricActionProperty(
            metric_name="metricName",
            metric_namespace="metricNamespace",
            metric_unit="metricUnit",
            metric_value="metricValue",
            role_arn="roleArn",

            # the properties below are optional
            metric_timestamp="metricTimestamp"
        ),
        dynamo_db=iot.CfnTopicRule.DynamoDBActionProperty(
            hash_key_field="hashKeyField",
            hash_key_value="hashKeyValue",
            role_arn="roleArn",
            table_name="tableName",

            # the properties below are optional
            hash_key_type="hashKeyType",
            payload_field="payloadField",
            range_key_field="rangeKeyField",
            range_key_type="rangeKeyType",
            range_key_value="rangeKeyValue"
        ),
        dynamo_dBv2=iot.CfnTopicRule.DynamoDBv2ActionProperty(
            put_item=iot.CfnTopicRule.PutItemInputProperty(
                table_name="tableName"
            ),
            role_arn="roleArn"
        ),
        elasticsearch=iot.CfnTopicRule.ElasticsearchActionProperty(
            endpoint="endpoint",
            id="id",
            index="index",
            role_arn="roleArn",
            type="type"
        ),
        firehose=iot.CfnTopicRule.FirehoseActionProperty(
            delivery_stream_name="deliveryStreamName",
            role_arn="roleArn",

            # the properties below are optional
            batch_mode=False,
            separator="separator"
        ),
        http=iot.CfnTopicRule.HttpActionProperty(
            url="url",

            # the properties below are optional
            auth=iot.CfnTopicRule.HttpAuthorizationProperty(
                sigv4=iot.CfnTopicRule.SigV4AuthorizationProperty(
                    role_arn="roleArn",
                    service_name="serviceName",
                    signing_region="signingRegion"
                )
            ),
            confirmation_url="confirmationUrl",
            headers=[iot.CfnTopicRule.HttpActionHeaderProperty(
                key="key",
                value="value"
            )]
        ),
        iot_analytics=iot.CfnTopicRule.IotAnalyticsActionProperty(
            channel_name="channelName",
            role_arn="roleArn",

            # the properties below are optional
            batch_mode=False
        ),
        iot_events=iot.CfnTopicRule.IotEventsActionProperty(
            input_name="inputName",
            role_arn="roleArn",

            # the properties below are optional
            batch_mode=False,
            message_id="messageId"
        ),
        iot_site_wise=iot.CfnTopicRule.IotSiteWiseActionProperty(
            put_asset_property_value_entries=[iot.CfnTopicRule.PutAssetPropertyValueEntryProperty(
                property_values=[iot.CfnTopicRule.AssetPropertyValueProperty(
                    timestamp=iot.CfnTopicRule.AssetPropertyTimestampProperty(
                        time_in_seconds="timeInSeconds",

                        # the properties below are optional
                        offset_in_nanos="offsetInNanos"
                    ),
                    value=iot.CfnTopicRule.AssetPropertyVariantProperty(
                        boolean_value="booleanValue",
                        double_value="doubleValue",
                        integer_value="integerValue",
                        string_value="stringValue"
                    ),

                    # the properties below are optional
                    quality="quality"
                )],

                # the properties below are optional
                asset_id="assetId",
                entry_id="entryId",
                property_alias="propertyAlias",
                property_id="propertyId"
            )],
            role_arn="roleArn"
        ),
        kafka=iot.CfnTopicRule.KafkaActionProperty(
            client_properties={
                "client_properties_key": "clientProperties"
            },
            destination_arn="destinationArn",
            topic="topic",

            # the properties below are optional
            key="key",
            partition="partition"
        ),
        kinesis=iot.CfnTopicRule.KinesisActionProperty(
            role_arn="roleArn",
            stream_name="streamName",

            # the properties below are optional
            partition_key="partitionKey"
        ),
        lambda_=iot.CfnTopicRule.LambdaActionProperty(
            function_arn="functionArn"
        ),
        open_search=iot.CfnTopicRule.OpenSearchActionProperty(
            endpoint="endpoint",
            id="id",
            index="index",
            role_arn="roleArn",
            type="type"
        ),
        republish=iot.CfnTopicRule.RepublishActionProperty(
            role_arn="roleArn",
            topic="topic",

            # the properties below are optional
            qos=123
        ),
        s3=iot.CfnTopicRule.S3ActionProperty(
            bucket_name="bucketName",
            key="key",
            role_arn="roleArn",

            # the properties below are optional
            canned_acl="cannedAcl"
        ),
        sns=iot.CfnTopicRule.SnsActionProperty(
            role_arn="roleArn",
            target_arn="targetArn",

            # the properties below are optional
            message_format="messageFormat"
        ),
        sqs=iot.CfnTopicRule.SqsActionProperty(
            queue_url="queueUrl",
            role_arn="roleArn",

            # the properties below are optional
            use_base64=False
        ),
        step_functions=iot.CfnTopicRule.StepFunctionsActionProperty(
            role_arn="roleArn",
            state_machine_name="stateMachineName",

            # the properties below are optional
            execution_name_prefix="executionNamePrefix"
        ),
        timestream=iot.CfnTopicRule.TimestreamActionProperty(
            database_name="databaseName",
            dimensions=[iot.CfnTopicRule.TimestreamDimensionProperty(
                name="name",
                value="value"
            )],
            role_arn="roleArn",
            table_name="tableName",

            # the properties below are optional
            batch_mode=False,
            timestamp=iot.CfnTopicRule.TimestreamTimestampProperty(
                unit="unit",
                value="value"
            )
        )
    ),
    rule_disabled=False
)

Attributes

actions

The actions associated with the rule.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-topicrulepayload.html#cfn-iot-topicrule-topicrulepayload-actions

Return type

Union[IResolvable, List[Union[ActionProperty, IResolvable]]]

aws_iot_sql_version

The version of the SQL rules engine to use when evaluating the rule.

The default value is 2015-10-08.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-topicrulepayload.html#cfn-iot-topicrule-topicrulepayload-awsiotsqlversion

Return type

Optional[str]

description

The description of the rule.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-topicrulepayload.html#cfn-iot-topicrule-topicrulepayload-description

Return type

Optional[str]

error_action

The action to take when an error occurs.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-topicrulepayload.html#cfn-iot-topicrule-topicrulepayload-erroraction

Return type

Union[ActionProperty, IResolvable, None]

rule_disabled

Specifies whether the rule is disabled.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-topicrulepayload.html#cfn-iot-topicrule-topicrulepayload-ruledisabled

Return type

Union[bool, IResolvable, None]

sql

The SQL statement used to query the topic.

For more information, see AWS IoT SQL Reference in the AWS IoT Developer Guide .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-topicrulepayload.html#cfn-iot-topicrule-topicrulepayload-sql

Return type

str