/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the dynamodb-2012-08-10.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.DynamoDBv2.Model
{
///
/// 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
TransactWriteItems
request is in a different account or
/// region.
///
/// -
///
/// More than one action in the
TransactWriteItems
operation 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.
///
///
///
/// DynamoDB cancels a TransactGetItems
request under the following circumstances:
///
/// -
///
/// There is an ongoing
TransactGetItems
operation that conflicts with a
/// concurrent PutItem
, UpdateItem
, DeleteItem
/// or TransactWriteItems
request. In this case the TransactGetItems
/// operation fails with a TransactionCanceledException
.
///
/// -
///
/// A table in the
TransactGetItems
request 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.
///
///
///
#if !NETSTANDARD
[Serializable]
#endif
public partial class TransactionCanceledException : AmazonDynamoDBException
{
private List _cancellationReasons = new List();
///
/// Constructs a new TransactionCanceledException with the specified error
/// message.
///
///
/// Describes the error encountered.
///
public TransactionCanceledException(string message)
: base(message) {}
///
/// Construct instance of TransactionCanceledException
///
///
///
public TransactionCanceledException(string message, Exception innerException)
: base(message, innerException) {}
///
/// Construct instance of TransactionCanceledException
///
///
public TransactionCanceledException(Exception innerException)
: base(innerException) {}
///
/// Construct instance of TransactionCanceledException
///
///
///
///
///
///
///
public TransactionCanceledException(string message, Exception innerException, Amazon.Runtime.ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, innerException, errorType, errorCode, requestId, statusCode) {}
///
/// Construct instance of TransactionCanceledException
///
///
///
///
///
///
public TransactionCanceledException(string message, Amazon.Runtime.ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, errorType, errorCode, requestId, statusCode) {}
#if !NETSTANDARD
///
/// Constructs a new instance of the TransactionCanceledException class with serialized data.
///
/// The that holds the serialized object data about the exception being thrown.
/// The that contains contextual information about the source or destination.
/// The parameter is null.
/// The class name is null or is zero (0).
protected TransactionCanceledException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
this.CancellationReasons = (List)info.GetValue("CancellationReasons", typeof(List));
}
///
/// Sets the with information about the exception.
///
/// The that holds the serialized object data about the exception being thrown.
/// The that contains contextual information about the source or destination.
/// The parameter is a null reference (Nothing in Visual Basic).
#if BCL35
[System.Security.Permissions.SecurityPermission(
System.Security.Permissions.SecurityAction.LinkDemand,
Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
#endif
[System.Security.SecurityCritical]
// These FxCop rules are giving false-positives for this method
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")]
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
{
base.GetObjectData(info, context);
info.AddValue("CancellationReasons", this.CancellationReasons);
}
#endif
///
/// Gets and sets the property CancellationReasons.
///
/// A list of cancellation reasons.
///
///
[AWSProperty(Min=1, Max=100)]
public List CancellationReasons
{
get { return this._cancellationReasons; }
set { this._cancellationReasons = value; }
}
// Check to see if CancellationReasons property is set
internal bool IsSetCancellationReasons()
{
return this._cancellationReasons != null && this._cancellationReasons.Count > 0;
}
}
}