Class: Aws::DynamoDB::Types::TransactWriteItemsInput
- Inherits:
-
Struct
- Object
- Struct
- Aws::DynamoDB::Types::TransactWriteItemsInput
- Defined in:
- gems/aws-sdk-dynamodb/lib/aws-sdk-dynamodb/types.rb
Overview
When making an API call, you may pass TransactWriteItemsInput data as a hash:
{
transact_items: [ # required
{
condition_check: {
key: { # required
"AttributeName" => "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
},
table_name: "TableName", # required
condition_expression: "ConditionExpression", # required
expression_attribute_names: {
"ExpressionAttributeNameVariable" => "AttributeName",
},
expression_attribute_values: {
"ExpressionAttributeValueVariable" => "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
},
return_values_on_condition_check_failure: "ALL_OLD", # accepts ALL_OLD, NONE
},
put: {
item: { # required
"AttributeName" => "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
},
table_name: "TableName", # required
condition_expression: "ConditionExpression",
expression_attribute_names: {
"ExpressionAttributeNameVariable" => "AttributeName",
},
expression_attribute_values: {
"ExpressionAttributeValueVariable" => "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
},
return_values_on_condition_check_failure: "ALL_OLD", # accepts ALL_OLD, NONE
},
delete: {
key: { # required
"AttributeName" => "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
},
table_name: "TableName", # required
condition_expression: "ConditionExpression",
expression_attribute_names: {
"ExpressionAttributeNameVariable" => "AttributeName",
},
expression_attribute_values: {
"ExpressionAttributeValueVariable" => "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
},
return_values_on_condition_check_failure: "ALL_OLD", # accepts ALL_OLD, NONE
},
update: {
key: { # required
"AttributeName" => "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
},
update_expression: "UpdateExpression", # required
table_name: "TableName", # required
condition_expression: "ConditionExpression",
expression_attribute_names: {
"ExpressionAttributeNameVariable" => "AttributeName",
},
expression_attribute_values: {
"ExpressionAttributeValueVariable" => "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
},
return_values_on_condition_check_failure: "ALL_OLD", # accepts ALL_OLD, NONE
},
},
],
return_consumed_capacity: "INDEXES", # accepts INDEXES, TOTAL, NONE
return_item_collection_metrics: "SIZE", # accepts SIZE, NONE
client_request_token: "ClientRequestToken",
}
Constant Summary collapse
- SENSITIVE =
[]
Instance Attribute Summary collapse
-
#client_request_token ⇒ String
Providing a
ClientRequestToken
makes the call toTransactWriteItems
idempotent, meaning that multiple identical calls have the same effect as one single call. -
#return_consumed_capacity ⇒ String
Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:.
-
#return_item_collection_metrics ⇒ String
Determines whether item collection metrics are returned.
-
#transact_items ⇒ Array<Types::TransactWriteItem>
An ordered array of up to 25
TransactWriteItem
objects, each of which contains aConditionCheck
,Put
,Update
, orDelete
object.
Instance Attribute Details
#client_request_token ⇒ String
Providing a ClientRequestToken
makes the call to
TransactWriteItems
idempotent, meaning that multiple identical
calls have the same effect as one single call.
Although multiple identical calls using the same client request
token produce the same result on the server (no side effects), the
responses to the calls might not be the same. If the
ReturnConsumedCapacity>
parameter is set, then the initial
TransactWriteItems
call returns the amount of write capacity units
consumed in making the changes. Subsequent TransactWriteItems
calls with the same client token return the number of read capacity
units consumed in reading the item.
A client request token is valid for 10 minutes after the first request that uses it is completed. After 10 minutes, any request with the same client token is treated as a new request. Do not resubmit the same request with the same client token for more than 10 minutes, or the result might not be idempotent.
If you submit a request with the same client token but a change in
other parameters within the 10-minute idempotency window, DynamoDB
returns an IdempotentParameterMismatch
exception.
A suitable default value is auto-generated. You should normally not need to pass this option.
10243 10244 10245 10246 10247 10248 10249 10250 |
# File 'gems/aws-sdk-dynamodb/lib/aws-sdk-dynamodb/types.rb', line 10243 class TransactWriteItemsInput < Struct.new( :transact_items, :return_consumed_capacity, :return_item_collection_metrics, :client_request_token) SENSITIVE = [] include Aws::Structure end |
#return_consumed_capacity ⇒ String
Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:
INDEXES
- The response includes the aggregateConsumedCapacity
for the operation, together withConsumedCapacity
for each table and secondary index that was accessed.Note that some operations, such as
GetItem
andBatchGetItem
, do not access any indexes at all. In these cases, specifyingINDEXES
will only returnConsumedCapacity
information for table(s).TOTAL
- The response includes only the aggregateConsumedCapacity
for the operation.NONE
- NoConsumedCapacity
details are included in the response.
10243 10244 10245 10246 10247 10248 10249 10250 |
# File 'gems/aws-sdk-dynamodb/lib/aws-sdk-dynamodb/types.rb', line 10243 class TransactWriteItemsInput < Struct.new( :transact_items, :return_consumed_capacity, :return_item_collection_metrics, :client_request_token) SENSITIVE = [] include Aws::Structure end |
#return_item_collection_metrics ⇒ String
Determines whether item collection metrics are returned. If set to
SIZE
, the response includes statistics about item collections (if
any), that were modified during the operation and are returned in
the response. If set to NONE
(the default), no statistics are
returned.
10243 10244 10245 10246 10247 10248 10249 10250 |
# File 'gems/aws-sdk-dynamodb/lib/aws-sdk-dynamodb/types.rb', line 10243 class TransactWriteItemsInput < Struct.new( :transact_items, :return_consumed_capacity, :return_item_collection_metrics, :client_request_token) SENSITIVE = [] include Aws::Structure end |
#transact_items ⇒ Array<Types::TransactWriteItem>
An ordered array of up to 25 TransactWriteItem
objects, each of
which contains a ConditionCheck
, Put
, Update
, or Delete
object. These can operate on items in different tables, but the
tables must reside in the same Amazon Web Services account and
Region, and no two of them can operate on the same item.
10243 10244 10245 10246 10247 10248 10249 10250 |
# File 'gems/aws-sdk-dynamodb/lib/aws-sdk-dynamodb/types.rb', line 10243 class TransactWriteItemsInput < Struct.new( :transact_items, :return_consumed_capacity, :return_item_collection_metrics, :client_request_token) SENSITIVE = [] include Aws::Structure end |