@aws-sdk/client-dynamodb 3.699.0 → 3.705.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleSet = void 0;
4
4
  const H = "required", I = "type", J = "fn", K = "argv", L = "ref", M = "url", N = "properties", O = "headers";
5
5
  const a = false, b = "isSet", c = "error", d = "endpoint", e = "tree", f = "PartitionResult", g = "stringEquals", h = "not", i = { [H]: false, [I]: "String" }, j = { [H]: true, "default": false, [I]: "Boolean" }, k = { [J]: "booleanEquals", [K]: [{ [L]: "UseFIPS" }, true] }, l = { [J]: "booleanEquals", [K]: [{ [L]: "UseDualStack" }, true] }, m = {}, n = { [L]: "Region" }, o = { [J]: b, [K]: [{ [L]: "AccountIdEndpointMode" }] }, p = { [L]: "AccountIdEndpointMode" }, q = { [J]: b, [K]: [{ [L]: "AccountId" }] }, r = { [L]: "AccountId" }, s = { [J]: g, [K]: [{ [J]: "getAttr", [K]: [{ [L]: f }, "name"] }, "aws"] }, t = { [J]: "getAttr", [K]: [{ [L]: f }, "name"] }, u = { [J]: h, [K]: [k] }, v = { [J]: h, [K]: [l] }, w = { [J]: "booleanEquals", [K]: [{ [J]: "getAttr", [K]: [{ [L]: f }, "supportsFIPS"] }, true] }, x = { [J]: "booleanEquals", [K]: [{ [J]: "getAttr", [K]: [{ [L]: f }, "supportsDualStack"] }, true] }, y = { [M]: "https://dynamodb-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", [N]: {}, [O]: {} }, z = { "conditions": [o, { [J]: g, [K]: [p, "disabled"] }], [d]: { [M]: "https://dynamodb.{Region}.{PartitionResult#dnsSuffix}", [N]: {}, [O]: {} }, [I]: d }, A = { [d]: { [M]: "https://dynamodb.{Region}.{PartitionResult#dnsSuffix}", [N]: {}, [O]: {} }, [I]: d }, B = { [M]: "https://dynamodb-fips.{Region}.{PartitionResult#dnsSuffix}", [N]: {}, [O]: {} }, C = { [M]: "https://dynamodb.{Region}.{PartitionResult#dualStackDnsSuffix}", [N]: {}, [O]: {} }, D = [k], E = [l], F = [n], G = [o, { [J]: g, [K]: [p, "disabled"] }];
6
- 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 }] };
6
+ 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 }] };
7
7
  exports.ruleSet = _data;
package/dist-cjs/index.js CHANGED
@@ -105,6 +105,7 @@ __export(src_exports, {
105
105
  ListImportsCommand: () => ListImportsCommand,
106
106
  ListTablesCommand: () => ListTablesCommand,
107
107
  ListTagsOfResourceCommand: () => ListTagsOfResourceCommand,
108
+ MultiRegionConsistency: () => MultiRegionConsistency,
108
109
  PointInTimeRecoveryStatus: () => PointInTimeRecoveryStatus,
109
110
  PointInTimeRecoveryUnavailableException: () => PointInTimeRecoveryUnavailableException,
110
111
  PolicyNotFoundException: () => PolicyNotFoundException,
@@ -116,6 +117,7 @@ __export(src_exports, {
116
117
  ReplicaAlreadyExistsException: () => ReplicaAlreadyExistsException,
117
118
  ReplicaNotFoundException: () => ReplicaNotFoundException,
118
119
  ReplicaStatus: () => ReplicaStatus,
120
+ ReplicatedWriteConflictException: () => ReplicatedWriteConflictException,
119
121
  RequestLimitExceeded: () => RequestLimitExceeded,
120
122
  ResourceInUseException: () => ResourceInUseException,
121
123
  ResourceNotFoundException: () => ResourceNotFoundException,
@@ -613,6 +615,10 @@ var _GlobalTableAlreadyExistsException = class _GlobalTableAlreadyExistsExceptio
613
615
  };
614
616
  __name(_GlobalTableAlreadyExistsException, "GlobalTableAlreadyExistsException");
615
617
  var GlobalTableAlreadyExistsException = _GlobalTableAlreadyExistsException;
618
+ var MultiRegionConsistency = {
619
+ EVENTUAL: "EVENTUAL",
620
+ STRONG: "STRONG"
621
+ };
616
622
  var _ResourceInUseException = class _ResourceInUseException extends DynamoDBServiceException {
617
623
  /**
618
624
  * @internal
@@ -637,6 +643,23 @@ var ReturnValue = {
637
643
  UPDATED_NEW: "UPDATED_NEW",
638
644
  UPDATED_OLD: "UPDATED_OLD"
639
645
  };
646
+ var _ReplicatedWriteConflictException = class _ReplicatedWriteConflictException extends DynamoDBServiceException {
647
+ /**
648
+ * @internal
649
+ */
650
+ constructor(opts) {
651
+ super({
652
+ name: "ReplicatedWriteConflictException",
653
+ $fault: "client",
654
+ ...opts
655
+ });
656
+ this.name = "ReplicatedWriteConflictException";
657
+ this.$fault = "client";
658
+ Object.setPrototypeOf(this, _ReplicatedWriteConflictException.prototype);
659
+ }
660
+ };
661
+ __name(_ReplicatedWriteConflictException, "ReplicatedWriteConflictException");
662
+ var ReplicatedWriteConflictException = _ReplicatedWriteConflictException;
640
663
  var _TransactionConflictException = class _TransactionConflictException extends DynamoDBServiceException {
641
664
  /**
642
665
  * @internal
@@ -2174,6 +2197,9 @@ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
2174
2197
  case "ConditionalCheckFailedException":
2175
2198
  case "com.amazonaws.dynamodb#ConditionalCheckFailedException":
2176
2199
  throw await de_ConditionalCheckFailedExceptionRes(parsedOutput, context);
2200
+ case "ReplicatedWriteConflictException":
2201
+ case "com.amazonaws.dynamodb#ReplicatedWriteConflictException":
2202
+ throw await de_ReplicatedWriteConflictExceptionRes(parsedOutput, context);
2177
2203
  case "TransactionConflictException":
2178
2204
  case "com.amazonaws.dynamodb#TransactionConflictException":
2179
2205
  throw await de_TransactionConflictExceptionRes(parsedOutput, context);
@@ -2453,6 +2479,15 @@ var de_ReplicaNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput,
2453
2479
  });
2454
2480
  return (0, import_smithy_client.decorateServiceException)(exception, body);
2455
2481
  }, "de_ReplicaNotFoundExceptionRes");
2482
+ var de_ReplicatedWriteConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2483
+ const body = parsedOutput.body;
2484
+ const deserialized = (0, import_smithy_client._json)(body);
2485
+ const exception = new ReplicatedWriteConflictException({
2486
+ $metadata: deserializeMetadata(parsedOutput),
2487
+ ...deserialized
2488
+ });
2489
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
2490
+ }, "de_ReplicatedWriteConflictExceptionRes");
2456
2491
  var de_RequestLimitExceededRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2457
2492
  const body = parsedOutput.body;
2458
2493
  const deserialized = (0, import_smithy_client._json)(body);
@@ -3940,6 +3975,7 @@ var de_TableDescription = /* @__PURE__ */ __name((output, context) => {
3940
3975
  LatestStreamArn: import_smithy_client.expectString,
3941
3976
  LatestStreamLabel: import_smithy_client.expectString,
3942
3977
  LocalSecondaryIndexes: import_smithy_client._json,
3978
+ MultiRegionConsistency: import_smithy_client.expectString,
3943
3979
  OnDemandThroughput: import_smithy_client._json,
3944
3980
  ProvisionedThroughput: (_) => de_ProvisionedThroughputDescription(_, context),
3945
3981
  Replicas: (_) => de_ReplicaDescriptionList(_, context),
@@ -5225,8 +5261,10 @@ var waitUntilTableNotExists = /* @__PURE__ */ __name(async (params, input) => {
5225
5261
  TableClass,
5226
5262
  TableStatus,
5227
5263
  GlobalTableAlreadyExistsException,
5264
+ MultiRegionConsistency,
5228
5265
  ResourceInUseException,
5229
5266
  ReturnValue,
5267
+ ReplicatedWriteConflictException,
5230
5268
  TransactionConflictException,
5231
5269
  PolicyNotFoundException,
5232
5270
  ExportFormat,
@@ -1,4 +1,4 @@
1
1
  const H = "required", I = "type", J = "fn", K = "argv", L = "ref", M = "url", N = "properties", O = "headers";
2
2
  const a = false, b = "isSet", c = "error", d = "endpoint", e = "tree", f = "PartitionResult", g = "stringEquals", h = "not", i = { [H]: false, [I]: "String" }, j = { [H]: true, "default": false, [I]: "Boolean" }, k = { [J]: "booleanEquals", [K]: [{ [L]: "UseFIPS" }, true] }, l = { [J]: "booleanEquals", [K]: [{ [L]: "UseDualStack" }, true] }, m = {}, n = { [L]: "Region" }, o = { [J]: b, [K]: [{ [L]: "AccountIdEndpointMode" }] }, p = { [L]: "AccountIdEndpointMode" }, q = { [J]: b, [K]: [{ [L]: "AccountId" }] }, r = { [L]: "AccountId" }, s = { [J]: g, [K]: [{ [J]: "getAttr", [K]: [{ [L]: f }, "name"] }, "aws"] }, t = { [J]: "getAttr", [K]: [{ [L]: f }, "name"] }, u = { [J]: h, [K]: [k] }, v = { [J]: h, [K]: [l] }, w = { [J]: "booleanEquals", [K]: [{ [J]: "getAttr", [K]: [{ [L]: f }, "supportsFIPS"] }, true] }, x = { [J]: "booleanEquals", [K]: [{ [J]: "getAttr", [K]: [{ [L]: f }, "supportsDualStack"] }, true] }, y = { [M]: "https://dynamodb-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", [N]: {}, [O]: {} }, z = { "conditions": [o, { [J]: g, [K]: [p, "disabled"] }], [d]: { [M]: "https://dynamodb.{Region}.{PartitionResult#dnsSuffix}", [N]: {}, [O]: {} }, [I]: d }, A = { [d]: { [M]: "https://dynamodb.{Region}.{PartitionResult#dnsSuffix}", [N]: {}, [O]: {} }, [I]: d }, B = { [M]: "https://dynamodb-fips.{Region}.{PartitionResult#dnsSuffix}", [N]: {}, [O]: {} }, C = { [M]: "https://dynamodb.{Region}.{PartitionResult#dualStackDnsSuffix}", [N]: {}, [O]: {} }, D = [k], E = [l], F = [n], G = [o, { [J]: g, [K]: [p, "disabled"] }];
3
- 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 }] };
3
+ 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 }] };
4
4
  export const ruleSet = _data;
@@ -320,6 +320,10 @@ export class GlobalTableAlreadyExistsException extends __BaseException {
320
320
  Object.setPrototypeOf(this, GlobalTableAlreadyExistsException.prototype);
321
321
  }
322
322
  }
323
+ export const MultiRegionConsistency = {
324
+ EVENTUAL: "EVENTUAL",
325
+ STRONG: "STRONG",
326
+ };
323
327
  export class ResourceInUseException extends __BaseException {
324
328
  constructor(opts) {
325
329
  super({
@@ -339,6 +343,18 @@ export const ReturnValue = {
339
343
  UPDATED_NEW: "UPDATED_NEW",
340
344
  UPDATED_OLD: "UPDATED_OLD",
341
345
  };
346
+ export class ReplicatedWriteConflictException extends __BaseException {
347
+ constructor(opts) {
348
+ super({
349
+ name: "ReplicatedWriteConflictException",
350
+ $fault: "client",
351
+ ...opts,
352
+ });
353
+ this.name = "ReplicatedWriteConflictException";
354
+ this.$fault = "client";
355
+ Object.setPrototypeOf(this, ReplicatedWriteConflictException.prototype);
356
+ }
357
+ }
342
358
  export class TransactionConflictException extends __BaseException {
343
359
  constructor(opts) {
344
360
  super({
@@ -3,7 +3,7 @@ import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
3
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
4
4
  import { v4 as generateIdempotencyToken } from "uuid";
5
5
  import { DynamoDBServiceException as __BaseException } from "../models/DynamoDBServiceException";
6
- import { AttributeValue, BackupInUseException, BackupNotFoundException, ConditionalCheckFailedException, ContinuousBackupsUnavailableException, DuplicateItemException, ExportConflictException, ExportNotFoundException, GlobalTableAlreadyExistsException, GlobalTableNotFoundException, IdempotentParameterMismatchException, ImportConflictException, ImportNotFoundException, IndexNotFoundException, InternalServerError, InvalidEndpointException, InvalidExportTimeException, InvalidRestoreTimeException, ItemCollectionSizeLimitExceededException, LimitExceededException, PointInTimeRecoveryUnavailableException, PolicyNotFoundException, ProvisionedThroughputExceededException, ReplicaAlreadyExistsException, ReplicaNotFoundException, RequestLimitExceeded, ResourceInUseException, ResourceNotFoundException, TableAlreadyExistsException, TableInUseException, TableNotFoundException, TransactionCanceledException, TransactionConflictException, TransactionInProgressException, } from "../models/models_0";
6
+ import { AttributeValue, BackupInUseException, BackupNotFoundException, ConditionalCheckFailedException, ContinuousBackupsUnavailableException, DuplicateItemException, ExportConflictException, ExportNotFoundException, GlobalTableAlreadyExistsException, GlobalTableNotFoundException, IdempotentParameterMismatchException, ImportConflictException, ImportNotFoundException, IndexNotFoundException, InternalServerError, InvalidEndpointException, InvalidExportTimeException, InvalidRestoreTimeException, ItemCollectionSizeLimitExceededException, LimitExceededException, PointInTimeRecoveryUnavailableException, PolicyNotFoundException, ProvisionedThroughputExceededException, ReplicaAlreadyExistsException, ReplicaNotFoundException, ReplicatedWriteConflictException, RequestLimitExceeded, ResourceInUseException, ResourceNotFoundException, TableAlreadyExistsException, TableInUseException, TableNotFoundException, TransactionCanceledException, TransactionConflictException, TransactionInProgressException, } from "../models/models_0";
7
7
  export const se_BatchExecuteStatementCommand = async (input, context) => {
8
8
  const headers = sharedHeaders("BatchExecuteStatement");
9
9
  let body;
@@ -1133,6 +1133,9 @@ const de_CommandError = async (output, context) => {
1133
1133
  case "ConditionalCheckFailedException":
1134
1134
  case "com.amazonaws.dynamodb#ConditionalCheckFailedException":
1135
1135
  throw await de_ConditionalCheckFailedExceptionRes(parsedOutput, context);
1136
+ case "ReplicatedWriteConflictException":
1137
+ case "com.amazonaws.dynamodb#ReplicatedWriteConflictException":
1138
+ throw await de_ReplicatedWriteConflictExceptionRes(parsedOutput, context);
1136
1139
  case "TransactionConflictException":
1137
1140
  case "com.amazonaws.dynamodb#TransactionConflictException":
1138
1141
  throw await de_TransactionConflictExceptionRes(parsedOutput, context);
@@ -1412,6 +1415,15 @@ const de_ReplicaNotFoundExceptionRes = async (parsedOutput, context) => {
1412
1415
  });
1413
1416
  return __decorateServiceException(exception, body);
1414
1417
  };
1418
+ const de_ReplicatedWriteConflictExceptionRes = async (parsedOutput, context) => {
1419
+ const body = parsedOutput.body;
1420
+ const deserialized = _json(body);
1421
+ const exception = new ReplicatedWriteConflictException({
1422
+ $metadata: deserializeMetadata(parsedOutput),
1423
+ ...deserialized,
1424
+ });
1425
+ return __decorateServiceException(exception, body);
1426
+ };
1415
1427
  const de_RequestLimitExceededRes = async (parsedOutput, context) => {
1416
1428
  const body = parsedOutput.body;
1417
1429
  const deserialized = _json(body);
@@ -2966,6 +2978,7 @@ const de_TableDescription = (output, context) => {
2966
2978
  LatestStreamArn: __expectString,
2967
2979
  LatestStreamLabel: __expectString,
2968
2980
  LocalSecondaryIndexes: _json,
2981
+ MultiRegionConsistency: __expectString,
2969
2982
  OnDemandThroughput: _json,
2970
2983
  ProvisionedThroughput: (_) => de_ProvisionedThroughputDescription(_, context),
2971
2984
  Replicas: (_) => de_ReplicaDescriptionList(_, context),
@@ -309,6 +309,7 @@ declare const CreateTableCommand_base: {
309
309
  * // WriteUnitsPerSecond: Number("long"),
310
310
  * // Status: "CREATING" || "UPDATING" || "DELETING" || "ACTIVE" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS" || "ARCHIVING" || "ARCHIVED",
311
311
  * // },
312
+ * // MultiRegionConsistency: "EVENTUAL" || "STRONG",
312
313
  * // },
313
314
  * // };
314
315
  *
@@ -223,6 +223,9 @@ declare const DeleteItemCommand_base: {
223
223
  * successful, unless your retry queue is too large to finish. Reduce the frequency of
224
224
  * 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>
225
225
  *
226
+ * @throws {@link ReplicatedWriteConflictException} (client fault)
227
+ * <p>The request was rejected because one or more items in the request are being modified by a request in another Region. </p>
228
+ *
226
229
  * @throws {@link RequestLimitExceeded} (client fault)
227
230
  * <p>Throughput exceeds the current throughput quota for your account. Please contact
228
231
  * <a href="https://aws.amazon.com/support">Amazon Web Services Support</a> to request a
@@ -230,6 +230,7 @@ declare const DeleteTableCommand_base: {
230
230
  * // WriteUnitsPerSecond: Number("long"),
231
231
  * // Status: "CREATING" || "UPDATING" || "DELETING" || "ACTIVE" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS" || "ARCHIVING" || "ARCHIVED",
232
232
  * // },
233
+ * // MultiRegionConsistency: "EVENTUAL" || "STRONG",
233
234
  * // },
234
235
  * // };
235
236
  *
@@ -221,6 +221,7 @@ declare const DescribeTableCommand_base: {
221
221
  * // WriteUnitsPerSecond: Number("long"),
222
222
  * // Status: "CREATING" || "UPDATING" || "DELETING" || "ACTIVE" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS" || "ARCHIVING" || "ARCHIVED",
223
223
  * // },
224
+ * // MultiRegionConsistency: "EVENTUAL" || "STRONG",
224
225
  * // },
225
226
  * // };
226
227
  *
@@ -233,6 +233,9 @@ declare const PutItemCommand_base: {
233
233
  * successful, unless your retry queue is too large to finish. Reduce the frequency of
234
234
  * 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>
235
235
  *
236
+ * @throws {@link ReplicatedWriteConflictException} (client fault)
237
+ * <p>The request was rejected because one or more items in the request are being modified by a request in another Region. </p>
238
+ *
236
239
  * @throws {@link RequestLimitExceeded} (client fault)
237
240
  * <p>Throughput exceeds the current throughput quota for your account. Please contact
238
241
  * <a href="https://aws.amazon.com/support">Amazon Web Services Support</a> to request a
@@ -293,6 +293,7 @@ declare const RestoreTableFromBackupCommand_base: {
293
293
  * // WriteUnitsPerSecond: Number("long"),
294
294
  * // Status: "CREATING" || "UPDATING" || "DELETING" || "ACTIVE" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS" || "ARCHIVING" || "ARCHIVED",
295
295
  * // },
296
+ * // MultiRegionConsistency: "EVENTUAL" || "STRONG",
296
297
  * // },
297
298
  * // };
298
299
  *
@@ -321,6 +321,7 @@ declare const RestoreTableToPointInTimeCommand_base: {
321
321
  * // WriteUnitsPerSecond: Number("long"),
322
322
  * // Status: "CREATING" || "UPDATING" || "DELETING" || "ACTIVE" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS" || "ARCHIVING" || "ARCHIVED",
323
323
  * // },
324
+ * // MultiRegionConsistency: "EVENTUAL" || "STRONG",
324
325
  * // },
325
326
  * // };
326
327
  *
@@ -226,6 +226,9 @@ declare const UpdateItemCommand_base: {
226
226
  * successful, unless your retry queue is too large to finish. Reduce the frequency of
227
227
  * 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>
228
228
  *
229
+ * @throws {@link ReplicatedWriteConflictException} (client fault)
230
+ * <p>The request was rejected because one or more items in the request are being modified by a request in another Region. </p>
231
+ *
229
232
  * @throws {@link RequestLimitExceeded} (client fault)
230
233
  * <p>Throughput exceeds the current throughput quota for your account. Please contact
231
234
  * <a href="https://aws.amazon.com/support">Amazon Web Services Support</a> to request a
@@ -183,6 +183,7 @@ declare const UpdateTableCommand_base: {
183
183
  * ],
184
184
  * TableClass: "STANDARD" || "STANDARD_INFREQUENT_ACCESS",
185
185
  * DeletionProtectionEnabled: true || false,
186
+ * MultiRegionConsistency: "EVENTUAL" || "STRONG",
186
187
  * OnDemandThroughput: {
187
188
  * MaxReadRequestUnits: Number("long"),
188
189
  * MaxWriteRequestUnits: Number("long"),
@@ -363,6 +364,7 @@ declare const UpdateTableCommand_base: {
363
364
  * // WriteUnitsPerSecond: Number("long"),
364
365
  * // Status: "CREATING" || "UPDATING" || "DELETING" || "ACTIVE" || "INACCESSIBLE_ENCRYPTION_CREDENTIALS" || "ARCHIVING" || "ARCHIVED",
365
366
  * // },
367
+ * // MultiRegionConsistency: "EVENTUAL" || "STRONG",
366
368
  * // },
367
369
  * // };
368
370
  *
@@ -2763,6 +2763,18 @@ export interface LocalSecondaryIndexDescription {
2763
2763
  */
2764
2764
  IndexArn?: string | undefined;
2765
2765
  }
2766
+ /**
2767
+ * @public
2768
+ * @enum
2769
+ */
2770
+ export declare const MultiRegionConsistency: {
2771
+ readonly EVENTUAL: "EVENTUAL";
2772
+ readonly STRONG: "STRONG";
2773
+ };
2774
+ /**
2775
+ * @public
2776
+ */
2777
+ export type MultiRegionConsistency = (typeof MultiRegionConsistency)[keyof typeof MultiRegionConsistency];
2766
2778
  /**
2767
2779
  * <p>Contains details for the restore.</p>
2768
2780
  * @public
@@ -3204,6 +3216,25 @@ export interface TableDescription {
3204
3216
  * @public
3205
3217
  */
3206
3218
  WarmThroughput?: TableWarmThroughputDescription | undefined;
3219
+ /**
3220
+ * <p>Indicates one of the following consistency modes for a global table:</p>
3221
+ * <ul>
3222
+ * <li>
3223
+ * <p>
3224
+ * <code>EVENTUAL</code>: Indicates that the global table is configured for multi-Region eventual consistency.</p>
3225
+ * </li>
3226
+ * <li>
3227
+ * <p>
3228
+ * <code>STRONG</code>: Indicates that the global table is configured for multi-Region strong consistency (preview).</p>
3229
+ * <note>
3230
+ * <p>Multi-Region strong consistency (MRSC) is a new DynamoDB global tables capability currently available in preview mode. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/PreviewFeatures.html#multi-region-strong-consistency-gt">Global tables multi-Region strong consistency</a>.</p>
3231
+ * </note>
3232
+ * </li>
3233
+ * </ul>
3234
+ * <p>If you don't specify this field, the global table consistency mode defaults to <code>EVENTUAL</code>.</p>
3235
+ * @public
3236
+ */
3237
+ MultiRegionConsistency?: MultiRegionConsistency | undefined;
3207
3238
  }
3208
3239
  /**
3209
3240
  * <p>Represents the output of a <code>CreateTable</code> operation.</p>
@@ -3305,6 +3336,18 @@ export declare const ReturnValue: {
3305
3336
  * @public
3306
3337
  */
3307
3338
  export type ReturnValue = (typeof ReturnValue)[keyof typeof ReturnValue];
3339
+ /**
3340
+ * <p>The request was rejected because one or more items in the request are being modified by a request in another Region. </p>
3341
+ * @public
3342
+ */
3343
+ export declare class ReplicatedWriteConflictException extends __BaseException {
3344
+ readonly name: "ReplicatedWriteConflictException";
3345
+ readonly $fault: "client";
3346
+ /**
3347
+ * @internal
3348
+ */
3349
+ constructor(opts: __ExceptionOptionType<ReplicatedWriteConflictException, __BaseException>);
3350
+ }
3308
3351
  /**
3309
3352
  * <p>Operation was rejected because there is an ongoing transaction for the
3310
3353
  * item.</p>
@@ -6336,6 +6379,26 @@ export interface UpdateTableInput {
6336
6379
  * @public
6337
6380
  */
6338
6381
  DeletionProtectionEnabled?: boolean | undefined;
6382
+ /**
6383
+ * <p>Specifies the consistency mode for a new global table. This parameter is only valid when you create a global table by specifying one or more <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ReplicationGroupUpdate.html#DDB-Type-ReplicationGroupUpdate-Create">Create</a> actions in the <a href="https://docs.aws.amazon.com/https:/docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateTable.html#DDB-UpdateTable-request-ReplicaUpdates">ReplicaUpdates</a> action list.</p>
6384
+ * <p>You can specify one of the following consistency modes:</p>
6385
+ * <ul>
6386
+ * <li>
6387
+ * <p>
6388
+ * <code>EVENTUAL</code>: Configures a new global table for multi-Region eventual consistency. This is the default consistency mode for global tables.</p>
6389
+ * </li>
6390
+ * <li>
6391
+ * <p>
6392
+ * <code>STRONG</code>: Configures a new global table for multi-Region strong consistency (preview).</p>
6393
+ * <note>
6394
+ * <p>Multi-Region strong consistency (MRSC) is a new DynamoDB global tables capability currently available in preview mode. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/PreviewFeatures.html#multi-region-strong-consistency-gt">Global tables multi-Region strong consistency</a>.</p>
6395
+ * </note>
6396
+ * </li>
6397
+ * </ul>
6398
+ * <p>If you don't specify this parameter, the global table consistency mode defaults to <code>EVENTUAL</code>.</p>
6399
+ * @public
6400
+ */
6401
+ MultiRegionConsistency?: MultiRegionConsistency | undefined;
6339
6402
  /**
6340
6403
  * <p>Updates the maximum number of read and write units for the specified table in
6341
6404
  * on-demand capacity mode. If you use this parameter, you must specify
@@ -638,6 +638,12 @@ export interface LocalSecondaryIndexDescription {
638
638
  ItemCount?: number | undefined;
639
639
  IndexArn?: string | undefined;
640
640
  }
641
+ export declare const MultiRegionConsistency: {
642
+ readonly EVENTUAL: "EVENTUAL";
643
+ readonly STRONG: "STRONG";
644
+ };
645
+ export type MultiRegionConsistency =
646
+ (typeof MultiRegionConsistency)[keyof typeof MultiRegionConsistency];
641
647
  export interface RestoreSummary {
642
648
  SourceBackupArn?: string | undefined;
643
649
  SourceTableArn?: string | undefined;
@@ -670,6 +676,7 @@ export interface TableDescription {
670
676
  DeletionProtectionEnabled?: boolean | undefined;
671
677
  OnDemandThroughput?: OnDemandThroughput | undefined;
672
678
  WarmThroughput?: TableWarmThroughputDescription | undefined;
679
+ MultiRegionConsistency?: MultiRegionConsistency | undefined;
673
680
  }
674
681
  export interface CreateTableOutput {
675
682
  TableDescription?: TableDescription | undefined;
@@ -702,6 +709,16 @@ export declare const ReturnValue: {
702
709
  readonly UPDATED_OLD: "UPDATED_OLD";
703
710
  };
704
711
  export type ReturnValue = (typeof ReturnValue)[keyof typeof ReturnValue];
712
+ export declare class ReplicatedWriteConflictException extends __BaseException {
713
+ readonly name: "ReplicatedWriteConflictException";
714
+ readonly $fault: "client";
715
+ constructor(
716
+ opts: __ExceptionOptionType<
717
+ ReplicatedWriteConflictException,
718
+ __BaseException
719
+ >
720
+ );
721
+ }
705
722
  export declare class TransactionConflictException extends __BaseException {
706
723
  readonly name: "TransactionConflictException";
707
724
  readonly $fault: "client";
@@ -1451,6 +1468,7 @@ export interface UpdateTableInput {
1451
1468
  ReplicaUpdates?: ReplicationGroupUpdate[] | undefined;
1452
1469
  TableClass?: TableClass | undefined;
1453
1470
  DeletionProtectionEnabled?: boolean | undefined;
1471
+ MultiRegionConsistency?: MultiRegionConsistency | undefined;
1454
1472
  OnDemandThroughput?: OnDemandThroughput | undefined;
1455
1473
  WarmThroughput?: WarmThroughput | undefined;
1456
1474
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-dynamodb",
3
3
  "description": "AWS SDK for JavaScript Dynamodb Client for Node.js, Browser and React Native",
4
- "version": "3.699.0",
4
+ "version": "3.705.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-dynamodb",