Skip to content

Commit a2e4992

Browse files
author
awstools
committed
feat(client-dynamodb): This release 1/ Adds support for throttled keys mode for CloudWatch Contributor Insights, 2/ Adds throttling reasons to exceptions across dataplane APIs. 3/ Explicitly models ThrottlingException as a class in statically typed languages. Refer to the launch day blog post for more details.
1 parent 71e32da commit a2e4992

21 files changed

+701
-264
lines changed

clients/client-dynamodb/src/commands/BatchExecuteStatementCommand.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,14 @@ export interface BatchExecuteStatementCommandOutput extends BatchExecuteStatemen
203203
* <p>An error occurred on the server side.</p>
204204
*
205205
* @throws {@link RequestLimitExceeded} (client fault)
206-
* <p>Throughput exceeds the current throughput quota for your account. Please contact
207-
* <a href="https://aws.amazon.com/support">Amazon Web ServicesSupport</a> to request a
208-
* quota increase.</p>
206+
* <p>Throughput exceeds the current throughput quota for your account. For detailed
207+
* information about why the request was throttled and the ARN of the impacted resource,
208+
* find the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ThrottlingReason.html">ThrottlingReason</a> field in the returned exception. Contact <a href="https://aws.amazon.com/support">Amazon Web ServicesSupport</a> to request a quota
209+
* increase.</p>
210+
*
211+
* @throws {@link ThrottlingException} (client fault)
212+
* <p>The request was denied due to request throttling. For detailed information about why
213+
* the request was throttled and the ARN of the impacted resource, find the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ThrottlingReason.html">ThrottlingReason</a> field in the returned exception.</p>
209214
*
210215
* @throws {@link DynamoDBServiceException}
211216
* <p>Base exception class for all service exceptions from DynamoDB service.</p>

clients/client-dynamodb/src/commands/BatchGetItemCommand.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -260,20 +260,27 @@ export interface BatchGetItemCommandOutput extends BatchGetItemOutput, __Metadat
260260
* @throws {@link InvalidEndpointException} (client fault)
261261
*
262262
* @throws {@link ProvisionedThroughputExceededException} (client fault)
263-
* <p>Your request rate is too high. The Amazon Web Services SDKs for DynamoDB
264-
* automatically retry requests that receive this exception. Your request is eventually
265-
* successful, unless your retry queue is too large to finish. Reduce the frequency of
266-
* requests and use exponential backoff. For more information, go to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff">Error Retries and Exponential Backoff</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
263+
* <p>The request was denied due to request throttling. For detailed information about
264+
* why the request was throttled and the ARN of the impacted resource, find the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ThrottlingReason.html">ThrottlingReason</a> field in the returned exception. The Amazon Web Services
265+
* SDKs for DynamoDB automatically retry requests that receive this exception.
266+
* Your request is eventually successful, unless your retry queue is too large to finish.
267+
* Reduce the frequency of requests and use exponential backoff. For more information, go
268+
* to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff">Error Retries and Exponential Backoff</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
267269
*
268270
* @throws {@link RequestLimitExceeded} (client fault)
269-
* <p>Throughput exceeds the current throughput quota for your account. Please contact
270-
* <a href="https://aws.amazon.com/support">Amazon Web ServicesSupport</a> to request a
271-
* quota increase.</p>
271+
* <p>Throughput exceeds the current throughput quota for your account. For detailed
272+
* information about why the request was throttled and the ARN of the impacted resource,
273+
* find the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ThrottlingReason.html">ThrottlingReason</a> field in the returned exception. Contact <a href="https://aws.amazon.com/support">Amazon Web ServicesSupport</a> to request a quota
274+
* increase.</p>
272275
*
273276
* @throws {@link ResourceNotFoundException} (client fault)
274277
* <p>The operation tried to access a nonexistent table or index. The resource might not
275278
* be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
276279
*
280+
* @throws {@link ThrottlingException} (client fault)
281+
* <p>The request was denied due to request throttling. For detailed information about why
282+
* the request was throttled and the ARN of the impacted resource, find the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ThrottlingReason.html">ThrottlingReason</a> field in the returned exception.</p>
283+
*
277284
* @throws {@link DynamoDBServiceException}
278285
* <p>Base exception class for all service exceptions from DynamoDB service.</p>
279286
*

clients/client-dynamodb/src/commands/BatchWriteItemCommand.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -306,24 +306,31 @@ export interface BatchWriteItemCommandOutput extends BatchWriteItemOutput, __Met
306306
* have one or more local secondary indexes.</p>
307307
*
308308
* @throws {@link ProvisionedThroughputExceededException} (client fault)
309-
* <p>Your request rate is too high. The Amazon Web Services SDKs for DynamoDB
310-
* automatically retry requests that receive this exception. Your request is eventually
311-
* successful, unless your retry queue is too large to finish. Reduce the frequency of
312-
* requests and use exponential backoff. For more information, go to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff">Error Retries and Exponential Backoff</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
309+
* <p>The request was denied due to request throttling. For detailed information about
310+
* why the request was throttled and the ARN of the impacted resource, find the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ThrottlingReason.html">ThrottlingReason</a> field in the returned exception. The Amazon Web Services
311+
* SDKs for DynamoDB automatically retry requests that receive this exception.
312+
* Your request is eventually successful, unless your retry queue is too large to finish.
313+
* Reduce the frequency of requests and use exponential backoff. For more information, go
314+
* to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff">Error Retries and Exponential Backoff</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
313315
*
314316
* @throws {@link ReplicatedWriteConflictException} (client fault)
315317
* <p>The request was rejected because one or more items in the request are being modified
316318
* by a request in another Region. </p>
317319
*
318320
* @throws {@link RequestLimitExceeded} (client fault)
319-
* <p>Throughput exceeds the current throughput quota for your account. Please contact
320-
* <a href="https://aws.amazon.com/support">Amazon Web ServicesSupport</a> to request a
321-
* quota increase.</p>
321+
* <p>Throughput exceeds the current throughput quota for your account. For detailed
322+
* information about why the request was throttled and the ARN of the impacted resource,
323+
* find the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ThrottlingReason.html">ThrottlingReason</a> field in the returned exception. Contact <a href="https://aws.amazon.com/support">Amazon Web ServicesSupport</a> to request a quota
324+
* increase.</p>
322325
*
323326
* @throws {@link ResourceNotFoundException} (client fault)
324327
* <p>The operation tried to access a nonexistent table or index. The resource might not
325328
* be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
326329
*
330+
* @throws {@link ThrottlingException} (client fault)
331+
* <p>The request was denied due to request throttling. For detailed information about why
332+
* the request was throttled and the ARN of the impacted resource, find the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ThrottlingReason.html">ThrottlingReason</a> field in the returned exception.</p>
333+
*
327334
* @throws {@link DynamoDBServiceException}
328335
* <p>Base exception class for all service exceptions from DynamoDB service.</p>
329336
*

clients/client-dynamodb/src/commands/DeleteItemCommand.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -219,24 +219,31 @@ export interface DeleteItemCommandOutput extends DeleteItemOutput, __MetadataBea
219219
* have one or more local secondary indexes.</p>
220220
*
221221
* @throws {@link ProvisionedThroughputExceededException} (client fault)
222-
* <p>Your request rate is too high. The Amazon Web Services SDKs for DynamoDB
223-
* automatically retry requests that receive this exception. Your request is eventually
224-
* successful, unless your retry queue is too large to finish. Reduce the frequency of
225-
* requests and use exponential backoff. For more information, go to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff">Error Retries and Exponential Backoff</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
222+
* <p>The request was denied due to request throttling. For detailed information about
223+
* why the request was throttled and the ARN of the impacted resource, find the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ThrottlingReason.html">ThrottlingReason</a> field in the returned exception. The Amazon Web Services
224+
* SDKs for DynamoDB automatically retry requests that receive this exception.
225+
* Your request is eventually successful, unless your retry queue is too large to finish.
226+
* Reduce the frequency of requests and use exponential backoff. For more information, go
227+
* to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff">Error Retries and Exponential Backoff</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
226228
*
227229
* @throws {@link ReplicatedWriteConflictException} (client fault)
228230
* <p>The request was rejected because one or more items in the request are being modified
229231
* by a request in another Region. </p>
230232
*
231233
* @throws {@link RequestLimitExceeded} (client fault)
232-
* <p>Throughput exceeds the current throughput quota for your account. Please contact
233-
* <a href="https://aws.amazon.com/support">Amazon Web ServicesSupport</a> to request a
234-
* quota increase.</p>
234+
* <p>Throughput exceeds the current throughput quota for your account. For detailed
235+
* information about why the request was throttled and the ARN of the impacted resource,
236+
* find the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ThrottlingReason.html">ThrottlingReason</a> field in the returned exception. Contact <a href="https://aws.amazon.com/support">Amazon Web ServicesSupport</a> to request a quota
237+
* increase.</p>
235238
*
236239
* @throws {@link ResourceNotFoundException} (client fault)
237240
* <p>The operation tried to access a nonexistent table or index. The resource might not
238241
* be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
239242
*
243+
* @throws {@link ThrottlingException} (client fault)
244+
* <p>The request was denied due to request throttling. For detailed information about why
245+
* the request was throttled and the ARN of the impacted resource, find the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ThrottlingReason.html">ThrottlingReason</a> field in the returned exception.</p>
246+
*
240247
* @throws {@link TransactionConflictException} (client fault)
241248
* <p>Operation was rejected because there is an ongoing transaction for the
242249
* item.</p>

clients/client-dynamodb/src/commands/DescribeContributorInsightsCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export interface DescribeContributorInsightsCommandOutput extends DescribeContri
5454
* // ExceptionName: "STRING_VALUE",
5555
* // ExceptionDescription: "STRING_VALUE",
5656
* // },
57+
* // ContributorInsightsMode: "ACCESSED_AND_THROTTLED_KEYS" || "THROTTLED_KEYS",
5758
* // };
5859
*
5960
* ```

clients/client-dynamodb/src/commands/ExecuteStatementCommand.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,20 +204,27 @@ export interface ExecuteStatementCommandOutput extends ExecuteStatementOutput, _
204204
* have one or more local secondary indexes.</p>
205205
*
206206
* @throws {@link ProvisionedThroughputExceededException} (client fault)
207-
* <p>Your request rate is too high. The Amazon Web Services SDKs for DynamoDB
208-
* automatically retry requests that receive this exception. Your request is eventually
209-
* successful, unless your retry queue is too large to finish. Reduce the frequency of
210-
* requests and use exponential backoff. For more information, go to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff">Error Retries and Exponential Backoff</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
207+
* <p>The request was denied due to request throttling. For detailed information about
208+
* why the request was throttled and the ARN of the impacted resource, find the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ThrottlingReason.html">ThrottlingReason</a> field in the returned exception. The Amazon Web Services
209+
* SDKs for DynamoDB automatically retry requests that receive this exception.
210+
* Your request is eventually successful, unless your retry queue is too large to finish.
211+
* Reduce the frequency of requests and use exponential backoff. For more information, go
212+
* to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff">Error Retries and Exponential Backoff</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
211213
*
212214
* @throws {@link RequestLimitExceeded} (client fault)
213-
* <p>Throughput exceeds the current throughput quota for your account. Please contact
214-
* <a href="https://aws.amazon.com/support">Amazon Web ServicesSupport</a> to request a
215-
* quota increase.</p>
215+
* <p>Throughput exceeds the current throughput quota for your account. For detailed
216+
* information about why the request was throttled and the ARN of the impacted resource,
217+
* find the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ThrottlingReason.html">ThrottlingReason</a> field in the returned exception. Contact <a href="https://aws.amazon.com/support">Amazon Web ServicesSupport</a> to request a quota
218+
* increase.</p>
216219
*
217220
* @throws {@link ResourceNotFoundException} (client fault)
218221
* <p>The operation tried to access a nonexistent table or index. The resource might not
219222
* be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
220223
*
224+
* @throws {@link ThrottlingException} (client fault)
225+
* <p>The request was denied due to request throttling. For detailed information about why
226+
* the request was throttled and the ARN of the impacted resource, find the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ThrottlingReason.html">ThrottlingReason</a> field in the returned exception.</p>
227+
*
221228
* @throws {@link TransactionConflictException} (client fault)
222229
* <p>Operation was rejected because there is an ongoing transaction for the
223230
* item.</p>

clients/client-dynamodb/src/commands/ExecuteTransactionCommand.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -194,20 +194,27 @@ export interface ExecuteTransactionCommandOutput extends ExecuteTransactionOutpu
194194
* <p>An error occurred on the server side.</p>
195195
*
196196
* @throws {@link ProvisionedThroughputExceededException} (client fault)
197-
* <p>Your request rate is too high. The Amazon Web Services SDKs for DynamoDB
198-
* automatically retry requests that receive this exception. Your request is eventually
199-
* successful, unless your retry queue is too large to finish. Reduce the frequency of
200-
* requests and use exponential backoff. For more information, go to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff">Error Retries and Exponential Backoff</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
197+
* <p>The request was denied due to request throttling. For detailed information about
198+
* why the request was throttled and the ARN of the impacted resource, find the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ThrottlingReason.html">ThrottlingReason</a> field in the returned exception. The Amazon Web Services
199+
* SDKs for DynamoDB automatically retry requests that receive this exception.
200+
* Your request is eventually successful, unless your retry queue is too large to finish.
201+
* Reduce the frequency of requests and use exponential backoff. For more information, go
202+
* to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff">Error Retries and Exponential Backoff</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
201203
*
202204
* @throws {@link RequestLimitExceeded} (client fault)
203-
* <p>Throughput exceeds the current throughput quota for your account. Please contact
204-
* <a href="https://aws.amazon.com/support">Amazon Web ServicesSupport</a> to request a
205-
* quota increase.</p>
205+
* <p>Throughput exceeds the current throughput quota for your account. For detailed
206+
* information about why the request was throttled and the ARN of the impacted resource,
207+
* find the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ThrottlingReason.html">ThrottlingReason</a> field in the returned exception. Contact <a href="https://aws.amazon.com/support">Amazon Web ServicesSupport</a> to request a quota
208+
* increase.</p>
206209
*
207210
* @throws {@link ResourceNotFoundException} (client fault)
208211
* <p>The operation tried to access a nonexistent table or index. The resource might not
209212
* be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
210213
*
214+
* @throws {@link ThrottlingException} (client fault)
215+
* <p>The request was denied due to request throttling. For detailed information about why
216+
* the request was throttled and the ARN of the impacted resource, find the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ThrottlingReason.html">ThrottlingReason</a> field in the returned exception.</p>
217+
*
211218
* @throws {@link TransactionCanceledException} (client fault)
212219
* <p>The entire transaction request was canceled.</p>
213220
* <p>DynamoDB cancels a <code>TransactWriteItems</code> request under the following

0 commit comments

Comments
 (0)