Class TransactionCanceledException
- Namespace
- Amazon.DynamoDBv2.Model
- Assembly
- AWSSDK.DynamoDBv2.dll
The entire transaction request was canceled.
DynamoDB cancels a
TransactWriteItems request under the following circumstances:
A condition in one of the condition expressions is not met.
A table in the
request is in a different account or region.TransactWriteItemsMore than one action in the
operation targets the same item.TransactWriteItemsThere is insufficient provisioned capacity for the transaction to be completed.
An item size becomes too large (larger than 400 KB), or a local secondary index (LSI) becomes too large, or a similar validation error occurs because of changes made by the transaction.
There is a user error, such as an invalid data format.
DynamoDB cancels a
TransactGetItems request under the following circumstances:
There is an ongoing
operation that conflicts with a concurrentTransactGetItems
,PutItem
,UpdateItem
orDeleteItem
request. In this case theTransactWriteItems
operation fails with aTransactGetItems
.TransactionCanceledExceptionA table in the
request is in a different account or region.TransactGetItemsThere is insufficient provisioned capacity for the transaction to be completed.
There is a user error, such as an invalid data format.
note
If using Java, DynamoDB lists the cancellation reasons on the
CancellationReasons
property. This property is not set for other languages. Transaction cancellation reasons
are ordered in the order of requested items, if an item has no error it will have
None code and Null message.
Cancellation reason codes and possible error messages:
No Errors:
Code:
NoneMessage:
null
Conditional Check Failed:
Code:
ConditionalCheckFailedMessage: The conditional request failed.
Item Collection Size Limit Exceeded:
Code:
ItemCollectionSizeLimitExceededMessage: Collection size exceeded.
Transaction Conflict:
Code:
TransactionConflictMessage: Transaction is ongoing for the item.
Provisioned Throughput Exceeded:
Code:
ProvisionedThroughputExceededMessages:
The level of configured provisioned throughput for the table was exceeded. Consider increasing your provisioning level with the UpdateTable API.
note
This Message is received when provisioned throughput is exceeded is on a provisioned DynamoDB table.
The level of configured provisioned throughput for one or more global secondary indexes of the table was exceeded. Consider increasing your provisioning level for the under-provisioned global secondary indexes with the UpdateTable API.
note
This message is returned when provisioned throughput is exceeded is on a provisioned GSI.
Throttling Error:
Code:
ThrottlingErrorMessages:
Throughput exceeds the current capacity of your table or index. DynamoDB is automatically scaling your table or index so please try again shortly. If exceptions persist, check if you have a hot key: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-partition-key-design.html.
note
This message is returned when writes get throttled on an On-Demand table as DynamoDB is automatically scaling the table.
Throughput exceeds the current capacity for one or more global secondary indexes. DynamoDB is automatically scaling your index so please try again shortly.
note
This message is returned when when writes get throttled on an On-Demand GSI as DynamoDB is automatically scaling the GSI.
Validation Error:
Code:
ValidationErrorMessages:
One or more parameter values were invalid.
The update expression attempted to update the secondary index key beyond allowed size limits.
The update expression attempted to update the secondary index key to unsupported type.
An operand in the update expression has an incorrect data type.
Item size to update has exceeded the maximum allowed size.
Number overflow. Attempting to store a number with magnitude larger than supported range.
Type mismatch for attribute to update.
Nesting Levels have exceeded supported limits.
The document path provided in the update expression is invalid for update.
The provided expression refers to an attribute that does not exist in the item.
public class TransactionCanceledException : AmazonDynamoDBException
- Inheritance
-
TransactionCanceledException
Constructors
TransactionCanceledException(Exception)
Construct instance of TransactionCanceledException
public TransactionCanceledException(Exception innerException)
Parameters
innerExceptionException
TransactionCanceledException(string)
Constructs a new TransactionCanceledException with the specified error message.
public TransactionCanceledException(string message)
Parameters
messagestringDescribes the error encountered.
TransactionCanceledException(string, ErrorType, string, string, HttpStatusCode)
Construct instance of TransactionCanceledException
public TransactionCanceledException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
Parameters
messagestringerrorTypeErrorTypeerrorCodestringrequestIdstringstatusCodeHttpStatusCode
TransactionCanceledException(string, Exception)
Construct instance of TransactionCanceledException
public TransactionCanceledException(string message, Exception innerException)
Parameters
TransactionCanceledException(string, Exception, ErrorType, string, string, HttpStatusCode)
Construct instance of TransactionCanceledException
public TransactionCanceledException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
Parameters
messagestringinnerExceptionExceptionerrorTypeErrorTypeerrorCodestringrequestIdstringstatusCodeHttpStatusCode
Properties
CancellationReasons
Gets and sets the property CancellationReasons.
A list of cancellation reasons.
public List<CancellationReason> CancellationReasons { get; set; }