Interface CfnTopicRule.ActionProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnTopicRule.ActionProperty.Jsii$Proxy
Enclosing class:
CfnTopicRule

@Stability(Stable) public static interface CfnTopicRule.ActionProperty extends software.amazon.jsii.JsiiSerializable
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 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())
                 .confirmationUrl("confirmationUrl")
                 .headers(List.of(HttpActionHeaderProperty.builder()
                         .key("key")
                         .value("value")
                         .build()))
                 .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
                 .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(new Date())
                 .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();
 
  • Method Details

    • getCloudwatchAlarm

      @Stability(Stable) @Nullable default Object getCloudwatchAlarm()
      Change the state of a CloudWatch alarm.
    • getCloudwatchLogs

      @Stability(Stable) @Nullable default Object getCloudwatchLogs()
      Sends data to CloudWatch.
    • getCloudwatchMetric

      @Stability(Stable) @Nullable default Object getCloudwatchMetric()
      Capture a CloudWatch metric.
    • getDynamoDb

      @Stability(Stable) @Nullable default Object getDynamoDb()
      Write to a DynamoDB table.
    • getDynamoDBv2

      @Stability(Stable) @Nullable default Object getDynamoDBv2()
      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.

    • getElasticsearch

      @Stability(Stable) @Nullable default Object getElasticsearch()
      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 the OpenSearch rule action instead. For more information, see OpenSearchAction .

    • getFirehose

      @Stability(Stable) @Nullable default Object getFirehose()
      Write to an Amazon Kinesis Firehose stream.
    • getHttp

      @Stability(Stable) @Nullable default Object getHttp()
      Send data to an HTTPS endpoint.
    • getIotAnalytics

      @Stability(Stable) @Nullable default Object getIotAnalytics()
      Sends message data to an AWS IoT Analytics channel.
    • getIotEvents

      @Stability(Stable) @Nullable default Object getIotEvents()
      Sends an input to an AWS IoT Events detector.
    • getIotSiteWise

      @Stability(Stable) @Nullable default Object getIotSiteWise()
      Sends data from the MQTT message that triggered the rule to AWS IoT SiteWise asset properties.
    • getKafka

      @Stability(Stable) @Nullable default Object getKafka()
      Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon MSK) or self-managed Apache Kafka cluster.
    • getKinesis

      @Stability(Stable) @Nullable default Object getKinesis()
      Write data to an Amazon Kinesis stream.
    • getLambda

      @Stability(Stable) @Nullable default Object getLambda()
      Invoke a Lambda function.
    • getLocation

      @Stability(Stable) @Nullable default Object getLocation()
      Sends device location data to Amazon Location Service .
    • getOpenSearch

      @Stability(Stable) @Nullable default Object getOpenSearch()
      Write data to an Amazon OpenSearch Service domain.
    • getRepublish

      @Stability(Stable) @Nullable default Object getRepublish()
      Publish to another MQTT topic.
    • getS3

      @Stability(Stable) @Nullable default Object getS3()
      Write to an Amazon S3 bucket.
    • getSns

      @Stability(Stable) @Nullable default Object getSns()
      Publish to an Amazon SNS topic.
    • getSqs

      @Stability(Stable) @Nullable default Object getSqs()
      Publish to an Amazon SQS queue.
    • getStepFunctions

      @Stability(Stable) @Nullable default Object getStepFunctions()
      Starts execution of a Step Functions state machine.
    • getTimestream

      @Stability(Stable) @Nullable default Object getTimestream()
      Writes attributes from an MQTT message.
    • builder

      @Stability(Stable) static CfnTopicRule.ActionProperty.Builder builder()
      Returns:
      a CfnTopicRule.ActionProperty.Builder of CfnTopicRule.ActionProperty