#[non_exhaustive]pub struct TransactionCanceledException {
pub message: Option<String>,
pub cancellation_reasons: Option<Vec<CancellationReason>>,
/* private fields */
}Expand description
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
TransactWriteItemsrequest is in a different account or region. -
More than one action in the
TransactWriteItemsoperation targets the same item. -
There 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.
-
There is an ongoing
TransactWriteItemsoperation that conflicts with a concurrentTransactWriteItemsrequest. In this case theTransactWriteItemsoperation fails with aTransactionCanceledException.
DynamoDB cancels a TransactGetItems request under the following circumstances:
-
There is an ongoing
TransactGetItemsoperation that conflicts with a concurrentPutItem,UpdateItem,DeleteItemorTransactWriteItemsrequest. In this case theTransactGetItemsoperation fails with aTransactionCanceledException. -
A table in the
TransactGetItemsrequest is in a different account or region. -
There is insufficient provisioned capacity for the transaction to be completed.
-
There is a user error, such as an invalid data format.
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:
None -
Message:
null
-
-
Conditional Check Failed:
-
Code:
ConditionalCheckFailed -
Message: The conditional request failed.
-
-
Item Collection Size Limit Exceeded:
-
Code:
ItemCollectionSizeLimitExceeded -
Message: Collection size exceeded.
-
-
Transaction Conflict:
-
Code:
TransactionConflict -
Message: Transaction is ongoing for the item.
-
-
Provisioned Throughput Exceeded:
-
Code:
ProvisionedThroughputExceeded -
Messages:
-
The level of configured provisioned throughput for the table was exceeded. Consider increasing your provisioning level with the UpdateTable API.
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.
This message is returned when provisioned throughput is exceeded is on a provisioned GSI.
-
-
-
Throttling Error:
-
Code:
ThrottlingError -
Messages:
-
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.
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.
This message is returned when writes get throttled on an On-Demand GSI as DynamoDB is automatically scaling the GSI.
-
-
-
Validation Error:
-
Code:
ValidationError -
Messages:
-
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.
-
-
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.message: Option<String>§cancellation_reasons: Option<Vec<CancellationReason>>A list of cancellation reasons.
Implementations§
Source§impl TransactionCanceledException
impl TransactionCanceledException
Sourcepub fn cancellation_reasons(&self) -> &[CancellationReason]
pub fn cancellation_reasons(&self) -> &[CancellationReason]
A list of cancellation reasons.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .cancellation_reasons.is_none().
Source§impl TransactionCanceledException
impl TransactionCanceledException
Sourcepub fn builder() -> TransactionCanceledExceptionBuilder
pub fn builder() -> TransactionCanceledExceptionBuilder
Creates a new builder-style object to manufacture TransactionCanceledException.
Trait Implementations§
Source§impl Clone for TransactionCanceledException
impl Clone for TransactionCanceledException
Source§fn clone(&self) -> TransactionCanceledException
fn clone(&self) -> TransactionCanceledException
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TransactionCanceledException
impl Debug for TransactionCanceledException
Source§impl Error for TransactionCanceledException
impl Error for TransactionCanceledException
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl PartialEq for TransactionCanceledException
impl PartialEq for TransactionCanceledException
Source§fn eq(&self, other: &TransactionCanceledException) -> bool
fn eq(&self, other: &TransactionCanceledException) -> bool
self and other values to be equal, and is used by ==.Source§impl ProvideErrorMetadata for TransactionCanceledException
impl ProvideErrorMetadata for TransactionCanceledException
Source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
Source§impl RequestId for TransactionCanceledException
impl RequestId for TransactionCanceledException
Source§fn request_id(&self) -> Option<&str>
fn request_id(&self) -> Option<&str>
None if the service could not be reached.impl StructuralPartialEq for TransactionCanceledException
Auto Trait Implementations§
impl Freeze for TransactionCanceledException
impl RefUnwindSafe for TransactionCanceledException
impl Send for TransactionCanceledException
impl Sync for TransactionCanceledException
impl Unpin for TransactionCanceledException
impl UnwindSafe for TransactionCanceledException
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more