Skip to content

Commit 73ec7dc

Browse files
author
awstools
committed
feat(client-dynamodb): This change adds support for witnesses in global tables. It also adds a new table status, REPLICATION_NOT_AUTHORIZED. This status will indicate scenarios where global replicas table can't be utilized for data plane operations.
1 parent b85b1f2 commit 73ec7dc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1064
-662
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,10 @@ export interface BatchWriteItemCommandOutput extends BatchWriteItemOutput, __Met
311311
* successful, unless your retry queue is too large to finish. Reduce the frequency of
312312
* 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>
313313
*
314+
* @throws {@link ReplicatedWriteConflictException} (client fault)
315+
* <p>The request was rejected because one or more items in the request are being modified
316+
* by a request in another Region. </p>
317+
*
314318
* @throws {@link RequestLimitExceeded} (client fault)
315319
* <p>Throughput exceeds the current throughput quota for your account. Please contact
316320
* <a href="https://aws.amazon.com/support">Amazon Web ServicesSupport</a> to request a

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

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -104,27 +104,30 @@ export interface CreateBackupCommandOutput extends CreateBackupOutput, __Metadat
104104
*
105105
* @throws {@link LimitExceededException} (client fault)
106106
* <p>There is no limit to the number of daily on-demand backups that can be taken. </p>
107-
* <p>For most purposes, up to 500 simultaneous table operations are allowed per account. These operations
108-
* include <code>CreateTable</code>, <code>UpdateTable</code>,
107+
* <p>For most purposes, up to 500 simultaneous table operations are allowed per account.
108+
* These operations include <code>CreateTable</code>, <code>UpdateTable</code>,
109109
* <code>DeleteTable</code>,<code>UpdateTimeToLive</code>,
110110
* <code>RestoreTableFromBackup</code>, and <code>RestoreTableToPointInTime</code>. </p>
111-
* <p>When you are creating a table with one or more secondary
112-
* indexes, you can have up to 250 such requests running at a time. However, if the table or
113-
* index specifications are complex, then DynamoDB might temporarily reduce the number
114-
* of concurrent operations.</p>
115-
* <p>When importing into DynamoDB, up to 50 simultaneous import table operations are allowed per account.</p>
111+
* <p>When you are creating a table with one or more secondary indexes, you can have up
112+
* to 250 such requests running at a time. However, if the table or index specifications
113+
* are complex, then DynamoDB might temporarily reduce the number of concurrent
114+
* operations.</p>
115+
* <p>When importing into DynamoDB, up to 50 simultaneous import table operations are
116+
* allowed per account.</p>
116117
* <p>There is a soft account quota of 2,500 tables.</p>
117-
* <p>GetRecords was called with a value of more than 1000 for the limit request parameter.</p>
118-
* <p>More than 2 processes are reading from the same streams shard at the same time. Exceeding
119-
* this limit may result in request throttling.</p>
118+
* <p>GetRecords was called with a value of more than 1000 for the limit request
119+
* parameter.</p>
120+
* <p>More than 2 processes are reading from the same streams shard at the same time.
121+
* Exceeding this limit may result in request throttling.</p>
120122
*
121123
* @throws {@link TableInUseException} (client fault)
122124
* <p>A target table with the specified name is either being created or deleted.
123125
* </p>
124126
*
125127
* @throws {@link TableNotFoundException} (client fault)
126128
* <p>A source table with the name <code>TableName</code> does not currently exist within
127-
* the subscriber's account or the subscriber is operating in the wrong Amazon Web Services Region.</p>
129+
* the subscriber's account or the subscriber is operating in the wrong Amazon Web Services
130+
* Region.</p>
128131
*
129132
* @throws {@link DynamoDBServiceException}
130133
* <p>Base exception class for all service exceptions from DynamoDB service.</p>

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

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export interface CreateGlobalTableCommandOutput extends CreateGlobalTableOutput,
104104
* // ReplicationGroup: [ // ReplicaDescriptionList
105105
* // { // ReplicaDescription
106106
* // RegionName: "STRING_VALUE",
107-
* // ReplicaStatus: "CREATING" || "CREATION_FAILED" || "UPDATING" || "DELETING" || "ACTIVE" || "REGION_DISABLED" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS",
107+
* // ReplicaStatus: "CREATING" || "CREATION_FAILED" || "UPDATING" || "DELETING" || "ACTIVE" || "REGION_DISABLED" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS" || "ARCHIVING" || "ARCHIVED" || "REPLICATION_NOT_AUTHORIZED",
108108
* // ReplicaStatusDescription: "STRING_VALUE",
109109
* // ReplicaStatusPercentProgress: "STRING_VALUE",
110110
* // KMSMasterKeyId: "STRING_VALUE",
@@ -117,7 +117,7 @@ export interface CreateGlobalTableCommandOutput extends CreateGlobalTableOutput,
117117
* // WarmThroughput: { // TableWarmThroughputDescription
118118
* // ReadUnitsPerSecond: Number("long"),
119119
* // WriteUnitsPerSecond: Number("long"),
120-
* // Status: "CREATING" || "UPDATING" || "DELETING" || "ACTIVE" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS" || "ARCHIVING" || "ARCHIVED",
120+
* // Status: "CREATING" || "UPDATING" || "DELETING" || "ACTIVE" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS" || "ARCHIVING" || "ARCHIVED" || "REPLICATION_NOT_AUTHORIZED",
121121
* // },
122122
* // GlobalSecondaryIndexes: [ // ReplicaGlobalSecondaryIndexDescriptionList
123123
* // { // ReplicaGlobalSecondaryIndexDescription
@@ -167,23 +167,26 @@ export interface CreateGlobalTableCommandOutput extends CreateGlobalTableOutput,
167167
*
168168
* @throws {@link LimitExceededException} (client fault)
169169
* <p>There is no limit to the number of daily on-demand backups that can be taken. </p>
170-
* <p>For most purposes, up to 500 simultaneous table operations are allowed per account. These operations
171-
* include <code>CreateTable</code>, <code>UpdateTable</code>,
170+
* <p>For most purposes, up to 500 simultaneous table operations are allowed per account.
171+
* These operations include <code>CreateTable</code>, <code>UpdateTable</code>,
172172
* <code>DeleteTable</code>,<code>UpdateTimeToLive</code>,
173173
* <code>RestoreTableFromBackup</code>, and <code>RestoreTableToPointInTime</code>. </p>
174-
* <p>When you are creating a table with one or more secondary
175-
* indexes, you can have up to 250 such requests running at a time. However, if the table or
176-
* index specifications are complex, then DynamoDB might temporarily reduce the number
177-
* of concurrent operations.</p>
178-
* <p>When importing into DynamoDB, up to 50 simultaneous import table operations are allowed per account.</p>
174+
* <p>When you are creating a table with one or more secondary indexes, you can have up
175+
* to 250 such requests running at a time. However, if the table or index specifications
176+
* are complex, then DynamoDB might temporarily reduce the number of concurrent
177+
* operations.</p>
178+
* <p>When importing into DynamoDB, up to 50 simultaneous import table operations are
179+
* allowed per account.</p>
179180
* <p>There is a soft account quota of 2,500 tables.</p>
180-
* <p>GetRecords was called with a value of more than 1000 for the limit request parameter.</p>
181-
* <p>More than 2 processes are reading from the same streams shard at the same time. Exceeding
182-
* this limit may result in request throttling.</p>
181+
* <p>GetRecords was called with a value of more than 1000 for the limit request
182+
* parameter.</p>
183+
* <p>More than 2 processes are reading from the same streams shard at the same time.
184+
* Exceeding this limit may result in request throttling.</p>
183185
*
184186
* @throws {@link TableNotFoundException} (client fault)
185187
* <p>A source table with the name <code>TableName</code> does not currently exist within
186-
* the subscriber's account or the subscriber is operating in the wrong Amazon Web Services Region.</p>
188+
* the subscriber's account or the subscriber is operating in the wrong Amazon Web Services
189+
* Region.</p>
187190
*
188191
* @throws {@link DynamoDBServiceException}
189192
* <p>Base exception class for all service exceptions from DynamoDB service.</p>

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

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export interface CreateTableCommandOutput extends CreateTableOutput, __MetadataB
156156
* // KeyType: "HASH" || "RANGE", // required
157157
* // },
158158
* // ],
159-
* // TableStatus: "CREATING" || "UPDATING" || "DELETING" || "ACTIVE" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS" || "ARCHIVING" || "ARCHIVED",
159+
* // TableStatus: "CREATING" || "UPDATING" || "DELETING" || "ACTIVE" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS" || "ARCHIVING" || "ARCHIVED" || "REPLICATION_NOT_AUTHORIZED",
160160
* // CreationDateTime: new Date("TIMESTAMP"),
161161
* // ProvisionedThroughput: { // ProvisionedThroughputDescription
162162
* // LastIncreaseDateTime: new Date("TIMESTAMP"),
@@ -241,7 +241,7 @@ export interface CreateTableCommandOutput extends CreateTableOutput, __MetadataB
241241
* // Replicas: [ // ReplicaDescriptionList
242242
* // { // ReplicaDescription
243243
* // RegionName: "STRING_VALUE",
244-
* // ReplicaStatus: "CREATING" || "CREATION_FAILED" || "UPDATING" || "DELETING" || "ACTIVE" || "REGION_DISABLED" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS",
244+
* // ReplicaStatus: "CREATING" || "CREATION_FAILED" || "UPDATING" || "DELETING" || "ACTIVE" || "REGION_DISABLED" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS" || "ARCHIVING" || "ARCHIVED" || "REPLICATION_NOT_AUTHORIZED",
245245
* // ReplicaStatusDescription: "STRING_VALUE",
246246
* // ReplicaStatusPercentProgress: "STRING_VALUE",
247247
* // KMSMasterKeyId: "STRING_VALUE",
@@ -254,7 +254,7 @@ export interface CreateTableCommandOutput extends CreateTableOutput, __MetadataB
254254
* // WarmThroughput: { // TableWarmThroughputDescription
255255
* // ReadUnitsPerSecond: Number("long"),
256256
* // WriteUnitsPerSecond: Number("long"),
257-
* // Status: "CREATING" || "UPDATING" || "DELETING" || "ACTIVE" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS" || "ARCHIVING" || "ARCHIVED",
257+
* // Status: "CREATING" || "UPDATING" || "DELETING" || "ACTIVE" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS" || "ARCHIVING" || "ARCHIVED" || "REPLICATION_NOT_AUTHORIZED",
258258
* // },
259259
* // GlobalSecondaryIndexes: [ // ReplicaGlobalSecondaryIndexDescriptionList
260260
* // { // ReplicaGlobalSecondaryIndexDescription
@@ -279,6 +279,12 @@ export interface CreateTableCommandOutput extends CreateTableOutput, __MetadataB
279279
* // },
280280
* // },
281281
* // ],
282+
* // GlobalTableWitnesses: [ // GlobalTableWitnessDescriptionList
283+
* // { // GlobalTableWitnessDescription
284+
* // RegionName: "STRING_VALUE",
285+
* // WitnessStatus: "CREATING" || "DELETING" || "ACTIVE",
286+
* // },
287+
* // ],
282288
* // RestoreSummary: { // RestoreSummary
283289
* // SourceBackupArn: "STRING_VALUE",
284290
* // SourceTableArn: "STRING_VALUE",
@@ -308,7 +314,7 @@ export interface CreateTableCommandOutput extends CreateTableOutput, __MetadataB
308314
* // WarmThroughput: {
309315
* // ReadUnitsPerSecond: Number("long"),
310316
* // WriteUnitsPerSecond: Number("long"),
311-
* // Status: "CREATING" || "UPDATING" || "DELETING" || "ACTIVE" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS" || "ARCHIVING" || "ARCHIVED",
317+
* // Status: "CREATING" || "UPDATING" || "DELETING" || "ACTIVE" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS" || "ARCHIVING" || "ARCHIVED" || "REPLICATION_NOT_AUTHORIZED",
312318
* // },
313319
* // MultiRegionConsistency: "EVENTUAL" || "STRONG",
314320
* // },
@@ -329,19 +335,21 @@ export interface CreateTableCommandOutput extends CreateTableOutput, __MetadataB
329335
*
330336
* @throws {@link LimitExceededException} (client fault)
331337
* <p>There is no limit to the number of daily on-demand backups that can be taken. </p>
332-
* <p>For most purposes, up to 500 simultaneous table operations are allowed per account. These operations
333-
* include <code>CreateTable</code>, <code>UpdateTable</code>,
338+
* <p>For most purposes, up to 500 simultaneous table operations are allowed per account.
339+
* These operations include <code>CreateTable</code>, <code>UpdateTable</code>,
334340
* <code>DeleteTable</code>,<code>UpdateTimeToLive</code>,
335341
* <code>RestoreTableFromBackup</code>, and <code>RestoreTableToPointInTime</code>. </p>
336-
* <p>When you are creating a table with one or more secondary
337-
* indexes, you can have up to 250 such requests running at a time. However, if the table or
338-
* index specifications are complex, then DynamoDB might temporarily reduce the number
339-
* of concurrent operations.</p>
340-
* <p>When importing into DynamoDB, up to 50 simultaneous import table operations are allowed per account.</p>
342+
* <p>When you are creating a table with one or more secondary indexes, you can have up
343+
* to 250 such requests running at a time. However, if the table or index specifications
344+
* are complex, then DynamoDB might temporarily reduce the number of concurrent
345+
* operations.</p>
346+
* <p>When importing into DynamoDB, up to 50 simultaneous import table operations are
347+
* allowed per account.</p>
341348
* <p>There is a soft account quota of 2,500 tables.</p>
342-
* <p>GetRecords was called with a value of more than 1000 for the limit request parameter.</p>
343-
* <p>More than 2 processes are reading from the same streams shard at the same time. Exceeding
344-
* this limit may result in request throttling.</p>
349+
* <p>GetRecords was called with a value of more than 1000 for the limit request
350+
* parameter.</p>
351+
* <p>More than 2 processes are reading from the same streams shard at the same time.
352+
* Exceeding this limit may result in request throttling.</p>
345353
*
346354
* @throws {@link ResourceInUseException} (client fault)
347355
* <p>The operation conflicts with the resource's availability. For example:</p>
@@ -350,13 +358,15 @@ export interface CreateTableCommandOutput extends CreateTableOutput, __MetadataB
350358
* <p>You attempted to recreate an existing table.</p>
351359
* </li>
352360
* <li>
353-
* <p>You tried to delete a table currently in the <code>CREATING</code> state.</p>
361+
* <p>You tried to delete a table currently in the <code>CREATING</code>
362+
* state.</p>
354363
* </li>
355364
* <li>
356365
* <p>You tried to update a resource that was already being updated.</p>
357366
* </li>
358367
* </ul>
359-
* <p>When appropriate, wait for the ongoing update to complete and attempt the request again.</p>
368+
* <p>When appropriate, wait for the ongoing update to complete and attempt the request
369+
* again.</p>
360370
*
361371
* @throws {@link DynamoDBServiceException}
362372
* <p>Base exception class for all service exceptions from DynamoDB service.</p>

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

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -159,19 +159,21 @@ export interface DeleteBackupCommandOutput extends DeleteBackupOutput, __Metadat
159159
*
160160
* @throws {@link LimitExceededException} (client fault)
161161
* <p>There is no limit to the number of daily on-demand backups that can be taken. </p>
162-
* <p>For most purposes, up to 500 simultaneous table operations are allowed per account. These operations
163-
* include <code>CreateTable</code>, <code>UpdateTable</code>,
162+
* <p>For most purposes, up to 500 simultaneous table operations are allowed per account.
163+
* These operations include <code>CreateTable</code>, <code>UpdateTable</code>,
164164
* <code>DeleteTable</code>,<code>UpdateTimeToLive</code>,
165165
* <code>RestoreTableFromBackup</code>, and <code>RestoreTableToPointInTime</code>. </p>
166-
* <p>When you are creating a table with one or more secondary
167-
* indexes, you can have up to 250 such requests running at a time. However, if the table or
168-
* index specifications are complex, then DynamoDB might temporarily reduce the number
169-
* of concurrent operations.</p>
170-
* <p>When importing into DynamoDB, up to 50 simultaneous import table operations are allowed per account.</p>
166+
* <p>When you are creating a table with one or more secondary indexes, you can have up
167+
* to 250 such requests running at a time. However, if the table or index specifications
168+
* are complex, then DynamoDB might temporarily reduce the number of concurrent
169+
* operations.</p>
170+
* <p>When importing into DynamoDB, up to 50 simultaneous import table operations are
171+
* allowed per account.</p>
171172
* <p>There is a soft account quota of 2,500 tables.</p>
172-
* <p>GetRecords was called with a value of more than 1000 for the limit request parameter.</p>
173-
* <p>More than 2 processes are reading from the same streams shard at the same time. Exceeding
174-
* this limit may result in request throttling.</p>
173+
* <p>GetRecords was called with a value of more than 1000 for the limit request
174+
* parameter.</p>
175+
* <p>More than 2 processes are reading from the same streams shard at the same time.
176+
* Exceeding this limit may result in request throttling.</p>
175177
*
176178
* @throws {@link DynamoDBServiceException}
177179
* <p>Base exception class for all service exceptions from DynamoDB service.</p>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ export interface DeleteItemCommandOutput extends DeleteItemOutput, __MetadataBea
225225
* 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>
226226
*
227227
* @throws {@link ReplicatedWriteConflictException} (client fault)
228-
* <p>The request was rejected because one or more items in the request are being modified by a request in another Region. </p>
228+
* <p>The request was rejected because one or more items in the request are being modified
229+
* by a request in another Region. </p>
229230
*
230231
* @throws {@link RequestLimitExceeded} (client fault)
231232
* <p>Throughput exceeds the current throughput quota for your account. Please contact

0 commit comments

Comments
 (0)