Interface CfnTopicRule.DynamoDBActionProperty

All Superinterfaces:
All Known Implementing Classes:
Enclosing class:

@Stability(Stable) public static interface CfnTopicRule.DynamoDBActionProperty extends
Describes an action to write to a DynamoDB table.

The tableName , hashKeyField , and rangeKeyField values must match the values used when you created the table.

The hashKeyValue and rangeKeyvalue fields use a substitution template syntax. These templates provide data at runtime. The syntax is as follows: ${ sql-expression }.

You can specify any valid expression in a WHERE or SELECT clause, including JSON properties, comparisons, calculations, and functions. For example, the following field uses the third level of the topic:

"hashKeyValue": "${topic(3)}"

The following field uses the timestamp:

"rangeKeyValue": "${timestamp()}"

For more information, see DynamoDBv2 Action in the AWS IoT Developer Guide .


 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 DynamoDBActionProperty dynamoDBActionProperty = DynamoDBActionProperty.builder()
         // the properties below are optional
  • Method Details

    • getHashKeyField

      @Stability(Stable) @NotNull String getHashKeyField()
      The hash key name.
    • getHashKeyValue

      @Stability(Stable) @NotNull String getHashKeyValue()
      The hash key value.
    • getRoleArn

      @Stability(Stable) @NotNull String getRoleArn()
      The ARN of the IAM role that grants access to the DynamoDB table.
    • getTableName

      @Stability(Stable) @NotNull String getTableName()
      The name of the DynamoDB table.
    • getHashKeyType

      @Stability(Stable) @Nullable default String getHashKeyType()
      The hash key type.

      Valid values are "STRING" or "NUMBER"

    • getPayloadField

      @Stability(Stable) @Nullable default String getPayloadField()
      The action payload.

      This name can be customized.

    • getRangeKeyField

      @Stability(Stable) @Nullable default String getRangeKeyField()
      The range key name.
    • getRangeKeyType

      @Stability(Stable) @Nullable default String getRangeKeyType()
      The range key type.

      Valid values are "STRING" or "NUMBER"

    • getRangeKeyValue

      @Stability(Stable) @Nullable default String getRangeKeyValue()
      The range key value.
    • builder

      @Stability(Stable) static CfnTopicRule.DynamoDBActionProperty.Builder builder()
      a CfnTopicRule.DynamoDBActionProperty.Builder of CfnTopicRule.DynamoDBActionProperty