Interface CfnTopicRule.IActionProperty
Describes the actions associated with a rule.
Namespace: Amazon.CDK.AWS.IoT
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IActionProperty
Syntax (vb)
Public Interface IActionProperty
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IoT;
var actionProperty = new ActionProperty {
CloudwatchAlarm = new CloudwatchAlarmActionProperty {
AlarmName = "alarmName",
RoleArn = "roleArn",
StateReason = "stateReason",
StateValue = "stateValue"
},
CloudwatchLogs = new CloudwatchLogsActionProperty {
LogGroupName = "logGroupName",
RoleArn = "roleArn",
// the properties below are optional
BatchMode = false
},
CloudwatchMetric = new CloudwatchMetricActionProperty {
MetricName = "metricName",
MetricNamespace = "metricNamespace",
MetricUnit = "metricUnit",
MetricValue = "metricValue",
RoleArn = "roleArn",
// the properties below are optional
MetricTimestamp = "metricTimestamp"
},
DynamoDb = new DynamoDBActionProperty {
HashKeyField = "hashKeyField",
HashKeyValue = "hashKeyValue",
RoleArn = "roleArn",
TableName = "tableName",
// the properties below are optional
HashKeyType = "hashKeyType",
PayloadField = "payloadField",
RangeKeyField = "rangeKeyField",
RangeKeyType = "rangeKeyType",
RangeKeyValue = "rangeKeyValue"
},
DynamoDBv2 = new DynamoDBv2ActionProperty {
PutItem = new PutItemInputProperty {
TableName = "tableName"
},
RoleArn = "roleArn"
},
Elasticsearch = new ElasticsearchActionProperty {
Endpoint = "endpoint",
Id = "id",
Index = "index",
RoleArn = "roleArn",
Type = "type"
},
Firehose = new FirehoseActionProperty {
DeliveryStreamName = "deliveryStreamName",
RoleArn = "roleArn",
// the properties below are optional
BatchMode = false,
Separator = "separator"
},
Http = new HttpActionProperty {
Url = "url",
// the properties below are optional
Auth = new HttpAuthorizationProperty {
Sigv4 = new SigV4AuthorizationProperty {
RoleArn = "roleArn",
ServiceName = "serviceName",
SigningRegion = "signingRegion"
}
},
ConfirmationUrl = "confirmationUrl",
Headers = new [] { new HttpActionHeaderProperty {
Key = "key",
Value = "value"
} }
},
IotAnalytics = new IotAnalyticsActionProperty {
ChannelName = "channelName",
RoleArn = "roleArn",
// the properties below are optional
BatchMode = false
},
IotEvents = new IotEventsActionProperty {
InputName = "inputName",
RoleArn = "roleArn",
// the properties below are optional
BatchMode = false,
MessageId = "messageId"
},
IotSiteWise = new IotSiteWiseActionProperty {
PutAssetPropertyValueEntries = new [] { new PutAssetPropertyValueEntryProperty {
PropertyValues = new [] { new AssetPropertyValueProperty {
Timestamp = new AssetPropertyTimestampProperty {
TimeInSeconds = "timeInSeconds",
// the properties below are optional
OffsetInNanos = "offsetInNanos"
},
Value = new AssetPropertyVariantProperty {
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 = new KafkaActionProperty {
ClientProperties = new Dictionary<string, string> {
{ "clientPropertiesKey", "clientProperties" }
},
DestinationArn = "destinationArn",
Topic = "topic",
// the properties below are optional
Headers = new [] { new KafkaActionHeaderProperty {
Key = "key",
Value = "value"
} },
Key = "key",
Partition = "partition"
},
Kinesis = new KinesisActionProperty {
RoleArn = "roleArn",
StreamName = "streamName",
// the properties below are optional
PartitionKey = "partitionKey"
},
Lambda = new LambdaActionProperty {
FunctionArn = "functionArn"
},
Location = new LocationActionProperty {
DeviceId = "deviceId",
Latitude = "latitude",
Longitude = "longitude",
RoleArn = "roleArn",
TrackerName = "trackerName",
// the properties below are optional
Timestamp = new TimestampProperty {
Value = "value",
// the properties below are optional
Unit = "unit"
}
},
OpenSearch = new OpenSearchActionProperty {
Endpoint = "endpoint",
Id = "id",
Index = "index",
RoleArn = "roleArn",
Type = "type"
},
Republish = new RepublishActionProperty {
RoleArn = "roleArn",
Topic = "topic",
// the properties below are optional
Headers = new RepublishActionHeadersProperty {
ContentType = "contentType",
CorrelationData = "correlationData",
MessageExpiry = "messageExpiry",
PayloadFormatIndicator = "payloadFormatIndicator",
ResponseTopic = "responseTopic",
UserProperties = new [] { new UserPropertyProperty {
Key = "key",
Value = "value"
} }
},
Qos = 123
},
S3 = new S3ActionProperty {
BucketName = "bucketName",
Key = "key",
RoleArn = "roleArn",
// the properties below are optional
CannedAcl = "cannedAcl"
},
Sns = new SnsActionProperty {
RoleArn = "roleArn",
TargetArn = "targetArn",
// the properties below are optional
MessageFormat = "messageFormat"
},
Sqs = new SqsActionProperty {
QueueUrl = "queueUrl",
RoleArn = "roleArn",
// the properties below are optional
UseBase64 = false
},
StepFunctions = new StepFunctionsActionProperty {
RoleArn = "roleArn",
StateMachineName = "stateMachineName",
// the properties below are optional
ExecutionNamePrefix = "executionNamePrefix"
},
Timestream = new TimestreamActionProperty {
DatabaseName = "databaseName",
Dimensions = new [] { new TimestreamDimensionProperty {
Name = "name",
Value = "value"
} },
RoleArn = "roleArn",
TableName = "tableName",
// the properties below are optional
Timestamp = new TimestreamTimestampProperty {
Unit = "unit",
Value = "value"
}
}
};
Synopsis
Properties
CloudwatchAlarm | Change the state of a CloudWatch alarm. |
CloudwatchLogs | Sends data to CloudWatch. |
CloudwatchMetric | Capture a CloudWatch metric. |
DynamoDb | Write to a DynamoDB table. |
DynamoDBv2 | Write to a DynamoDB table. |
Elasticsearch | Write data to an Amazon OpenSearch Service domain. |
Firehose | Write to an Amazon Kinesis Firehose stream. |
Http | Send data to an HTTPS endpoint. |
IotAnalytics | Sends message data to an AWS IoT Analytics channel. |
IotEvents | Sends an input to an AWS IoT Events detector. |
IotSiteWise | Sends data from the MQTT message that triggered the rule to AWS IoT SiteWise asset properties. |
Kafka | Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon MSK) or self-managed Apache Kafka cluster. |
Kinesis | Write data to an Amazon Kinesis stream. |
Lambda | Invoke a Lambda function. |
Location | Sends device location data to Amazon Location Service . |
OpenSearch | Write data to an Amazon OpenSearch Service domain. |
Republish | Publish to another MQTT topic. |
S3 | Write to an Amazon S3 bucket. |
Sns | Publish to an Amazon SNS topic. |
Sqs | Publish to an Amazon SQS queue. |
StepFunctions | Starts execution of a Step Functions state machine. |
Timestream | Writes attributes from an MQTT message. |
Properties
CloudwatchAlarm
Change the state of a CloudWatch alarm.
virtual object CloudwatchAlarm { get; }
Property Value
System.Object
Remarks
CloudwatchLogs
Sends data to CloudWatch.
virtual object CloudwatchLogs { get; }
Property Value
System.Object
Remarks
CloudwatchMetric
Capture a CloudWatch metric.
virtual object CloudwatchMetric { get; }
Property Value
System.Object
Remarks
DynamoDb
Write to a DynamoDB table.
virtual object DynamoDb { get; }
Property Value
System.Object
Remarks
DynamoDBv2
Write to a DynamoDB table.
virtual object DynamoDBv2 { get; }
Property Value
System.Object
Remarks
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.
Elasticsearch
Write data to an Amazon OpenSearch Service domain.
virtual object Elasticsearch { get; }
Property Value
System.Object
Remarks
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 .
Firehose
Write to an Amazon Kinesis Firehose stream.
virtual object Firehose { get; }
Property Value
System.Object
Remarks
Http
Send data to an HTTPS endpoint.
virtual object Http { get; }
Property Value
System.Object
Remarks
IotAnalytics
Sends message data to an AWS IoT Analytics channel.
virtual object IotAnalytics { get; }
Property Value
System.Object
Remarks
IotEvents
Sends an input to an AWS IoT Events detector.
virtual object IotEvents { get; }
Property Value
System.Object
Remarks
IotSiteWise
Sends data from the MQTT message that triggered the rule to AWS IoT SiteWise asset properties.
virtual object IotSiteWise { get; }
Property Value
System.Object
Remarks
Kafka
Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon MSK) or self-managed Apache Kafka cluster.
virtual object Kafka { get; }
Property Value
System.Object
Remarks
Kinesis
Write data to an Amazon Kinesis stream.
virtual object Kinesis { get; }
Property Value
System.Object
Remarks
Lambda
Invoke a Lambda function.
virtual object Lambda { get; }
Property Value
System.Object
Remarks
Location
Sends device location data to Amazon Location Service .
virtual object Location { get; }
Property Value
System.Object
Remarks
OpenSearch
Write data to an Amazon OpenSearch Service domain.
virtual object OpenSearch { get; }
Property Value
System.Object
Remarks
Republish
Publish to another MQTT topic.
virtual object Republish { get; }
Property Value
System.Object
Remarks
S3
Write to an Amazon S3 bucket.
virtual object S3 { get; }
Property Value
System.Object
Remarks
Sns
Publish to an Amazon SNS topic.
virtual object Sns { get; }
Property Value
System.Object
Remarks
Sqs
Publish to an Amazon SQS queue.
virtual object Sqs { get; }
Property Value
System.Object
Remarks
StepFunctions
Starts execution of a Step Functions state machine.
virtual object StepFunctions { get; }
Property Value
System.Object
Remarks
Timestream
Writes attributes from an MQTT message.
virtual object Timestream { get; }
Property Value
System.Object