CfnTopicRuleProps
- class aws_cdk.aws_iot.CfnTopicRuleProps(*, topic_rule_payload, rule_name=None, tags=None)
Bases:
object
Properties for defining a
CfnTopicRule
.- Parameters:
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…”
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-topicrule.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_iot as iot cfn_topic_rule_props = iot.CfnTopicRuleProps( 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" )] )
Attributes
- rule_name
The name of the rule.
Pattern :
^[a-zA-Z0-9_]+$
- tags
Metadata which can be used to manage the topic rule.
For URI Request parameters use format: …key1=value1&key2=value2…
For the CLI command-line parameter use format: –tags “key1=value1&key2=value2…”
For the cli-input-json file use format: “tags”: “key1=value1&key2=value2…”
- topic_rule_payload
The rule payload.