Skip to content
v2.278.0

ActionProperty Struct ​

Describes the actions associated with a rule.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iot as iot } from 'aws-cdk-lib';
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',
      },
    },
    batchConfig: {
      batchAcrossTopics: false,
      maxBatchOpenMs: 123,
      maxBatchSize: 123,
      maxBatchSizeBytes: 123,
    },
    confirmationUrl: 'confirmationUrl',
    enableBatching: false,
    headers: [{
      key: 'key',
      value: 'value',
    }],
  },
  influxDb: {
    databaseName: 'databaseName',
    destinationArn: 'destinationArn',
    roleArn: 'roleArn',
    tableName: 'tableName',

    // the properties below are optional
    batchConfig: {
      batchAcrossTopics: false,
      maxBatchOpenMs: 123,
      maxBatchSize: 123,
      maxBatchSizeBytes: 123,
    },
    organization: 'organization',
    tags: {
      tagsKey: 'tags',
    },
    timestampUnit: 'timestampUnit',
  },
  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
    headers: [{
      key: 'key',
      value: 'value',
    }],
    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: {
      value: 'value',

      // the properties below are optional
      unit: 'unit',
    },
  },
  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',
    },
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iot as iot

action_property = iot.CfnTopicRule.ActionProperty(
    cloudwatch_alarm=iot.CfnTopicRule.CloudwatchAlarmActionProperty(
        alarm_name="alarmName",
        role_arn="roleArn",
        state_reason="stateReason",
        state_value="stateValue"
    ),
    cloudwatch_logs=iot.CfnTopicRule.CloudwatchLogsActionProperty(
        log_group_name="logGroupName",
        role_arn="roleArn",

        # the properties below are optional
        batch_mode=False
    ),
    cloudwatch_metric=iot.CfnTopicRule.CloudwatchMetricActionProperty(
        metric_name="metricName",
        metric_namespace="metricNamespace",
        metric_unit="metricUnit",
        metric_value="metricValue",
        role_arn="roleArn",

        # the properties below are optional
        metric_timestamp="metricTimestamp"
    ),
    dynamo_db=iot.CfnTopicRule.DynamoDBActionProperty(
        hash_key_field="hashKeyField",
        hash_key_value="hashKeyValue",
        role_arn="roleArn",
        table_name="tableName",

        # the properties below are optional
        hash_key_type="hashKeyType",
        payload_field="payloadField",
        range_key_field="rangeKeyField",
        range_key_type="rangeKeyType",
        range_key_value="rangeKeyValue"
    ),
    dynamo_d_bv2=iot.CfnTopicRule.DynamoDBv2ActionProperty(
        put_item=iot.CfnTopicRule.PutItemInputProperty(
            table_name="tableName"
        ),
        role_arn="roleArn"
    ),
    elasticsearch=iot.CfnTopicRule.ElasticsearchActionProperty(
        endpoint="endpoint",
        id="id",
        index="index",
        role_arn="roleArn",
        type="type"
    ),
    firehose=iot.CfnTopicRule.FirehoseActionProperty(
        delivery_stream_name="deliveryStreamName",
        role_arn="roleArn",

        # the properties below are optional
        batch_mode=False,
        separator="separator"
    ),
    http=iot.CfnTopicRule.HttpActionProperty(
        url="url",

        # the properties below are optional
        auth=iot.CfnTopicRule.HttpAuthorizationProperty(
            sigv4=iot.CfnTopicRule.SigV4AuthorizationProperty(
                role_arn="roleArn",
                service_name="serviceName",
                signing_region="signingRegion"
            )
        ),
        batch_config=iot.CfnTopicRule.BatchConfigProperty(
            batch_across_topics=False,
            max_batch_open_ms=123,
            max_batch_size=123,
            max_batch_size_bytes=123
        ),
        confirmation_url="confirmationUrl",
        enable_batching=False,
        headers=[iot.CfnTopicRule.HttpActionHeaderProperty(
            key="key",
            value="value"
        )]
    ),
    influx_db=iot.CfnTopicRule.InfluxDBActionProperty(
        database_name="databaseName",
        destination_arn="destinationArn",
        role_arn="roleArn",
        table_name="tableName",

        # the properties below are optional
        batch_config=iot.CfnTopicRule.InfluxDBBatchConfigProperty(
            batch_across_topics=False,
            max_batch_open_ms=123,
            max_batch_size=123,
            max_batch_size_bytes=123
        ),
        organization="organization",
        tags={
            "tags_key": "tags"
        },
        timestamp_unit="timestampUnit"
    ),
    iot_analytics=iot.CfnTopicRule.IotAnalyticsActionProperty(
        channel_name="channelName",
        role_arn="roleArn",

        # the properties below are optional
        batch_mode=False
    ),
    iot_events=iot.CfnTopicRule.IotEventsActionProperty(
        input_name="inputName",
        role_arn="roleArn",

        # the properties below are optional
        batch_mode=False,
        message_id="messageId"
    ),
    iot_site_wise=iot.CfnTopicRule.IotSiteWiseActionProperty(
        put_asset_property_value_entries=[iot.CfnTopicRule.PutAssetPropertyValueEntryProperty(
            property_values=[iot.CfnTopicRule.AssetPropertyValueProperty(
                timestamp=iot.CfnTopicRule.AssetPropertyTimestampProperty(
                    time_in_seconds="timeInSeconds",

                    # the properties below are optional
                    offset_in_nanos="offsetInNanos"
                ),
                value=iot.CfnTopicRule.AssetPropertyVariantProperty(
                    boolean_value="booleanValue",
                    double_value="doubleValue",
                    integer_value="integerValue",
                    string_value="stringValue"
                ),

                # the properties below are optional
                quality="quality"
            )],

            # the properties below are optional
            asset_id="assetId",
            entry_id="entryId",
            property_alias="propertyAlias",
            property_id="propertyId"
        )],
        role_arn="roleArn"
    ),
    kafka=iot.CfnTopicRule.KafkaActionProperty(
        client_properties={
            "client_properties_key": "clientProperties"
        },
        destination_arn="destinationArn",
        topic="topic",

        # the properties below are optional
        headers=[iot.CfnTopicRule.KafkaActionHeaderProperty(
            key="key",
            value="value"
        )],
        key="key",
        partition="partition"
    ),
    kinesis=iot.CfnTopicRule.KinesisActionProperty(
        role_arn="roleArn",
        stream_name="streamName",

        # the properties below are optional
        partition_key="partitionKey"
    ),
    lambda_=iot.CfnTopicRule.LambdaActionProperty(
        function_arn="functionArn"
    ),
    location=iot.CfnTopicRule.LocationActionProperty(
        device_id="deviceId",
        latitude="latitude",
        longitude="longitude",
        role_arn="roleArn",
        tracker_name="trackerName",

        # the properties below are optional
        timestamp=iot.CfnTopicRule.TimestampProperty(
            value="value",

            # the properties below are optional
            unit="unit"
        )
    ),
    open_search=iot.CfnTopicRule.OpenSearchActionProperty(
        endpoint="endpoint",
        id="id",
        index="index",
        role_arn="roleArn",
        type="type"
    ),
    republish=iot.CfnTopicRule.RepublishActionProperty(
        role_arn="roleArn",
        topic="topic",

        # the properties below are optional
        headers=iot.CfnTopicRule.RepublishActionHeadersProperty(
            content_type="contentType",
            correlation_data="correlationData",
            message_expiry="messageExpiry",
            payload_format_indicator="payloadFormatIndicator",
            response_topic="responseTopic",
            user_properties=[iot.CfnTopicRule.UserPropertyProperty(
                key="key",
                value="value"
            )]
        ),
        qos=123
    ),
    s3=iot.CfnTopicRule.S3ActionProperty(
        bucket_name="bucketName",
        key="key",
        role_arn="roleArn",

        # the properties below are optional
        canned_acl="cannedAcl"
    ),
    sns=iot.CfnTopicRule.SnsActionProperty(
        role_arn="roleArn",
        target_arn="targetArn",

        # the properties below are optional
        message_format="messageFormat"
    ),
    sqs=iot.CfnTopicRule.SqsActionProperty(
        queue_url="queueUrl",
        role_arn="roleArn",

        # the properties below are optional
        use_base64=False
    ),
    step_functions=iot.CfnTopicRule.StepFunctionsActionProperty(
        role_arn="roleArn",
        state_machine_name="stateMachineName",

        # the properties below are optional
        execution_name_prefix="executionNamePrefix"
    ),
    timestream=iot.CfnTopicRule.TimestreamActionProperty(
        database_name="databaseName",
        dimensions=[iot.CfnTopicRule.TimestreamDimensionProperty(
            name="name",
            value="value"
        )],
        role_arn="roleArn",
        table_name="tableName",

        # the properties below are optional
        timestamp=iot.CfnTopicRule.TimestreamTimestampProperty(
            unit="unit",
            value="value"
        )
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.iot.*;

ActionProperty actionProperty = ActionProperty.builder()
        .cloudwatchAlarm(CloudwatchAlarmActionProperty.builder()
                .alarmName("alarmName")
                .roleArn("roleArn")
                .stateReason("stateReason")
                .stateValue("stateValue")
                .build())
        .cloudwatchLogs(CloudwatchLogsActionProperty.builder()
                .logGroupName("logGroupName")
                .roleArn("roleArn")

                // the properties below are optional
                .batchMode(false)
                .build())
        .cloudwatchMetric(CloudwatchMetricActionProperty.builder()
                .metricName("metricName")
                .metricNamespace("metricNamespace")
                .metricUnit("metricUnit")
                .metricValue("metricValue")
                .roleArn("roleArn")

                // the properties below are optional
                .metricTimestamp("metricTimestamp")
                .build())
        .dynamoDb(DynamoDBActionProperty.builder()
                .hashKeyField("hashKeyField")
                .hashKeyValue("hashKeyValue")
                .roleArn("roleArn")
                .tableName("tableName")

                // the properties below are optional
                .hashKeyType("hashKeyType")
                .payloadField("payloadField")
                .rangeKeyField("rangeKeyField")
                .rangeKeyType("rangeKeyType")
                .rangeKeyValue("rangeKeyValue")
                .build())
        .dynamoDBv2(DynamoDBv2ActionProperty.builder()
                .putItem(PutItemInputProperty.builder()
                        .tableName("tableName")
                        .build())
                .roleArn("roleArn")
                .build())
        .elasticsearch(ElasticsearchActionProperty.builder()
                .endpoint("endpoint")
                .id("id")
                .index("index")
                .roleArn("roleArn")
                .type("type")
                .build())
        .firehose(FirehoseActionProperty.builder()
                .deliveryStreamName("deliveryStreamName")
                .roleArn("roleArn")

                // the properties below are optional
                .batchMode(false)
                .separator("separator")
                .build())
        .http(HttpActionProperty.builder()
                .url("url")

                // the properties below are optional
                .auth(HttpAuthorizationProperty.builder()
                        .sigv4(SigV4AuthorizationProperty.builder()
                                .roleArn("roleArn")
                                .serviceName("serviceName")
                                .signingRegion("signingRegion")
                                .build())
                        .build())
                .batchConfig(BatchConfigProperty.builder()
                        .batchAcrossTopics(false)
                        .maxBatchOpenMs(123)
                        .maxBatchSize(123)
                        .maxBatchSizeBytes(123)
                        .build())
                .confirmationUrl("confirmationUrl")
                .enableBatching(false)
                .headers(List.of(HttpActionHeaderProperty.builder()
                        .key("key")
                        .value("value")
                        .build()))
                .build())
        .influxDb(InfluxDBActionProperty.builder()
                .databaseName("databaseName")
                .destinationArn("destinationArn")
                .roleArn("roleArn")
                .tableName("tableName")

                // the properties below are optional
                .batchConfig(InfluxDBBatchConfigProperty.builder()
                        .batchAcrossTopics(false)
                        .maxBatchOpenMs(123)
                        .maxBatchSize(123)
                        .maxBatchSizeBytes(123)
                        .build())
                .organization("organization")
                .tags(Map.of(
                        "tagsKey", "tags"))
                .timestampUnit("timestampUnit")
                .build())
        .iotAnalytics(IotAnalyticsActionProperty.builder()
                .channelName("channelName")
                .roleArn("roleArn")

                // the properties below are optional
                .batchMode(false)
                .build())
        .iotEvents(IotEventsActionProperty.builder()
                .inputName("inputName")
                .roleArn("roleArn")

                // the properties below are optional
                .batchMode(false)
                .messageId("messageId")
                .build())
        .iotSiteWise(IotSiteWiseActionProperty.builder()
                .putAssetPropertyValueEntries(List.of(PutAssetPropertyValueEntryProperty.builder()
                        .propertyValues(List.of(AssetPropertyValueProperty.builder()
                                .timestamp(AssetPropertyTimestampProperty.builder()
                                        .timeInSeconds("timeInSeconds")

                                        // the properties below are optional
                                        .offsetInNanos("offsetInNanos")
                                        .build())
                                .value(AssetPropertyVariantProperty.builder()
                                        .booleanValue("booleanValue")
                                        .doubleValue("doubleValue")
                                        .integerValue("integerValue")
                                        .stringValue("stringValue")
                                        .build())

                                // the properties below are optional
                                .quality("quality")
                                .build()))

                        // the properties below are optional
                        .assetId("assetId")
                        .entryId("entryId")
                        .propertyAlias("propertyAlias")
                        .propertyId("propertyId")
                        .build()))
                .roleArn("roleArn")
                .build())
        .kafka(KafkaActionProperty.builder()
                .clientProperties(Map.of(
                        "clientPropertiesKey", "clientProperties"))
                .destinationArn("destinationArn")
                .topic("topic")

                // the properties below are optional
                .headers(List.of(KafkaActionHeaderProperty.builder()
                        .key("key")
                        .value("value")
                        .build()))
                .key("key")
                .partition("partition")
                .build())
        .kinesis(KinesisActionProperty.builder()
                .roleArn("roleArn")
                .streamName("streamName")

                // the properties below are optional
                .partitionKey("partitionKey")
                .build())
        .lambda(LambdaActionProperty.builder()
                .functionArn("functionArn")
                .build())
        .location(LocationActionProperty.builder()
                .deviceId("deviceId")
                .latitude("latitude")
                .longitude("longitude")
                .roleArn("roleArn")
                .trackerName("trackerName")

                // the properties below are optional
                .timestamp(TimestampProperty.builder()
                        .value("value")

                        // the properties below are optional
                        .unit("unit")
                        .build())
                .build())
        .openSearch(OpenSearchActionProperty.builder()
                .endpoint("endpoint")
                .id("id")
                .index("index")
                .roleArn("roleArn")
                .type("type")
                .build())
        .republish(RepublishActionProperty.builder()
                .roleArn("roleArn")
                .topic("topic")

                // the properties below are optional
                .headers(RepublishActionHeadersProperty.builder()
                        .contentType("contentType")
                        .correlationData("correlationData")
                        .messageExpiry("messageExpiry")
                        .payloadFormatIndicator("payloadFormatIndicator")
                        .responseTopic("responseTopic")
                        .userProperties(List.of(UserPropertyProperty.builder()
                                .key("key")
                                .value("value")
                                .build()))
                        .build())
                .qos(123)
                .build())
        .s3(S3ActionProperty.builder()
                .bucketName("bucketName")
                .key("key")
                .roleArn("roleArn")

                // the properties below are optional
                .cannedAcl("cannedAcl")
                .build())
        .sns(SnsActionProperty.builder()
                .roleArn("roleArn")
                .targetArn("targetArn")

                // the properties below are optional
                .messageFormat("messageFormat")
                .build())
        .sqs(SqsActionProperty.builder()
                .queueUrl("queueUrl")
                .roleArn("roleArn")

                // the properties below are optional
                .useBase64(false)
                .build())
        .stepFunctions(StepFunctionsActionProperty.builder()
                .roleArn("roleArn")
                .stateMachineName("stateMachineName")

                // the properties below are optional
                .executionNamePrefix("executionNamePrefix")
                .build())
        .timestream(TimestreamActionProperty.builder()
                .databaseName("databaseName")
                .dimensions(List.of(TimestreamDimensionProperty.builder()
                        .name("name")
                        .value("value")
                        .build()))
                .roleArn("roleArn")
                .tableName("tableName")

                // the properties below are optional
                .timestamp(TimestreamTimestampProperty.builder()
                        .unit("unit")
                        .value("value")
                        .build())
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// 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"
            }
        },
        BatchConfig = new BatchConfigProperty {
            BatchAcrossTopics = false,
            MaxBatchOpenMs = 123,
            MaxBatchSize = 123,
            MaxBatchSizeBytes = 123
        },
        ConfirmationUrl = "confirmationUrl",
        EnableBatching = false,
        Headers = new [] { new HttpActionHeaderProperty {
            Key = "key",
            Value = "value"
        } }
    },
    InfluxDb = new InfluxDBActionProperty {
        DatabaseName = "databaseName",
        DestinationArn = "destinationArn",
        RoleArn = "roleArn",
        TableName = "tableName",

        // the properties below are optional
        BatchConfig = new InfluxDBBatchConfigProperty {
            BatchAcrossTopics = false,
            MaxBatchOpenMs = 123,
            MaxBatchSize = 123,
            MaxBatchSizeBytes = 123
        },
        Organization = "organization",
        Tags = new Dictionary<string, string> {
            { "tagsKey", "tags" }
        },
        TimestampUnit = "timestampUnit"
    },
    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"
        }
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

actionProperty := &ActionProperty{
	CloudwatchAlarm: &CloudwatchAlarmActionProperty{
		AlarmName: jsii.String("alarmName"),
		RoleArn: jsii.String("roleArn"),
		StateReason: jsii.String("stateReason"),
		StateValue: jsii.String("stateValue"),
	},
	CloudwatchLogs: &CloudwatchLogsActionProperty{
		LogGroupName: jsii.String("logGroupName"),
		RoleArn: jsii.String("roleArn"),

		// the properties below are optional
		BatchMode: jsii.Boolean(false),
	},
	CloudwatchMetric: &CloudwatchMetricActionProperty{
		MetricName: jsii.String("metricName"),
		MetricNamespace: jsii.String("metricNamespace"),
		MetricUnit: jsii.String("metricUnit"),
		MetricValue: jsii.String("metricValue"),
		RoleArn: jsii.String("roleArn"),

		// the properties below are optional
		MetricTimestamp: jsii.String("metricTimestamp"),
	},
	DynamoDb: &DynamoDBActionProperty{
		HashKeyField: jsii.String("hashKeyField"),
		HashKeyValue: jsii.String("hashKeyValue"),
		RoleArn: jsii.String("roleArn"),
		TableName: jsii.String("tableName"),

		// the properties below are optional
		HashKeyType: jsii.String("hashKeyType"),
		PayloadField: jsii.String("payloadField"),
		RangeKeyField: jsii.String("rangeKeyField"),
		RangeKeyType: jsii.String("rangeKeyType"),
		RangeKeyValue: jsii.String("rangeKeyValue"),
	},
	DynamoDBv2: &DynamoDBv2ActionProperty{
		PutItem: &PutItemInputProperty{
			TableName: jsii.String("tableName"),
		},
		RoleArn: jsii.String("roleArn"),
	},
	Elasticsearch: &ElasticsearchActionProperty{
		Endpoint: jsii.String("endpoint"),
		Id: jsii.String("id"),
		Index: jsii.String("index"),
		RoleArn: jsii.String("roleArn"),
		Type: jsii.String("type"),
	},
	Firehose: &FirehoseActionProperty{
		DeliveryStreamName: jsii.String("deliveryStreamName"),
		RoleArn: jsii.String("roleArn"),

		// the properties below are optional
		BatchMode: jsii.Boolean(false),
		Separator: jsii.String("separator"),
	},
	Http: &HttpActionProperty{
		Url: jsii.String("url"),

		// the properties below are optional
		Auth: &HttpAuthorizationProperty{
			Sigv4: &SigV4AuthorizationProperty{
				RoleArn: jsii.String("roleArn"),
				ServiceName: jsii.String("serviceName"),
				SigningRegion: jsii.String("signingRegion"),
			},
		},
		BatchConfig: &BatchConfigProperty{
			BatchAcrossTopics: jsii.Boolean(false),
			MaxBatchOpenMs: jsii.Number(123),
			MaxBatchSize: jsii.Number(123),
			MaxBatchSizeBytes: jsii.Number(123),
		},
		ConfirmationUrl: jsii.String("confirmationUrl"),
		EnableBatching: jsii.Boolean(false),
		Headers: []interface{}{
			&HttpActionHeaderProperty{
				Key: jsii.String("key"),
				Value: jsii.String("value"),
			},
		},
	},
	InfluxDb: &InfluxDBActionProperty{
		DatabaseName: jsii.String("databaseName"),
		DestinationArn: jsii.String("destinationArn"),
		RoleArn: jsii.String("roleArn"),
		TableName: jsii.String("tableName"),

		// the properties below are optional
		BatchConfig: &InfluxDBBatchConfigProperty{
			BatchAcrossTopics: jsii.Boolean(false),
			MaxBatchOpenMs: jsii.Number(123),
			MaxBatchSize: jsii.Number(123),
			MaxBatchSizeBytes: jsii.Number(123),
		},
		Organization: jsii.String("organization"),
		Tags: map[string]*string{
			"tagsKey": jsii.String("tags"),
		},
		TimestampUnit: jsii.String("timestampUnit"),
	},
	IotAnalytics: &IotAnalyticsActionProperty{
		ChannelName: jsii.String("channelName"),
		RoleArn: jsii.String("roleArn"),

		// the properties below are optional
		BatchMode: jsii.Boolean(false),
	},
	IotEvents: &IotEventsActionProperty{
		InputName: jsii.String("inputName"),
		RoleArn: jsii.String("roleArn"),

		// the properties below are optional
		BatchMode: jsii.Boolean(false),
		MessageId: jsii.String("messageId"),
	},
	IotSiteWise: &IotSiteWiseActionProperty{
		PutAssetPropertyValueEntries: []interface{}{
			&PutAssetPropertyValueEntryProperty{
				PropertyValues: []interface{}{
					&AssetPropertyValueProperty{
						Timestamp: &AssetPropertyTimestampProperty{
							TimeInSeconds: jsii.String("timeInSeconds"),

							// the properties below are optional
							OffsetInNanos: jsii.String("offsetInNanos"),
						},
						Value: &AssetPropertyVariantProperty{
							BooleanValue: jsii.String("booleanValue"),
							DoubleValue: jsii.String("doubleValue"),
							IntegerValue: jsii.String("integerValue"),
							StringValue: jsii.String("stringValue"),
						},

						// the properties below are optional
						Quality: jsii.String("quality"),
					},
				},

				// the properties below are optional
				AssetId: jsii.String("assetId"),
				EntryId: jsii.String("entryId"),
				PropertyAlias: jsii.String("propertyAlias"),
				PropertyId: jsii.String("propertyId"),
			},
		},
		RoleArn: jsii.String("roleArn"),
	},
	Kafka: &KafkaActionProperty{
		ClientProperties: map[string]*string{
			"clientPropertiesKey": jsii.String("clientProperties"),
		},
		DestinationArn: jsii.String("destinationArn"),
		Topic: jsii.String("topic"),

		// the properties below are optional
		Headers: []interface{}{
			&KafkaActionHeaderProperty{
				Key: jsii.String("key"),
				Value: jsii.String("value"),
			},
		},
		Key: jsii.String("key"),
		Partition: jsii.String("partition"),
	},
	Kinesis: &KinesisActionProperty{
		RoleArn: jsii.String("roleArn"),
		StreamName: jsii.String("streamName"),

		// the properties below are optional
		PartitionKey: jsii.String("partitionKey"),
	},
	Lambda: &LambdaActionProperty{
		FunctionArn: jsii.String("functionArn"),
	},
	Location: &LocationActionProperty{
		DeviceId: jsii.String("deviceId"),
		Latitude: jsii.String("latitude"),
		Longitude: jsii.String("longitude"),
		RoleArn: jsii.String("roleArn"),
		TrackerName: jsii.String("trackerName"),

		// the properties below are optional
		Timestamp: &TimestampProperty{
			Value: jsii.String("value"),

			// the properties below are optional
			Unit: jsii.String("unit"),
		},
	},
	OpenSearch: &OpenSearchActionProperty{
		Endpoint: jsii.String("endpoint"),
		Id: jsii.String("id"),
		Index: jsii.String("index"),
		RoleArn: jsii.String("roleArn"),
		Type: jsii.String("type"),
	},
	Republish: &RepublishActionProperty{
		RoleArn: jsii.String("roleArn"),
		Topic: jsii.String("topic"),

		// the properties below are optional
		Headers: &RepublishActionHeadersProperty{
			ContentType: jsii.String("contentType"),
			CorrelationData: jsii.String("correlationData"),
			MessageExpiry: jsii.String("messageExpiry"),
			PayloadFormatIndicator: jsii.String("payloadFormatIndicator"),
			ResponseTopic: jsii.String("responseTopic"),
			UserProperties: []interface{}{
				&UserPropertyProperty{
					Key: jsii.String("key"),
					Value: jsii.String("value"),
				},
			},
		},
		Qos: jsii.Number(123),
	},
	S3: &S3ActionProperty{
		BucketName: jsii.String("bucketName"),
		Key: jsii.String("key"),
		RoleArn: jsii.String("roleArn"),

		// the properties below are optional
		CannedAcl: jsii.String("cannedAcl"),
	},
	Sns: &SnsActionProperty{
		RoleArn: jsii.String("roleArn"),
		TargetArn: jsii.String("targetArn"),

		// the properties below are optional
		MessageFormat: jsii.String("messageFormat"),
	},
	Sqs: &SqsActionProperty{
		QueueUrl: jsii.String("queueUrl"),
		RoleArn: jsii.String("roleArn"),

		// the properties below are optional
		UseBase64: jsii.Boolean(false),
	},
	StepFunctions: &StepFunctionsActionProperty{
		RoleArn: jsii.String("roleArn"),
		StateMachineName: jsii.String("stateMachineName"),

		// the properties below are optional
		ExecutionNamePrefix: jsii.String("executionNamePrefix"),
	},
	Timestream: &TimestreamActionProperty{
		DatabaseName: jsii.String("databaseName"),
		Dimensions: []interface{}{
			&TimestreamDimensionProperty{
				Name: jsii.String("name"),
				Value: jsii.String("value"),
			},
		},
		RoleArn: jsii.String("roleArn"),
		TableName: jsii.String("tableName"),

		// the properties below are optional
		Timestamp: &TimestreamTimestampProperty{
			Unit: jsii.String("unit"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

cloudwatchAlarmoptionalIResolvable | CfnTopicRule.CloudwatchAlarmActionPropertycloudwatch_alarmoptionaltyping.Union[IResolvable, CloudwatchAlarmActionProperty]cloudwatchAlarmoptionalIResolvableCloudwatchAlarmoptionalIResolvableCloudwatchAlarmoptionalinterface{} #
Change the state of a CloudWatch alarm.
cloudwatchLogsoptionalIResolvable | CfnTopicRule.CloudwatchLogsActionPropertycloudwatch_logsoptionaltyping.Union[IResolvable, CloudwatchLogsActionProperty]cloudwatchLogsoptionalIResolvableCloudwatchLogsoptionalIResolvableCloudwatchLogsoptionalinterface{} #
Sends data to CloudWatch.
cloudwatchMetricoptionalIResolvable | CfnTopicRule.CloudwatchMetricActionPropertycloudwatch_metricoptionaltyping.Union[IResolvable, CloudwatchMetricActionProperty]cloudwatchMetricoptionalIResolvableCloudwatchMetricoptionalIResolvableCloudwatchMetricoptionalinterface{} #
Capture a CloudWatch metric.
dynamoDboptionalIResolvable | CfnTopicRule.DynamoDBActionPropertydynamo_dboptionaltyping.Union[IResolvable, DynamoDBActionProperty]dynamoDboptionalIResolvableDynamoDboptionalIResolvableDynamoDboptionalinterface{} #
Write to a DynamoDB table.
dynamoDBv2optionalIResolvable | CfnTopicRule.DynamoDBv2ActionPropertydynamo_d_bv2optionaltyping.Union[IResolvable, DynamoDBv2ActionProperty]dynamoDBv2optionalIResolvableDynamoDBv2optionalIResolvableDynamoDBv2optionalinterface{} #
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.

elasticsearchoptionalIResolvable | CfnTopicRule.ElasticsearchActionPropertyelasticsearchoptionaltyping.Union[IResolvable, ElasticsearchActionProperty]elasticsearchoptionalIResolvableElasticsearchoptionalIResolvableElasticsearchoptionalinterface{} #
Write data to an Amazon OpenSearch Service domain.
notes

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 .

firehoseoptionalIResolvable | CfnTopicRule.FirehoseActionPropertyfirehoseoptionaltyping.Union[IResolvable, FirehoseActionProperty]firehoseoptionalIResolvableFirehoseoptionalIResolvableFirehoseoptionalinterface{} #
Write to an Amazon Kinesis Firehose stream.
httpoptionalIResolvable | CfnTopicRule.HttpActionPropertyhttpoptionaltyping.Union[IResolvable, HttpActionProperty]httpoptionalIResolvableHttpoptionalIResolvableHttpoptionalinterface{} #
Send data to an HTTPS endpoint.
influxDboptionalIResolvable | CfnTopicRule.InfluxDBActionPropertyinflux_dboptionaltyping.Union[IResolvable, InfluxDBActionProperty]influxDboptionalIResolvableInfluxDboptionalIResolvableInfluxDboptionalinterface{} #
iotAnalyticsoptionalIResolvable | CfnTopicRule.IotAnalyticsActionPropertyiot_analyticsoptionaltyping.Union[IResolvable, IotAnalyticsActionProperty]iotAnalyticsoptionalIResolvableIotAnalyticsoptionalIResolvableIotAnalyticsoptionalinterface{} #
Sends message data to an AWS IoT Analytics channel.
iotEventsoptionalIResolvable | CfnTopicRule.IotEventsActionPropertyiot_eventsoptionaltyping.Union[IResolvable, IotEventsActionProperty]iotEventsoptionalIResolvableIotEventsoptionalIResolvableIotEventsoptionalinterface{} #
Sends an input to an AWS IoT Events detector.
iotSiteWiseoptionalIResolvable | CfnTopicRule.IotSiteWiseActionPropertyiot_site_wiseoptionaltyping.Union[IResolvable, IotSiteWiseActionProperty]iotSiteWiseoptionalIResolvableIotSiteWiseoptionalIResolvableIotSiteWiseoptionalinterface{} #
Sends data from the MQTT message that triggered the rule to AWS IoT SiteWise asset properties.
kafkaoptionalIResolvable | CfnTopicRule.KafkaActionPropertykafkaoptionaltyping.Union[IResolvable, KafkaActionProperty]kafkaoptionalIResolvableKafkaoptionalIResolvableKafkaoptionalinterface{} #
Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon MSK) or self-managed Apache Kafka cluster.
kinesisoptionalIResolvable | CfnTopicRule.KinesisActionPropertykinesisoptionaltyping.Union[IResolvable, KinesisActionProperty]kinesisoptionalIResolvableKinesisoptionalIResolvableKinesisoptionalinterface{} #
Write data to an Amazon Kinesis stream.
lambdaoptionalIResolvable | CfnTopicRule.LambdaActionPropertylambdaoptionaltyping.Union[IResolvable, LambdaActionProperty]lambdaoptionalIResolvableLambdaoptionalIResolvableLambdaoptionalinterface{} #
Invoke a Lambda function.
locationoptionalIResolvable | CfnTopicRule.LocationActionPropertylocationoptionaltyping.Union[IResolvable, LocationActionProperty]locationoptionalIResolvableLocationoptionalIResolvableLocationoptionalinterface{} #
Sends device location data to Amazon Location Service .
openSearchoptionalIResolvable | CfnTopicRule.OpenSearchActionPropertyopen_searchoptionaltyping.Union[IResolvable, OpenSearchActionProperty]openSearchoptionalIResolvableOpenSearchoptionalIResolvableOpenSearchoptionalinterface{} #
Write data to an Amazon OpenSearch Service domain.
republishoptionalIResolvable | CfnTopicRule.RepublishActionPropertyrepublishoptionaltyping.Union[IResolvable, RepublishActionProperty]republishoptionalIResolvableRepublishoptionalIResolvableRepublishoptionalinterface{} #
Publish to another MQTT topic.
s3optionalIResolvable | CfnTopicRule.S3ActionPropertys3optionaltyping.Union[IResolvable, S3ActionProperty]s3optionalIResolvableS3optionalIResolvableS3optionalinterface{} #
Write to an Amazon S3 bucket.
snsoptionalIResolvable | CfnTopicRule.SnsActionPropertysnsoptionaltyping.Union[IResolvable, SnsActionProperty]snsoptionalIResolvableSnsoptionalIResolvableSnsoptionalinterface{} #
Publish to an Amazon SNS topic.
sqsoptionalIResolvable | CfnTopicRule.SqsActionPropertysqsoptionaltyping.Union[IResolvable, SqsActionProperty]sqsoptionalIResolvableSqsoptionalIResolvableSqsoptionalinterface{} #
Publish to an Amazon SQS queue.
stepFunctionsoptionalIResolvable | CfnTopicRule.StepFunctionsActionPropertystep_functionsoptionaltyping.Union[IResolvable, StepFunctionsActionProperty]stepFunctionsoptionalIResolvableStepFunctionsoptionalIResolvableStepFunctionsoptionalinterface{} #
Starts execution of a Step Functions state machine.
timestreamoptionalIResolvable | CfnTopicRule.TimestreamActionPropertytimestreamoptionaltyping.Union[IResolvable, TimestreamActionProperty]timestreamoptionalIResolvableTimestreamoptionalIResolvableTimestreamoptionalinterface{} #
Writes attributes from an MQTT message.