DynamoDBv2ActionProperty
Struct External
Describes an action to write to a DynamoDB table.
This DynamoDB action writes each attribute in the message payload into it's own column in the DynamoDB table.
| Source | |
|---|---|
| Type last changed |
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 dynamoDBv2ActionProperty: iot.CfnTopicRule.DynamoDBv2ActionProperty = {
putItem: {
tableName: 'tableName',
},
roleArn: 'roleArn',
};
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
dynamo_d_bv2_action_property = iot.CfnTopicRule.DynamoDBv2ActionProperty(
put_item=iot.CfnTopicRule.PutItemInputProperty(
table_name="tableName"
),
role_arn="roleArn"
)
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.*;
DynamoDBv2ActionProperty dynamoDBv2ActionProperty = DynamoDBv2ActionProperty.builder()
.putItem(PutItemInputProperty.builder()
.tableName("tableName")
.build())
.roleArn("roleArn")
.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 dynamoDBv2ActionProperty = new DynamoDBv2ActionProperty {
PutItem = new PutItemInputProperty {
TableName = "tableName"
},
RoleArn = "roleArn"
};
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"
dynamoDBv2ActionProperty := &DynamoDBv2ActionProperty{
PutItem: &PutItemInputProperty{
TableName: jsii.String("tableName"),
},
RoleArn: jsii.String("roleArn"),
}
Properties
putItemoptionalIResolvable | CfnTopicRule.put_itemoptionaltyping.Union[IResolvable, PutItemInputProperty]putItemoptionalIResolvablePutItemoptionalIResolvablePutItemoptionalinterface{} #Specifies the DynamoDB table to which the message data will be written. For example:.
{ "dynamoDBv2": { "roleArn": "aws:iam:12341251:my-role" "putItem": { "tableName": "my-table" } } }
Each attribute in the message payload will be written to a separate column in the DynamoDB database.
roleArnoptionalstringrole_arnoptionalstrroleArnoptionalStringRoleArnoptionalstringRoleArnoptional*string #The ARN of the IAM role that grants access to the DynamoDB table.