

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::IoT::TopicRule
<a name="aws-resource-iot-topicrule"></a>

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](https://docs.aws.amazon.com/iot/latest/developerguide/iot-rules.html) in the *AWS IoT Developer Guide*.

## Syntax
<a name="aws-resource-iot-topicrule-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-iot-topicrule-syntax.json"></a>

```
{
  "Type" : "AWS::IoT::TopicRule",
  "Properties" : {
      "[RuleName](#cfn-iot-topicrule-rulename)" : String,
      "[Tags](#cfn-iot-topicrule-tags)" : [ Tag, ... ],
      "[TopicRulePayload](#cfn-iot-topicrule-topicrulepayload)" : TopicRulePayload
    }
}
```

### YAML
<a name="aws-resource-iot-topicrule-syntax.yaml"></a>

```
Type: AWS::IoT::TopicRule
Properties:
  [RuleName](#cfn-iot-topicrule-rulename): String
  [Tags](#cfn-iot-topicrule-tags): 
    - Tag
  [TopicRulePayload](#cfn-iot-topicrule-topicrulepayload): 
    TopicRulePayload
```

## Properties
<a name="aws-resource-iot-topicrule-properties"></a>

`RuleName`  <a name="cfn-iot-topicrule-rulename"></a>
The name of the rule.  
*Required*: No  
*Type*: String  
*Pattern*: `^[a-zA-Z0-9_]+$`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-iot-topicrule-tags"></a>
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..."
*Required*: No  
*Type*: Array of [Tag](aws-properties-iot-topicrule-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TopicRulePayload`  <a name="cfn-iot-topicrule-topicrulepayload"></a>
The rule payload.  
*Required*: Yes  
*Type*: [TopicRulePayload](aws-properties-iot-topicrule-topicrulepayload.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-iot-topicrule-return-values"></a>

### Ref
<a name="aws-resource-iot-topicrule-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the topic rule name. For example:

 `{ "Ref": "MyTopicRule" }` 

For a stack named My-Stack (the - character is omitted), a value similar to the following is returned:

 `MyStackMyTopicRule12ABC3D456EFG` 

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-iot-topicrule-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-iot-topicrule-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the AWS IoT rule, such as `arn:aws:iot:us-east-2:123456789012:rule/MyIoTRule`.

## Examples
<a name="aws-resource-iot-topicrule--examples"></a>

### 
<a name="aws-resource-iot-topicrule--examples--"></a>

The following example declares an AWS IoT rule.

#### JSON
<a name="aws-resource-iot-topicrule--examples----json"></a>

```
{
  "AWSTemplateFormatVersion": "2010-09-09",
  "Resources": {
    "MyTopicRule": {
      "Type": "AWS::IoT::TopicRule",
      "Properties": {
        "RuleName": {
          "Ref": "NameParameter"
        },
        "TopicRulePayload": {
          "RuleDisabled": "true",
          "Sql": "SELECT temp FROM 'SomeTopic' WHERE temp > 60",
          "Actions": [
            {
              "S3": {
                "BucketName": {
                  "Ref": "amzn-s3-demo-bucket"
                },
                "RoleArn": {
                  "Fn::GetAtt": [
                    "MyRole",
                    "Arn"
                  ]
                },
                "Key": "MyKey.txt"
              }
            }
          ]
        }
      }
    }
  }
}
```

#### YAML
<a name="aws-resource-iot-topicrule--examples----yaml"></a>

```
AWSTemplateFormatVersion: '2010-09-09'
Resources:
  MyTopicRule:
    Type: AWS::IoT::TopicRule
    Properties:
      RuleName:
        Ref: NameParameter
      TopicRulePayload:
        RuleDisabled: 'true'
        Sql: "SELECT temp FROM 'SomeTopic' WHERE temp > 60"
        Actions:
          - S3:
              BucketName:
                Ref: amzn-s3-demo-bucket
              RoleArn:
                Fn::GetAtt:
                  - MyRole
                  - Arn
              Key: MyKey.txt
```

# AWS::IoT::TopicRule Action
<a name="aws-properties-iot-topicrule-action"></a>

Describes the actions associated with a rule.

## Syntax
<a name="aws-properties-iot-topicrule-action-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-action-syntax.json"></a>

```
{
  "[CloudwatchAlarm](#cfn-iot-topicrule-action-cloudwatchalarm)" : CloudwatchAlarmAction,
  "[CloudwatchLogs](#cfn-iot-topicrule-action-cloudwatchlogs)" : CloudwatchLogsAction,
  "[CloudwatchMetric](#cfn-iot-topicrule-action-cloudwatchmetric)" : CloudwatchMetricAction,
  "[DynamoDB](#cfn-iot-topicrule-action-dynamodb)" : DynamoDBAction,
  "[DynamoDBv2](#cfn-iot-topicrule-action-dynamodbv2)" : DynamoDBv2Action,
  "[Elasticsearch](#cfn-iot-topicrule-action-elasticsearch)" : ElasticsearchAction,
  "[Firehose](#cfn-iot-topicrule-action-firehose)" : FirehoseAction,
  "[Http](#cfn-iot-topicrule-action-http)" : HttpAction,
  "[IotAnalytics](#cfn-iot-topicrule-action-iotanalytics)" : IotAnalyticsAction,
  "[IotEvents](#cfn-iot-topicrule-action-iotevents)" : IotEventsAction,
  "[IotSiteWise](#cfn-iot-topicrule-action-iotsitewise)" : IotSiteWiseAction,
  "[Kafka](#cfn-iot-topicrule-action-kafka)" : KafkaAction,
  "[Kinesis](#cfn-iot-topicrule-action-kinesis)" : KinesisAction,
  "[Lambda](#cfn-iot-topicrule-action-lambda)" : LambdaAction,
  "[Location](#cfn-iot-topicrule-action-location)" : LocationAction,
  "[OpenSearch](#cfn-iot-topicrule-action-opensearch)" : OpenSearchAction,
  "[Republish](#cfn-iot-topicrule-action-republish)" : RepublishAction,
  "[S3](#cfn-iot-topicrule-action-s3)" : S3Action,
  "[Sns](#cfn-iot-topicrule-action-sns)" : SnsAction,
  "[Sqs](#cfn-iot-topicrule-action-sqs)" : SqsAction,
  "[StepFunctions](#cfn-iot-topicrule-action-stepfunctions)" : StepFunctionsAction,
  "[Timestream](#cfn-iot-topicrule-action-timestream)" : TimestreamAction
}
```

### YAML
<a name="aws-properties-iot-topicrule-action-syntax.yaml"></a>

```
  [CloudwatchAlarm](#cfn-iot-topicrule-action-cloudwatchalarm): 
    CloudwatchAlarmAction
  [CloudwatchLogs](#cfn-iot-topicrule-action-cloudwatchlogs): 
    CloudwatchLogsAction
  [CloudwatchMetric](#cfn-iot-topicrule-action-cloudwatchmetric): 
    CloudwatchMetricAction
  [DynamoDB](#cfn-iot-topicrule-action-dynamodb): 
    DynamoDBAction
  [DynamoDBv2](#cfn-iot-topicrule-action-dynamodbv2): 
    DynamoDBv2Action
  [Elasticsearch](#cfn-iot-topicrule-action-elasticsearch): 
    ElasticsearchAction
  [Firehose](#cfn-iot-topicrule-action-firehose): 
    FirehoseAction
  [Http](#cfn-iot-topicrule-action-http): 
    HttpAction
  [IotAnalytics](#cfn-iot-topicrule-action-iotanalytics): 
    IotAnalyticsAction
  [IotEvents](#cfn-iot-topicrule-action-iotevents): 
    IotEventsAction
  [IotSiteWise](#cfn-iot-topicrule-action-iotsitewise): 
    IotSiteWiseAction
  [Kafka](#cfn-iot-topicrule-action-kafka): 
    KafkaAction
  [Kinesis](#cfn-iot-topicrule-action-kinesis): 
    KinesisAction
  [Lambda](#cfn-iot-topicrule-action-lambda): 
    LambdaAction
  [Location](#cfn-iot-topicrule-action-location): 
    LocationAction
  [OpenSearch](#cfn-iot-topicrule-action-opensearch): 
    OpenSearchAction
  [Republish](#cfn-iot-topicrule-action-republish): 
    RepublishAction
  [S3](#cfn-iot-topicrule-action-s3): 
    S3Action
  [Sns](#cfn-iot-topicrule-action-sns): 
    SnsAction
  [Sqs](#cfn-iot-topicrule-action-sqs): 
    SqsAction
  [StepFunctions](#cfn-iot-topicrule-action-stepfunctions): 
    StepFunctionsAction
  [Timestream](#cfn-iot-topicrule-action-timestream): 
    TimestreamAction
```

## Properties
<a name="aws-properties-iot-topicrule-action-properties"></a>

`CloudwatchAlarm`  <a name="cfn-iot-topicrule-action-cloudwatchalarm"></a>
Change the state of a CloudWatch alarm.  
*Required*: No  
*Type*: [CloudwatchAlarmAction](aws-properties-iot-topicrule-cloudwatchalarmaction.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CloudwatchLogs`  <a name="cfn-iot-topicrule-action-cloudwatchlogs"></a>
Sends data to CloudWatch.  
*Required*: No  
*Type*: [CloudwatchLogsAction](aws-properties-iot-topicrule-cloudwatchlogsaction.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CloudwatchMetric`  <a name="cfn-iot-topicrule-action-cloudwatchmetric"></a>
Capture a CloudWatch metric.  
*Required*: No  
*Type*: [CloudwatchMetricAction](aws-properties-iot-topicrule-cloudwatchmetricaction.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DynamoDB`  <a name="cfn-iot-topicrule-action-dynamodb"></a>
Write to a DynamoDB table.  
*Required*: No  
*Type*: [DynamoDBAction](aws-properties-iot-topicrule-dynamodbaction.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DynamoDBv2`  <a name="cfn-iot-topicrule-action-dynamodbv2"></a>
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.  
*Required*: No  
*Type*: [DynamoDBv2Action](aws-properties-iot-topicrule-dynamodbv2action.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Elasticsearch`  <a name="cfn-iot-topicrule-action-elasticsearch"></a>
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](https://docs.aws.amazon.com//iot/latest/apireference/API_OpenSearchAction.html).
*Required*: No  
*Type*: [ElasticsearchAction](aws-properties-iot-topicrule-elasticsearchaction.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Firehose`  <a name="cfn-iot-topicrule-action-firehose"></a>
Write to an Amazon Kinesis Firehose stream.  
*Required*: No  
*Type*: [FirehoseAction](aws-properties-iot-topicrule-firehoseaction.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Http`  <a name="cfn-iot-topicrule-action-http"></a>
Send data to an HTTPS endpoint.  
*Required*: No  
*Type*: [HttpAction](aws-properties-iot-topicrule-httpaction.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IotAnalytics`  <a name="cfn-iot-topicrule-action-iotanalytics"></a>
Sends message data to an AWS IoT Analytics channel.  
*Required*: No  
*Type*: [IotAnalyticsAction](aws-properties-iot-topicrule-iotanalyticsaction.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IotEvents`  <a name="cfn-iot-topicrule-action-iotevents"></a>
Sends an input to an AWS IoT Events detector.  
*Required*: No  
*Type*: [IotEventsAction](aws-properties-iot-topicrule-ioteventsaction.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IotSiteWise`  <a name="cfn-iot-topicrule-action-iotsitewise"></a>
Sends data from the MQTT message that triggered the rule to AWS IoT SiteWise asset properties.  
*Required*: No  
*Type*: [IotSiteWiseAction](aws-properties-iot-topicrule-iotsitewiseaction.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Kafka`  <a name="cfn-iot-topicrule-action-kafka"></a>
Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon MSK) or self-managed Apache Kafka cluster.  
*Required*: No  
*Type*: [KafkaAction](aws-properties-iot-topicrule-kafkaaction.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Kinesis`  <a name="cfn-iot-topicrule-action-kinesis"></a>
Write data to an Amazon Kinesis stream.  
*Required*: No  
*Type*: [KinesisAction](aws-properties-iot-topicrule-kinesisaction.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Lambda`  <a name="cfn-iot-topicrule-action-lambda"></a>
Invoke a Lambda function.  
*Required*: No  
*Type*: [LambdaAction](aws-properties-iot-topicrule-lambdaaction.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Location`  <a name="cfn-iot-topicrule-action-location"></a>
Sends device location data to [Amazon Location Service](https://docs.aws.amazon.com//location/latest/developerguide/welcome.html).  
*Required*: No  
*Type*: [LocationAction](aws-properties-iot-topicrule-locationaction.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`OpenSearch`  <a name="cfn-iot-topicrule-action-opensearch"></a>
Write data to an Amazon OpenSearch Service domain.  
*Required*: No  
*Type*: [OpenSearchAction](aws-properties-iot-topicrule-opensearchaction.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Republish`  <a name="cfn-iot-topicrule-action-republish"></a>
Publish to another MQTT topic.  
*Required*: No  
*Type*: [RepublishAction](aws-properties-iot-topicrule-republishaction.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`S3`  <a name="cfn-iot-topicrule-action-s3"></a>
Write to an Amazon S3 bucket.  
*Required*: No  
*Type*: [S3Action](aws-properties-iot-topicrule-s3action.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Sns`  <a name="cfn-iot-topicrule-action-sns"></a>
Publish to an Amazon SNS topic.  
*Required*: No  
*Type*: [SnsAction](aws-properties-iot-topicrule-snsaction.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Sqs`  <a name="cfn-iot-topicrule-action-sqs"></a>
Publish to an Amazon SQS queue.  
*Required*: No  
*Type*: [SqsAction](aws-properties-iot-topicrule-sqsaction.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StepFunctions`  <a name="cfn-iot-topicrule-action-stepfunctions"></a>
Starts execution of a Step Functions state machine.  
*Required*: No  
*Type*: [StepFunctionsAction](aws-properties-iot-topicrule-stepfunctionsaction.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Timestream`  <a name="cfn-iot-topicrule-action-timestream"></a>
Writes attributes from an MQTT message.  
*Required*: No  
*Type*: [TimestreamAction](aws-properties-iot-topicrule-timestreamaction.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule AssetPropertyTimestamp
<a name="aws-properties-iot-topicrule-assetpropertytimestamp"></a>

An asset property timestamp entry containing the following information.

## Syntax
<a name="aws-properties-iot-topicrule-assetpropertytimestamp-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-assetpropertytimestamp-syntax.json"></a>

```
{
  "[OffsetInNanos](#cfn-iot-topicrule-assetpropertytimestamp-offsetinnanos)" : String,
  "[TimeInSeconds](#cfn-iot-topicrule-assetpropertytimestamp-timeinseconds)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-assetpropertytimestamp-syntax.yaml"></a>

```
  [OffsetInNanos](#cfn-iot-topicrule-assetpropertytimestamp-offsetinnanos): String
  [TimeInSeconds](#cfn-iot-topicrule-assetpropertytimestamp-timeinseconds): String
```

## Properties
<a name="aws-properties-iot-topicrule-assetpropertytimestamp-properties"></a>

`OffsetInNanos`  <a name="cfn-iot-topicrule-assetpropertytimestamp-offsetinnanos"></a>
Optional. A string that contains the nanosecond time offset. Accepts substitution templates.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TimeInSeconds`  <a name="cfn-iot-topicrule-assetpropertytimestamp-timeinseconds"></a>
A string that contains the time in seconds since epoch. Accepts substitution templates.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule AssetPropertyValue
<a name="aws-properties-iot-topicrule-assetpropertyvalue"></a>

An asset property value entry containing the following information.

## Syntax
<a name="aws-properties-iot-topicrule-assetpropertyvalue-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-assetpropertyvalue-syntax.json"></a>

```
{
  "[Quality](#cfn-iot-topicrule-assetpropertyvalue-quality)" : String,
  "[Timestamp](#cfn-iot-topicrule-assetpropertyvalue-timestamp)" : AssetPropertyTimestamp,
  "[Value](#cfn-iot-topicrule-assetpropertyvalue-value)" : AssetPropertyVariant
}
```

### YAML
<a name="aws-properties-iot-topicrule-assetpropertyvalue-syntax.yaml"></a>

```
  [Quality](#cfn-iot-topicrule-assetpropertyvalue-quality): String
  [Timestamp](#cfn-iot-topicrule-assetpropertyvalue-timestamp): 
    AssetPropertyTimestamp
  [Value](#cfn-iot-topicrule-assetpropertyvalue-value): 
    AssetPropertyVariant
```

## Properties
<a name="aws-properties-iot-topicrule-assetpropertyvalue-properties"></a>

`Quality`  <a name="cfn-iot-topicrule-assetpropertyvalue-quality"></a>
Optional. A string that describes the quality of the value. Accepts substitution templates. Must be `GOOD`, `BAD`, or `UNCERTAIN`.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Timestamp`  <a name="cfn-iot-topicrule-assetpropertyvalue-timestamp"></a>
The asset property value timestamp.  
*Required*: Yes  
*Type*: [AssetPropertyTimestamp](aws-properties-iot-topicrule-assetpropertytimestamp.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-iot-topicrule-assetpropertyvalue-value"></a>
The value of the asset property.  
*Required*: Yes  
*Type*: [AssetPropertyVariant](aws-properties-iot-topicrule-assetpropertyvariant.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule AssetPropertyVariant
<a name="aws-properties-iot-topicrule-assetpropertyvariant"></a>

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

## Syntax
<a name="aws-properties-iot-topicrule-assetpropertyvariant-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-assetpropertyvariant-syntax.json"></a>

```
{
  "[BooleanValue](#cfn-iot-topicrule-assetpropertyvariant-booleanvalue)" : String,
  "[DoubleValue](#cfn-iot-topicrule-assetpropertyvariant-doublevalue)" : String,
  "[IntegerValue](#cfn-iot-topicrule-assetpropertyvariant-integervalue)" : String,
  "[StringValue](#cfn-iot-topicrule-assetpropertyvariant-stringvalue)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-assetpropertyvariant-syntax.yaml"></a>

```
  [BooleanValue](#cfn-iot-topicrule-assetpropertyvariant-booleanvalue): String
  [DoubleValue](#cfn-iot-topicrule-assetpropertyvariant-doublevalue): String
  [IntegerValue](#cfn-iot-topicrule-assetpropertyvariant-integervalue): String
  [StringValue](#cfn-iot-topicrule-assetpropertyvariant-stringvalue): 
    String
```

## Properties
<a name="aws-properties-iot-topicrule-assetpropertyvariant-properties"></a>

`BooleanValue`  <a name="cfn-iot-topicrule-assetpropertyvariant-booleanvalue"></a>
Optional. A string that contains the boolean value (`true` or `false`) of the value entry. Accepts substitution templates.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DoubleValue`  <a name="cfn-iot-topicrule-assetpropertyvariant-doublevalue"></a>
Optional. A string that contains the double value of the value entry. Accepts substitution templates.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IntegerValue`  <a name="cfn-iot-topicrule-assetpropertyvariant-integervalue"></a>
Optional. A string that contains the integer value of the value entry. Accepts substitution templates.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StringValue`  <a name="cfn-iot-topicrule-assetpropertyvariant-stringvalue"></a>
Optional. The string value of the value entry. Accepts substitution templates.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule BatchConfig
<a name="aws-properties-iot-topicrule-batchconfig"></a>

<a name="aws-properties-iot-topicrule-batchconfig-description"></a>The `BatchConfig` property type specifies Property description not available. for an [AWS::IoT::TopicRule](aws-resource-iot-topicrule.md).

## Syntax
<a name="aws-properties-iot-topicrule-batchconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-batchconfig-syntax.json"></a>

```
{
  "[MaxBatchOpenMs](#cfn-iot-topicrule-batchconfig-maxbatchopenms)" : Integer,
  "[MaxBatchSize](#cfn-iot-topicrule-batchconfig-maxbatchsize)" : Integer,
  "[MaxBatchSizeBytes](#cfn-iot-topicrule-batchconfig-maxbatchsizebytes)" : Integer
}
```

### YAML
<a name="aws-properties-iot-topicrule-batchconfig-syntax.yaml"></a>

```
  [MaxBatchOpenMs](#cfn-iot-topicrule-batchconfig-maxbatchopenms): Integer
  [MaxBatchSize](#cfn-iot-topicrule-batchconfig-maxbatchsize): Integer
  [MaxBatchSizeBytes](#cfn-iot-topicrule-batchconfig-maxbatchsizebytes): Integer
```

## Properties
<a name="aws-properties-iot-topicrule-batchconfig-properties"></a>

`MaxBatchOpenMs`  <a name="cfn-iot-topicrule-batchconfig-maxbatchopenms"></a>
Property description not available.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaxBatchSize`  <a name="cfn-iot-topicrule-batchconfig-maxbatchsize"></a>
Property description not available.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaxBatchSizeBytes`  <a name="cfn-iot-topicrule-batchconfig-maxbatchsizebytes"></a>
Property description not available.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule CloudwatchAlarmAction
<a name="aws-properties-iot-topicrule-cloudwatchalarmaction"></a>

Describes an action that updates a CloudWatch alarm.

## Syntax
<a name="aws-properties-iot-topicrule-cloudwatchalarmaction-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-cloudwatchalarmaction-syntax.json"></a>

```
{
  "[AlarmName](#cfn-iot-topicrule-cloudwatchalarmaction-alarmname)" : String,
  "[RoleArn](#cfn-iot-topicrule-cloudwatchalarmaction-rolearn)" : String,
  "[StateReason](#cfn-iot-topicrule-cloudwatchalarmaction-statereason)" : String,
  "[StateValue](#cfn-iot-topicrule-cloudwatchalarmaction-statevalue)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-cloudwatchalarmaction-syntax.yaml"></a>

```
  [AlarmName](#cfn-iot-topicrule-cloudwatchalarmaction-alarmname): String
  [RoleArn](#cfn-iot-topicrule-cloudwatchalarmaction-rolearn): String
  [StateReason](#cfn-iot-topicrule-cloudwatchalarmaction-statereason): String
  [StateValue](#cfn-iot-topicrule-cloudwatchalarmaction-statevalue): String
```

## Properties
<a name="aws-properties-iot-topicrule-cloudwatchalarmaction-properties"></a>

`AlarmName`  <a name="cfn-iot-topicrule-cloudwatchalarmaction-alarmname"></a>
The CloudWatch alarm name.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-iot-topicrule-cloudwatchalarmaction-rolearn"></a>
The IAM role that allows access to the CloudWatch alarm.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StateReason`  <a name="cfn-iot-topicrule-cloudwatchalarmaction-statereason"></a>
The reason for the alarm change.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StateValue`  <a name="cfn-iot-topicrule-cloudwatchalarmaction-statevalue"></a>
The value of the alarm state. Acceptable values are: OK, ALARM, INSUFFICIENT\$1DATA.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule CloudwatchLogsAction
<a name="aws-properties-iot-topicrule-cloudwatchlogsaction"></a>

Describes an action that updates a CloudWatch log.

## Syntax
<a name="aws-properties-iot-topicrule-cloudwatchlogsaction-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-cloudwatchlogsaction-syntax.json"></a>

```
{
  "[BatchMode](#cfn-iot-topicrule-cloudwatchlogsaction-batchmode)" : Boolean,
  "[LogGroupName](#cfn-iot-topicrule-cloudwatchlogsaction-loggroupname)" : String,
  "[RoleArn](#cfn-iot-topicrule-cloudwatchlogsaction-rolearn)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-cloudwatchlogsaction-syntax.yaml"></a>

```
  [BatchMode](#cfn-iot-topicrule-cloudwatchlogsaction-batchmode): Boolean
  [LogGroupName](#cfn-iot-topicrule-cloudwatchlogsaction-loggroupname): String
  [RoleArn](#cfn-iot-topicrule-cloudwatchlogsaction-rolearn): String
```

## Properties
<a name="aws-properties-iot-topicrule-cloudwatchlogsaction-properties"></a>

`BatchMode`  <a name="cfn-iot-topicrule-cloudwatchlogsaction-batchmode"></a>
Indicates whether batches of log records will be extracted and uploaded into CloudWatch.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LogGroupName`  <a name="cfn-iot-topicrule-cloudwatchlogsaction-loggroupname"></a>
The CloudWatch log name.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-iot-topicrule-cloudwatchlogsaction-rolearn"></a>
The IAM role that allows access to the CloudWatch log.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule CloudwatchMetricAction
<a name="aws-properties-iot-topicrule-cloudwatchmetricaction"></a>

Describes an action that captures a CloudWatch metric.

## Syntax
<a name="aws-properties-iot-topicrule-cloudwatchmetricaction-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-cloudwatchmetricaction-syntax.json"></a>

```
{
  "[MetricName](#cfn-iot-topicrule-cloudwatchmetricaction-metricname)" : String,
  "[MetricNamespace](#cfn-iot-topicrule-cloudwatchmetricaction-metricnamespace)" : String,
  "[MetricTimestamp](#cfn-iot-topicrule-cloudwatchmetricaction-metrictimestamp)" : String,
  "[MetricUnit](#cfn-iot-topicrule-cloudwatchmetricaction-metricunit)" : String,
  "[MetricValue](#cfn-iot-topicrule-cloudwatchmetricaction-metricvalue)" : String,
  "[RoleArn](#cfn-iot-topicrule-cloudwatchmetricaction-rolearn)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-cloudwatchmetricaction-syntax.yaml"></a>

```
  [MetricName](#cfn-iot-topicrule-cloudwatchmetricaction-metricname): String
  [MetricNamespace](#cfn-iot-topicrule-cloudwatchmetricaction-metricnamespace): String
  [MetricTimestamp](#cfn-iot-topicrule-cloudwatchmetricaction-metrictimestamp): String
  [MetricUnit](#cfn-iot-topicrule-cloudwatchmetricaction-metricunit): String
  [MetricValue](#cfn-iot-topicrule-cloudwatchmetricaction-metricvalue): String
  [RoleArn](#cfn-iot-topicrule-cloudwatchmetricaction-rolearn): String
```

## Properties
<a name="aws-properties-iot-topicrule-cloudwatchmetricaction-properties"></a>

`MetricName`  <a name="cfn-iot-topicrule-cloudwatchmetricaction-metricname"></a>
The CloudWatch metric name.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MetricNamespace`  <a name="cfn-iot-topicrule-cloudwatchmetricaction-metricnamespace"></a>
The CloudWatch metric namespace name.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MetricTimestamp`  <a name="cfn-iot-topicrule-cloudwatchmetricaction-metrictimestamp"></a>
An optional [Unix timestamp](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#about_timestamp).  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MetricUnit`  <a name="cfn-iot-topicrule-cloudwatchmetricaction-metricunit"></a>
The [metric unit](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#Unit) supported by CloudWatch.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MetricValue`  <a name="cfn-iot-topicrule-cloudwatchmetricaction-metricvalue"></a>
The CloudWatch metric value.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-iot-topicrule-cloudwatchmetricaction-rolearn"></a>
The IAM role that allows access to the CloudWatch metric.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule DynamoDBAction
<a name="aws-properties-iot-topicrule-dynamodbaction"></a>

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: \$1\$1*sql-expression*\$1.

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](https://docs.aws.amazon.com/iot/latest/developerguide/iot-rule-actions.html) in the *AWS IoT Developer Guide*.

## Syntax
<a name="aws-properties-iot-topicrule-dynamodbaction-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-dynamodbaction-syntax.json"></a>

```
{
  "[HashKeyField](#cfn-iot-topicrule-dynamodbaction-hashkeyfield)" : String,
  "[HashKeyType](#cfn-iot-topicrule-dynamodbaction-hashkeytype)" : String,
  "[HashKeyValue](#cfn-iot-topicrule-dynamodbaction-hashkeyvalue)" : String,
  "[PayloadField](#cfn-iot-topicrule-dynamodbaction-payloadfield)" : String,
  "[RangeKeyField](#cfn-iot-topicrule-dynamodbaction-rangekeyfield)" : String,
  "[RangeKeyType](#cfn-iot-topicrule-dynamodbaction-rangekeytype)" : String,
  "[RangeKeyValue](#cfn-iot-topicrule-dynamodbaction-rangekeyvalue)" : String,
  "[RoleArn](#cfn-iot-topicrule-dynamodbaction-rolearn)" : String,
  "[TableName](#cfn-iot-topicrule-dynamodbaction-tablename)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-dynamodbaction-syntax.yaml"></a>

```
  [HashKeyField](#cfn-iot-topicrule-dynamodbaction-hashkeyfield): String
  [HashKeyType](#cfn-iot-topicrule-dynamodbaction-hashkeytype): String
  [HashKeyValue](#cfn-iot-topicrule-dynamodbaction-hashkeyvalue): String
  [PayloadField](#cfn-iot-topicrule-dynamodbaction-payloadfield): String
  [RangeKeyField](#cfn-iot-topicrule-dynamodbaction-rangekeyfield): String
  [RangeKeyType](#cfn-iot-topicrule-dynamodbaction-rangekeytype): String
  [RangeKeyValue](#cfn-iot-topicrule-dynamodbaction-rangekeyvalue): String
  [RoleArn](#cfn-iot-topicrule-dynamodbaction-rolearn): String
  [TableName](#cfn-iot-topicrule-dynamodbaction-tablename): String
```

## Properties
<a name="aws-properties-iot-topicrule-dynamodbaction-properties"></a>

`HashKeyField`  <a name="cfn-iot-topicrule-dynamodbaction-hashkeyfield"></a>
The hash key name.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`HashKeyType`  <a name="cfn-iot-topicrule-dynamodbaction-hashkeytype"></a>
The hash key type. Valid values are "STRING" or "NUMBER"  
*Required*: No  
*Type*: String  
*Allowed values*: `STRING | NUMBER`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`HashKeyValue`  <a name="cfn-iot-topicrule-dynamodbaction-hashkeyvalue"></a>
The hash key value.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PayloadField`  <a name="cfn-iot-topicrule-dynamodbaction-payloadfield"></a>
The action payload. This name can be customized.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RangeKeyField`  <a name="cfn-iot-topicrule-dynamodbaction-rangekeyfield"></a>
The range key name.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RangeKeyType`  <a name="cfn-iot-topicrule-dynamodbaction-rangekeytype"></a>
The range key type. Valid values are "STRING" or "NUMBER"  
*Required*: No  
*Type*: String  
*Allowed values*: `STRING | NUMBER`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RangeKeyValue`  <a name="cfn-iot-topicrule-dynamodbaction-rangekeyvalue"></a>
The range key value.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-iot-topicrule-dynamodbaction-rolearn"></a>
The ARN of the IAM role that grants access to the DynamoDB table.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TableName`  <a name="cfn-iot-topicrule-dynamodbaction-tablename"></a>
The name of the DynamoDB table.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule DynamoDBv2Action
<a name="aws-properties-iot-topicrule-dynamodbv2action"></a>

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.

## Syntax
<a name="aws-properties-iot-topicrule-dynamodbv2action-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-dynamodbv2action-syntax.json"></a>

```
{
  "[PutItem](#cfn-iot-topicrule-dynamodbv2action-putitem)" : PutItemInput,
  "[RoleArn](#cfn-iot-topicrule-dynamodbv2action-rolearn)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-dynamodbv2action-syntax.yaml"></a>

```
  [PutItem](#cfn-iot-topicrule-dynamodbv2action-putitem): 
    PutItemInput
  [RoleArn](#cfn-iot-topicrule-dynamodbv2action-rolearn): String
```

## Properties
<a name="aws-properties-iot-topicrule-dynamodbv2action-properties"></a>

`PutItem`  <a name="cfn-iot-topicrule-dynamodbv2action-putitem"></a>
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.  
*Required*: No  
*Type*: [PutItemInput](aws-properties-iot-topicrule-putiteminput.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-iot-topicrule-dynamodbv2action-rolearn"></a>
The ARN of the IAM role that grants access to the DynamoDB table.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-iot-topicrule-dynamodbv2action--seealso"></a>
+ [AWS SDK for C\$1\$1](https://sdk.amazonaws.com/cpp/api/LATEST/class_aws_1_1_io_t_1_1_model_1_1_dynamo_d_bv2_action.html).
+ [AWS SDK for Go](https://docs.aws.amazon.com/sdk-for-go/api/service/iot/#DynamoDBv2Action).
+ [AWS SDK for Java](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/iot/model/DynamoDBv2Action.html).
+ [AWS SDK for Ruby V2](https://docs.aws.amazon.com/sdkforruby/api/Aws/IoT/Types/DynamoDBv2Action.html).



# AWS::IoT::TopicRule ElasticsearchAction
<a name="aws-properties-iot-topicrule-elasticsearchaction"></a>

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

**Note**  
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](https://docs.aws.amazon.com//iot/latest/apireference/API_OpenSearchAction.html).

## Syntax
<a name="aws-properties-iot-topicrule-elasticsearchaction-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-elasticsearchaction-syntax.json"></a>

```
{
  "[Endpoint](#cfn-iot-topicrule-elasticsearchaction-endpoint)" : String,
  "[Id](#cfn-iot-topicrule-elasticsearchaction-id)" : String,
  "[Index](#cfn-iot-topicrule-elasticsearchaction-index)" : String,
  "[RoleArn](#cfn-iot-topicrule-elasticsearchaction-rolearn)" : String,
  "[Type](#cfn-iot-topicrule-elasticsearchaction-type)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-elasticsearchaction-syntax.yaml"></a>

```
  [Endpoint](#cfn-iot-topicrule-elasticsearchaction-endpoint): String
  [Id](#cfn-iot-topicrule-elasticsearchaction-id): String
  [Index](#cfn-iot-topicrule-elasticsearchaction-index): String
  [RoleArn](#cfn-iot-topicrule-elasticsearchaction-rolearn): String
  [Type](#cfn-iot-topicrule-elasticsearchaction-type): String
```

## Properties
<a name="aws-properties-iot-topicrule-elasticsearchaction-properties"></a>

`Endpoint`  <a name="cfn-iot-topicrule-elasticsearchaction-endpoint"></a>
The endpoint of your OpenSearch domain.  
*Required*: Yes  
*Type*: String  
*Pattern*: `https?://.*`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Id`  <a name="cfn-iot-topicrule-elasticsearchaction-id"></a>
The unique identifier for the document you are storing.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Index`  <a name="cfn-iot-topicrule-elasticsearchaction-index"></a>
The index where you want to store your data.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-iot-topicrule-elasticsearchaction-rolearn"></a>
The IAM role ARN that has access to OpenSearch.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Type`  <a name="cfn-iot-topicrule-elasticsearchaction-type"></a>
The type of document you are storing.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule FirehoseAction
<a name="aws-properties-iot-topicrule-firehoseaction"></a>

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

## Syntax
<a name="aws-properties-iot-topicrule-firehoseaction-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-firehoseaction-syntax.json"></a>

```
{
  "[BatchMode](#cfn-iot-topicrule-firehoseaction-batchmode)" : Boolean,
  "[DeliveryStreamName](#cfn-iot-topicrule-firehoseaction-deliverystreamname)" : String,
  "[RoleArn](#cfn-iot-topicrule-firehoseaction-rolearn)" : String,
  "[Separator](#cfn-iot-topicrule-firehoseaction-separator)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-firehoseaction-syntax.yaml"></a>

```
  [BatchMode](#cfn-iot-topicrule-firehoseaction-batchmode): Boolean
  [DeliveryStreamName](#cfn-iot-topicrule-firehoseaction-deliverystreamname): String
  [RoleArn](#cfn-iot-topicrule-firehoseaction-rolearn): String
  [Separator](#cfn-iot-topicrule-firehoseaction-separator): String
```

## Properties
<a name="aws-properties-iot-topicrule-firehoseaction-properties"></a>

`BatchMode`  <a name="cfn-iot-topicrule-firehoseaction-batchmode"></a>
Whether to deliver the Kinesis Data Firehose stream as a batch by using [https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html](https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html). The default value is `false`.  
When `batchMode` is `true` and the rule's SQL statement evaluates to an Array, each Array element forms one record in the [https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html](https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html) request. The resulting array can't have more than 500 records.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DeliveryStreamName`  <a name="cfn-iot-topicrule-firehoseaction-deliverystreamname"></a>
The delivery stream name.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-iot-topicrule-firehoseaction-rolearn"></a>
The IAM role that grants access to the Amazon Kinesis Firehose stream.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Separator`  <a name="cfn-iot-topicrule-firehoseaction-separator"></a>
A character separator that will be used to separate records written to the Firehose stream. Valid values are: '\$1n' (newline), '\$1t' (tab), '\$1r\$1n' (Windows newline), ',' (comma).  
*Required*: No  
*Type*: String  
*Pattern*: `([\n\t])|(\r\n)|(,)`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule HttpAction
<a name="aws-properties-iot-topicrule-httpaction"></a>

Send data to an HTTPS endpoint.

## Syntax
<a name="aws-properties-iot-topicrule-httpaction-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-httpaction-syntax.json"></a>

```
{
  "[Auth](#cfn-iot-topicrule-httpaction-auth)" : HttpAuthorization,
  "[BatchConfig](#cfn-iot-topicrule-httpaction-batchconfig)" : BatchConfig,
  "[ConfirmationUrl](#cfn-iot-topicrule-httpaction-confirmationurl)" : String,
  "[EnableBatching](#cfn-iot-topicrule-httpaction-enablebatching)" : Boolean,
  "[Headers](#cfn-iot-topicrule-httpaction-headers)" : [ HttpActionHeader, ... ],
  "[Url](#cfn-iot-topicrule-httpaction-url)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-httpaction-syntax.yaml"></a>

```
  [Auth](#cfn-iot-topicrule-httpaction-auth): 
    HttpAuthorization
  [BatchConfig](#cfn-iot-topicrule-httpaction-batchconfig): 
    BatchConfig
  [ConfirmationUrl](#cfn-iot-topicrule-httpaction-confirmationurl): String
  [EnableBatching](#cfn-iot-topicrule-httpaction-enablebatching): Boolean
  [Headers](#cfn-iot-topicrule-httpaction-headers): 
    - HttpActionHeader
  [Url](#cfn-iot-topicrule-httpaction-url): String
```

## Properties
<a name="aws-properties-iot-topicrule-httpaction-properties"></a>

`Auth`  <a name="cfn-iot-topicrule-httpaction-auth"></a>
The authentication method to use when sending data to an HTTPS endpoint.  
*Required*: No  
*Type*: [HttpAuthorization](aws-properties-iot-topicrule-httpauthorization.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`BatchConfig`  <a name="cfn-iot-topicrule-httpaction-batchconfig"></a>
Property description not available.  
*Required*: No  
*Type*: [BatchConfig](aws-properties-iot-topicrule-batchconfig.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ConfirmationUrl`  <a name="cfn-iot-topicrule-httpaction-confirmationurl"></a>
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.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EnableBatching`  <a name="cfn-iot-topicrule-httpaction-enablebatching"></a>
Property description not available.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Headers`  <a name="cfn-iot-topicrule-httpaction-headers"></a>
The HTTP headers to send with the message data.  
*Required*: No  
*Type*: Array of [HttpActionHeader](aws-properties-iot-topicrule-httpactionheader.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Url`  <a name="cfn-iot-topicrule-httpaction-url"></a>
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.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule HttpActionHeader
<a name="aws-properties-iot-topicrule-httpactionheader"></a>

The HTTP action header.

## Syntax
<a name="aws-properties-iot-topicrule-httpactionheader-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-httpactionheader-syntax.json"></a>

```
{
  "[Key](#cfn-iot-topicrule-httpactionheader-key)" : String,
  "[Value](#cfn-iot-topicrule-httpactionheader-value)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-httpactionheader-syntax.yaml"></a>

```
  [Key](#cfn-iot-topicrule-httpactionheader-key): String
  [Value](#cfn-iot-topicrule-httpactionheader-value): String
```

## Properties
<a name="aws-properties-iot-topicrule-httpactionheader-properties"></a>

`Key`  <a name="cfn-iot-topicrule-httpactionheader-key"></a>
The HTTP header key.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-iot-topicrule-httpactionheader-value"></a>
The HTTP header value. Substitution templates are supported.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule HttpAuthorization
<a name="aws-properties-iot-topicrule-httpauthorization"></a>

The authorization method used to send messages.

## Syntax
<a name="aws-properties-iot-topicrule-httpauthorization-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-httpauthorization-syntax.json"></a>

```
{
  "[Sigv4](#cfn-iot-topicrule-httpauthorization-sigv4)" : SigV4Authorization
}
```

### YAML
<a name="aws-properties-iot-topicrule-httpauthorization-syntax.yaml"></a>

```
  [Sigv4](#cfn-iot-topicrule-httpauthorization-sigv4): 
    SigV4Authorization
```

## Properties
<a name="aws-properties-iot-topicrule-httpauthorization-properties"></a>

`Sigv4`  <a name="cfn-iot-topicrule-httpauthorization-sigv4"></a>
Use Sig V4 authorization. For more information, see [Signature Version 4 Signing Process](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html).  
*Required*: No  
*Type*: [SigV4Authorization](aws-properties-iot-topicrule-sigv4authorization.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule IotAnalyticsAction
<a name="aws-properties-iot-topicrule-iotanalyticsaction"></a>

Sends message data to an AWS IoT Analytics channel.

## Syntax
<a name="aws-properties-iot-topicrule-iotanalyticsaction-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-iotanalyticsaction-syntax.json"></a>

```
{
  "[BatchMode](#cfn-iot-topicrule-iotanalyticsaction-batchmode)" : Boolean,
  "[ChannelName](#cfn-iot-topicrule-iotanalyticsaction-channelname)" : String,
  "[RoleArn](#cfn-iot-topicrule-iotanalyticsaction-rolearn)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-iotanalyticsaction-syntax.yaml"></a>

```
  [BatchMode](#cfn-iot-topicrule-iotanalyticsaction-batchmode): Boolean
  [ChannelName](#cfn-iot-topicrule-iotanalyticsaction-channelname): String
  [RoleArn](#cfn-iot-topicrule-iotanalyticsaction-rolearn): String
```

## Properties
<a name="aws-properties-iot-topicrule-iotanalyticsaction-properties"></a>

`BatchMode`  <a name="cfn-iot-topicrule-iotanalyticsaction-batchmode"></a>
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 [https://docs.aws.amazon.com/iotanalytics/latest/APIReference/API_BatchPutMessage.html](https://docs.aws.amazon.com/iotanalytics/latest/APIReference/API_BatchPutMessage.html) The resulting array can't have more than 100 messages.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ChannelName`  <a name="cfn-iot-topicrule-iotanalyticsaction-channelname"></a>
The name of the IoT Analytics channel to which message data will be sent.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-iot-topicrule-iotanalyticsaction-rolearn"></a>
The ARN of the role which has a policy that grants IoT Analytics permission to send message data via IoT Analytics (iotanalytics:BatchPutMessage).  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-iot-topicrule-iotanalyticsaction--seealso"></a>
+ [IotAnalyticsAction](https://docs.aws.amazon.com/iot/latest/apireference/API_IotAnalyticsAction.html) in the *AWS IoT API Reference*.



# AWS::IoT::TopicRule IotEventsAction
<a name="aws-properties-iot-topicrule-ioteventsaction"></a>

Sends an input to an AWS IoT Events detector.

## Syntax
<a name="aws-properties-iot-topicrule-ioteventsaction-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-ioteventsaction-syntax.json"></a>

```
{
  "[BatchMode](#cfn-iot-topicrule-ioteventsaction-batchmode)" : Boolean,
  "[InputName](#cfn-iot-topicrule-ioteventsaction-inputname)" : String,
  "[MessageId](#cfn-iot-topicrule-ioteventsaction-messageid)" : String,
  "[RoleArn](#cfn-iot-topicrule-ioteventsaction-rolearn)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-ioteventsaction-syntax.yaml"></a>

```
  [BatchMode](#cfn-iot-topicrule-ioteventsaction-batchmode): Boolean
  [InputName](#cfn-iot-topicrule-ioteventsaction-inputname): String
  [MessageId](#cfn-iot-topicrule-ioteventsaction-messageid): String
  [RoleArn](#cfn-iot-topicrule-ioteventsaction-rolearn): String
```

## Properties
<a name="aws-properties-iot-topicrule-ioteventsaction-properties"></a>

`BatchMode`  <a name="cfn-iot-topicrule-ioteventsaction-batchmode"></a>
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 [https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_BatchPutMessage.html](https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_BatchPutMessage.html). The resulting array can't have more than 10 messages.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`InputName`  <a name="cfn-iot-topicrule-ioteventsaction-inputname"></a>
The name of the AWS IoT Events input.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MessageId`  <a name="cfn-iot-topicrule-ioteventsaction-messageid"></a>
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.  
*Required*: No  
*Type*: String  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-iot-topicrule-ioteventsaction-rolearn"></a>
The ARN of the role that grants AWS IoT permission to send an input to an AWS IoT Events detector. ("Action":"iotevents:BatchPutMessage").  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule IotSiteWiseAction
<a name="aws-properties-iot-topicrule-iotsitewiseaction"></a>

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

## Syntax
<a name="aws-properties-iot-topicrule-iotsitewiseaction-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-iotsitewiseaction-syntax.json"></a>

```
{
  "[PutAssetPropertyValueEntries](#cfn-iot-topicrule-iotsitewiseaction-putassetpropertyvalueentries)" : [ PutAssetPropertyValueEntry, ... ],
  "[RoleArn](#cfn-iot-topicrule-iotsitewiseaction-rolearn)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-iotsitewiseaction-syntax.yaml"></a>

```
  [PutAssetPropertyValueEntries](#cfn-iot-topicrule-iotsitewiseaction-putassetpropertyvalueentries): 
    - PutAssetPropertyValueEntry
  [RoleArn](#cfn-iot-topicrule-iotsitewiseaction-rolearn): String
```

## Properties
<a name="aws-properties-iot-topicrule-iotsitewiseaction-properties"></a>

`PutAssetPropertyValueEntries`  <a name="cfn-iot-topicrule-iotsitewiseaction-putassetpropertyvalueentries"></a>
A list of asset property value entries.  
*Required*: Yes  
*Type*: Array of [PutAssetPropertyValueEntry](aws-properties-iot-topicrule-putassetpropertyvalueentry.md)  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-iot-topicrule-iotsitewiseaction-rolearn"></a>
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.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule KafkaAction
<a name="aws-properties-iot-topicrule-kafkaaction"></a>

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

## Syntax
<a name="aws-properties-iot-topicrule-kafkaaction-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-kafkaaction-syntax.json"></a>

```
{
  "[ClientProperties](#cfn-iot-topicrule-kafkaaction-clientproperties)" : {Key: Value, ...},
  "[DestinationArn](#cfn-iot-topicrule-kafkaaction-destinationarn)" : String,
  "[Headers](#cfn-iot-topicrule-kafkaaction-headers)" : [ KafkaActionHeader, ... ],
  "[Key](#cfn-iot-topicrule-kafkaaction-key)" : String,
  "[Partition](#cfn-iot-topicrule-kafkaaction-partition)" : String,
  "[Topic](#cfn-iot-topicrule-kafkaaction-topic)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-kafkaaction-syntax.yaml"></a>

```
  [ClientProperties](#cfn-iot-topicrule-kafkaaction-clientproperties): 
    Key: Value
  [DestinationArn](#cfn-iot-topicrule-kafkaaction-destinationarn): String
  [Headers](#cfn-iot-topicrule-kafkaaction-headers): 
    - KafkaActionHeader
  [Key](#cfn-iot-topicrule-kafkaaction-key): String
  [Partition](#cfn-iot-topicrule-kafkaaction-partition): String
  [Topic](#cfn-iot-topicrule-kafkaaction-topic): String
```

## Properties
<a name="aws-properties-iot-topicrule-kafkaaction-properties"></a>

`ClientProperties`  <a name="cfn-iot-topicrule-kafkaaction-clientproperties"></a>
Properties of the Apache Kafka producer client.  
*Required*: Yes  
*Type*: Object of String  
*Pattern*: `.*`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DestinationArn`  <a name="cfn-iot-topicrule-kafkaaction-destinationarn"></a>
The ARN of Kafka action's VPC `TopicRuleDestination`.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Headers`  <a name="cfn-iot-topicrule-kafkaaction-headers"></a>
The list of Kafka headers that you specify.  
*Required*: No  
*Type*: Array of [KafkaActionHeader](aws-properties-iot-topicrule-kafkaactionheader.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Key`  <a name="cfn-iot-topicrule-kafkaaction-key"></a>
The Kafka message key.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Partition`  <a name="cfn-iot-topicrule-kafkaaction-partition"></a>
The Kafka message partition.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Topic`  <a name="cfn-iot-topicrule-kafkaaction-topic"></a>
The Kafka topic for messages to be sent to the Kafka broker.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule KafkaActionHeader
<a name="aws-properties-iot-topicrule-kafkaactionheader"></a>

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.

## Syntax
<a name="aws-properties-iot-topicrule-kafkaactionheader-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-kafkaactionheader-syntax.json"></a>

```
{
  "[Key](#cfn-iot-topicrule-kafkaactionheader-key)" : String,
  "[Value](#cfn-iot-topicrule-kafkaactionheader-value)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-kafkaactionheader-syntax.yaml"></a>

```
  [Key](#cfn-iot-topicrule-kafkaactionheader-key): String
  [Value](#cfn-iot-topicrule-kafkaactionheader-value): String
```

## Properties
<a name="aws-properties-iot-topicrule-kafkaactionheader-properties"></a>

`Key`  <a name="cfn-iot-topicrule-kafkaactionheader-key"></a>
The key of the Kafka header.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-iot-topicrule-kafkaactionheader-value"></a>
The value of the Kafka header.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule KinesisAction
<a name="aws-properties-iot-topicrule-kinesisaction"></a>

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

## Syntax
<a name="aws-properties-iot-topicrule-kinesisaction-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-kinesisaction-syntax.json"></a>

```
{
  "[PartitionKey](#cfn-iot-topicrule-kinesisaction-partitionkey)" : String,
  "[RoleArn](#cfn-iot-topicrule-kinesisaction-rolearn)" : String,
  "[StreamName](#cfn-iot-topicrule-kinesisaction-streamname)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-kinesisaction-syntax.yaml"></a>

```
  [PartitionKey](#cfn-iot-topicrule-kinesisaction-partitionkey): String
  [RoleArn](#cfn-iot-topicrule-kinesisaction-rolearn): String
  [StreamName](#cfn-iot-topicrule-kinesisaction-streamname): String
```

## Properties
<a name="aws-properties-iot-topicrule-kinesisaction-properties"></a>

`PartitionKey`  <a name="cfn-iot-topicrule-kinesisaction-partitionkey"></a>
The partition key.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-iot-topicrule-kinesisaction-rolearn"></a>
The ARN of the IAM role that grants access to the Amazon Kinesis stream.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StreamName`  <a name="cfn-iot-topicrule-kinesisaction-streamname"></a>
The name of the Amazon Kinesis stream.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule LambdaAction
<a name="aws-properties-iot-topicrule-lambdaaction"></a>

Describes an action to invoke a Lambda function.

## Syntax
<a name="aws-properties-iot-topicrule-lambdaaction-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-lambdaaction-syntax.json"></a>

```
{
  "[FunctionArn](#cfn-iot-topicrule-lambdaaction-functionarn)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-lambdaaction-syntax.yaml"></a>

```
  [FunctionArn](#cfn-iot-topicrule-lambdaaction-functionarn): String
```

## Properties
<a name="aws-properties-iot-topicrule-lambdaaction-properties"></a>

`FunctionArn`  <a name="cfn-iot-topicrule-lambdaaction-functionarn"></a>
The ARN of the Lambda function.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule LocationAction
<a name="aws-properties-iot-topicrule-locationaction"></a>

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

## Syntax
<a name="aws-properties-iot-topicrule-locationaction-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-locationaction-syntax.json"></a>

```
{
  "[DeviceId](#cfn-iot-topicrule-locationaction-deviceid)" : String,
  "[Latitude](#cfn-iot-topicrule-locationaction-latitude)" : String,
  "[Longitude](#cfn-iot-topicrule-locationaction-longitude)" : String,
  "[RoleArn](#cfn-iot-topicrule-locationaction-rolearn)" : String,
  "[Timestamp](#cfn-iot-topicrule-locationaction-timestamp)" : Timestamp,
  "[TrackerName](#cfn-iot-topicrule-locationaction-trackername)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-locationaction-syntax.yaml"></a>

```
  [DeviceId](#cfn-iot-topicrule-locationaction-deviceid): String
  [Latitude](#cfn-iot-topicrule-locationaction-latitude): String
  [Longitude](#cfn-iot-topicrule-locationaction-longitude): String
  [RoleArn](#cfn-iot-topicrule-locationaction-rolearn): String
  [Timestamp](#cfn-iot-topicrule-locationaction-timestamp): 
    Timestamp
  [TrackerName](#cfn-iot-topicrule-locationaction-trackername): String
```

## Properties
<a name="aws-properties-iot-topicrule-locationaction-properties"></a>

`DeviceId`  <a name="cfn-iot-topicrule-locationaction-deviceid"></a>
The unique ID of the device providing the location data.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Latitude`  <a name="cfn-iot-topicrule-locationaction-latitude"></a>
A string that evaluates to a double value that represents the latitude of the device's location.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Longitude`  <a name="cfn-iot-topicrule-locationaction-longitude"></a>
A string that evaluates to a double value that represents the longitude of the device's location.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-iot-topicrule-locationaction-rolearn"></a>
The IAM role that grants permission to write to the Amazon Location resource.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Timestamp`  <a name="cfn-iot-topicrule-locationaction-timestamp"></a>
The time that the location data was sampled. The default value is the time the MQTT message was processed.  
*Required*: No  
*Type*: [Timestamp](aws-properties-iot-topicrule-timestamp.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TrackerName`  <a name="cfn-iot-topicrule-locationaction-trackername"></a>
The name of the tracker resource in Amazon Location in which the location is updated.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule OpenSearchAction
<a name="aws-properties-iot-topicrule-opensearchaction"></a>

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

## Syntax
<a name="aws-properties-iot-topicrule-opensearchaction-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-opensearchaction-syntax.json"></a>

```
{
  "[Endpoint](#cfn-iot-topicrule-opensearchaction-endpoint)" : String,
  "[Id](#cfn-iot-topicrule-opensearchaction-id)" : String,
  "[Index](#cfn-iot-topicrule-opensearchaction-index)" : String,
  "[RoleArn](#cfn-iot-topicrule-opensearchaction-rolearn)" : String,
  "[Type](#cfn-iot-topicrule-opensearchaction-type)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-opensearchaction-syntax.yaml"></a>

```
  [Endpoint](#cfn-iot-topicrule-opensearchaction-endpoint): String
  [Id](#cfn-iot-topicrule-opensearchaction-id): String
  [Index](#cfn-iot-topicrule-opensearchaction-index): String
  [RoleArn](#cfn-iot-topicrule-opensearchaction-rolearn): String
  [Type](#cfn-iot-topicrule-opensearchaction-type): String
```

## Properties
<a name="aws-properties-iot-topicrule-opensearchaction-properties"></a>

`Endpoint`  <a name="cfn-iot-topicrule-opensearchaction-endpoint"></a>
The endpoint of your OpenSearch domain.  
*Required*: Yes  
*Type*: String  
*Pattern*: `https?://.*`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Id`  <a name="cfn-iot-topicrule-opensearchaction-id"></a>
The unique identifier for the document you are storing.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Index`  <a name="cfn-iot-topicrule-opensearchaction-index"></a>
The OpenSearch index where you want to store your data.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-iot-topicrule-opensearchaction-rolearn"></a>
The IAM role ARN that has access to OpenSearch.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Type`  <a name="cfn-iot-topicrule-opensearchaction-type"></a>
The type of document you are storing.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule PutAssetPropertyValueEntry
<a name="aws-properties-iot-topicrule-putassetpropertyvalueentry"></a>

An asset property value entry containing the following information.

## Syntax
<a name="aws-properties-iot-topicrule-putassetpropertyvalueentry-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-putassetpropertyvalueentry-syntax.json"></a>

```
{
  "[AssetId](#cfn-iot-topicrule-putassetpropertyvalueentry-assetid)" : String,
  "[EntryId](#cfn-iot-topicrule-putassetpropertyvalueentry-entryid)" : String,
  "[PropertyAlias](#cfn-iot-topicrule-putassetpropertyvalueentry-propertyalias)" : String,
  "[PropertyId](#cfn-iot-topicrule-putassetpropertyvalueentry-propertyid)" : String,
  "[PropertyValues](#cfn-iot-topicrule-putassetpropertyvalueentry-propertyvalues)" : [ AssetPropertyValue, ... ]
}
```

### YAML
<a name="aws-properties-iot-topicrule-putassetpropertyvalueentry-syntax.yaml"></a>

```
  [AssetId](#cfn-iot-topicrule-putassetpropertyvalueentry-assetid): String
  [EntryId](#cfn-iot-topicrule-putassetpropertyvalueentry-entryid): String
  [PropertyAlias](#cfn-iot-topicrule-putassetpropertyvalueentry-propertyalias): String
  [PropertyId](#cfn-iot-topicrule-putassetpropertyvalueentry-propertyid): String
  [PropertyValues](#cfn-iot-topicrule-putassetpropertyvalueentry-propertyvalues): 
    - AssetPropertyValue
```

## Properties
<a name="aws-properties-iot-topicrule-putassetpropertyvalueentry-properties"></a>

`AssetId`  <a name="cfn-iot-topicrule-putassetpropertyvalueentry-assetid"></a>
The ID of the AWS IoT SiteWise asset. You must specify either a `propertyAlias` or both an `aliasId` and a `propertyId`. Accepts substitution templates.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EntryId`  <a name="cfn-iot-topicrule-putassetpropertyvalueentry-entryid"></a>
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.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PropertyAlias`  <a name="cfn-iot-topicrule-putassetpropertyvalueentry-propertyalias"></a>
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.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PropertyId`  <a name="cfn-iot-topicrule-putassetpropertyvalueentry-propertyid"></a>
The ID of the asset's property. You must specify either a `propertyAlias` or both an `aliasId` and a `propertyId`. Accepts substitution templates.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PropertyValues`  <a name="cfn-iot-topicrule-putassetpropertyvalueentry-propertyvalues"></a>
A list of property values to insert that each contain timestamp, quality, and value (TQV) information.  
*Required*: Yes  
*Type*: Array of [AssetPropertyValue](aws-properties-iot-topicrule-assetpropertyvalue.md)  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule PutItemInput
<a name="aws-properties-iot-topicrule-putiteminput"></a>

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

## Syntax
<a name="aws-properties-iot-topicrule-putiteminput-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-putiteminput-syntax.json"></a>

```
{
  "[TableName](#cfn-iot-topicrule-putiteminput-tablename)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-putiteminput-syntax.yaml"></a>

```
  [TableName](#cfn-iot-topicrule-putiteminput-tablename): String
```

## Properties
<a name="aws-properties-iot-topicrule-putiteminput-properties"></a>

`TableName`  <a name="cfn-iot-topicrule-putiteminput-tablename"></a>
The table where the message data will be written.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule RepublishAction
<a name="aws-properties-iot-topicrule-republishaction"></a>

Describes an action to republish to another topic.

## Syntax
<a name="aws-properties-iot-topicrule-republishaction-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-republishaction-syntax.json"></a>

```
{
  "[Headers](#cfn-iot-topicrule-republishaction-headers)" : RepublishActionHeaders,
  "[Qos](#cfn-iot-topicrule-republishaction-qos)" : Integer,
  "[RoleArn](#cfn-iot-topicrule-republishaction-rolearn)" : String,
  "[Topic](#cfn-iot-topicrule-republishaction-topic)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-republishaction-syntax.yaml"></a>

```
  [Headers](#cfn-iot-topicrule-republishaction-headers): 
    RepublishActionHeaders
  [Qos](#cfn-iot-topicrule-republishaction-qos): Integer
  [RoleArn](#cfn-iot-topicrule-republishaction-rolearn): String
  [Topic](#cfn-iot-topicrule-republishaction-topic): String
```

## Properties
<a name="aws-properties-iot-topicrule-republishaction-properties"></a>

`Headers`  <a name="cfn-iot-topicrule-republishaction-headers"></a>
MQTT Version 5.0 headers information. For more information, see [MQTT](https://docs.aws.amazon.com//iot/latest/developerguide/mqtt.html) in the IoT Core Developer Guide.  
*Required*: No  
*Type*: [RepublishActionHeaders](aws-properties-iot-topicrule-republishactionheaders.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Qos`  <a name="cfn-iot-topicrule-republishaction-qos"></a>
The Quality of Service (QoS) level to use when republishing messages. The default value is 0.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-iot-topicrule-republishaction-rolearn"></a>
The ARN of the IAM role that grants access.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Topic`  <a name="cfn-iot-topicrule-republishaction-topic"></a>
The name of the MQTT topic.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule RepublishActionHeaders
<a name="aws-properties-iot-topicrule-republishactionheaders"></a>

Specifies MQTT Version 5.0 headers information. For more information, see [MQTT](https://docs.aws.amazon.com//iot/latest/developerguide/mqtt.html) in the IoT Core Developer Guide.

## Syntax
<a name="aws-properties-iot-topicrule-republishactionheaders-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-republishactionheaders-syntax.json"></a>

```
{
  "[ContentType](#cfn-iot-topicrule-republishactionheaders-contenttype)" : String,
  "[CorrelationData](#cfn-iot-topicrule-republishactionheaders-correlationdata)" : String,
  "[MessageExpiry](#cfn-iot-topicrule-republishactionheaders-messageexpiry)" : String,
  "[PayloadFormatIndicator](#cfn-iot-topicrule-republishactionheaders-payloadformatindicator)" : String,
  "[ResponseTopic](#cfn-iot-topicrule-republishactionheaders-responsetopic)" : String,
  "[UserProperties](#cfn-iot-topicrule-republishactionheaders-userproperties)" : [ UserProperty, ... ]
}
```

### YAML
<a name="aws-properties-iot-topicrule-republishactionheaders-syntax.yaml"></a>

```
  [ContentType](#cfn-iot-topicrule-republishactionheaders-contenttype): String
  [CorrelationData](#cfn-iot-topicrule-republishactionheaders-correlationdata): String
  [MessageExpiry](#cfn-iot-topicrule-republishactionheaders-messageexpiry): String
  [PayloadFormatIndicator](#cfn-iot-topicrule-republishactionheaders-payloadformatindicator): String
  [ResponseTopic](#cfn-iot-topicrule-republishactionheaders-responsetopic): String
  [UserProperties](#cfn-iot-topicrule-republishactionheaders-userproperties): 
    - UserProperty
```

## Properties
<a name="aws-properties-iot-topicrule-republishactionheaders-properties"></a>

`ContentType`  <a name="cfn-iot-topicrule-republishactionheaders-contenttype"></a>
A UTF-8 encoded string that describes the content of the publishing message.  
For more information, see [ Content Type](https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901118) in the MQTT Version 5.0 specification.  
Supports [substitution templates](https://docs.aws.amazon.com//iot/latest/developerguide/iot-substitution-templates.html).  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CorrelationData`  <a name="cfn-iot-topicrule-republishactionheaders-correlationdata"></a>
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](https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901115) in the MQTT Version 5.0 specification.  
Supports [substitution templates](https://docs.aws.amazon.com//iot/latest/developerguide/iot-substitution-templates.html).  
 This binary data must be base64-encoded. 
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MessageExpiry`  <a name="cfn-iot-topicrule-republishactionheaders-messageexpiry"></a>
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](https://docs.aws.amazon.com//general/latest/gr/iot-core.html#limits_iot) in the IoT Core Reference Guide.  
Supports [substitution templates](https://docs.aws.amazon.com//iot/latest/developerguide/iot-substitution-templates.html).  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PayloadFormatIndicator`  <a name="cfn-iot-topicrule-republishactionheaders-payloadformatindicator"></a>
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](https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901111) from the MQTT Version 5.0 specification.  
Supports [substitution templates](https://docs.aws.amazon.com//iot/latest/developerguide/iot-substitution-templates.html).  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ResponseTopic`  <a name="cfn-iot-topicrule-republishactionheaders-responsetopic"></a>
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](https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901114) in the MQTT Version 5.0 specification.  
Supports [substitution templates](https://docs.aws.amazon.com//iot/latest/developerguide/iot-substitution-templates.html).  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UserProperties`  <a name="cfn-iot-topicrule-republishactionheaders-userproperties"></a>
An array of key-value pairs that you define in the MQTT5 header.  
*Required*: No  
*Type*: Array of [UserProperty](aws-properties-iot-topicrule-userproperty.md)  
*Minimum*: `1`  
*Maximum*: `100`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule S3Action
<a name="aws-properties-iot-topicrule-s3action"></a>

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

## Syntax
<a name="aws-properties-iot-topicrule-s3action-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-s3action-syntax.json"></a>

```
{
  "[BucketName](#cfn-iot-topicrule-s3action-bucketname)" : String,
  "[CannedAcl](#cfn-iot-topicrule-s3action-cannedacl)" : String,
  "[Key](#cfn-iot-topicrule-s3action-key)" : String,
  "[RoleArn](#cfn-iot-topicrule-s3action-rolearn)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-s3action-syntax.yaml"></a>

```
  [BucketName](#cfn-iot-topicrule-s3action-bucketname): String
  [CannedAcl](#cfn-iot-topicrule-s3action-cannedacl): String
  [Key](#cfn-iot-topicrule-s3action-key): String
  [RoleArn](#cfn-iot-topicrule-s3action-rolearn): String
```

## Properties
<a name="aws-properties-iot-topicrule-s3action-properties"></a>

`BucketName`  <a name="cfn-iot-topicrule-s3action-bucketname"></a>
The Amazon S3 bucket.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CannedAcl`  <a name="cfn-iot-topicrule-s3action-cannedacl"></a>
The Amazon S3 canned ACL that controls access to the object identified by the object key. For more information, see [S3 canned ACLs](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl).  
*Required*: No  
*Type*: String  
*Allowed values*: `private | public-read | public-read-write | aws-exec-read | authenticated-read | bucket-owner-read | bucket-owner-full-control | log-delivery-write`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Key`  <a name="cfn-iot-topicrule-s3action-key"></a>
The object key. For more information, see [Actions, resources, and condition keys for Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html).  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-iot-topicrule-s3action-rolearn"></a>
The ARN of the IAM role that grants access.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule SigV4Authorization
<a name="aws-properties-iot-topicrule-sigv4authorization"></a>

For more information, see [Signature Version 4 signing process](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html).

## Syntax
<a name="aws-properties-iot-topicrule-sigv4authorization-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-sigv4authorization-syntax.json"></a>

```
{
  "[RoleArn](#cfn-iot-topicrule-sigv4authorization-rolearn)" : String,
  "[ServiceName](#cfn-iot-topicrule-sigv4authorization-servicename)" : String,
  "[SigningRegion](#cfn-iot-topicrule-sigv4authorization-signingregion)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-sigv4authorization-syntax.yaml"></a>

```
  [RoleArn](#cfn-iot-topicrule-sigv4authorization-rolearn): String
  [ServiceName](#cfn-iot-topicrule-sigv4authorization-servicename): String
  [SigningRegion](#cfn-iot-topicrule-sigv4authorization-signingregion): String
```

## Properties
<a name="aws-properties-iot-topicrule-sigv4authorization-properties"></a>

`RoleArn`  <a name="cfn-iot-topicrule-sigv4authorization-rolearn"></a>
The ARN of the signing role.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ServiceName`  <a name="cfn-iot-topicrule-sigv4authorization-servicename"></a>
The service name to use while signing with Sig V4.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SigningRegion`  <a name="cfn-iot-topicrule-sigv4authorization-signingregion"></a>
The signing region.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule SnsAction
<a name="aws-properties-iot-topicrule-snsaction"></a>

Describes an action to publish to an Amazon SNS topic.

## Syntax
<a name="aws-properties-iot-topicrule-snsaction-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-snsaction-syntax.json"></a>

```
{
  "[MessageFormat](#cfn-iot-topicrule-snsaction-messageformat)" : String,
  "[RoleArn](#cfn-iot-topicrule-snsaction-rolearn)" : String,
  "[TargetArn](#cfn-iot-topicrule-snsaction-targetarn)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-snsaction-syntax.yaml"></a>

```
  [MessageFormat](#cfn-iot-topicrule-snsaction-messageformat): String
  [RoleArn](#cfn-iot-topicrule-snsaction-rolearn): String
  [TargetArn](#cfn-iot-topicrule-snsaction-targetarn): String
```

## Properties
<a name="aws-properties-iot-topicrule-snsaction-properties"></a>

`MessageFormat`  <a name="cfn-iot-topicrule-snsaction-messageformat"></a>
(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](https://docs.aws.amazon.com/sns/latest/dg/json-formats.html) in the *Amazon Simple Notification Service Developer Guide*.  
*Required*: No  
*Type*: String  
*Allowed values*: `RAW | JSON`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-iot-topicrule-snsaction-rolearn"></a>
The ARN of the IAM role that grants access.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TargetArn`  <a name="cfn-iot-topicrule-snsaction-targetarn"></a>
The ARN of the SNS topic.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule SqsAction
<a name="aws-properties-iot-topicrule-sqsaction"></a>

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

## Syntax
<a name="aws-properties-iot-topicrule-sqsaction-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-sqsaction-syntax.json"></a>

```
{
  "[QueueUrl](#cfn-iot-topicrule-sqsaction-queueurl)" : String,
  "[RoleArn](#cfn-iot-topicrule-sqsaction-rolearn)" : String,
  "[UseBase64](#cfn-iot-topicrule-sqsaction-usebase64)" : Boolean
}
```

### YAML
<a name="aws-properties-iot-topicrule-sqsaction-syntax.yaml"></a>

```
  [QueueUrl](#cfn-iot-topicrule-sqsaction-queueurl): String
  [RoleArn](#cfn-iot-topicrule-sqsaction-rolearn): String
  [UseBase64](#cfn-iot-topicrule-sqsaction-usebase64): Boolean
```

## Properties
<a name="aws-properties-iot-topicrule-sqsaction-properties"></a>

`QueueUrl`  <a name="cfn-iot-topicrule-sqsaction-queueurl"></a>
The URL of the Amazon SQS queue.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-iot-topicrule-sqsaction-rolearn"></a>
The ARN of the IAM role that grants access.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UseBase64`  <a name="cfn-iot-topicrule-sqsaction-usebase64"></a>
Specifies whether to use Base64 encoding.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule StepFunctionsAction
<a name="aws-properties-iot-topicrule-stepfunctionsaction"></a>

Starts execution of a Step Functions state machine.

## Syntax
<a name="aws-properties-iot-topicrule-stepfunctionsaction-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-stepfunctionsaction-syntax.json"></a>

```
{
  "[ExecutionNamePrefix](#cfn-iot-topicrule-stepfunctionsaction-executionnameprefix)" : String,
  "[RoleArn](#cfn-iot-topicrule-stepfunctionsaction-rolearn)" : String,
  "[StateMachineName](#cfn-iot-topicrule-stepfunctionsaction-statemachinename)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-stepfunctionsaction-syntax.yaml"></a>

```
  [ExecutionNamePrefix](#cfn-iot-topicrule-stepfunctionsaction-executionnameprefix): String
  [RoleArn](#cfn-iot-topicrule-stepfunctionsaction-rolearn): String
  [StateMachineName](#cfn-iot-topicrule-stepfunctionsaction-statemachinename): String
```

## Properties
<a name="aws-properties-iot-topicrule-stepfunctionsaction-properties"></a>

`ExecutionNamePrefix`  <a name="cfn-iot-topicrule-stepfunctionsaction-executionnameprefix"></a>
(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.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-iot-topicrule-stepfunctionsaction-rolearn"></a>
The ARN of the role that grants IoT permission to start execution of a state machine ("Action":"states:StartExecution").  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StateMachineName`  <a name="cfn-iot-topicrule-stepfunctionsaction-statemachinename"></a>
The name of the Step Functions state machine whose execution will be started.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-iot-topicrule-stepfunctionsaction--seealso"></a>
+ [StepFunctionsAction](https://docs.aws.amazon.com/iot/latest/apireference/API_StepFunctionsAction.html) in the *AWS IoT API Reference*.



# AWS::IoT::TopicRule Tag
<a name="aws-properties-iot-topicrule-tag"></a>

A set of key/value pairs that are used to manage the resource.

## Syntax
<a name="aws-properties-iot-topicrule-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-tag-syntax.json"></a>

```
{
  "[Key](#cfn-iot-topicrule-tag-key)" : String,
  "[Value](#cfn-iot-topicrule-tag-value)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-tag-syntax.yaml"></a>

```
  [Key](#cfn-iot-topicrule-tag-key): String
  [Value](#cfn-iot-topicrule-tag-value): String
```

## Properties
<a name="aws-properties-iot-topicrule-tag-properties"></a>

`Key`  <a name="cfn-iot-topicrule-tag-key"></a>
The tag's key.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-iot-topicrule-tag-value"></a>
The tag's value.  
*Required*: Yes  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule Timestamp
<a name="aws-properties-iot-topicrule-timestamp"></a>

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

## Syntax
<a name="aws-properties-iot-topicrule-timestamp-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-timestamp-syntax.json"></a>

```
{
  "[Unit](#cfn-iot-topicrule-timestamp-unit)" : String,
  "[Value](#cfn-iot-topicrule-timestamp-value)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-timestamp-syntax.yaml"></a>

```
  [Unit](#cfn-iot-topicrule-timestamp-unit): String
  [Value](#cfn-iot-topicrule-timestamp-value): String
```

## Properties
<a name="aws-properties-iot-topicrule-timestamp-properties"></a>

`Unit`  <a name="cfn-iot-topicrule-timestamp-unit"></a>
The precision of the timestamp value that results from the expression described in `value`.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-iot-topicrule-timestamp-value"></a>
An expression that returns a long epoch time value.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule TimestreamAction
<a name="aws-properties-iot-topicrule-timestreamaction"></a>

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

## Syntax
<a name="aws-properties-iot-topicrule-timestreamaction-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-timestreamaction-syntax.json"></a>

```
{
  "[DatabaseName](#cfn-iot-topicrule-timestreamaction-databasename)" : String,
  "[Dimensions](#cfn-iot-topicrule-timestreamaction-dimensions)" : [ TimestreamDimension, ... ],
  "[RoleArn](#cfn-iot-topicrule-timestreamaction-rolearn)" : String,
  "[TableName](#cfn-iot-topicrule-timestreamaction-tablename)" : String,
  "[Timestamp](#cfn-iot-topicrule-timestreamaction-timestamp)" : TimestreamTimestamp
}
```

### YAML
<a name="aws-properties-iot-topicrule-timestreamaction-syntax.yaml"></a>

```
  [DatabaseName](#cfn-iot-topicrule-timestreamaction-databasename): String
  [Dimensions](#cfn-iot-topicrule-timestreamaction-dimensions): 
    - TimestreamDimension
  [RoleArn](#cfn-iot-topicrule-timestreamaction-rolearn): String
  [TableName](#cfn-iot-topicrule-timestreamaction-tablename): String
  [Timestamp](#cfn-iot-topicrule-timestreamaction-timestamp): 
    TimestreamTimestamp
```

## Properties
<a name="aws-properties-iot-topicrule-timestreamaction-properties"></a>

`DatabaseName`  <a name="cfn-iot-topicrule-timestreamaction-databasename"></a>
The name of an Amazon Timestream database that has the table to write records into.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Dimensions`  <a name="cfn-iot-topicrule-timestreamaction-dimensions"></a>
Metadata attributes of the time series that are written in each measure record.  
*Required*: Yes  
*Type*: Array of [TimestreamDimension](aws-properties-iot-topicrule-timestreamdimension.md)  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-iot-topicrule-timestreamaction-rolearn"></a>
The Amazon Resource Name (ARN) of the role that grants AWS IoT permission to write to the Timestream database table.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TableName`  <a name="cfn-iot-topicrule-timestreamaction-tablename"></a>
The table where the message data will be written.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Timestamp`  <a name="cfn-iot-topicrule-timestreamaction-timestamp"></a>
The value to use for the entry's timestamp. If blank, the time that the entry was processed is used.  
*Required*: No  
*Type*: [TimestreamTimestamp](aws-properties-iot-topicrule-timestreamtimestamp.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule TimestreamDimension
<a name="aws-properties-iot-topicrule-timestreamdimension"></a>

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

## Syntax
<a name="aws-properties-iot-topicrule-timestreamdimension-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-timestreamdimension-syntax.json"></a>

```
{
  "[Name](#cfn-iot-topicrule-timestreamdimension-name)" : String,
  "[Value](#cfn-iot-topicrule-timestreamdimension-value)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-timestreamdimension-syntax.yaml"></a>

```
  [Name](#cfn-iot-topicrule-timestreamdimension-name): String
  [Value](#cfn-iot-topicrule-timestreamdimension-value): String
```

## Properties
<a name="aws-properties-iot-topicrule-timestreamdimension-properties"></a>

`Name`  <a name="cfn-iot-topicrule-timestreamdimension-name"></a>
The metadata dimension name. This is the name of the column in the Amazon Timestream database table record.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-iot-topicrule-timestreamdimension-value"></a>
The value to write in this column of the database record.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule TimestreamTimestamp
<a name="aws-properties-iot-topicrule-timestreamtimestamp"></a>

The value to use for the entry's timestamp. If blank, the time that the entry was processed is used.

## Syntax
<a name="aws-properties-iot-topicrule-timestreamtimestamp-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-timestreamtimestamp-syntax.json"></a>

```
{
  "[Unit](#cfn-iot-topicrule-timestreamtimestamp-unit)" : String,
  "[Value](#cfn-iot-topicrule-timestreamtimestamp-value)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-timestreamtimestamp-syntax.yaml"></a>

```
  [Unit](#cfn-iot-topicrule-timestreamtimestamp-unit): String
  [Value](#cfn-iot-topicrule-timestreamtimestamp-value): String
```

## Properties
<a name="aws-properties-iot-topicrule-timestreamtimestamp-properties"></a>

`Unit`  <a name="cfn-iot-topicrule-timestreamtimestamp-unit"></a>
The precision of the timestamp value that results from the expression described in `value`.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-iot-topicrule-timestreamtimestamp-value"></a>
An expression that returns a long epoch time value.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule TopicRulePayload
<a name="aws-properties-iot-topicrule-topicrulepayload"></a>

Describes a rule.

## Syntax
<a name="aws-properties-iot-topicrule-topicrulepayload-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-topicrulepayload-syntax.json"></a>

```
{
  "[Actions](#cfn-iot-topicrule-topicrulepayload-actions)" : [ Action, ... ],
  "[AwsIotSqlVersion](#cfn-iot-topicrule-topicrulepayload-awsiotsqlversion)" : String,
  "[Description](#cfn-iot-topicrule-topicrulepayload-description)" : String,
  "[ErrorAction](#cfn-iot-topicrule-topicrulepayload-erroraction)" : Action,
  "[RuleDisabled](#cfn-iot-topicrule-topicrulepayload-ruledisabled)" : Boolean,
  "[Sql](#cfn-iot-topicrule-topicrulepayload-sql)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-topicrulepayload-syntax.yaml"></a>

```
  [Actions](#cfn-iot-topicrule-topicrulepayload-actions): 
    - Action
  [AwsIotSqlVersion](#cfn-iot-topicrule-topicrulepayload-awsiotsqlversion): String
  [Description](#cfn-iot-topicrule-topicrulepayload-description): String
  [ErrorAction](#cfn-iot-topicrule-topicrulepayload-erroraction): 
    Action
  [RuleDisabled](#cfn-iot-topicrule-topicrulepayload-ruledisabled): Boolean
  [Sql](#cfn-iot-topicrule-topicrulepayload-sql): String
```

## Properties
<a name="aws-properties-iot-topicrule-topicrulepayload-properties"></a>

`Actions`  <a name="cfn-iot-topicrule-topicrulepayload-actions"></a>
The actions associated with the rule.  
*Required*: Yes  
*Type*: Array of [Action](aws-properties-iot-topicrule-action.md)  
*Minimum*: `0`  
*Maximum*: `10`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AwsIotSqlVersion`  <a name="cfn-iot-topicrule-topicrulepayload-awsiotsqlversion"></a>
The version of the SQL rules engine to use when evaluating the rule.  
The default value is 2015-10-08.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Description`  <a name="cfn-iot-topicrule-topicrulepayload-description"></a>
The description of the rule.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ErrorAction`  <a name="cfn-iot-topicrule-topicrulepayload-erroraction"></a>
The action to take when an error occurs.  
*Required*: No  
*Type*: [Action](aws-properties-iot-topicrule-action.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RuleDisabled`  <a name="cfn-iot-topicrule-topicrulepayload-ruledisabled"></a>
Specifies whether the rule is disabled.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Sql`  <a name="cfn-iot-topicrule-topicrulepayload-sql"></a>
The SQL statement used to query the topic. For more information, see [AWS IoT SQL Reference](https://docs.aws.amazon.com/iot/latest/developerguide/iot-sql-reference.html) in the *AWS IoT Developer Guide*.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::IoT::TopicRule UserProperty
<a name="aws-properties-iot-topicrule-userproperty"></a>

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

## Syntax
<a name="aws-properties-iot-topicrule-userproperty-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-iot-topicrule-userproperty-syntax.json"></a>

```
{
  "[Key](#cfn-iot-topicrule-userproperty-key)" : String,
  "[Value](#cfn-iot-topicrule-userproperty-value)" : String
}
```

### YAML
<a name="aws-properties-iot-topicrule-userproperty-syntax.yaml"></a>

```
  [Key](#cfn-iot-topicrule-userproperty-key): String
  [Value](#cfn-iot-topicrule-userproperty-value): String
```

## Properties
<a name="aws-properties-iot-topicrule-userproperty-properties"></a>

`Key`  <a name="cfn-iot-topicrule-userproperty-key"></a>
A key to be specified in `UserProperty`.  
*Required*: Yes  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-iot-topicrule-userproperty-value"></a>
A value to be specified in `UserProperty`.  
*Required*: Yes  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `1024`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)