Skip to content

Commit c96da51

Browse files
author
awstools
committed
feat(client-dynamodb): This change adds support for global tables with multi-Region strong consistency (in preview). The UpdateTable API now supports a new attribute MultiRegionConsistency to set consistency when creating global tables. The DescribeTable output now optionally includes the MultiRegionConsistency attribute.
1 parent 40ef36d commit c96da51

File tree

13 files changed

+167
-3
lines changed

13 files changed

+167
-3
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ export interface CreateTableCommandOutput extends CreateTableOutput, __MetadataB
310310
* // WriteUnitsPerSecond: Number("long"),
311311
* // Status: "CREATING" || "UPDATING" || "DELETING" || "ACTIVE" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS" || "ARCHIVING" || "ARCHIVED",
312312
* // },
313+
* // MultiRegionConsistency: "EVENTUAL" || "STRONG",
313314
* // },
314315
* // };
315316
*

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ export interface DeleteItemCommandOutput extends DeleteItemOutput, __MetadataBea
224224
* successful, unless your retry queue is too large to finish. Reduce the frequency of
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
*
227+
* @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>
229+
*
227230
* @throws {@link RequestLimitExceeded} (client fault)
228231
* <p>Throughput exceeds the current throughput quota for your account. Please contact
229232
* <a href="https://aws.amazon.com/support">Amazon Web Services Support</a> to request a

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ export interface DeleteTableCommandOutput extends DeleteTableOutput, __MetadataB
231231
* // WriteUnitsPerSecond: Number("long"),
232232
* // Status: "CREATING" || "UPDATING" || "DELETING" || "ACTIVE" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS" || "ARCHIVING" || "ARCHIVED",
233233
* // },
234+
* // MultiRegionConsistency: "EVENTUAL" || "STRONG",
234235
* // },
235236
* // };
236237
*

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ export interface DescribeTableCommandOutput extends DescribeTableOutput, __Metad
222222
* // WriteUnitsPerSecond: Number("long"),
223223
* // Status: "CREATING" || "UPDATING" || "DELETING" || "ACTIVE" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS" || "ARCHIVING" || "ARCHIVED",
224224
* // },
225+
* // MultiRegionConsistency: "EVENTUAL" || "STRONG",
225226
* // },
226227
* // };
227228
*

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,9 @@ export interface PutItemCommandOutput extends PutItemOutput, __MetadataBearer {}
234234
* successful, unless your retry queue is too large to finish. Reduce the frequency of
235235
* 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>
236236
*
237+
* @throws {@link ReplicatedWriteConflictException} (client fault)
238+
* <p>The request was rejected because one or more items in the request are being modified by a request in another Region. </p>
239+
*
237240
* @throws {@link RequestLimitExceeded} (client fault)
238241
* <p>Throughput exceeds the current throughput quota for your account. Please contact
239242
* <a href="https://aws.amazon.com/support">Amazon Web Services Support</a> to request a

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ export interface RestoreTableFromBackupCommandOutput extends RestoreTableFromBac
294294
* // WriteUnitsPerSecond: Number("long"),
295295
* // Status: "CREATING" || "UPDATING" || "DELETING" || "ACTIVE" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS" || "ARCHIVING" || "ARCHIVED",
296296
* // },
297+
* // MultiRegionConsistency: "EVENTUAL" || "STRONG",
297298
* // },
298299
* // };
299300
*

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ export interface RestoreTableToPointInTimeCommandOutput extends RestoreTableToPo
322322
* // WriteUnitsPerSecond: Number("long"),
323323
* // Status: "CREATING" || "UPDATING" || "DELETING" || "ACTIVE" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS" || "ARCHIVING" || "ARCHIVED",
324324
* // },
325+
* // MultiRegionConsistency: "EVENTUAL" || "STRONG",
325326
* // },
326327
* // };
327328
*

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@ export interface UpdateItemCommandOutput extends UpdateItemOutput, __MetadataBea
227227
* successful, unless your retry queue is too large to finish. Reduce the frequency of
228228
* 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>
229229
*
230+
* @throws {@link ReplicatedWriteConflictException} (client fault)
231+
* <p>The request was rejected because one or more items in the request are being modified by a request in another Region. </p>
232+
*
230233
* @throws {@link RequestLimitExceeded} (client fault)
231234
* <p>Throughput exceeds the current throughput quota for your account. Please contact
232235
* <a href="https://aws.amazon.com/support">Amazon Web Services Support</a> to request a

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ export interface UpdateTableCommandOutput extends UpdateTableOutput, __MetadataB
184184
* ],
185185
* TableClass: "STANDARD" || "STANDARD_INFREQUENT_ACCESS",
186186
* DeletionProtectionEnabled: true || false,
187+
* MultiRegionConsistency: "EVENTUAL" || "STRONG",
187188
* OnDemandThroughput: {
188189
* MaxReadRequestUnits: Number("long"),
189190
* MaxWriteRequestUnits: Number("long"),
@@ -364,6 +365,7 @@ export interface UpdateTableCommandOutput extends UpdateTableOutput, __MetadataB
364365
* // WriteUnitsPerSecond: Number("long"),
365366
* // Status: "CREATING" || "UPDATING" || "DELETING" || "ACTIVE" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS" || "ARCHIVING" || "ARCHIVED",
366367
* // },
368+
* // MultiRegionConsistency: "EVENTUAL" || "STRONG",
367369
* // },
368370
* // };
369371
*

clients/client-dynamodb/src/endpoint/ruleset.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ D=[k],
4747
E=[l],
4848
F=[n],
4949
G=[o,{[J]:g,[K]:[p,"disabled"]}];
50-
const _data={version:"1.0",parameters:{Region:i,UseDualStack:j,UseFIPS:j,Endpoint:i,AccountId:i,AccountIdEndpointMode:i},rules:[{conditions:[{[J]:b,[K]:[{[L]:"Endpoint"}]}],rules:[{conditions:D,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[I]:c},{conditions:E,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[I]:c},{endpoint:{[M]:"{Endpoint}",[N]:m,[O]:m},[I]:d}],[I]:e},{conditions:[{[J]:b,[K]:F}],rules:[{conditions:[{[J]:"aws.partition",[K]:F,assign:f}],rules:[{conditions:[{[J]:g,[K]:[n,"local"]}],rules:[{conditions:D,error:"Invalid Configuration: FIPS and local endpoint are not supported",[I]:c},{conditions:E,error:"Invalid Configuration: Dualstack and local endpoint are not supported",[I]:c},{endpoint:{[M]:"http://localhost:8000",[N]:{authSchemes:[{name:"sigv4",signingName:"dynamodb",signingRegion:"us-east-1"}]},[O]:m},[I]:d}],[I]:e},{conditions:[o,{[J]:g,[K]:[p,"required"]},{[J]:h,[K]:[q]}],error:"AccountIdEndpointMode is required but no AccountID was provided or able to be loaded.",[I]:c},{conditions:[q,s,u,v,{[J]:h,[K]:[{[J]:"isValidHostLabel",[K]:[r,a]}]}],error:"Credentials-sourced account ID parameter is invalid",[I]:c},{conditions:[k,l],rules:[{conditions:[w,x],rules:[{conditions:G,endpoint:y,[I]:d},{endpoint:y,[I]:d}],[I]:e},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[I]:c}],[I]:e},{conditions:D,rules:[{conditions:[w],rules:[{conditions:[{[J]:g,[K]:[t,"aws-us-gov"]}],rules:[z,A],[I]:e},{conditions:G,endpoint:B,[I]:d},{endpoint:B,[I]:d}],[I]:e},{error:"FIPS is enabled but this partition does not support FIPS",[I]:c}],[I]:e},{conditions:E,rules:[{conditions:[x],rules:[{conditions:G,endpoint:C,[I]:d},{endpoint:C,[I]:d}],[I]:e},{error:"DualStack is enabled but this partition does not support DualStack",[I]:c}],[I]:e},z,{conditions:[q,s,u,v],endpoint:{[M]:"https://{AccountId}.ddb.{Region}.{PartitionResult#dnsSuffix}",[N]:m,[O]:m},[I]:d},A],[I]:e}],[I]:e},{error:"Invalid Configuration: Missing Region",[I]:c}]};
50+
const _data={version:"1.0",parameters:{Region:i,UseDualStack:j,UseFIPS:j,Endpoint:i,AccountId:i,AccountIdEndpointMode:i},rules:[{conditions:[{[J]:b,[K]:[{[L]:"Endpoint"}]}],rules:[{conditions:D,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[I]:c},{conditions:E,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[I]:c},{endpoint:{[M]:"{Endpoint}",[N]:m,[O]:m},[I]:d}],[I]:e},{conditions:[{[J]:b,[K]:F}],rules:[{conditions:[{[J]:"aws.partition",[K]:F,assign:f}],rules:[{conditions:[{[J]:g,[K]:[n,"local"]}],rules:[{conditions:D,error:"Invalid Configuration: FIPS and local endpoint are not supported",[I]:c},{conditions:E,error:"Invalid Configuration: Dualstack and local endpoint are not supported",[I]:c},{endpoint:{[M]:"http://localhost:8000",[N]:{authSchemes:[{signingRegion:"us-east-1",signingName:"dynamodb",name:"sigv4"}]},[O]:m},[I]:d}],[I]:e},{conditions:[o,{[J]:g,[K]:[p,"required"]},{[J]:h,[K]:[q]}],error:"AccountIdEndpointMode is required but no AccountID was provided or able to be loaded.",[I]:c},{conditions:[q,s,u,v,{[J]:h,[K]:[{[J]:"isValidHostLabel",[K]:[r,a]}]}],error:"Credentials-sourced account ID parameter is invalid",[I]:c},{conditions:[k,l],rules:[{conditions:[w,x],rules:[{conditions:G,endpoint:y,[I]:d},{endpoint:y,[I]:d}],[I]:e},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[I]:c}],[I]:e},{conditions:D,rules:[{conditions:[w],rules:[{conditions:[{[J]:g,[K]:[t,"aws-us-gov"]}],rules:[z,A],[I]:e},{conditions:G,endpoint:B,[I]:d},{endpoint:B,[I]:d}],[I]:e},{error:"FIPS is enabled but this partition does not support FIPS",[I]:c}],[I]:e},{conditions:E,rules:[{conditions:[x],rules:[{conditions:G,endpoint:C,[I]:d},{endpoint:C,[I]:d}],[I]:e},{error:"DualStack is enabled but this partition does not support DualStack",[I]:c}],[I]:e},z,{conditions:[q,s,u,v],endpoint:{[M]:"https://{AccountId}.ddb.{Region}.{PartitionResult#dnsSuffix}",[N]:m,[O]:m},[I]:d},A],[I]:e}],[I]:e},{error:"Invalid Configuration: Missing Region",[I]:c}]};
5151
export const ruleSet: RuleSetObject = _data;

0 commit comments

Comments
 (0)