interface ActionProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.IoT.CfnTopicRule.ActionProperty |
Java | software.amazon.awscdk.services.iot.CfnTopicRule.ActionProperty |
Python | aws_cdk.aws_iot.CfnTopicRule.ActionProperty |
TypeScript | @aws-cdk/aws-iot » CfnTopicRule » ActionProperty |
Describes the actions associated with a rule.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as iot from '@aws-cdk/aws-iot';
const actionProperty: iot.CfnTopicRule.ActionProperty = {
cloudwatchAlarm: {
alarmName: 'alarmName',
roleArn: 'roleArn',
stateReason: 'stateReason',
stateValue: 'stateValue',
},
cloudwatchLogs: {
logGroupName: 'logGroupName',
roleArn: 'roleArn',
// the properties below are optional
batchMode: false,
},
cloudwatchMetric: {
metricName: 'metricName',
metricNamespace: 'metricNamespace',
metricUnit: 'metricUnit',
metricValue: 'metricValue',
roleArn: 'roleArn',
// the properties below are optional
metricTimestamp: 'metricTimestamp',
},
dynamoDb: {
hashKeyField: 'hashKeyField',
hashKeyValue: 'hashKeyValue',
roleArn: 'roleArn',
tableName: 'tableName',
// the properties below are optional
hashKeyType: 'hashKeyType',
payloadField: 'payloadField',
rangeKeyField: 'rangeKeyField',
rangeKeyType: 'rangeKeyType',
rangeKeyValue: 'rangeKeyValue',
},
dynamoDBv2: {
putItem: {
tableName: 'tableName',
},
roleArn: 'roleArn',
},
elasticsearch: {
endpoint: 'endpoint',
id: 'id',
index: 'index',
roleArn: 'roleArn',
type: 'type',
},
firehose: {
deliveryStreamName: 'deliveryStreamName',
roleArn: 'roleArn',
// the properties below are optional
batchMode: false,
separator: 'separator',
},
http: {
url: 'url',
// the properties below are optional
auth: {
sigv4: {
roleArn: 'roleArn',
serviceName: 'serviceName',
signingRegion: 'signingRegion',
},
},
confirmationUrl: 'confirmationUrl',
headers: [{
key: 'key',
value: 'value',
}],
},
iotAnalytics: {
channelName: 'channelName',
roleArn: 'roleArn',
// the properties below are optional
batchMode: false,
},
iotEvents: {
inputName: 'inputName',
roleArn: 'roleArn',
// the properties below are optional
batchMode: false,
messageId: 'messageId',
},
iotSiteWise: {
putAssetPropertyValueEntries: [{
propertyValues: [{
timestamp: {
timeInSeconds: 'timeInSeconds',
// the properties below are optional
offsetInNanos: 'offsetInNanos',
},
value: {
booleanValue: 'booleanValue',
doubleValue: 'doubleValue',
integerValue: 'integerValue',
stringValue: 'stringValue',
},
// the properties below are optional
quality: 'quality',
}],
// the properties below are optional
assetId: 'assetId',
entryId: 'entryId',
propertyAlias: 'propertyAlias',
propertyId: 'propertyId',
}],
roleArn: 'roleArn',
},
kafka: {
clientProperties: {
clientPropertiesKey: 'clientProperties',
},
destinationArn: 'destinationArn',
topic: 'topic',
// the properties below are optional
key: 'key',
partition: 'partition',
},
kinesis: {
roleArn: 'roleArn',
streamName: 'streamName',
// the properties below are optional
partitionKey: 'partitionKey',
},
lambda: {
functionArn: 'functionArn',
},
location: {
deviceId: 'deviceId',
latitude: 'latitude',
longitude: 'longitude',
roleArn: 'roleArn',
trackerName: 'trackerName',
// the properties below are optional
timestamp: new Date(),
},
openSearch: {
endpoint: 'endpoint',
id: 'id',
index: 'index',
roleArn: 'roleArn',
type: 'type',
},
republish: {
roleArn: 'roleArn',
topic: 'topic',
// the properties below are optional
headers: {
contentType: 'contentType',
correlationData: 'correlationData',
messageExpiry: 'messageExpiry',
payloadFormatIndicator: 'payloadFormatIndicator',
responseTopic: 'responseTopic',
userProperties: [{
key: 'key',
value: 'value',
}],
},
qos: 123,
},
s3: {
bucketName: 'bucketName',
key: 'key',
roleArn: 'roleArn',
// the properties below are optional
cannedAcl: 'cannedAcl',
},
sns: {
roleArn: 'roleArn',
targetArn: 'targetArn',
// the properties below are optional
messageFormat: 'messageFormat',
},
sqs: {
queueUrl: 'queueUrl',
roleArn: 'roleArn',
// the properties below are optional
useBase64: false,
},
stepFunctions: {
roleArn: 'roleArn',
stateMachineName: 'stateMachineName',
// the properties below are optional
executionNamePrefix: 'executionNamePrefix',
},
timestream: {
databaseName: 'databaseName',
dimensions: [{
name: 'name',
value: 'value',
}],
roleArn: 'roleArn',
tableName: 'tableName',
// the properties below are optional
timestamp: {
unit: 'unit',
value: 'value',
},
},
};
Properties
Name | Type | Description |
---|---|---|
cloudwatch | IResolvable | Cloudwatch | Change the state of a CloudWatch alarm. |
cloudwatch | IResolvable | Cloudwatch | Sends data to CloudWatch. |
cloudwatch | IResolvable | Cloudwatch | Capture a CloudWatch metric. |
dynamo | IResolvable | Dynamo | Write to a DynamoDB table. |
dynamo | IResolvable | Dynamo | Write to a DynamoDB table. |
elasticsearch? | IResolvable | Elasticsearch | Write data to an Amazon OpenSearch Service domain. |
firehose? | IResolvable | Firehose | Write to an Amazon Kinesis Firehose stream. |
http? | IResolvable | Http | Send data to an HTTPS endpoint. |
iot | IResolvable | Iot | Sends message data to an AWS IoT Analytics channel. |
iot | IResolvable | Iot | Sends an input to an AWS IoT Events detector. |
iot | IResolvable | Iot | Sends data from the MQTT message that triggered the rule to AWS IoT SiteWise asset properties. |
kafka? | IResolvable | Kafka | Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon MSK) or self-managed Apache Kafka cluster. |
kinesis? | IResolvable | Kinesis | Write data to an Amazon Kinesis stream. |
lambda? | IResolvable | Lambda | Invoke a Lambda function. |
location? | IResolvable | Location | Sends device location data to Amazon Location Service . |
open | IResolvable | Open | Write data to an Amazon OpenSearch Service domain. |
republish? | IResolvable | Republish | Publish to another MQTT topic. |
s3? | IResolvable | S3 | Write to an Amazon S3 bucket. |
sns? | IResolvable | Sns | Publish to an Amazon SNS topic. |
sqs? | IResolvable | Sqs | Publish to an Amazon SQS queue. |
step | IResolvable | Step | Starts execution of a Step Functions state machine. |
timestream? | IResolvable | Timestream | Writes attributes from an MQTT message. |
cloudwatchAlarm?
Type:
IResolvable
|
Cloudwatch
(optional)
Change the state of a CloudWatch alarm.
cloudwatchLogs?
Type:
IResolvable
|
Cloudwatch
(optional)
Sends data to CloudWatch.
cloudwatchMetric?
Type:
IResolvable
|
Cloudwatch
(optional)
Capture a CloudWatch metric.
dynamoDBv2?
Type:
IResolvable
|
Dynamo
(optional)
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.
dynamoDb?
Type:
IResolvable
|
Dynamo
(optional)
Write to a DynamoDB table.
elasticsearch?
Type:
IResolvable
|
Elasticsearch
(optional)
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 theOpenSearch
rule action instead. For more information, see OpenSearchAction .
firehose?
Type:
IResolvable
|
Firehose
(optional)
Write to an Amazon Kinesis Firehose stream.
http?
Type:
IResolvable
|
Http
(optional)
Send data to an HTTPS endpoint.
iotAnalytics?
Type:
IResolvable
|
Iot
(optional)
Sends message data to an AWS IoT Analytics channel.
iotEvents?
Type:
IResolvable
|
Iot
(optional)
Sends an input to an AWS IoT Events detector.
iotSiteWise?
Type:
IResolvable
|
Iot
(optional)
Sends data from the MQTT message that triggered the rule to AWS IoT SiteWise asset properties.
kafka?
Type:
IResolvable
|
Kafka
(optional)
Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon MSK) or self-managed Apache Kafka cluster.
kinesis?
Type:
IResolvable
|
Kinesis
(optional)
Write data to an Amazon Kinesis stream.
lambda?
Type:
IResolvable
|
Lambda
(optional)
Invoke a Lambda function.
location?
Type:
IResolvable
|
Location
(optional)
Sends device location data to Amazon Location Service .
openSearch?
Type:
IResolvable
|
Open
(optional)
Write data to an Amazon OpenSearch Service domain.
republish?
Type:
IResolvable
|
Republish
(optional)
Publish to another MQTT topic.
s3?
Type:
IResolvable
|
S3
(optional)
Write to an Amazon S3 bucket.
sns?
Type:
IResolvable
|
Sns
(optional)
Publish to an Amazon SNS topic.
sqs?
Type:
IResolvable
|
Sqs
(optional)
Publish to an Amazon SQS queue.
stepFunctions?
Type:
IResolvable
|
Step
(optional)
Starts execution of a Step Functions state machine.
timestream?
Type:
IResolvable
|
Timestream
(optional)
Writes attributes from an MQTT message.