@Stability(value=Stable)
public static interface CfnTopicRule.DynamoDBActionProperty
extends software.amazon.jsii.JsiiSerializable
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 .
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.*;
DynamoDBActionProperty dynamoDBActionProperty = 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();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnTopicRule.DynamoDBActionProperty.Builder
A builder for
CfnTopicRule.DynamoDBActionProperty |
static class |
CfnTopicRule.DynamoDBActionProperty.Jsii$Proxy
An implementation for
CfnTopicRule.DynamoDBActionProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnTopicRule.DynamoDBActionProperty.Builder |
builder() |
String |
getHashKeyField()
The hash key name.
|
default String |
getHashKeyType()
The hash key type.
|
String |
getHashKeyValue()
The hash key value.
|
default String |
getPayloadField()
The action payload.
|
default String |
getRangeKeyField()
The range key name.
|
default String |
getRangeKeyType()
The range key type.
|
default String |
getRangeKeyValue()
The range key value.
|
String |
getRoleArn()
The ARN of the IAM role that grants access to the DynamoDB table.
|
String |
getTableName()
The name of the DynamoDB table.
|
@Stability(value=Stable) @NotNull String getHashKeyField()
@Stability(value=Stable) @NotNull String getHashKeyValue()
@Stability(value=Stable) @NotNull String getRoleArn()
@Stability(value=Stable) @NotNull String getTableName()
@Stability(value=Stable) @Nullable default String getHashKeyType()
Valid values are "STRING" or "NUMBER"
@Stability(value=Stable) @Nullable default String getPayloadField()
This name can be customized.
@Stability(value=Stable) @Nullable default String getRangeKeyField()
@Stability(value=Stable) @Nullable default String getRangeKeyType()
Valid values are "STRING" or "NUMBER"
@Stability(value=Stable) @Nullable default String getRangeKeyValue()
@Stability(value=Stable) static CfnTopicRule.DynamoDBActionProperty.Builder builder()
Copyright © 2022. All rights reserved.