1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
2
3package dynamodb
4
5import (
6	"github.com/aws/aws-sdk-go/private/protocol"
7)
8
9const (
10
11	// ErrCodeBackupInUseException for service response error code
12	// "BackupInUseException".
13	//
14	// There is another ongoing conflicting backup control plane operation on the
15	// table. The backup is either being created, deleted or restored to a table.
16	ErrCodeBackupInUseException = "BackupInUseException"
17
18	// ErrCodeBackupNotFoundException for service response error code
19	// "BackupNotFoundException".
20	//
21	// Backup not found for the given BackupARN.
22	ErrCodeBackupNotFoundException = "BackupNotFoundException"
23
24	// ErrCodeConditionalCheckFailedException for service response error code
25	// "ConditionalCheckFailedException".
26	//
27	// A condition specified in the operation could not be evaluated.
28	ErrCodeConditionalCheckFailedException = "ConditionalCheckFailedException"
29
30	// ErrCodeContinuousBackupsUnavailableException for service response error code
31	// "ContinuousBackupsUnavailableException".
32	//
33	// Backups have not yet been enabled for this table.
34	ErrCodeContinuousBackupsUnavailableException = "ContinuousBackupsUnavailableException"
35
36	// ErrCodeDuplicateItemException for service response error code
37	// "DuplicateItemException".
38	//
39	// There was an attempt to insert an item with the same primary key as an item
40	// that already exists in the DynamoDB table.
41	ErrCodeDuplicateItemException = "DuplicateItemException"
42
43	// ErrCodeExportConflictException for service response error code
44	// "ExportConflictException".
45	//
46	// There was a conflict when writing to the specified S3 bucket.
47	ErrCodeExportConflictException = "ExportConflictException"
48
49	// ErrCodeExportNotFoundException for service response error code
50	// "ExportNotFoundException".
51	//
52	// The specified export was not found.
53	ErrCodeExportNotFoundException = "ExportNotFoundException"
54
55	// ErrCodeGlobalTableAlreadyExistsException for service response error code
56	// "GlobalTableAlreadyExistsException".
57	//
58	// The specified global table already exists.
59	ErrCodeGlobalTableAlreadyExistsException = "GlobalTableAlreadyExistsException"
60
61	// ErrCodeGlobalTableNotFoundException for service response error code
62	// "GlobalTableNotFoundException".
63	//
64	// The specified global table does not exist.
65	ErrCodeGlobalTableNotFoundException = "GlobalTableNotFoundException"
66
67	// ErrCodeIdempotentParameterMismatchException for service response error code
68	// "IdempotentParameterMismatchException".
69	//
70	// DynamoDB rejected the request because you retried a request with a different
71	// payload but with an idempotent token that was already used.
72	ErrCodeIdempotentParameterMismatchException = "IdempotentParameterMismatchException"
73
74	// ErrCodeIndexNotFoundException for service response error code
75	// "IndexNotFoundException".
76	//
77	// The operation tried to access a nonexistent index.
78	ErrCodeIndexNotFoundException = "IndexNotFoundException"
79
80	// ErrCodeInternalServerError for service response error code
81	// "InternalServerError".
82	//
83	// An error occurred on the server side.
84	ErrCodeInternalServerError = "InternalServerError"
85
86	// ErrCodeInvalidExportTimeException for service response error code
87	// "InvalidExportTimeException".
88	//
89	// The specified ExportTime is outside of the point in time recovery window.
90	ErrCodeInvalidExportTimeException = "InvalidExportTimeException"
91
92	// ErrCodeInvalidRestoreTimeException for service response error code
93	// "InvalidRestoreTimeException".
94	//
95	// An invalid restore time was specified. RestoreDateTime must be between EarliestRestorableDateTime
96	// and LatestRestorableDateTime.
97	ErrCodeInvalidRestoreTimeException = "InvalidRestoreTimeException"
98
99	// ErrCodeItemCollectionSizeLimitExceededException for service response error code
100	// "ItemCollectionSizeLimitExceededException".
101	//
102	// An item collection is too large. This exception is only returned for tables
103	// that have one or more local secondary indexes.
104	ErrCodeItemCollectionSizeLimitExceededException = "ItemCollectionSizeLimitExceededException"
105
106	// ErrCodeLimitExceededException for service response error code
107	// "LimitExceededException".
108	//
109	// There is no limit to the number of daily on-demand backups that can be taken.
110	//
111	// Up to 50 simultaneous table operations are allowed per account. These operations
112	// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup,
113	// and RestoreTableToPointInTime.
114	//
115	// The only exception is when you are creating a table with one or more secondary
116	// indexes. You can have up to 25 such requests running at a time; however,
117	// if the table or index specifications are complex, DynamoDB might temporarily
118	// reduce the number of concurrent operations.
119	//
120	// There is a soft account quota of 256 tables.
121	ErrCodeLimitExceededException = "LimitExceededException"
122
123	// ErrCodePointInTimeRecoveryUnavailableException for service response error code
124	// "PointInTimeRecoveryUnavailableException".
125	//
126	// Point in time recovery has not yet been enabled for this source table.
127	ErrCodePointInTimeRecoveryUnavailableException = "PointInTimeRecoveryUnavailableException"
128
129	// ErrCodeProvisionedThroughputExceededException for service response error code
130	// "ProvisionedThroughputExceededException".
131	//
132	// Your request rate is too high. The AWS SDKs for DynamoDB automatically retry
133	// requests that receive this exception. Your request is eventually successful,
134	// unless your retry queue is too large to finish. Reduce the frequency of requests
135	// and use exponential backoff. For more information, go to Error Retries and
136	// Exponential Backoff (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff)
137	// in the Amazon DynamoDB Developer Guide.
138	ErrCodeProvisionedThroughputExceededException = "ProvisionedThroughputExceededException"
139
140	// ErrCodeReplicaAlreadyExistsException for service response error code
141	// "ReplicaAlreadyExistsException".
142	//
143	// The specified replica is already part of the global table.
144	ErrCodeReplicaAlreadyExistsException = "ReplicaAlreadyExistsException"
145
146	// ErrCodeReplicaNotFoundException for service response error code
147	// "ReplicaNotFoundException".
148	//
149	// The specified replica is no longer part of the global table.
150	ErrCodeReplicaNotFoundException = "ReplicaNotFoundException"
151
152	// ErrCodeRequestLimitExceeded for service response error code
153	// "RequestLimitExceeded".
154	//
155	// Throughput exceeds the current throughput quota for your account. Please
156	// contact AWS Support at AWS Support (https://aws.amazon.com/support) to request
157	// a quota increase.
158	ErrCodeRequestLimitExceeded = "RequestLimitExceeded"
159
160	// ErrCodeResourceInUseException for service response error code
161	// "ResourceInUseException".
162	//
163	// The operation conflicts with the resource's availability. For example, you
164	// attempted to recreate an existing table, or tried to delete a table currently
165	// in the CREATING state.
166	ErrCodeResourceInUseException = "ResourceInUseException"
167
168	// ErrCodeResourceNotFoundException for service response error code
169	// "ResourceNotFoundException".
170	//
171	// The operation tried to access a nonexistent table or index. The resource
172	// might not be specified correctly, or its status might not be ACTIVE.
173	ErrCodeResourceNotFoundException = "ResourceNotFoundException"
174
175	// ErrCodeTableAlreadyExistsException for service response error code
176	// "TableAlreadyExistsException".
177	//
178	// A target table with the specified name already exists.
179	ErrCodeTableAlreadyExistsException = "TableAlreadyExistsException"
180
181	// ErrCodeTableInUseException for service response error code
182	// "TableInUseException".
183	//
184	// A target table with the specified name is either being created or deleted.
185	ErrCodeTableInUseException = "TableInUseException"
186
187	// ErrCodeTableNotFoundException for service response error code
188	// "TableNotFoundException".
189	//
190	// A source table with the name TableName does not currently exist within the
191	// subscriber's account.
192	ErrCodeTableNotFoundException = "TableNotFoundException"
193
194	// ErrCodeTransactionCanceledException for service response error code
195	// "TransactionCanceledException".
196	//
197	// The entire transaction request was canceled.
198	//
199	// DynamoDB cancels a TransactWriteItems request under the following circumstances:
200	//
201	//    * A condition in one of the condition expressions is not met.
202	//
203	//    * A table in the TransactWriteItems request is in a different account
204	//    or region.
205	//
206	//    * More than one action in the TransactWriteItems operation targets the
207	//    same item.
208	//
209	//    * There is insufficient provisioned capacity for the transaction to be
210	//    completed.
211	//
212	//    * An item size becomes too large (larger than 400 KB), or a local secondary
213	//    index (LSI) becomes too large, or a similar validation error occurs because
214	//    of changes made by the transaction.
215	//
216	//    * There is a user error, such as an invalid data format.
217	//
218	// DynamoDB cancels a TransactGetItems request under the following circumstances:
219	//
220	//    * There is an ongoing TransactGetItems operation that conflicts with a
221	//    concurrent PutItem, UpdateItem, DeleteItem or TransactWriteItems request.
222	//    In this case the TransactGetItems operation fails with a TransactionCanceledException.
223	//
224	//    * A table in the TransactGetItems request is in a different account or
225	//    region.
226	//
227	//    * There is insufficient provisioned capacity for the transaction to be
228	//    completed.
229	//
230	//    * There is a user error, such as an invalid data format.
231	//
232	// If using Java, DynamoDB lists the cancellation reasons on the CancellationReasons
233	// property. This property is not set for other languages. Transaction cancellation
234	// reasons are ordered in the order of requested items, if an item has no error
235	// it will have NONE code and Null message.
236	//
237	// Cancellation reason codes and possible error messages:
238	//
239	//    * No Errors: Code: NONE Message: null
240	//
241	//    * Conditional Check Failed: Code: ConditionalCheckFailed Message: The
242	//    conditional request failed.
243	//
244	//    * Item Collection Size Limit Exceeded: Code: ItemCollectionSizeLimitExceeded
245	//    Message: Collection size exceeded.
246	//
247	//    * Transaction Conflict: Code: TransactionConflict Message: Transaction
248	//    is ongoing for the item.
249	//
250	//    * Provisioned Throughput Exceeded: Code: ProvisionedThroughputExceeded
251	//    Messages: The level of configured provisioned throughput for the table
252	//    was exceeded. Consider increasing your provisioning level with the UpdateTable
253	//    API. This Message is received when provisioned throughput is exceeded
254	//    is on a provisioned DynamoDB table. The level of configured provisioned
255	//    throughput for one or more global secondary indexes of the table was exceeded.
256	//    Consider increasing your provisioning level for the under-provisioned
257	//    global secondary indexes with the UpdateTable API. This message is returned
258	//    when provisioned throughput is exceeded is on a provisioned GSI.
259	//
260	//    * Throttling Error: Code: ThrottlingError Messages: Throughput exceeds
261	//    the current capacity of your table or index. DynamoDB is automatically
262	//    scaling your table or index so please try again shortly. If exceptions
263	//    persist, check if you have a hot key: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-partition-key-design.html.
264	//    This message is returned when writes get throttled on an On-Demand table
265	//    as DynamoDB is automatically scaling the table. Throughput exceeds the
266	//    current capacity for one or more global secondary indexes. DynamoDB is
267	//    automatically scaling your index so please try again shortly. This message
268	//    is returned when when writes get throttled on an On-Demand GSI as DynamoDB
269	//    is automatically scaling the GSI.
270	//
271	//    * Validation Error: Code: ValidationError Messages: One or more parameter
272	//    values were invalid. The update expression attempted to update the secondary
273	//    index key beyond allowed size limits. The update expression attempted
274	//    to update the secondary index key to unsupported type. An operand in the
275	//    update expression has an incorrect data type. Item size to update has
276	//    exceeded the maximum allowed size. Number overflow. Attempting to store
277	//    a number with magnitude larger than supported range. Type mismatch for
278	//    attribute to update. Nesting Levels have exceeded supported limits. The
279	//    document path provided in the update expression is invalid for update.
280	//    The provided expression refers to an attribute that does not exist in
281	//    the item.
282	ErrCodeTransactionCanceledException = "TransactionCanceledException"
283
284	// ErrCodeTransactionConflictException for service response error code
285	// "TransactionConflictException".
286	//
287	// Operation was rejected because there is an ongoing transaction for the item.
288	ErrCodeTransactionConflictException = "TransactionConflictException"
289
290	// ErrCodeTransactionInProgressException for service response error code
291	// "TransactionInProgressException".
292	//
293	// The transaction with the given request token is already in progress.
294	ErrCodeTransactionInProgressException = "TransactionInProgressException"
295)
296
297var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
298	"BackupInUseException":                     newErrorBackupInUseException,
299	"BackupNotFoundException":                  newErrorBackupNotFoundException,
300	"ConditionalCheckFailedException":          newErrorConditionalCheckFailedException,
301	"ContinuousBackupsUnavailableException":    newErrorContinuousBackupsUnavailableException,
302	"DuplicateItemException":                   newErrorDuplicateItemException,
303	"ExportConflictException":                  newErrorExportConflictException,
304	"ExportNotFoundException":                  newErrorExportNotFoundException,
305	"GlobalTableAlreadyExistsException":        newErrorGlobalTableAlreadyExistsException,
306	"GlobalTableNotFoundException":             newErrorGlobalTableNotFoundException,
307	"IdempotentParameterMismatchException":     newErrorIdempotentParameterMismatchException,
308	"IndexNotFoundException":                   newErrorIndexNotFoundException,
309	"InternalServerError":                      newErrorInternalServerError,
310	"InvalidExportTimeException":               newErrorInvalidExportTimeException,
311	"InvalidRestoreTimeException":              newErrorInvalidRestoreTimeException,
312	"ItemCollectionSizeLimitExceededException": newErrorItemCollectionSizeLimitExceededException,
313	"LimitExceededException":                   newErrorLimitExceededException,
314	"PointInTimeRecoveryUnavailableException":  newErrorPointInTimeRecoveryUnavailableException,
315	"ProvisionedThroughputExceededException":   newErrorProvisionedThroughputExceededException,
316	"ReplicaAlreadyExistsException":            newErrorReplicaAlreadyExistsException,
317	"ReplicaNotFoundException":                 newErrorReplicaNotFoundException,
318	"RequestLimitExceeded":                     newErrorRequestLimitExceeded,
319	"ResourceInUseException":                   newErrorResourceInUseException,
320	"ResourceNotFoundException":                newErrorResourceNotFoundException,
321	"TableAlreadyExistsException":              newErrorTableAlreadyExistsException,
322	"TableInUseException":                      newErrorTableInUseException,
323	"TableNotFoundException":                   newErrorTableNotFoundException,
324	"TransactionCanceledException":             newErrorTransactionCanceledException,
325	"TransactionConflictException":             newErrorTransactionConflictException,
326	"TransactionInProgressException":           newErrorTransactionInProgressException,
327}
328