You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::IoT::Types::DynamoDBAction

Inherits:
Struct
  • Object
show all
Defined in:
(unknown)

Overview

Note:

When passing DynamoDBAction as input to an Aws::Client method, you can use a vanilla Hash:

{
  table_name: "TableName", # required
  role_arn: "AwsArn", # required
  operation: "DynamoOperation",
  hash_key_field: "HashKeyField", # required
  hash_key_value: "HashKeyValue", # required
  hash_key_type: "STRING", # accepts STRING, NUMBER
  range_key_field: "RangeKeyField",
  range_key_value: "RangeKeyValue",
  range_key_type: "STRING", # accepts STRING, NUMBER
  payload_field: "PayloadField",
}

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: ${<i>sql-expression</i>}.

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()}"

Returned by:

Instance Attribute Summary collapse

Instance Attribute Details

#hash_key_fieldString

The hash key name.

Returns:

  • (String)

    The hash key name.

#hash_key_typeString

The hash key type. Valid values are \"STRING\" or \"NUMBER\"

Possible values:

  • STRING
  • NUMBER

Returns:

  • (String)

    The hash key type.

#hash_key_valueString

The hash key value.

Returns:

  • (String)

    The hash key value.

#operationString

The type of operation to be performed. This follows the substitution template, so it can be $`{operation}`, but the substitution must result in one of the following: INSERT, UPDATE, or DELETE.

Returns:

  • (String)

    The type of operation to be performed.

#payload_fieldString

The action payload. This name can be customized.

Returns:

  • (String)

    The action payload.

#range_key_fieldString

The range key name.

Returns:

  • (String)

    The range key name.

#range_key_typeString

The range key type. Valid values are \"STRING\" or \"NUMBER\"

Possible values:

  • STRING
  • NUMBER

Returns:

  • (String)

    The range key type.

#range_key_valueString

The range key value.

Returns:

  • (String)

    The range key value.

#role_arnString

The ARN of the IAM role that grants access to the DynamoDB table.

Returns:

  • (String)

    The ARN of the IAM role that grants access to the DynamoDB table.

#table_nameString

The name of the DynamoDB table.

Returns:

  • (String)

    The name of the DynamoDB table.