CfnTopicRule

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

Bases: CfnResource

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 .

See:

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

CloudformationResource:

AWS::IoT::TopicRule

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_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",

                # the properties below are optional
                batch_mode=False
            ),
            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
                headers=[iot.CfnTopicRule.KafkaActionHeaderProperty(
                    key="key",
                    value="value"
                )],
                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"
            ),
            location=iot.CfnTopicRule.LocationActionProperty(
                device_id="deviceId",
                latitude="latitude",
                longitude="longitude",
                role_arn="roleArn",
                tracker_name="trackerName",

                # the properties below are optional
                timestamp=iot.CfnTopicRule.TimestampProperty(
                    value="value",

                    # the properties below are optional
                    unit="unit"
                )
            ),
            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
                headers=iot.CfnTopicRule.RepublishActionHeadersProperty(
                    content_type="contentType",
                    correlation_data="correlationData",
                    message_expiry="messageExpiry",
                    payload_format_indicator="payloadFormatIndicator",
                    response_topic="responseTopic",
                    user_properties=[iot.CfnTopicRule.UserPropertyProperty(
                        key="key",
                        value="value"
                    )]
                ),
                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
                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",

                # the properties below are optional
                batch_mode=False
            ),
            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
                headers=[iot.CfnTopicRule.KafkaActionHeaderProperty(
                    key="key",
                    value="value"
                )],
                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"
            ),
            location=iot.CfnTopicRule.LocationActionProperty(
                device_id="deviceId",
                latitude="latitude",
                longitude="longitude",
                role_arn="roleArn",
                tracker_name="trackerName",

                # the properties below are optional
                timestamp=iot.CfnTopicRule.TimestampProperty(
                    value="value",

                    # the properties below are optional
                    unit="unit"
                )
            ),
            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
                headers=iot.CfnTopicRule.RepublishActionHeadersProperty(
                    content_type="contentType",
                    correlation_data="correlationData",
                    message_expiry="messageExpiry",
                    payload_format_indicator="payloadFormatIndicator",
                    response_topic="responseTopic",
                    user_properties=[iot.CfnTopicRule.UserPropertyProperty(
                        key="key",
                        value="value"
                    )]
                ),
                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
                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"
    )]
)
Parameters:
  • scope (Construct) – Scope in which this resource is defined.

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

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

  • rule_name (Optional[str]) – The name of the rule. Pattern : ^[a-zA-Z0-9_]+$

  • 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_dependency(target)

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

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

Parameters:

target (CfnResource) –

Return type:

None

add_depends_on(target)

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

Parameters:

target (CfnResource) –

Deprecated:

use addDependency

Stability:

deprecated

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

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

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

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

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

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

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

For example:

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

would add the overrides Example:

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

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

Parameters:
  • path (str) –

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

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

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

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

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

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

  • value (Any) – The value.

Return type:

None

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

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

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

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

Parameters:
  • policy (Optional[RemovalPolicy]) –

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

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

See:

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

Return type:

None

get_att(attribute_name, type_hint=None)

Returns a token for an runtime attribute of this resource.

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

Parameters:
  • attribute_name (str) – The name of the attribute.

  • type_hint (Optional[ResolutionTypeHint]) –

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

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

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

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

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

Return type:

None

obtain_dependencies()

Retrieves an array of resources this resource depends on.

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

Return type:

List[Union[Stack, CfnResource]]

obtain_resource_dependencies()

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

Return type:

List[CfnResource]

override_logical_id(new_logical_id)

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

Parameters:

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

Return type:

None

remove_dependency(target)

Indicates that this resource no longer depends on another resource.

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

Parameters:

target (CfnResource) –

Return type:

None

replace_dependency(target, new_target)

Replaces one dependency with another.

Parameters:
Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::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

cfn_options

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

cfn_resource_type

AWS resource type.

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.

logical_id

The logical ID for this CloudFormation stack element.

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

To override this value, use overrideLogicalId(newLogicalId).

Returns:

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

node

The tree node.

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

rule_name

The name of the rule.

stack

The stack in which this element is defined.

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

tags

Tag Manager which manages the tags for this resource.

tags_raw

Metadata which can be used to manage the topic rule.

topic_rule_payload

The rule payload.

Static Methods

classmethod is_cfn_element(x)

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

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

Parameters:

x (Any) –

Return type:

bool

Returns:

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

classmethod is_cfn_resource(x)

Check whether the given object is a CfnResource.

Parameters:

x (Any) –

Return type:

bool

classmethod is_construct(x)

Checks if x is a construct.

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

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

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

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

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, location=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:
See:

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

        # the properties below are optional
        batch_mode=False
    ),
    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
        headers=[iot.CfnTopicRule.KafkaActionHeaderProperty(
            key="key",
            value="value"
        )],
        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"
    ),
    location=iot.CfnTopicRule.LocationActionProperty(
        device_id="deviceId",
        latitude="latitude",
        longitude="longitude",
        role_arn="roleArn",
        tracker_name="trackerName",

        # the properties below are optional
        timestamp=iot.CfnTopicRule.TimestampProperty(
            value="value",

            # the properties below are optional
            unit="unit"
        )
    ),
    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
        headers=iot.CfnTopicRule.RepublishActionHeadersProperty(
            content_type="contentType",
            correlation_data="correlationData",
            message_expiry="messageExpiry",
            payload_format_indicator="payloadFormatIndicator",
            response_topic="responseTopic",
            user_properties=[iot.CfnTopicRule.UserPropertyProperty(
                key="key",
                value="value"
            )]
        ),
        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
        timestamp=iot.CfnTopicRule.TimestreamTimestampProperty(
            unit="unit",
            value="value"
        )
    )
)

Attributes

cloudwatch_alarm

Change the state of a CloudWatch alarm.

See:

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

cloudwatch_logs

Sends data to CloudWatch.

See:

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

cloudwatch_metric

Capture a CloudWatch metric.

See:

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

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.

See:

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

dynamo_db

Write to a DynamoDB table.

See:

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

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 .

See:

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

firehose

Write to an Amazon Kinesis Firehose stream.

See:

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

http

Send data to an HTTPS endpoint.

See:

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

iot_analytics

Sends message data to an AWS IoT Analytics channel.

See:

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

iot_events

Sends an input to an AWS IoT Events detector.

See:

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

iot_site_wise

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

See:

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

kafka

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

See:

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

kinesis

Write data to an Amazon Kinesis stream.

See:

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

lambda_

Invoke a Lambda function.

See:

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

location

//docs.aws.amazon.com//location/latest/developerguide/welcome.html>`_ .

See:

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

Type:

Sends device location data to `Amazon Location Service <https

Write data to an Amazon OpenSearch Service domain.

See:

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

republish

Publish to another MQTT topic.

See:

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

s3

Write to an Amazon S3 bucket.

See:

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

sns

Publish to an Amazon SNS topic.

See:

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

sqs

Publish to an Amazon SQS queue.

See:

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

step_functions

Starts execution of a Step Functions state machine.

See:

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

timestream

Writes attributes from an MQTT message.

See:

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

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.

See:

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

See:

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

time_in_seconds

A string that contains the time in seconds since epoch.

Accepts substitution templates.

See:

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

AssetPropertyValueProperty

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

Bases: object

An asset property value entry containing the following information.

Parameters:
See:

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

See:

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

timestamp

The asset property value timestamp.

See:

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

value

The value of the asset property.

See:

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

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.

See:

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

See:

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

double_value

Optional.

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

See:

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

integer_value

Optional.

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

See:

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

string_value

Optional.

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

See:

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

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.

See:

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

See:

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

role_arn

The IAM role that allows access to the CloudWatch alarm.

See:

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

state_reason

The reason for the alarm change.

See:

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

state_value

The value of the alarm state.

Acceptable values are: OK, ALARM, INSUFFICIENT_DATA.

See:

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

CloudwatchLogsActionProperty

class CfnTopicRule.CloudwatchLogsActionProperty(*, log_group_name, role_arn, batch_mode=None)

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.

  • batch_mode (Union[bool, IResolvable, None]) – Indicates whether batches of log records will be extracted and uploaded into CloudWatch.

See:

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

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

    # the properties below are optional
    batch_mode=False
)

Attributes

batch_mode

Indicates whether batches of log records will be extracted and uploaded into CloudWatch.

See:

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

log_group_name

The CloudWatch log name.

See:

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

role_arn

The IAM role that allows access to the CloudWatch log.

See:

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

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 .

See:

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

See:

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

metric_namespace

The CloudWatch metric namespace name.

See:

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

metric_timestamp

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

See:

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

metric_unit

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

See:

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

Type:

The `metric unit <https

metric_value

The CloudWatch metric value.

See:

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

role_arn

The IAM role that allows access to the CloudWatch metric.

See:

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

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.

See:

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

See:

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

hash_key_type

The hash key type.

Valid values are “STRING” or “NUMBER”

See:

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

hash_key_value

The hash key value.

See:

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

payload_field

The action payload.

This name can be customized.

See:

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

range_key_field

The range key name.

See:

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

range_key_type

The range key type.

Valid values are “STRING” or “NUMBER”

See:

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

range_key_value

The range key value.

See:

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

role_arn

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

See:

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

table_name

The name of the DynamoDB table.

See:

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

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.

See:

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

See:

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

role_arn

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

See:

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

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.

See:

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

See:

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

id

The unique identifier for the document you are storing.

See:

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

index

The index where you want to store your data.

See:

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

role_arn

The IAM role ARN that has access to OpenSearch.

See:

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

type

The type of document you are storing.

See:

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

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

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

See:

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

delivery_stream_name

The delivery stream name.

See:

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

role_arn

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

See:

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

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

See:

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

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.

See:

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

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

Attributes

key

The HTTP header key.

See:

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

value

The HTTP header value.

Substitution templates are supported.

See:

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

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.

See:

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

See:

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

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.

See:

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

headers

The HTTP headers to send with the message data.

See:

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

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.

See:

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

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 .

See:

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

See:

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

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.

See:

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

See:

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

channel_name

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

See:

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

role_arn

BatchPutMessage).

See:

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

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.

See:

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

See:

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

input_name

The name of the AWS IoT Events input.

See:

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

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.

See:

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

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

See:

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

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.

See:

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

See:

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

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.

See:

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

KafkaActionHeaderProperty

class CfnTopicRule.KafkaActionHeaderProperty(*, key, value)

Bases: object

Specifies a Kafka header using key-value pairs when you create a Rule’s Kafka Action.

You can use these headers to route data from IoT clients to downstream Kafka clusters without modifying your message payload.

Parameters:
  • key (str) – The key of the Kafka header.

  • value (str) – The value of the Kafka header.

See:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iot as iot

kafka_action_header_property = iot.CfnTopicRule.KafkaActionHeaderProperty(
    key="key",
    value="value"
)

Attributes

key

The key of the Kafka header.

See:

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

value

The value of the Kafka header.

See:

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

KafkaActionProperty

class CfnTopicRule.KafkaActionProperty(*, client_properties, destination_arn, topic, headers=None, 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.

  • headers (Union[IResolvable, Sequence[Union[IResolvable, KafkaActionHeaderProperty, Dict[str, Any]]], None]) – The list of Kafka headers that you specify.

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

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

See:

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.
from aws_cdk import 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
    headers=[iot.CfnTopicRule.KafkaActionHeaderProperty(
        key="key",
        value="value"
    )],
    key="key",
    partition="partition"
)

Attributes

client_properties

Properties of the Apache Kafka producer client.

See:

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

destination_arn

The ARN of Kafka action’s VPC TopicRuleDestination .

See:

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

headers

The list of Kafka headers that you specify.

See:

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

key

The Kafka message key.

See:

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

partition

The Kafka message partition.

See:

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

topic

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

See:

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

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.

See:

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

See:

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

role_arn

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

See:

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

stream_name

The name of the Amazon Kinesis stream.

See:

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

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.

See:

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

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

Attributes

function_arn

The ARN of the Lambda function.

See:

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

LocationActionProperty

class CfnTopicRule.LocationActionProperty(*, device_id, latitude, longitude, role_arn, tracker_name, timestamp=None)

Bases: object

Describes an action to send device location updates from an MQTT message to an Amazon Location tracker resource.

Parameters:
  • device_id (str) – The unique ID of the device providing the location data.

  • latitude (str) – A string that evaluates to a double value that represents the latitude of the device’s location.

  • longitude (str) – A string that evaluates to a double value that represents the longitude of the device’s location.

  • role_arn (str) – The IAM role that grants permission to write to the Amazon Location resource.

  • tracker_name (str) – The name of the tracker resource in Amazon Location in which the location is updated.

  • timestamp (Union[IResolvable, TimestampProperty, Dict[str, Any], None]) – The time that the location data was sampled. The default value is the time the MQTT message was processed.

See:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iot as iot

location_action_property = iot.CfnTopicRule.LocationActionProperty(
    device_id="deviceId",
    latitude="latitude",
    longitude="longitude",
    role_arn="roleArn",
    tracker_name="trackerName",

    # the properties below are optional
    timestamp=iot.CfnTopicRule.TimestampProperty(
        value="value",

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

Attributes

device_id

The unique ID of the device providing the location data.

See:

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

latitude

A string that evaluates to a double value that represents the latitude of the device’s location.

See:

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

longitude

A string that evaluates to a double value that represents the longitude of the device’s location.

See:

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

role_arn

The IAM role that grants permission to write to the Amazon Location resource.

See:

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

timestamp

The time that the location data was sampled.

The default value is the time the MQTT message was processed.

See:

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

tracker_name

The name of the tracker resource in Amazon Location in which the location is updated.

See:

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

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.

See:

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

See:

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

id

The unique identifier for the document you are storing.

See:

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

index

The OpenSearch index where you want to store your data.

See:

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

role_arn

The IAM role ARN that has access to OpenSearch.

See:

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

type

The type of document you are storing.

See:

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

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.

See:

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

See:

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

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.

See:

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

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.

See:

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

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.

See:

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

property_values

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

See:

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

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.

See:

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

See:

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

RepublishActionHeadersProperty

class CfnTopicRule.RepublishActionHeadersProperty(*, content_type=None, correlation_data=None, message_expiry=None, payload_format_indicator=None, response_topic=None, user_properties=None)

Bases: object

Specifies MQTT Version 5.0 headers information. For more information, see MQTT in the IoT Core Developer Guide.

Parameters:
  • content_type (Optional[str]) – A UTF-8 encoded string that describes the content of the publishing message. For more information, see Content Type in the MQTT Version 5.0 specification. Supports substitution templates .

  • correlation_data (Optional[str]) –

    The base64-encoded binary data used by the sender of the request message to identify which request the response message is for. For more information, see Correlation Data in the MQTT Version 5.0 specification. Supports substitution templates . .. epigraph:: This binary data must be base64-encoded.

  • message_expiry (Optional[str]) –

    A user-defined integer value that represents the message expiry interval at the broker. If the messages haven’t been sent to the subscribers within that interval, the message expires and is removed. The value of messageExpiry represents the number of seconds before it expires. For more information about the limits of messageExpiry , see Message broker and protocol limits and quotas in the IoT Core Reference Guide. Supports substitution templates .

  • payload_format_indicator (Optional[str]) –

    An Enum string value that indicates whether the payload is formatted as UTF-8. Valid values are UNSPECIFIED_BYTES and UTF8_DATA . For more information, see Payload Format Indicator from the MQTT Version 5.0 specification. Supports substitution templates .

  • response_topic (Optional[str]) –

    A UTF-8 encoded string that’s used as the topic name for a response message. The response topic is used to describe the topic to which the receiver should publish as part of the request-response flow. The topic must not contain wildcard characters. For more information, see Response Topic in the MQTT Version 5.0 specification. Supports substitution templates .

  • user_properties (Union[IResolvable, Sequence[Union[IResolvable, UserPropertyProperty, Dict[str, Any]]], None]) – An array of key-value pairs that you define in the MQTT5 header.

See:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iot as iot

republish_action_headers_property = iot.CfnTopicRule.RepublishActionHeadersProperty(
    content_type="contentType",
    correlation_data="correlationData",
    message_expiry="messageExpiry",
    payload_format_indicator="payloadFormatIndicator",
    response_topic="responseTopic",
    user_properties=[iot.CfnTopicRule.UserPropertyProperty(
        key="key",
        value="value"
    )]
)

Attributes

content_type

A UTF-8 encoded string that describes the content of the publishing message.

For more information, see Content Type in the MQTT Version 5.0 specification.

Supports substitution templates .

See:

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

correlation_data

The base64-encoded binary data used by the sender of the request message to identify which request the response message is for.

For more information, see Correlation Data in the MQTT Version 5.0 specification.

Supports substitution templates . .. epigraph:

This binary data must be base64-encoded.
See:

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

message_expiry

A user-defined integer value that represents the message expiry interval at the broker.

If the messages haven’t been sent to the subscribers within that interval, the message expires and is removed. The value of messageExpiry represents the number of seconds before it expires. For more information about the limits of messageExpiry , see Message broker and protocol limits and quotas in the IoT Core Reference Guide.

Supports substitution templates .

See:

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

payload_format_indicator

An Enum string value that indicates whether the payload is formatted as UTF-8.

Valid values are UNSPECIFIED_BYTES and UTF8_DATA .

For more information, see Payload Format Indicator from the MQTT Version 5.0 specification.

Supports substitution templates .

See:

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

response_topic

A UTF-8 encoded string that’s used as the topic name for a response message.

The response topic is used to describe the topic to which the receiver should publish as part of the request-response flow. The topic must not contain wildcard characters.

For more information, see Response Topic in the MQTT Version 5.0 specification.

Supports substitution templates .

See:

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

user_properties

An array of key-value pairs that you define in the MQTT5 header.

See:

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

RepublishActionProperty

class CfnTopicRule.RepublishActionProperty(*, role_arn, topic, headers=None, 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.

  • headers (Union[IResolvable, RepublishActionHeadersProperty, Dict[str, Any], None]) –

    MQTT Version 5.0 headers information. For more information, see MQTT in the IoT Core Developer Guide.

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

See:

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

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

    # the properties below are optional
    headers=iot.CfnTopicRule.RepublishActionHeadersProperty(
        content_type="contentType",
        correlation_data="correlationData",
        message_expiry="messageExpiry",
        payload_format_indicator="payloadFormatIndicator",
        response_topic="responseTopic",
        user_properties=[iot.CfnTopicRule.UserPropertyProperty(
            key="key",
            value="value"
        )]
    ),
    qos=123
)

Attributes

headers

//docs.aws.amazon.com//iot/latest/developerguide/mqtt.html>`_ in the IoT Core Developer Guide.

See:

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

Type:

MQTT Version 5.0 headers information. For more information, see `MQTT <https

qos

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

The default value is 0.

See:

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

role_arn

The ARN of the IAM role that grants access.

See:

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

topic

The name of the MQTT topic.

See:

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

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 .

See:

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

See:

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

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 .

See:

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

key

The object key.

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

See:

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

role_arn

The ARN of the IAM role that grants access.

See:

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

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.

See:

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

See:

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

service_name

The service name to use while signing with Sig V4.

See:

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

signing_region

The signing region.

See:

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

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 .

See:

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

See:

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

role_arn

The ARN of the IAM role that grants access.

See:

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

target_arn

The ARN of the SNS topic.

See:

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

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.

See:

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

See:

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

role_arn

The ARN of the IAM role that grants access.

See:

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

use_base64

Specifies whether to use Base64 encoding.

See:

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

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.

See:

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

See:

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

role_arn

StartExecution”).

See:

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

state_machine_name

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

See:

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

TimestampProperty

class CfnTopicRule.TimestampProperty(*, value, unit=None)

Bases: object

Describes how to interpret an application-defined timestamp value from an MQTT message payload and the precision of that value.

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

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

See:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iot as iot

timestamp_property = iot.CfnTopicRule.TimestampProperty(
    value="value",

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

Attributes

unit

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

See:

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

value

An expression that returns a long epoch time value.

See:

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

TimestreamActionProperty

class CfnTopicRule.TimestreamActionProperty(*, database_name, dimensions, role_arn, table_name, 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.

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

See:

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.
from aws_cdk import 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
    timestamp=iot.CfnTopicRule.TimestreamTimestampProperty(
        unit="unit",
        value="value"
    )
)

Attributes

database_name

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

See:

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

dimensions

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

See:

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

role_arn

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

See:

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

table_name

The table where the message data will be written.

See:

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

timestamp

The value to use for the entry’s timestamp.

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

See:

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

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.

See:

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

See:

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

value

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

See:

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

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.

See:

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

See:

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

value

An expression that returns a long epoch time value.

See:

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

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[IResolvable, ActionProperty, Dict[str, Any]]]]) – 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[IResolvable, ActionProperty, Dict[str, Any], None]) – The action to take when an error occurs.

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

See:

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

            # the properties below are optional
            batch_mode=False
        ),
        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
            headers=[iot.CfnTopicRule.KafkaActionHeaderProperty(
                key="key",
                value="value"
            )],
            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"
        ),
        location=iot.CfnTopicRule.LocationActionProperty(
            device_id="deviceId",
            latitude="latitude",
            longitude="longitude",
            role_arn="roleArn",
            tracker_name="trackerName",

            # the properties below are optional
            timestamp=iot.CfnTopicRule.TimestampProperty(
                value="value",

                # the properties below are optional
                unit="unit"
            )
        ),
        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
            headers=iot.CfnTopicRule.RepublishActionHeadersProperty(
                content_type="contentType",
                correlation_data="correlationData",
                message_expiry="messageExpiry",
                payload_format_indicator="payloadFormatIndicator",
                response_topic="responseTopic",
                user_properties=[iot.CfnTopicRule.UserPropertyProperty(
                    key="key",
                    value="value"
                )]
            ),
            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
            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",

            # the properties below are optional
            batch_mode=False
        ),
        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
            headers=[iot.CfnTopicRule.KafkaActionHeaderProperty(
                key="key",
                value="value"
            )],
            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"
        ),
        location=iot.CfnTopicRule.LocationActionProperty(
            device_id="deviceId",
            latitude="latitude",
            longitude="longitude",
            role_arn="roleArn",
            tracker_name="trackerName",

            # the properties below are optional
            timestamp=iot.CfnTopicRule.TimestampProperty(
                value="value",

                # the properties below are optional
                unit="unit"
            )
        ),
        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
            headers=iot.CfnTopicRule.RepublishActionHeadersProperty(
                content_type="contentType",
                correlation_data="correlationData",
                message_expiry="messageExpiry",
                payload_format_indicator="payloadFormatIndicator",
                response_topic="responseTopic",
                user_properties=[iot.CfnTopicRule.UserPropertyProperty(
                    key="key",
                    value="value"
                )]
            ),
            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
            timestamp=iot.CfnTopicRule.TimestreamTimestampProperty(
                unit="unit",
                value="value"
            )
        )
    ),
    rule_disabled=False
)

Attributes

actions

The actions associated with the rule.

See:

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

aws_iot_sql_version

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

The default value is 2015-10-08.

See:

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

description

The description of the rule.

See:

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

error_action

The action to take when an error occurs.

See:

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

rule_disabled

Specifies whether the rule is disabled.

See:

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

sql

The SQL statement used to query the topic.

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

See:

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

UserPropertyProperty

class CfnTopicRule.UserPropertyProperty(*, key, value)

Bases: object

A key-value pair that you define in the header.

Parameters:
  • key (str) – A key to be specified in UserProperty .

  • value (str) – A value to be specified in UserProperty .

See:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iot as iot

user_property_property = iot.CfnTopicRule.UserPropertyProperty(
    key="key",
    value="value"
)

Attributes

key

A key to be specified in UserProperty .

See:

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

value

A value to be specified in UserProperty .

See:

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