Class TransactWriteItemsEnhancedRequest
- java.lang.Object
-
- software.amazon.awssdk.enhanced.dynamodb.model.TransactWriteItemsEnhancedRequest
-
@ThreadSafe public final class TransactWriteItemsEnhancedRequest extends Object
Defines parameters used for the transaction operation transactWriteItems() (such asDynamoDbEnhancedClient.transactWriteItems(TransactWriteItemsEnhancedRequest)).A request contains parameters for the different actions available in the operation:
- Write/Update items through put and update actions
- Delete items
- Use a condition check
TransactPutItemEnhancedRequestand each low-level action request is associated with the table where the action should be applied. On initialization, these requests are transformed intoTransactWriteItemand stored in the request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTransactWriteItemsEnhancedRequest.BuilderA builder that is used to create a transaction object with the desired parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TransactWriteItemsEnhancedRequest.Builderbuilder()Creates a newly initialized builder for a request object.StringclientRequestToken()Providing aClientRequestTokenmakes the call toTransactWriteItemsidempotent, meaning that multiple identical calls have the same effect as one single call.booleanequals(Object o)inthashCode()ReturnConsumedCapacityreturnConsumedCapacity()Whether to return the capacity consumed by this operation.StringreturnConsumedCapacityAsString()Whether to return the capacity consumed by this operation.ReturnItemCollectionMetricsreturnItemCollectionMetrics()Whether to return the item collection metrics.StringreturnItemCollectionMetricsAsString()Whether to return the item collection metrics.List<TransactWriteItem>transactWriteItems()Returns the list ofTransactWriteItemthat represents all actions in the request.
-
-
-
Method Detail
-
builder
public static TransactWriteItemsEnhancedRequest.Builder builder()
Creates a newly initialized builder for a request object.
-
clientRequestToken
public String clientRequestToken()
Providing a
ClientRequestTokenmakes the call toTransactWriteItemsidempotent, meaning that multiple identical calls have the same effect as one single call.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
IdempotentParameterMismatchexception.
-
returnConsumedCapacity
public ReturnConsumedCapacity returnConsumedCapacity()
Whether to return the capacity consumed by this operation.- See Also:
PutItemRequest.returnConsumedCapacity()
-
returnConsumedCapacityAsString
public String returnConsumedCapacityAsString()
Whether to return the capacity consumed by this operation.Similar to
returnConsumedCapacity()but return the value as a string. This is useful in situations where the value is not defined inReturnConsumedCapacity.
-
returnItemCollectionMetrics
public ReturnItemCollectionMetrics returnItemCollectionMetrics()
Whether to return the item collection metrics.
-
returnItemCollectionMetricsAsString
public String returnItemCollectionMetricsAsString()
Whether to return the item collection metrics.Similar to
returnConsumedCapacity()but return the value as a string. This is useful in situations where the value is not defined inReturnConsumedCapacity.
-
transactWriteItems
public List<TransactWriteItem> transactWriteItems()
Returns the list ofTransactWriteItemthat represents all actions in the request.
-
-