Class: AWSCDK::IoT::CfnTopicRule::DynamoDBv2ActionProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IoT::CfnTopicRule::DynamoDBv2ActionProperty
- Defined in:
- io_t/cfn_topic_rule.rb
Overview
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.
Instance Attribute Summary collapse
-
#put_item ⇒ AWSCDK::IResolvable, ...
readonly
Specifies the DynamoDB table to which the message data will be written.
-
#role_arn ⇒ String?
readonly
The ARN of the IAM role that grants access to the DynamoDB table.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(put_item: nil, role_arn: nil) ⇒ DynamoDBv2ActionProperty
constructor
A new instance of DynamoDBv2ActionProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(put_item: nil, role_arn: nil) ⇒ DynamoDBv2ActionProperty
Returns a new instance of DynamoDBv2ActionProperty.
1382 1383 1384 1385 1386 1387 |
# File 'io_t/cfn_topic_rule.rb', line 1382 def initialize(put_item: nil, role_arn: nil) @put_item = put_item.is_a?(Hash) ? ::AWSCDK::IoT::CfnTopicRule::PutItemInputProperty.new(**put_item.transform_keys(&:to_sym)) : put_item Jsii::Type.check_type(@put_item, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3QuQ2ZuVG9waWNSdWxlLlB1dEl0ZW1JbnB1dFByb3BlcnR5In1dfX0=")), "putItem") unless @put_item.nil? @role_arn = role_arn Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn") unless @role_arn.nil? end |
Instance Attribute Details
#put_item ⇒ AWSCDK::IResolvable, ... (readonly)
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.
1397 1398 1399 |
# File 'io_t/cfn_topic_rule.rb', line 1397 def put_item @put_item end |
#role_arn ⇒ String? (readonly)
The ARN of the IAM role that grants access to the DynamoDB table.
1402 1403 1404 |
# File 'io_t/cfn_topic_rule.rb', line 1402 def role_arn @role_arn end |
Class Method Details
.jsii_properties ⇒ Object
1404 1405 1406 1407 1408 1409 |
# File 'io_t/cfn_topic_rule.rb', line 1404 def self.jsii_properties { :put_item => "putItem", :role_arn => "roleArn", } end |
Instance Method Details
#to_jsii ⇒ Object
1411 1412 1413 1414 1415 1416 1417 1418 |
# File 'io_t/cfn_topic_rule.rb', line 1411 def to_jsii result = {} result.merge!({ "putItem" => @put_item, "roleArn" => @role_arn, }) result.compact end |