Show / Hide Table of Contents

Class CfnTopicRule.ActionProperty

Describes the actions associated with a rule.

Inheritance
object
CfnTopicRule.ActionProperty
Implements
CfnTopicRule.IActionProperty
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.IoT
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnTopicRule.ActionProperty : CfnTopicRule.IActionProperty
Syntax (vb)
Public Class CfnTopicRule.ActionProperty Implements CfnTopicRule.IActionProperty
Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html

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

Constructors

ActionProperty()

Describes the actions associated with a rule.

Properties

CloudwatchAlarm

Change the state of a CloudWatch alarm.

CloudwatchLogs

Sends data to CloudWatch.

CloudwatchMetric

Capture a CloudWatch metric.

DynamoDBv2

Write to a DynamoDB table.

DynamoDb

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.

Constructors

ActionProperty()

Describes the actions associated with a rule.

public ActionProperty()
Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html

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"
                     }
                 }
             };

Properties

CloudwatchAlarm

Change the state of a CloudWatch alarm.

public object? CloudwatchAlarm { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-cloudwatchalarm

CloudwatchLogs

Sends data to CloudWatch.

public object? CloudwatchLogs { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-cloudwatchlogs

CloudwatchMetric

Capture a CloudWatch metric.

public object? CloudwatchMetric { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-cloudwatchmetric

DynamoDBv2

Write to a DynamoDB table.

public object? DynamoDBv2 { get; set; }
Property Value

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.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-dynamodbv2

DynamoDb

Write to a DynamoDB table.

public object? DynamoDb { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-dynamodb

Elasticsearch

Write data to an Amazon OpenSearch Service domain.

public object? Elasticsearch { get; set; }
Property Value

object

Remarks
The <code>Elasticsearch</code> action can only be used by existing rule actions. To create a new rule action or to update an existing rule action, use the <code>OpenSearch</code> rule action instead. For more information, see <a href="https://docs.aws.amazon.com//iot/latest/apireference/API_OpenSearchAction.html">OpenSearchAction</a> .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-elasticsearch

Firehose

Write to an Amazon Kinesis Firehose stream.

public object? Firehose { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-firehose

Http

Send data to an HTTPS endpoint.

public object? Http { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-http

IotAnalytics

Sends message data to an AWS IoT Analytics channel.

public object? IotAnalytics { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-iotanalytics

IotEvents

Sends an input to an AWS IoT Events detector.

public object? IotEvents { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-iotevents

IotSiteWise

Sends data from the MQTT message that triggered the rule to AWS IoT SiteWise asset properties.

public object? IotSiteWise { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-iotsitewise

Kafka

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

public object? Kafka { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-kafka

Kinesis

Write data to an Amazon Kinesis stream.

public object? Kinesis { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-kinesis

Lambda

Invoke a Lambda function.

public object? Lambda { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-lambda

Location

Sends device location data to Amazon Location Service .

public object? Location { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-location

OpenSearch

Write data to an Amazon OpenSearch Service domain.

public object? OpenSearch { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-opensearch

Republish

Publish to another MQTT topic.

public object? Republish { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-republish

S3

Write to an Amazon S3 bucket.

public object? S3 { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-s3

Sns

Publish to an Amazon SNS topic.

public object? Sns { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-sns

Sqs

Publish to an Amazon SQS queue.

public object? Sqs { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-sqs

StepFunctions

Starts execution of a Step Functions state machine.

public object? StepFunctions { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-stepfunctions

Timestream

Writes attributes from an MQTT message.

public object? Timestream { get; set; }
Property Value

object

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html#cfn-iot-topicrule-action-timestream

Implements

CfnTopicRule.IActionProperty
Back to top Generated by DocFX