Interface CfnTopicRule.IDynamoDBActionProperty
Describes an action to write to a DynamoDB table.
Namespace: Amazon.CDK.AWS.IoT
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IDynamoDBActionProperty
Syntax (vb)
Public Interface IDynamoDBActionProperty
Remarks
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 .
ExampleMetadata: fixture=_generated
Examples
// 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 dynamoDBActionProperty = new DynamoDBActionProperty {
HashKeyField = "hashKeyField",
HashKeyValue = "hashKeyValue",
RoleArn = "roleArn",
TableName = "tableName",
// the properties below are optional
HashKeyType = "hashKeyType",
PayloadField = "payloadField",
RangeKeyField = "rangeKeyField",
RangeKeyType = "rangeKeyType",
RangeKeyValue = "rangeKeyValue"
};
Synopsis
Properties
HashKeyField | The hash key name. |
HashKeyType | The hash key type. |
HashKeyValue | The hash key value. |
PayloadField | The action payload. |
RangeKeyField | The range key name. |
RangeKeyType | The range key type. |
RangeKeyValue | The range key value. |
RoleArn | The ARN of the IAM role that grants access to the DynamoDB table. |
TableName | The name of the DynamoDB table. |
Properties
HashKeyField
The hash key name.
string HashKeyField { get; }
Property Value
System.String
Remarks
HashKeyType
The hash key type.
virtual string HashKeyType { get; }
Property Value
System.String
Remarks
Valid values are "STRING" or "NUMBER"
HashKeyValue
The hash key value.
string HashKeyValue { get; }
Property Value
System.String
Remarks
PayloadField
The action payload.
virtual string PayloadField { get; }
Property Value
System.String
Remarks
RangeKeyField
The range key name.
virtual string RangeKeyField { get; }
Property Value
System.String
Remarks
RangeKeyType
The range key type.
virtual string RangeKeyType { get; }
Property Value
System.String
Remarks
Valid values are "STRING" or "NUMBER"
RangeKeyValue
The range key value.
virtual string RangeKeyValue { get; }
Property Value
System.String
Remarks
RoleArn
The ARN of the IAM role that grants access to the DynamoDB table.
string RoleArn { get; }
Property Value
System.String
Remarks
TableName
The name of the DynamoDB table.
string TableName { get; }
Property Value
System.String