interface DynamoDBActionProperty
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.IoT.Mixins.CfnTopicRulePropsMixin.DynamoDBActionProperty |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsiot/mixins#CfnTopicRulePropsMixin_DynamoDBActionProperty |
Java | software.amazon.awscdk.mixins.preview.services.iot.mixins.CfnTopicRulePropsMixin.DynamoDBActionProperty |
Python | aws_cdk.mixins_preview.aws_iot.mixins.CfnTopicRulePropsMixin.DynamoDBActionProperty |
TypeScript | @aws-cdk/mixins-preview » aws_iot » mixins » CfnTopicRulePropsMixin » DynamoDBActionProperty |
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 .
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { mixins as iot_mixins } from '@aws-cdk/mixins-preview/aws-iot';
const dynamoDBActionProperty: iot_mixins.CfnTopicRulePropsMixin.DynamoDBActionProperty = {
hashKeyField: 'hashKeyField',
hashKeyType: 'hashKeyType',
hashKeyValue: 'hashKeyValue',
payloadField: 'payloadField',
rangeKeyField: 'rangeKeyField',
rangeKeyType: 'rangeKeyType',
rangeKeyValue: 'rangeKeyValue',
roleArn: 'roleArn',
tableName: 'tableName',
};
Properties
| Name | Type | Description |
|---|---|---|
| hash | string | The hash key name. |
| hash | string | The hash key type. |
| hash | string | The hash key value. |
| payload | string | The action payload. |
| range | string | The range key name. |
| range | string | The range key type. |
| range | string | The range key value. |
| role | string | The ARN of the IAM role that grants access to the DynamoDB table. |
| table | string | The name of the DynamoDB table. |
hashKeyField?
Type:
string
(optional)
The hash key name.
hashKeyType?
Type:
string
(optional)
The hash key type.
Valid values are "STRING" or "NUMBER"
hashKeyValue?
Type:
string
(optional)
The hash key value.
payloadField?
Type:
string
(optional)
The action payload.
This name can be customized.
rangeKeyField?
Type:
string
(optional)
The range key name.
rangeKeyType?
Type:
string
(optional)
The range key type.
Valid values are "STRING" or "NUMBER"
rangeKeyValue?
Type:
string
(optional)
The range key value.
roleArn?
Type:
string
(optional)
The ARN of the IAM role that grants access to the DynamoDB table.
tableName?
Type:
string
(optional)
The name of the DynamoDB table.

.NET
Go
Java
Python
TypeScript