{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-core/json-schema/amazon-iot-core-create-topic-rule-request-schema.json",
  "title": "CreateTopicRuleRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-core-rules-api-openapi.yml#/components/schemas/CreateTopicRuleRequest",
  "type": "object",
  "properties": {
    "ruleName": {
      "type": "string",
      "description": "The name of the rule."
    },
    "topicRulePayload": {
      "$ref": "#/$defs/TopicRulePayload"
    },
    "tags": {
      "type": "string",
      "description": "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": [
    "ruleName",
    "topicRulePayload"
  ],
  "$defs": {
    "Action": {
      "type": "object",
      "properties": {
        "dynamoDB": {
          "$ref": "#/$defs/DynamoDBAction"
        },
        "dynamoDBv2": {
          "$ref": "#/$defs/DynamoDBv2Action"
        },
        "lambda": {
          "$ref": "#/$defs/LambdaAction"
        },
        "sns": {
          "$ref": "#/$defs/SnsAction"
        },
        "sqs": {
          "$ref": "#/$defs/SqsAction"
        },
        "kinesis": {
          "$ref": "#/$defs/KinesisAction"
        },
        "republish": {
          "$ref": "#/$defs/RepublishAction"
        },
        "s3": {
          "$ref": "#/$defs/S3Action"
        },
        "firehose": {
          "$ref": "#/$defs/FirehoseAction"
        },
        "cloudwatchMetric": {
          "$ref": "#/$defs/CloudwatchMetricAction"
        },
        "cloudwatchAlarm": {
          "$ref": "#/$defs/CloudwatchAlarmAction"
        },
        "cloudwatchLogs": {
          "$ref": "#/$defs/CloudwatchLogsAction"
        },
        "elasticsearch": {
          "$ref": "#/$defs/ElasticsearchAction"
        },
        "salesforce": {
          "$ref": "#/$defs/SalesforceAction"
        },
        "iotAnalytics": {
          "$ref": "#/$defs/IotAnalyticsAction"
        },
        "iotEvents": {
          "$ref": "#/$defs/IotEventsAction"
        },
        "iotSiteWise": {
          "$ref": "#/$defs/IotSiteWiseAction"
        },
        "stepFunctions": {
          "$ref": "#/$defs/StepFunctionsAction"
        },
        "timestream": {
          "$ref": "#/$defs/TimestreamAction"
        },
        "http": {
          "$ref": "#/$defs/HttpAction"
        },
        "kafka": {
          "$ref": "#/$defs/KafkaAction"
        },
        "openSearch": {
          "$ref": "#/$defs/OpenSearchAction"
        },
        "location": {
          "$ref": "#/$defs/LocationAction"
        },
        "influxDB": {
          "$ref": "#/$defs/InfluxDBAction"
        }
      }
    },
    "AssetPropertyTimestamp": {
      "type": "object",
      "properties": {
        "timeInSeconds": {
          "type": "string",
          "description": "A string that contains the time in seconds since epoch. Accepts substitution templates."
        },
        "offsetInNanos": {
          "type": "string",
          "description": "Optional. A string that contains the nanosecond time offset. Accepts substitution templates."
        }
      },
      "required": [
        "timeInSeconds"
      ]
    },
    "AssetPropertyValue": {
      "type": "object",
      "properties": {
        "value": {
          "$ref": "#/$defs/AssetPropertyVariant"
        },
        "timestamp": {
          "$ref": "#/$defs/AssetPropertyTimestamp"
        },
        "quality": {
          "type": "string",
          "description": "Optional. A string that describes the quality of the value. Accepts substitution templates. Must be GOOD, BAD, or UNCERTAIN."
        }
      },
      "required": [
        "value",
        "timestamp"
      ]
    },
    "AssetPropertyVariant": {
      "type": "object",
      "properties": {
        "stringValue": {
          "type": "string",
          "description": "Optional. The string value of the value entry. Accepts substitution templates."
        },
        "integerValue": {
          "type": "string",
          "description": "Optional. A string that contains the integer value of the value entry. Accepts substitution templates."
        },
        "doubleValue": {
          "type": "string",
          "description": "Optional. A string that contains the double value of the value entry. Accepts substitution templates."
        },
        "booleanValue": {
          "type": "string",
          "description": "Optional. A string that contains the boolean value (true or false) of the value entry. Accepts substitution templates."
        }
      },
      "description": "Exactly one member is set."
    },
    "BatchConfig": {
      "type": "object",
      "properties": {
        "maxBatchOpenMs": {
          "type": "integer",
          "description": "The maximum amount of time (in milliseconds) that an outgoing call waits for other calls with which it batches messages of the same type. The higher the setting, the longer the latency of the batched HTTP Action will be."
        },
        "maxBatchSize": {
          "type": "integer",
          "description": "The maximum number of messages that are batched together in a single action execution."
        },
        "maxBatchSizeBytes": {
          "type": "integer",
          "description": "Maximum size of a message batch, in bytes."
        },
        "batchAcrossTopics": {
          "type": "boolean",
          "description": "Whether to allow batching messages from different MQTT topics into a single HTTP request. By default, only messages from the same topic are batched together. The default value is false. When batchAcrossTopics is enabled, the error payload format changes: the topic field moves from the top level to inside each entry in the payloadsWithMetadata array, since each message in the batch may originate from a different topic. Messages are always batched within the scope of the same account, rule name, target HTTP endpoint URL, and billing group. Messages that differ in any of these attributes are neve"
        }
      }
    },
    "CloudwatchAlarmAction": {
      "type": "object",
      "properties": {
        "roleArn": {
          "type": "string",
          "description": "The IAM role that allows access to the CloudWatch alarm."
        },
        "alarmName": {
          "type": "string",
          "description": "The CloudWatch alarm name."
        },
        "stateReason": {
          "type": "string",
          "description": "The reason for the alarm change."
        },
        "stateValue": {
          "type": "string",
          "description": "The value of the alarm state. Acceptable values are: OK, ALARM, INSUFFICIENT_DATA."
        }
      },
      "required": [
        "roleArn",
        "alarmName",
        "stateReason",
        "stateValue"
      ]
    },
    "CloudwatchLogsAction": {
      "type": "object",
      "properties": {
        "roleArn": {
          "type": "string",
          "description": "The IAM role that allows access to the CloudWatch log."
        },
        "logGroupName": {
          "type": "string",
          "description": "The CloudWatch log group to which the action sends data."
        },
        "batchMode": {
          "type": "boolean",
          "description": "Indicates whether batches of log records will be extracted and uploaded into CloudWatch. Values include true or false (default)."
        }
      },
      "required": [
        "roleArn",
        "logGroupName"
      ]
    },
    "CloudwatchMetricAction": {
      "type": "object",
      "properties": {
        "roleArn": {
          "type": "string",
          "description": "The IAM role that allows access to the CloudWatch metric."
        },
        "metricNamespace": {
          "type": "string",
          "description": "The CloudWatch metric namespace name."
        },
        "metricName": {
          "type": "string",
          "description": "The CloudWatch metric name."
        },
        "metricValue": {
          "type": "string",
          "description": "The CloudWatch metric value."
        },
        "metricUnit": {
          "type": "string",
          "description": "The metric unit supported by CloudWatch."
        },
        "metricTimestamp": {
          "type": "string",
          "description": "An optional Unix timestamp."
        }
      },
      "required": [
        "roleArn",
        "metricNamespace",
        "metricName",
        "metricValue",
        "metricUnit"
      ]
    },
    "DynamoDBAction": {
      "type": "object",
      "properties": {
        "tableName": {
          "type": "string",
          "description": "The name of the DynamoDB table."
        },
        "roleArn": {
          "type": "string",
          "description": "The ARN of the IAM role that grants access to the DynamoDB table."
        },
        "operation": {
          "type": "string",
          "description": "The type of operation to be performed. This follows the substitution template, so it can be ${operation}, but the substitution must result in one of the following: INSERT, UPDATE, or DELETE."
        },
        "hashKeyField": {
          "type": "string",
          "description": "The hash key name."
        },
        "hashKeyValue": {
          "type": "string",
          "description": "The hash key value."
        },
        "hashKeyType": {
          "type": "string",
          "enum": [
            "STRING",
            "NUMBER"
          ],
          "description": "The hash key type. Valid values are \"STRING\" or \"NUMBER\""
        },
        "rangeKeyField": {
          "type": "string",
          "description": "The range key name."
        },
        "rangeKeyValue": {
          "type": "string",
          "description": "The range key value."
        },
        "rangeKeyType": {
          "type": "string",
          "enum": [
            "STRING",
            "NUMBER"
          ],
          "description": "The range key type. Valid values are \"STRING\" or \"NUMBER\""
        },
        "payloadField": {
          "type": "string",
          "description": "The action payload. This name can be customized."
        }
      },
      "required": [
        "tableName",
        "roleArn",
        "hashKeyField",
        "hashKeyValue"
      ]
    },
    "DynamoDBv2Action": {
      "type": "object",
      "properties": {
        "roleArn": {
          "type": "string",
          "description": "The ARN of the IAM role that grants access to the DynamoDB table."
        },
        "putItem": {
          "$ref": "#/$defs/PutItemInput"
        }
      },
      "required": [
        "roleArn",
        "putItem"
      ]
    },
    "ElasticsearchAction": {
      "type": "object",
      "properties": {
        "roleArn": {
          "type": "string",
          "description": "The IAM role ARN that has access to OpenSearch."
        },
        "endpoint": {
          "type": "string",
          "description": "The endpoint of your OpenSearch domain."
        },
        "index": {
          "type": "string",
          "description": "The index where you want to store your data."
        },
        "type": {
          "type": "string",
          "description": "The type of document you are storing."
        },
        "id": {
          "type": "string",
          "description": "The unique identifier for the document you are storing."
        }
      },
      "required": [
        "roleArn",
        "endpoint",
        "index",
        "type",
        "id"
      ]
    },
    "FirehoseAction": {
      "type": "object",
      "properties": {
        "roleArn": {
          "type": "string",
          "description": "The IAM role that grants access to the Amazon Kinesis Firehose stream."
        },
        "deliveryStreamName": {
          "type": "string",
          "description": "The delivery stream name."
        },
        "separator": {
          "type": "string",
          "description": "A character separator that will be used to separate records written to the Firehose stream. Valid values are: '\\n' (newline), '\\t' (tab), '\\r\\n' (Windows newline), ',' (comma)."
        },
        "batchMode": {
          "type": "boolean",
          "description": "Whether to deliver the Kinesis Data Firehose stream as a batch by using PutRecordBatch . The default value is false. When batchMode is true and the rule's SQL statement evaluates to an Array, each Array element forms one record in the PutRecordBatch request. The resulting array can't have more than 500 records."
        }
      },
      "required": [
        "roleArn",
        "deliveryStreamName"
      ]
    },
    "HttpAction": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "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."
        },
        "confirmationUrl": {
          "type": "string",
          "description": "The URL to which 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 IoT uses the endpoint URL as the confirmation URL. If you use substitution templates in the confirmationUrl, you must create and enable topic rule destinations that match each possible value of the substitution template before traffic is allowed to your endpoint URL."
        },
        "headers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/HttpActionHeader"
          },
          "description": "The HTTP headers to send with the message data."
        },
        "auth": {
          "$ref": "#/$defs/HttpAuthorization"
        },
        "enableBatching": {
          "type": "boolean",
          "description": "Whether to process the HTTP action messages into a single request. Value can be true or false."
        },
        "batchConfig": {
          "$ref": "#/$defs/BatchConfig"
        }
      },
      "required": [
        "url"
      ]
    },
    "HttpActionHeader": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The HTTP header key."
        },
        "value": {
          "type": "string",
          "description": "The HTTP header value. Substitution templates are supported."
        }
      },
      "required": [
        "key",
        "value"
      ]
    },
    "HttpAuthorization": {
      "type": "object",
      "properties": {
        "sigv4": {
          "$ref": "#/$defs/SigV4Authorization"
        }
      }
    },
    "InfluxDBAction": {
      "type": "object",
      "properties": {
        "destinationArn": {
          "type": "string",
          "description": "The ARN of the InfluxDB topic rule destination that identifies the InfluxDB instance to write to."
        },
        "roleArn": {
          "type": "string",
          "description": "The ARN of the role that grants permission to retrieve the InfluxDB API token from Amazon Web Services Secrets Manager."
        },
        "databaseName": {
          "type": "string",
          "description": "The name of the InfluxDB database to write to. In InfluxDB 2, this is the name of the bucket."
        },
        "tableName": {
          "type": "string",
          "description": "The name of the table to write the data point to. This is the measurement name of the InfluxDB line protocol record. Accepts substitution templates."
        },
        "organization": {
          "type": "string",
          "description": "The name of the InfluxDB organization that owns the database. A write to an InfluxDB 2 instance fails if this value isn't set. This value isn't used when the destination is an InfluxDB 3 instance."
        },
        "tags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The set of tags to write with each data point. Tags are the indexed metadata of an InfluxDB data point. Tag names and tag values accept substitution templates. A tag name can't use the @{...} per-element form. A tag name must resolve to the same value for every element of an array payload."
        },
        "timestampUnit": {
          "type": "string",
          "enum": [
            "s",
            "ms",
            "us",
            "ns"
          ],
          "description": "The precision of the timestamp written with each data point. Valid values are s (seconds), ms (milliseconds), us (microseconds), and ns (nanoseconds). If omitted, the topic rule action uses ms."
        },
        "batchConfig": {
          "$ref": "#/$defs/InfluxDBBatchConfig"
        }
      },
      "required": [
        "destinationArn",
        "roleArn",
        "databaseName",
        "tableName"
      ]
    },
    "InfluxDBBatchConfig": {
      "type": "object",
      "properties": {
        "maxBatchSize": {
          "type": "integer",
          "description": "The maximum number of data points to collect in a batch. If you don't specify a value, this limit doesn't apply. IoT then closes each batch when another configured limit is reached."
        },
        "maxBatchOpenMs": {
          "type": "integer",
          "description": "The maximum length of time, in milliseconds, to keep a batch open before writing it to InfluxDB. If you don't specify a value, this limit doesn't apply. IoT then closes each batch when another configured limit is reached."
        },
        "maxBatchSizeBytes": {
          "type": "integer",
          "description": "The maximum size of a batch, in bytes, before IoT writes it to InfluxDB. If you don't specify a value, this limit doesn't apply. IoT then closes each batch when another configured limit is reached."
        },
        "batchAcrossTopics": {
          "type": "boolean",
          "description": "Specifies whether to collect data points from different topics into the same batch. If omitted or false, IoT batches data points for each topic separately."
        }
      }
    },
    "IotAnalyticsAction": {
      "type": "object",
      "properties": {
        "channelArn": {
          "type": "string",
          "description": "(deprecated) The ARN of the IoT Analytics channel to which message data will be sent."
        },
        "channelName": {
          "type": "string",
          "description": "The name of the IoT Analytics channel to which message data will be sent."
        },
        "batchMode": {
          "type": "boolean",
          "description": "Whether to process the action as a batch. The default value is false. When batchMode is true and the rule SQL statement evaluates to an Array, each Array element is delivered as a separate message when passed by BatchPutMessage to the IoT Analytics channel. The resulting array can't have more than 100 messages."
        },
        "roleArn": {
          "type": "string",
          "description": "The ARN of the role which has a policy that grants IoT Analytics permission to send message data via IoT Analytics (iotanalytics:BatchPutMessage)."
        }
      }
    },
    "IotEventsAction": {
      "type": "object",
      "properties": {
        "inputName": {
          "type": "string",
          "description": "The name of the IoT Events input."
        },
        "messageId": {
          "type": "string",
          "description": "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 IoT Events detector."
        },
        "batchMode": {
          "type": "boolean",
          "description": "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 it's sent to IoT Events by calling BatchPutMessage . The resulting array can't have more than 10 messages."
        },
        "roleArn": {
          "type": "string",
          "description": "The ARN of the role that grants IoT permission to send an input to an IoT Events detector. (\"Action\":\"iotevents:BatchPutMessage\")."
        }
      },
      "required": [
        "inputName",
        "roleArn"
      ]
    },
    "IotSiteWiseAction": {
      "type": "object",
      "properties": {
        "putAssetPropertyValueEntries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PutAssetPropertyValueEntry"
          },
          "description": "A list of asset property value entries."
        },
        "roleArn": {
          "type": "string",
          "description": "The ARN of the role that grants IoT permission to send an asset property value to IoT SiteWise. (\"Action\": \"iotsitewise:BatchPutAssetPropertyValue\"). The trust policy can restrict access to specific asset hierarchy paths."
        }
      },
      "required": [
        "putAssetPropertyValueEntries",
        "roleArn"
      ]
    },
    "KafkaAction": {
      "type": "object",
      "properties": {
        "destinationArn": {
          "type": "string",
          "description": "The ARN of Kafka action's VPC TopicRuleDestination."
        },
        "topic": {
          "type": "string",
          "description": "The Kafka topic for messages to be sent to the Kafka broker."
        },
        "key": {
          "type": "string",
          "description": "The Kafka message key."
        },
        "partition": {
          "type": "string",
          "description": "The Kafka message partition."
        },
        "clientProperties": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Properties of the Apache Kafka producer client."
        },
        "headers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/KafkaActionHeader"
          },
          "description": "The list of Kafka headers that you specify."
        }
      },
      "required": [
        "destinationArn",
        "topic",
        "clientProperties"
      ]
    },
    "KafkaActionHeader": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The key of the Kafka header."
        },
        "value": {
          "type": "string",
          "description": "The value of the Kafka header."
        }
      },
      "required": [
        "key",
        "value"
      ]
    },
    "KinesisAction": {
      "type": "object",
      "properties": {
        "roleArn": {
          "type": "string",
          "description": "The ARN of the IAM role that grants access to the Amazon Kinesis stream."
        },
        "streamName": {
          "type": "string",
          "description": "The name of the Amazon Kinesis stream."
        },
        "partitionKey": {
          "type": "string",
          "description": "The partition key."
        }
      },
      "required": [
        "roleArn",
        "streamName"
      ]
    },
    "LambdaAction": {
      "type": "object",
      "properties": {
        "functionArn": {
          "type": "string",
          "description": "The ARN of the Lambda function."
        }
      },
      "required": [
        "functionArn"
      ]
    },
    "LocationAction": {
      "type": "object",
      "properties": {
        "roleArn": {
          "type": "string",
          "description": "The IAM role that grants permission to write to the Amazon Location resource."
        },
        "trackerName": {
          "type": "string",
          "description": "The name of the tracker resource in Amazon Location in which the location is updated."
        },
        "deviceId": {
          "type": "string",
          "description": "The unique ID of the device providing the location data."
        },
        "timestamp": {
          "$ref": "#/$defs/LocationTimestamp"
        },
        "latitude": {
          "type": "string",
          "description": "A string that evaluates to a double value that represents the latitude of the device's location."
        },
        "longitude": {
          "type": "string",
          "description": "A string that evaluates to a double value that represents the longitude of the device's location."
        }
      },
      "required": [
        "roleArn",
        "trackerName",
        "deviceId",
        "latitude",
        "longitude"
      ]
    },
    "LocationTimestamp": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string",
          "description": "An expression that returns a long epoch time value."
        },
        "unit": {
          "type": "string",
          "description": "The precision of the timestamp value that results from the expression described in value. Valid values: SECONDS | MILLISECONDS | MICROSECONDS | NANOSECONDS. The default is MILLISECONDS."
        }
      },
      "required": [
        "value"
      ]
    },
    "MqttHeaders": {
      "type": "object",
      "properties": {
        "payloadFormatIndicator": {
          "type": "string",
          "description": "An Enum string value that indicates whether the payload is formatted as UTF-8. Valid values are UNSPECIFIED_BYTES and UTF8_DATA. For more information, see Payload Format Indicator from the MQTT Version 5.0 specification. Supports substitution templates."
        },
        "contentType": {
          "type": "string",
          "description": "A UTF-8 encoded string that describes the content of the publishing message. For more information, see Content Type from the MQTT Version 5.0 specification. Supports substitution templates."
        },
        "responseTopic": {
          "type": "string",
          "description": "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 which the receiver should publish to as part of the request-response flow. The topic must not contain wildcard characters. For more information, see Response Topic from the MQTT Version 5.0 specification. Supports substitution templates."
        },
        "correlationData": {
          "type": "string",
          "description": "The base64-encoded binary data used by the sender of the request message to identify which request the response message is for when it's received. For more information, see Correlation Data from the MQTT Version 5.0 specification. This binary data must be based64-encoded. Supports substitution templates."
        },
        "messageExpiry": {
          "type": "string",
          "description": "A user-defined integer value that will persist a message at the message broker for a specified amount of time to ensure that the message will expire if it's no longer relevant to the subscriber. The value of messageExpiry represents the number of seconds before it expires. For more information about the limits of messageExpiry, see Amazon Web Services IoT Core message broker and protocol limits and quotas from the Amazon Web Services Reference Guide. Supports substitution templates."
        },
        "userProperties": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UserProperty"
          },
          "description": "An array of key-value pairs that you define in the MQTT5 header."
        }
      }
    },
    "OpenSearchAction": {
      "type": "object",
      "properties": {
        "roleArn": {
          "type": "string",
          "description": "The IAM role ARN that has access to OpenSearch."
        },
        "endpoint": {
          "type": "string",
          "description": "The endpoint of your OpenSearch domain."
        },
        "index": {
          "type": "string",
          "description": "The OpenSearch index where you want to store your data."
        },
        "type": {
          "type": "string",
          "description": "The type of document you are storing."
        },
        "id": {
          "type": "string",
          "description": "The unique identifier for the document you are storing."
        }
      },
      "required": [
        "roleArn",
        "endpoint",
        "index",
        "type",
        "id"
      ]
    },
    "PutAssetPropertyValueEntry": {
      "type": "object",
      "properties": {
        "entryId": {
          "type": "string",
          "description": "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."
        },
        "assetId": {
          "type": "string",
          "description": "The ID of the IoT SiteWise asset. You must specify either a propertyAlias or both an aliasId and a propertyId. Accepts substitution templates."
        },
        "propertyId": {
          "type": "string",
          "description": "The ID of the asset's property. You must specify either a propertyAlias or both an aliasId and a propertyId. Accepts substitution templates."
        },
        "propertyAlias": {
          "type": "string",
          "description": "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."
        },
        "propertyValues": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AssetPropertyValue"
          },
          "description": "A list of property values to insert that each contain timestamp, quality, and value (TQV) information."
        }
      },
      "required": [
        "propertyValues"
      ]
    },
    "PutItemInput": {
      "type": "object",
      "properties": {
        "tableName": {
          "type": "string",
          "description": "The table where the message data will be written."
        }
      },
      "required": [
        "tableName"
      ]
    },
    "RepublishAction": {
      "type": "object",
      "properties": {
        "roleArn": {
          "type": "string",
          "description": "The ARN of the IAM role that grants access."
        },
        "topic": {
          "type": "string",
          "description": "The name of the MQTT topic."
        },
        "qos": {
          "type": "integer",
          "description": "The Quality of Service (QoS) level to use when republishing messages. The default value is 0."
        },
        "headers": {
          "$ref": "#/$defs/MqttHeaders"
        }
      },
      "required": [
        "roleArn",
        "topic"
      ]
    },
    "S3Action": {
      "type": "object",
      "properties": {
        "roleArn": {
          "type": "string",
          "description": "The ARN of the IAM role that grants access."
        },
        "bucketName": {
          "type": "string",
          "description": "The Amazon S3 bucket."
        },
        "key": {
          "type": "string",
          "description": "The object key. For more information, see Actions, resources, and condition keys for Amazon S3."
        },
        "cannedAcl": {
          "type": "string",
          "enum": [
            "private",
            "public-read",
            "public-read-write",
            "aws-exec-read",
            "authenticated-read",
            "bucket-owner-read",
            "bucket-owner-full-control",
            "log-delivery-write"
          ],
          "description": "The Amazon S3 canned ACL that controls access to the object identified by the object key. For more information, see S3 canned ACLs."
        }
      },
      "required": [
        "roleArn",
        "bucketName",
        "key"
      ]
    },
    "SalesforceAction": {
      "type": "object",
      "properties": {
        "token": {
          "type": "string",
          "description": "The token used to authenticate access to the Salesforce IoT Cloud Input Stream. The token is available from the Salesforce IoT Cloud platform after creation of the Input Stream."
        },
        "url": {
          "type": "string",
          "description": "The URL exposed by the Salesforce IoT Cloud Input Stream. The URL is available from the Salesforce IoT Cloud platform after creation of the Input Stream."
        }
      },
      "required": [
        "token",
        "url"
      ]
    },
    "SigV4Authorization": {
      "type": "object",
      "properties": {
        "signingRegion": {
          "type": "string",
          "description": "The signing region."
        },
        "serviceName": {
          "type": "string",
          "description": "The service name to use while signing with Sig V4."
        },
        "roleArn": {
          "type": "string",
          "description": "The ARN of the signing role."
        }
      },
      "required": [
        "signingRegion",
        "serviceName",
        "roleArn"
      ]
    },
    "SnsAction": {
      "type": "object",
      "properties": {
        "targetArn": {
          "type": "string",
          "description": "The ARN of the SNS topic."
        },
        "roleArn": {
          "type": "string",
          "description": "The ARN of the IAM role that grants access."
        },
        "messageFormat": {
          "type": "string",
          "enum": [
            "RAW",
            "JSON"
          ],
          "description": "(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. To read more about SNS message formats, see https://docs.aws.amazon.com/sns/latest/dg/json-formats.html refer to their official documentation."
        }
      },
      "required": [
        "targetArn",
        "roleArn"
      ]
    },
    "SqsAction": {
      "type": "object",
      "properties": {
        "roleArn": {
          "type": "string",
          "description": "The ARN of the IAM role that grants access."
        },
        "queueUrl": {
          "type": "string",
          "description": "The URL of the Amazon SQS queue."
        },
        "useBase64": {
          "type": "boolean",
          "description": "Specifies whether to use Base64 encoding."
        }
      },
      "required": [
        "roleArn",
        "queueUrl"
      ]
    },
    "StepFunctionsAction": {
      "type": "object",
      "properties": {
        "executionNamePrefix": {
          "type": "string",
          "description": "(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."
        },
        "stateMachineName": {
          "type": "string",
          "description": "The name of the Step Functions state machine whose execution will be started."
        },
        "roleArn": {
          "type": "string",
          "description": "The ARN of the role that grants IoT permission to start execution of a state machine (\"Action\":\"states:StartExecution\")."
        }
      },
      "required": [
        "stateMachineName",
        "roleArn"
      ]
    },
    "TimestreamAction": {
      "type": "object",
      "properties": {
        "roleArn": {
          "type": "string",
          "description": "The ARN of the role that grants permission to write to the Amazon Timestream database table."
        },
        "databaseName": {
          "type": "string",
          "description": "The name of an Amazon Timestream database."
        },
        "tableName": {
          "type": "string",
          "description": "The name of the database table into which to write the measure records."
        },
        "dimensions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TimestreamDimension"
          },
          "description": "Metadata attributes of the time series that are written in each measure record."
        },
        "timestamp": {
          "$ref": "#/$defs/TimestreamTimestamp"
        }
      },
      "required": [
        "roleArn",
        "databaseName",
        "tableName",
        "dimensions"
      ]
    },
    "TimestreamDimension": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The metadata dimension name. This is the name of the column in the Amazon Timestream database table record. Dimensions cannot be named: measure_name, measure_value, or time. These names are reserved. Dimension names cannot start with ts_ or measure_value and they cannot contain the colon (:) character."
        },
        "value": {
          "type": "string",
          "description": "The value to write in this column of the database record."
        }
      },
      "required": [
        "name",
        "value"
      ]
    },
    "TimestreamTimestamp": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string",
          "description": "An expression that returns a long epoch time value."
        },
        "unit": {
          "type": "string",
          "description": "The precision of the timestamp value that results from the expression described in value. Valid values: SECONDS | MILLISECONDS | MICROSECONDS | NANOSECONDS. The default is MILLISECONDS."
        }
      },
      "required": [
        "value",
        "unit"
      ]
    },
    "TopicRulePayload": {
      "type": "object",
      "properties": {
        "sql": {
          "type": "string",
          "description": "The SQL statement used to query the topic. For more information, see IoT SQL Reference in the IoT Developer Guide."
        },
        "description": {
          "type": "string",
          "description": "The description of the rule."
        },
        "actions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Action"
          },
          "description": "The actions associated with the rule."
        },
        "ruleDisabled": {
          "type": "boolean",
          "description": "Specifies whether the rule is disabled."
        },
        "awsIotSqlVersion": {
          "type": "string",
          "description": "The version of the SQL rules engine to use when evaluating the rule."
        },
        "errorAction": {
          "$ref": "#/$defs/Action"
        }
      },
      "required": [
        "sql",
        "actions"
      ]
    },
    "UserProperty": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "A key to be specified in UserProperty."
        },
        "value": {
          "type": "string",
          "description": "A value to be specified in UserProperty."
        }
      },
      "required": [
        "key",
        "value"
      ]
    }
  }
}