{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/amazon-iot-events/refs/heads/main/json-schema/iot-events-alarm-action-schema.json", "title": "AlarmAction", "description": "Specifies one of the following actions to receive notifications when the alarm state changes.", "type": "object", "properties": { "sns": { "type": "object", "required": [ "targetArn" ], "properties": { "targetArn": { "allOf": [ { "$ref": "#/components/schemas/AmazonResourceName" }, { "description": "The ARN of the Amazon SNS target where the message is sent." } ] }, "payload": { "allOf": [ { "$ref": "#/components/schemas/Payload" }, { "description": "You can configure the action payload when you send a message as an Amazon SNS push notification." } ] } }, "description": "Information required to publish the Amazon SNS message." }, "iotTopicPublish": { "type": "object", "required": [ "mqttTopic" ], "properties": { "mqttTopic": { "allOf": [ { "$ref": "#/components/schemas/MQTTTopic" }, { "description": "The MQTT topic of the message. You can use a string expression that includes variables ($variable.<variable-name>) and input values ($input.<input-name>.<path-to-datum>) as the topic string." } ] }, "payload": { "allOf": [ { "$ref": "#/components/schemas/Payload" }, { "description": "You can configure the action payload when you publish a message to an AWS IoT Core topic." } ] } }, "description": "Information required to publish the MQTT message through the AWS IoT message broker." }, "lambda": { "type": "object", "required": [ "functionArn" ], "properties": { "functionArn": { "allOf": [ { "$ref": "#/components/schemas/AmazonResourceName" }, { "description": "The ARN of the Lambda function that is executed." } ] }, "payload": { "allOf": [ { "$ref": "#/components/schemas/Payload" }, { "description": "You can configure the action payload when you send a message to a Lambda function." } ] } }, "description": "Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action." }, "iotEvents": { "type": "object", "required": [ "inputName" ], "properties": { "inputName": { "allOf": [ { "$ref": "#/components/schemas/InputName" }, { "description": "The name of the AWS IoT Events input where the data is sent." } ] }, "payload": { "allOf": [ { "$ref": "#/components/schemas/Payload" }, { "description": "You can configure the action payload when you send a message to an AWS IoT Events input." } ] } }, "description": "Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action." }, "sqs": { "type": "object", "required": [ "queueUrl" ], "properties": { "queueUrl": { "allOf": [ { "$ref": "#/components/schemas/QueueUrl" }, { "description": "The URL of the SQS queue where the data is written." } ] }, "useBase64": { "allOf": [ { "$ref": "#/components/schemas/UseBase64" }, { "description": "Set this to TRUE if you want the data to be base-64 encoded before it is written to the queue. Otherwise, set this to FALSE." } ] }, "payload": { "allOf": [ { "$ref": "#/components/schemas/Payload" }, { "description": "You can configure the action payload when you send a message to an Amazon SQS queue." } ] } }, "description": "Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue." }, "firehose": { "type": "object", "required": [ "deliveryStreamName" ], "properties": { "deliveryStreamName": { "allOf": [ { "$ref": "#/components/schemas/DeliveryStreamName" }, { "description": "The name of the Kinesis Data Firehose delivery stream where the data is written." } ] }, "separator": { "allOf": [ { "$ref": "#/components/schemas/FirehoseSeparator" }, { "description": "A character separator that is used to separate records written to the Kinesis Data Firehose delivery stream. Valid values are: '\\n' (newline), '\\t' (tab), '\\r\\n' (Windows newline), ',' (comma)." } ] }, "payload": { "allOf": [ { "$ref": "#/components/schemas/Payload" }, { "description": "You can configure the action payload when you send a message to an Amazon Kinesis Data Firehose delivery stream." } ] } }, "description": "Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream." }, "dynamoDB": { "type": "object", "required": [ "hashKeyField", "hashKeyValue", "tableName" ], "properties": { "hashKeyType": { "allOf": [ { "$ref": "#/components/schemas/DynamoKeyType" }, { "description": "

The data type for the hash key (also called the partition key). You can specify the following values:

If you don't specify hashKeyType, the default value is 'STRING'.

" } ] }, "hashKeyField": { "allOf": [ { "$ref": "#/components/schemas/DynamoKeyField" }, { "description": "The name of the hash key (also called the partition key). The hashKeyField value must match the partition key of the target DynamoDB table." } ] }, "hashKeyValue": { "allOf": [ { "$ref": "#/components/schemas/DynamoKeyValue" }, { "description": "The value of the hash key (also called the partition key)." } ] }, "rangeKeyType": { "allOf": [ { "$ref": "#/components/schemas/DynamoKeyType" }, { "description": "

The data type for the range key (also called the sort key), You can specify the following values:

If you don't specify rangeKeyField, the default value is 'STRING'.

" } ] }, "rangeKeyField": { "allOf": [ { "$ref": "#/components/schemas/DynamoKeyField" }, { "description": "The name of the range key (also called the sort key). The rangeKeyField value must match the sort key of the target DynamoDB table. " } ] }, "rangeKeyValue": { "allOf": [ { "$ref": "#/components/schemas/DynamoKeyValue" }, { "description": "The value of the range key (also called the sort key)." } ] }, "operation": { "allOf": [ { "$ref": "#/components/schemas/DynamoOperation" }, { "description": "

The type of operation to perform. You can specify the following values:

If you don't specify this parameter, AWS IoT Events triggers the 'INSERT' operation.

" } ] }, "payloadField": { "allOf": [ { "$ref": "#/components/schemas/DynamoKeyField" }, { "description": "

The name of the DynamoDB column that receives the action payload.

If you don't specify this parameter, the name of the DynamoDB column is payload.

" } ] }, "tableName": { "allOf": [ { "$ref": "#/components/schemas/DynamoTableName" }, { "description": "The name of the DynamoDB table. The tableName value must match the table name of the target DynamoDB table. " } ] }, "payload": { "$ref": "#/components/schemas/Payload" } }, "description": "

Defines an action to write to the Amazon DynamoDB table that you created. The standard action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the payload. One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify.

You must use expressions for all parameters in DynamoDBAction. The expressions accept literals, operators, functions, references, and substitution templates.

Examples

For more information, see Expressions in the AWS IoT Events Developer Guide.

If the defined payload type is a string, DynamoDBAction writes non-JSON data to the DynamoDB table as binary data. The DynamoDB console displays the data as Base64-encoded text. The value for the payloadField parameter is <payload-field>_raw.

" }, "dynamoDBv2": { "type": "object", "required": [ "tableName" ], "properties": { "tableName": { "allOf": [ { "$ref": "#/components/schemas/DynamoTableName" }, { "description": "The name of the DynamoDB table." } ] }, "payload": { "$ref": "#/components/schemas/Payload" } }, "description": "

Defines an action to write to the Amazon DynamoDB table that you created. The default action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the payload. A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify.

You must use expressions for all parameters in DynamoDBv2Action. The expressions accept literals, operators, functions, references, and substitution templates.

Examples

For more information, see Expressions in the AWS IoT Events Developer Guide.

The value for the type parameter in Payload must be JSON.

" }, "iotSiteWise": { "type": "object", "properties": { "entryId": { "allOf": [ { "$ref": "#/components/schemas/AssetPropertyEntryId" }, { "description": "A unique identifier for this entry. You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier." } ] }, "assetId": { "allOf": [ { "$ref": "#/components/schemas/AssetId" }, { "description": "The ID of the asset that has the specified property." } ] }, "propertyId": { "allOf": [ { "$ref": "#/components/schemas/AssetPropertyId" }, { "description": "The ID of the asset property." } ] }, "propertyAlias": { "allOf": [ { "$ref": "#/components/schemas/AssetPropertyAlias" }, { "description": "The alias of the asset property." } ] }, "propertyValue": { "allOf": [ { "$ref": "#/components/schemas/AssetPropertyValue" }, { "description": "The value to send to the asset property. This value contains timestamp, quality, and value (TQV) information. " } ] } }, "description": "

Sends information about the detector model instance and the event that triggered the action to a specified asset property in AWS IoT SiteWise.

You must use expressions for all parameters in IotSiteWiseAction. The expressions accept literals, operators, functions, references, and substitutions templates.

Examples

You must specify either propertyAlias or both assetId and propertyId to identify the target asset property in AWS IoT SiteWise.

For more information, see Expressions in the AWS IoT Events Developer Guide.

" } } }