@aws-sdk/client-dynamodb 3.38.0 → 3.42.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.
Files changed (69) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +18 -16
  3. package/dist-cjs/endpoints.js +162 -27
  4. package/dist-cjs/runtimeConfig.browser.js +6 -3
  5. package/dist-cjs/runtimeConfig.js +5 -3
  6. package/dist-es/endpoints.js +162 -27
  7. package/dist-es/runtimeConfig.browser.js +3 -2
  8. package/dist-es/runtimeConfig.js +3 -3
  9. package/dist-types/DynamoDB.d.ts +606 -567
  10. package/dist-types/DynamoDBClient.d.ts +24 -15
  11. package/dist-types/commands/BatchExecuteStatementCommand.d.ts +7 -4
  12. package/dist-types/commands/BatchGetItemCommand.d.ts +27 -26
  13. package/dist-types/commands/BatchWriteItemCommand.d.ts +51 -47
  14. package/dist-types/commands/CreateBackupCommand.d.ts +19 -19
  15. package/dist-types/commands/CreateGlobalTableCommand.d.ts +32 -43
  16. package/dist-types/commands/CreateTableCommand.d.ts +14 -14
  17. package/dist-types/commands/DeleteBackupCommand.d.ts +3 -2
  18. package/dist-types/commands/DeleteItemCommand.d.ts +12 -7
  19. package/dist-types/commands/DeleteTableCommand.d.ts +18 -16
  20. package/dist-types/commands/DescribeBackupCommand.d.ts +3 -2
  21. package/dist-types/commands/DescribeContinuousBackupsCommand.d.ts +12 -11
  22. package/dist-types/commands/DescribeContributorInsightsCommand.d.ts +3 -2
  23. package/dist-types/commands/DescribeEndpointsCommand.d.ts +1 -1
  24. package/dist-types/commands/DescribeExportCommand.d.ts +1 -1
  25. package/dist-types/commands/DescribeGlobalTableCommand.d.ts +6 -5
  26. package/dist-types/commands/DescribeGlobalTableSettingsCommand.d.ts +5 -4
  27. package/dist-types/commands/DescribeKinesisStreamingDestinationCommand.d.ts +1 -1
  28. package/dist-types/commands/DescribeLimitsCommand.d.ts +51 -41
  29. package/dist-types/commands/DescribeTableCommand.d.ts +11 -8
  30. package/dist-types/commands/DescribeTableReplicaAutoScalingCommand.d.ts +5 -4
  31. package/dist-types/commands/DescribeTimeToLiveCommand.d.ts +1 -1
  32. package/dist-types/commands/DisableKinesisStreamingDestinationCommand.d.ts +1 -1
  33. package/dist-types/commands/EnableKinesisStreamingDestinationCommand.d.ts +5 -5
  34. package/dist-types/commands/ExecuteStatementCommand.d.ts +3 -4
  35. package/dist-types/commands/ExecuteTransactionCommand.d.ts +9 -4
  36. package/dist-types/commands/ExportTableToPointInTimeCommand.d.ts +1 -1
  37. package/dist-types/commands/GetItemCommand.d.ts +9 -8
  38. package/dist-types/commands/ListBackupsCommand.d.ts +7 -7
  39. package/dist-types/commands/ListContributorInsightsCommand.d.ts +3 -2
  40. package/dist-types/commands/ListExportsCommand.d.ts +1 -1
  41. package/dist-types/commands/ListGlobalTablesCommand.d.ts +5 -4
  42. package/dist-types/commands/ListTablesCommand.d.ts +4 -4
  43. package/dist-types/commands/ListTagsOfResourceCommand.d.ts +5 -5
  44. package/dist-types/commands/PutItemCommand.d.ts +52 -45
  45. package/dist-types/commands/QueryCommand.d.ts +40 -44
  46. package/dist-types/commands/RestoreTableFromBackupCommand.d.ts +19 -19
  47. package/dist-types/commands/RestoreTableToPointInTimeCommand.d.ts +36 -41
  48. package/dist-types/commands/ScanCommand.d.ts +17 -16
  49. package/dist-types/commands/TagResourceCommand.d.ts +3 -4
  50. package/dist-types/commands/TransactGetItemsCommand.d.ts +12 -11
  51. package/dist-types/commands/TransactWriteItemsCommand.d.ts +49 -47
  52. package/dist-types/commands/UntagResourceCommand.d.ts +3 -4
  53. package/dist-types/commands/UpdateContinuousBackupsCommand.d.ts +10 -10
  54. package/dist-types/commands/UpdateContributorInsightsCommand.d.ts +7 -2
  55. package/dist-types/commands/UpdateGlobalTableCommand.d.ts +12 -17
  56. package/dist-types/commands/UpdateGlobalTableSettingsCommand.d.ts +1 -1
  57. package/dist-types/commands/UpdateItemCommand.d.ts +8 -4
  58. package/dist-types/commands/UpdateTableCommand.d.ts +15 -13
  59. package/dist-types/commands/UpdateTableReplicaAutoScalingCommand.d.ts +5 -4
  60. package/dist-types/commands/UpdateTimeToLiveCommand.d.ts +15 -15
  61. package/dist-types/models/models_0.d.ts +3413 -2779
  62. package/dist-types/runtimeConfig.browser.d.ts +2 -0
  63. package/dist-types/runtimeConfig.d.ts +2 -0
  64. package/dist-types/runtimeConfig.native.d.ts +2 -0
  65. package/dist-types/ts3.4/DynamoDBClient.d.ts +4 -0
  66. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
  67. package/dist-types/ts3.4/runtimeConfig.d.ts +2 -0
  68. package/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
  69. package/package.json +27 -27
package/CHANGELOG.md CHANGED
@@ -3,6 +3,47 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.42.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.41.0...v3.42.0) (2021-11-19)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **clients:** merge default variants by comparing tags ([#3044](https://github.com/aws/aws-sdk-js-v3/issues/3044)) ([d65a310](https://github.com/aws/aws-sdk-js-v3/commit/d65a310ed5a471e72633a18ae6f3c98390e20783))
12
+
13
+
14
+
15
+
16
+
17
+ # [3.41.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.40.1...v3.41.0) (2021-11-11)
18
+
19
+
20
+ ### Features
21
+
22
+ * **clients:** update clients as of 2021/11/11 ([#3015](https://github.com/aws/aws-sdk-js-v3/issues/3015)) ([3d82c4e](https://github.com/aws/aws-sdk-js-v3/commit/3d82c4e3c4d174533f46ce35495cf5cffabdb35a))
23
+
24
+
25
+
26
+
27
+
28
+ # [3.40.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.39.0...v3.40.0) (2021-11-05)
29
+
30
+
31
+ ### Features
32
+
33
+ * **clients:** populate variants in endpoints hashes ([#2974](https://github.com/aws/aws-sdk-js-v3/issues/2974)) ([0dd68ef](https://github.com/aws/aws-sdk-js-v3/commit/0dd68ef8b04ea0e96e43b05a9a10221e433fdf86))
34
+
35
+
36
+
37
+
38
+
39
+ # [3.39.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.38.0...v3.39.0) (2021-10-29)
40
+
41
+ **Note:** Version bump only for package @aws-sdk/client-dynamodb
42
+
43
+
44
+
45
+
46
+
6
47
  # [3.38.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.37.0...v3.38.0) (2021-10-22)
7
48
 
8
49
 
package/README.md CHANGED
@@ -9,22 +9,24 @@ AWS SDK for JavaScript DynamoDB Client for Node.js, Browser and React Native.
9
9
 
10
10
  <fullname>Amazon DynamoDB</fullname>
11
11
 
12
- <p>Amazon DynamoDB is a fully managed NoSQL database service that provides fast and
13
- predictable performance with seamless scalability. DynamoDB lets you offload the
14
- administrative burdens of operating and scaling a distributed database, so that you don't have
15
- to worry about hardware provisioning, setup and configuration, replication, software patching,
16
- or cluster scaling.</p>
17
-
18
- <p>With DynamoDB, you can create database tables that can store and retrieve any amount of
19
- data, and serve any level of request traffic. You can scale up or scale down your tables'
20
- throughput capacity without downtime or performance degradation, and use the AWS Management
21
- Console to monitor resource utilization and performance metrics.</p>
22
-
23
- <p>DynamoDB automatically spreads the data and traffic for your tables over a sufficient
24
- number of servers to handle your throughput and storage requirements, while maintaining
25
- consistent and fast performance. All of your data is stored on solid state disks (SSDs) and
26
- automatically replicated across multiple Availability Zones in an AWS region, providing
27
- built-in high availability and data durability. </p>
12
+ <p>Amazon DynamoDB is a fully managed NoSQL database service that provides fast
13
+ and predictable performance with seamless scalability. DynamoDB lets you
14
+ offload the administrative burdens of operating and scaling a distributed database, so
15
+ that you don't have to worry about hardware provisioning, setup and configuration,
16
+ replication, software patching, or cluster scaling.</p>
17
+
18
+ <p>With DynamoDB, you can create database tables that can store and retrieve
19
+ any amount of data, and serve any level of request traffic. You can scale up or scale
20
+ down your tables' throughput capacity without downtime or performance degradation, and
21
+ use the Amazon Web Services Management Console to monitor resource utilization and performance
22
+ metrics.</p>
23
+
24
+ <p>DynamoDB automatically spreads the data and traffic for your tables over
25
+ a sufficient number of servers to handle your throughput and storage requirements, while
26
+ maintaining consistent and fast performance. All of your data is stored on solid state
27
+ disks (SSDs) and automatically replicated across multiple Availability Zones in an
28
+ Amazon Web Services Region, providing built-in high availability and data
29
+ durability.</p>
28
30
 
29
31
  ## Installing
30
32
 
@@ -3,37 +3,98 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.defaultRegionInfoProvider = void 0;
4
4
  const config_resolver_1 = require("@aws-sdk/config-resolver");
5
5
  const regionHash = {
6
- "ca-central-1-fips": {
7
- hostname: "dynamodb-fips.ca-central-1.amazonaws.com",
8
- signingRegion: "ca-central-1",
6
+ "ca-central-1": {
7
+ variants: [
8
+ {
9
+ hostname: "dynamodb.ca-central-1.amazonaws.com",
10
+ tags: [],
11
+ },
12
+ {
13
+ hostname: "dynamodb-fips.ca-central-1.amazonaws.com",
14
+ tags: ["fips"],
15
+ },
16
+ ],
9
17
  },
10
18
  local: {
11
- hostname: "localhost:8000",
19
+ variants: [
20
+ {
21
+ hostname: "localhost:8000",
22
+ tags: [],
23
+ },
24
+ ],
12
25
  signingRegion: "us-east-1",
13
26
  },
14
- "us-east-1-fips": {
15
- hostname: "dynamodb-fips.us-east-1.amazonaws.com",
16
- signingRegion: "us-east-1",
27
+ "us-east-1": {
28
+ variants: [
29
+ {
30
+ hostname: "dynamodb.us-east-1.amazonaws.com",
31
+ tags: [],
32
+ },
33
+ {
34
+ hostname: "dynamodb-fips.us-east-1.amazonaws.com",
35
+ tags: ["fips"],
36
+ },
37
+ ],
17
38
  },
18
- "us-east-2-fips": {
19
- hostname: "dynamodb-fips.us-east-2.amazonaws.com",
20
- signingRegion: "us-east-2",
39
+ "us-east-2": {
40
+ variants: [
41
+ {
42
+ hostname: "dynamodb.us-east-2.amazonaws.com",
43
+ tags: [],
44
+ },
45
+ {
46
+ hostname: "dynamodb-fips.us-east-2.amazonaws.com",
47
+ tags: ["fips"],
48
+ },
49
+ ],
21
50
  },
22
- "us-gov-east-1-fips": {
23
- hostname: "dynamodb.us-gov-east-1.amazonaws.com",
24
- signingRegion: "us-gov-east-1",
51
+ "us-gov-east-1": {
52
+ variants: [
53
+ {
54
+ hostname: "dynamodb.us-gov-east-1.amazonaws.com",
55
+ tags: [],
56
+ },
57
+ {
58
+ hostname: "dynamodb.us-gov-east-1.amazonaws.com",
59
+ tags: ["fips"],
60
+ },
61
+ ],
25
62
  },
26
- "us-gov-west-1-fips": {
27
- hostname: "dynamodb.us-gov-west-1.amazonaws.com",
28
- signingRegion: "us-gov-west-1",
63
+ "us-gov-west-1": {
64
+ variants: [
65
+ {
66
+ hostname: "dynamodb.us-gov-west-1.amazonaws.com",
67
+ tags: [],
68
+ },
69
+ {
70
+ hostname: "dynamodb.us-gov-west-1.amazonaws.com",
71
+ tags: ["fips"],
72
+ },
73
+ ],
29
74
  },
30
- "us-west-1-fips": {
31
- hostname: "dynamodb-fips.us-west-1.amazonaws.com",
32
- signingRegion: "us-west-1",
75
+ "us-west-1": {
76
+ variants: [
77
+ {
78
+ hostname: "dynamodb.us-west-1.amazonaws.com",
79
+ tags: [],
80
+ },
81
+ {
82
+ hostname: "dynamodb-fips.us-west-1.amazonaws.com",
83
+ tags: ["fips"],
84
+ },
85
+ ],
33
86
  },
34
- "us-west-2-fips": {
35
- hostname: "dynamodb-fips.us-west-2.amazonaws.com",
36
- signingRegion: "us-west-2",
87
+ "us-west-2": {
88
+ variants: [
89
+ {
90
+ hostname: "dynamodb.us-west-2.amazonaws.com",
91
+ tags: [],
92
+ },
93
+ {
94
+ hostname: "dynamodb-fips.us-west-2.amazonaws.com",
95
+ tags: ["fips"],
96
+ },
97
+ ],
37
98
  },
38
99
  };
39
100
  const partitionHash = {
@@ -67,23 +128,97 @@ const partitionHash = {
67
128
  "us-west-2",
68
129
  "us-west-2-fips",
69
130
  ],
70
- hostname: "dynamodb.{region}.amazonaws.com",
131
+ regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
132
+ variants: [
133
+ {
134
+ hostname: "dynamodb.{region}.amazonaws.com",
135
+ tags: [],
136
+ },
137
+ {
138
+ hostname: "dynamodb-fips.{region}.amazonaws.com",
139
+ tags: ["fips"],
140
+ },
141
+ {
142
+ hostname: "dynamodb-fips.{region}.api.aws",
143
+ tags: ["dualstack", "fips"],
144
+ },
145
+ {
146
+ hostname: "dynamodb.{region}.api.aws",
147
+ tags: ["dualstack"],
148
+ },
149
+ ],
71
150
  },
72
151
  "aws-cn": {
73
152
  regions: ["cn-north-1", "cn-northwest-1"],
74
- hostname: "dynamodb.{region}.amazonaws.com.cn",
153
+ regionRegex: "^cn\\-\\w+\\-\\d+$",
154
+ variants: [
155
+ {
156
+ hostname: "dynamodb.{region}.amazonaws.com.cn",
157
+ tags: [],
158
+ },
159
+ {
160
+ hostname: "dynamodb-fips.{region}.amazonaws.com.cn",
161
+ tags: ["fips"],
162
+ },
163
+ {
164
+ hostname: "dynamodb-fips.{region}.api.amazonwebservices.com.cn",
165
+ tags: ["dualstack", "fips"],
166
+ },
167
+ {
168
+ hostname: "dynamodb.{region}.api.amazonwebservices.com.cn",
169
+ tags: ["dualstack"],
170
+ },
171
+ ],
75
172
  },
76
173
  "aws-iso": {
77
174
  regions: ["us-iso-east-1", "us-iso-west-1"],
78
- hostname: "dynamodb.{region}.c2s.ic.gov",
175
+ regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
176
+ variants: [
177
+ {
178
+ hostname: "dynamodb.{region}.c2s.ic.gov",
179
+ tags: [],
180
+ },
181
+ {
182
+ hostname: "dynamodb-fips.{region}.c2s.ic.gov",
183
+ tags: ["fips"],
184
+ },
185
+ ],
79
186
  },
80
187
  "aws-iso-b": {
81
188
  regions: ["us-isob-east-1"],
82
- hostname: "dynamodb.{region}.sc2s.sgov.gov",
189
+ regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
190
+ variants: [
191
+ {
192
+ hostname: "dynamodb.{region}.sc2s.sgov.gov",
193
+ tags: [],
194
+ },
195
+ {
196
+ hostname: "dynamodb-fips.{region}.sc2s.sgov.gov",
197
+ tags: ["fips"],
198
+ },
199
+ ],
83
200
  },
84
201
  "aws-us-gov": {
85
202
  regions: ["us-gov-east-1", "us-gov-east-1-fips", "us-gov-west-1", "us-gov-west-1-fips"],
86
- hostname: "dynamodb.{region}.amazonaws.com",
203
+ regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
204
+ variants: [
205
+ {
206
+ hostname: "dynamodb.{region}.amazonaws.com",
207
+ tags: [],
208
+ },
209
+ {
210
+ hostname: "dynamodb.{region}.amazonaws.com",
211
+ tags: ["fips"],
212
+ },
213
+ {
214
+ hostname: "dynamodb-fips.{region}.api.aws",
215
+ tags: ["dualstack", "fips"],
216
+ },
217
+ {
218
+ hostname: "dynamodb.{region}.api.aws",
219
+ tags: ["dualstack"],
220
+ },
221
+ ],
87
222
  },
88
223
  };
89
224
  const defaultRegionInfoProvider = async (region, options) => config_resolver_1.getRegionInfo(region, {
@@ -4,6 +4,7 @@ exports.getRuntimeConfig = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
6
  const sha256_browser_1 = require("@aws-crypto/sha256-browser");
7
+ const config_resolver_1 = require("@aws-sdk/config-resolver");
7
8
  const fetch_http_handler_1 = require("@aws-sdk/fetch-http-handler");
8
9
  const invalid_dependency_1 = require("@aws-sdk/invalid-dependency");
9
10
  const middleware_retry_1 = require("@aws-sdk/middleware-retry");
@@ -13,7 +14,7 @@ const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
13
14
  const util_utf8_browser_1 = require("@aws-sdk/util-utf8-browser");
14
15
  const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
15
16
  const getRuntimeConfig = (config) => {
16
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
17
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
17
18
  const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
18
19
  return {
19
20
  ...clientSharedValues,
@@ -31,8 +32,10 @@ const getRuntimeConfig = (config) => {
31
32
  retryMode: (_k = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _k !== void 0 ? _k : (() => Promise.resolve(middleware_retry_1.DEFAULT_RETRY_MODE)),
32
33
  sha256: (_l = config === null || config === void 0 ? void 0 : config.sha256) !== null && _l !== void 0 ? _l : sha256_browser_1.Sha256,
33
34
  streamCollector: (_m = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _m !== void 0 ? _m : fetch_http_handler_1.streamCollector,
34
- utf8Decoder: (_o = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _o !== void 0 ? _o : util_utf8_browser_1.fromUtf8,
35
- utf8Encoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _p !== void 0 ? _p : util_utf8_browser_1.toUtf8,
35
+ useDualstackEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _o !== void 0 ? _o : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
36
+ useFipsEndpoint: (_p = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _p !== void 0 ? _p : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
37
+ utf8Decoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _q !== void 0 ? _q : util_utf8_browser_1.fromUtf8,
38
+ utf8Encoder: (_r = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _r !== void 0 ? _r : util_utf8_browser_1.toUtf8,
36
39
  };
37
40
  };
38
41
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -18,7 +18,7 @@ const util_utf8_node_1 = require("@aws-sdk/util-utf8-node");
18
18
  const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
19
19
  const smithy_client_1 = require("@aws-sdk/smithy-client");
20
20
  const getRuntimeConfig = (config) => {
21
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
21
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
22
22
  smithy_client_1.emitWarningIfUnsupportedVersion(process.version);
23
23
  const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
24
24
  return {
@@ -37,8 +37,10 @@ const getRuntimeConfig = (config) => {
37
37
  retryMode: (_k = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _k !== void 0 ? _k : node_config_provider_1.loadConfig(middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS),
38
38
  sha256: (_l = config === null || config === void 0 ? void 0 : config.sha256) !== null && _l !== void 0 ? _l : hash_node_1.Hash.bind(null, "sha256"),
39
39
  streamCollector: (_m = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _m !== void 0 ? _m : node_http_handler_1.streamCollector,
40
- utf8Decoder: (_o = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _o !== void 0 ? _o : util_utf8_node_1.fromUtf8,
41
- utf8Encoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _p !== void 0 ? _p : util_utf8_node_1.toUtf8,
40
+ useDualstackEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _o !== void 0 ? _o : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
41
+ useFipsEndpoint: (_p = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _p !== void 0 ? _p : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
42
+ utf8Decoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _q !== void 0 ? _q : util_utf8_node_1.fromUtf8,
43
+ utf8Encoder: (_r = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _r !== void 0 ? _r : util_utf8_node_1.toUtf8,
42
44
  };
43
45
  };
44
46
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,37 +1,98 @@
1
1
  import { __assign, __awaiter, __generator } from "tslib";
2
2
  import { getRegionInfo } from "@aws-sdk/config-resolver";
3
3
  var regionHash = {
4
- "ca-central-1-fips": {
5
- hostname: "dynamodb-fips.ca-central-1.amazonaws.com",
6
- signingRegion: "ca-central-1",
4
+ "ca-central-1": {
5
+ variants: [
6
+ {
7
+ hostname: "dynamodb.ca-central-1.amazonaws.com",
8
+ tags: [],
9
+ },
10
+ {
11
+ hostname: "dynamodb-fips.ca-central-1.amazonaws.com",
12
+ tags: ["fips"],
13
+ },
14
+ ],
7
15
  },
8
16
  local: {
9
- hostname: "localhost:8000",
17
+ variants: [
18
+ {
19
+ hostname: "localhost:8000",
20
+ tags: [],
21
+ },
22
+ ],
10
23
  signingRegion: "us-east-1",
11
24
  },
12
- "us-east-1-fips": {
13
- hostname: "dynamodb-fips.us-east-1.amazonaws.com",
14
- signingRegion: "us-east-1",
25
+ "us-east-1": {
26
+ variants: [
27
+ {
28
+ hostname: "dynamodb.us-east-1.amazonaws.com",
29
+ tags: [],
30
+ },
31
+ {
32
+ hostname: "dynamodb-fips.us-east-1.amazonaws.com",
33
+ tags: ["fips"],
34
+ },
35
+ ],
15
36
  },
16
- "us-east-2-fips": {
17
- hostname: "dynamodb-fips.us-east-2.amazonaws.com",
18
- signingRegion: "us-east-2",
37
+ "us-east-2": {
38
+ variants: [
39
+ {
40
+ hostname: "dynamodb.us-east-2.amazonaws.com",
41
+ tags: [],
42
+ },
43
+ {
44
+ hostname: "dynamodb-fips.us-east-2.amazonaws.com",
45
+ tags: ["fips"],
46
+ },
47
+ ],
19
48
  },
20
- "us-gov-east-1-fips": {
21
- hostname: "dynamodb.us-gov-east-1.amazonaws.com",
22
- signingRegion: "us-gov-east-1",
49
+ "us-gov-east-1": {
50
+ variants: [
51
+ {
52
+ hostname: "dynamodb.us-gov-east-1.amazonaws.com",
53
+ tags: [],
54
+ },
55
+ {
56
+ hostname: "dynamodb.us-gov-east-1.amazonaws.com",
57
+ tags: ["fips"],
58
+ },
59
+ ],
23
60
  },
24
- "us-gov-west-1-fips": {
25
- hostname: "dynamodb.us-gov-west-1.amazonaws.com",
26
- signingRegion: "us-gov-west-1",
61
+ "us-gov-west-1": {
62
+ variants: [
63
+ {
64
+ hostname: "dynamodb.us-gov-west-1.amazonaws.com",
65
+ tags: [],
66
+ },
67
+ {
68
+ hostname: "dynamodb.us-gov-west-1.amazonaws.com",
69
+ tags: ["fips"],
70
+ },
71
+ ],
27
72
  },
28
- "us-west-1-fips": {
29
- hostname: "dynamodb-fips.us-west-1.amazonaws.com",
30
- signingRegion: "us-west-1",
73
+ "us-west-1": {
74
+ variants: [
75
+ {
76
+ hostname: "dynamodb.us-west-1.amazonaws.com",
77
+ tags: [],
78
+ },
79
+ {
80
+ hostname: "dynamodb-fips.us-west-1.amazonaws.com",
81
+ tags: ["fips"],
82
+ },
83
+ ],
31
84
  },
32
- "us-west-2-fips": {
33
- hostname: "dynamodb-fips.us-west-2.amazonaws.com",
34
- signingRegion: "us-west-2",
85
+ "us-west-2": {
86
+ variants: [
87
+ {
88
+ hostname: "dynamodb.us-west-2.amazonaws.com",
89
+ tags: [],
90
+ },
91
+ {
92
+ hostname: "dynamodb-fips.us-west-2.amazonaws.com",
93
+ tags: ["fips"],
94
+ },
95
+ ],
35
96
  },
36
97
  };
37
98
  var partitionHash = {
@@ -65,23 +126,97 @@ var partitionHash = {
65
126
  "us-west-2",
66
127
  "us-west-2-fips",
67
128
  ],
68
- hostname: "dynamodb.{region}.amazonaws.com",
129
+ regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
130
+ variants: [
131
+ {
132
+ hostname: "dynamodb.{region}.amazonaws.com",
133
+ tags: [],
134
+ },
135
+ {
136
+ hostname: "dynamodb-fips.{region}.amazonaws.com",
137
+ tags: ["fips"],
138
+ },
139
+ {
140
+ hostname: "dynamodb-fips.{region}.api.aws",
141
+ tags: ["dualstack", "fips"],
142
+ },
143
+ {
144
+ hostname: "dynamodb.{region}.api.aws",
145
+ tags: ["dualstack"],
146
+ },
147
+ ],
69
148
  },
70
149
  "aws-cn": {
71
150
  regions: ["cn-north-1", "cn-northwest-1"],
72
- hostname: "dynamodb.{region}.amazonaws.com.cn",
151
+ regionRegex: "^cn\\-\\w+\\-\\d+$",
152
+ variants: [
153
+ {
154
+ hostname: "dynamodb.{region}.amazonaws.com.cn",
155
+ tags: [],
156
+ },
157
+ {
158
+ hostname: "dynamodb-fips.{region}.amazonaws.com.cn",
159
+ tags: ["fips"],
160
+ },
161
+ {
162
+ hostname: "dynamodb-fips.{region}.api.amazonwebservices.com.cn",
163
+ tags: ["dualstack", "fips"],
164
+ },
165
+ {
166
+ hostname: "dynamodb.{region}.api.amazonwebservices.com.cn",
167
+ tags: ["dualstack"],
168
+ },
169
+ ],
73
170
  },
74
171
  "aws-iso": {
75
172
  regions: ["us-iso-east-1", "us-iso-west-1"],
76
- hostname: "dynamodb.{region}.c2s.ic.gov",
173
+ regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
174
+ variants: [
175
+ {
176
+ hostname: "dynamodb.{region}.c2s.ic.gov",
177
+ tags: [],
178
+ },
179
+ {
180
+ hostname: "dynamodb-fips.{region}.c2s.ic.gov",
181
+ tags: ["fips"],
182
+ },
183
+ ],
77
184
  },
78
185
  "aws-iso-b": {
79
186
  regions: ["us-isob-east-1"],
80
- hostname: "dynamodb.{region}.sc2s.sgov.gov",
187
+ regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
188
+ variants: [
189
+ {
190
+ hostname: "dynamodb.{region}.sc2s.sgov.gov",
191
+ tags: [],
192
+ },
193
+ {
194
+ hostname: "dynamodb-fips.{region}.sc2s.sgov.gov",
195
+ tags: ["fips"],
196
+ },
197
+ ],
81
198
  },
82
199
  "aws-us-gov": {
83
200
  regions: ["us-gov-east-1", "us-gov-east-1-fips", "us-gov-west-1", "us-gov-west-1-fips"],
84
- hostname: "dynamodb.{region}.amazonaws.com",
201
+ regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
202
+ variants: [
203
+ {
204
+ hostname: "dynamodb.{region}.amazonaws.com",
205
+ tags: [],
206
+ },
207
+ {
208
+ hostname: "dynamodb.{region}.amazonaws.com",
209
+ tags: ["fips"],
210
+ },
211
+ {
212
+ hostname: "dynamodb-fips.{region}.api.aws",
213
+ tags: ["dualstack", "fips"],
214
+ },
215
+ {
216
+ hostname: "dynamodb.{region}.api.aws",
217
+ tags: ["dualstack"],
218
+ },
219
+ ],
85
220
  },
86
221
  };
87
222
  export var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
@@ -1,6 +1,7 @@
1
1
  import { __assign } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { Sha256 } from "@aws-crypto/sha256-browser";
4
+ import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
4
5
  import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
5
6
  import { invalidProvider } from "@aws-sdk/invalid-dependency";
6
7
  import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
@@ -10,7 +11,7 @@ import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
10
11
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
11
12
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
12
13
  export var getRuntimeConfig = function (config) {
13
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
14
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
14
15
  var clientSharedValues = getSharedRuntimeConfig(config);
15
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), endpointDiscoveryEnabledProvider: (_f = config === null || config === void 0 ? void 0 : config.endpointDiscoveryEnabledProvider) !== null && _f !== void 0 ? _f : (function () { return Promise.resolve(undefined); }), maxAttempts: (_g = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _g !== void 0 ? _g : DEFAULT_MAX_ATTEMPTS, region: (_h = config === null || config === void 0 ? void 0 : config.region) !== null && _h !== void 0 ? _h : invalidProvider("Region is missing"), requestHandler: (_j = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _j !== void 0 ? _j : new FetchHttpHandler(), retryMode: (_k = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _k !== void 0 ? _k : (function () { return Promise.resolve(DEFAULT_RETRY_MODE); }), sha256: (_l = config === null || config === void 0 ? void 0 : config.sha256) !== null && _l !== void 0 ? _l : Sha256, streamCollector: (_m = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _m !== void 0 ? _m : streamCollector, utf8Decoder: (_o = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _o !== void 0 ? _o : fromUtf8, utf8Encoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _p !== void 0 ? _p : toUtf8 });
16
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), endpointDiscoveryEnabledProvider: (_f = config === null || config === void 0 ? void 0 : config.endpointDiscoveryEnabledProvider) !== null && _f !== void 0 ? _f : (function () { return Promise.resolve(undefined); }), maxAttempts: (_g = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _g !== void 0 ? _g : DEFAULT_MAX_ATTEMPTS, region: (_h = config === null || config === void 0 ? void 0 : config.region) !== null && _h !== void 0 ? _h : invalidProvider("Region is missing"), requestHandler: (_j = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _j !== void 0 ? _j : new FetchHttpHandler(), retryMode: (_k = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _k !== void 0 ? _k : (function () { return Promise.resolve(DEFAULT_RETRY_MODE); }), sha256: (_l = config === null || config === void 0 ? void 0 : config.sha256) !== null && _l !== void 0 ? _l : Sha256, streamCollector: (_m = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _m !== void 0 ? _m : streamCollector, useDualstackEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_p = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _p !== void 0 ? _p : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _q !== void 0 ? _q : fromUtf8, utf8Encoder: (_r = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _r !== void 0 ? _r : toUtf8 });
16
17
  };
@@ -1,7 +1,7 @@
1
1
  import { __assign } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
4
- import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver";
4
+ import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
5
5
  import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
6
6
  import { Hash } from "@aws-sdk/hash-node";
7
7
  import { NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS } from "@aws-sdk/middleware-endpoint-discovery";
@@ -15,8 +15,8 @@ import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
15
15
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
16
16
  import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
17
17
  export var getRuntimeConfig = function (config) {
18
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
18
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
19
19
  emitWarningIfUnsupportedVersion(process.version);
20
20
  var clientSharedValues = getSharedRuntimeConfig(config);
21
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), endpointDiscoveryEnabledProvider: (_f = config === null || config === void 0 ? void 0 : config.endpointDiscoveryEnabledProvider) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS), maxAttempts: (_g = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_h = config === null || config === void 0 ? void 0 : config.region) !== null && _h !== void 0 ? _h : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_j = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _j !== void 0 ? _j : new NodeHttpHandler(), retryMode: (_k = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _k !== void 0 ? _k : loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: (_l = config === null || config === void 0 ? void 0 : config.sha256) !== null && _l !== void 0 ? _l : Hash.bind(null, "sha256"), streamCollector: (_m = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _m !== void 0 ? _m : streamCollector, utf8Decoder: (_o = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _o !== void 0 ? _o : fromUtf8, utf8Encoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _p !== void 0 ? _p : toUtf8 });
21
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), endpointDiscoveryEnabledProvider: (_f = config === null || config === void 0 ? void 0 : config.endpointDiscoveryEnabledProvider) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS), maxAttempts: (_g = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_h = config === null || config === void 0 ? void 0 : config.region) !== null && _h !== void 0 ? _h : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_j = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _j !== void 0 ? _j : new NodeHttpHandler(), retryMode: (_k = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _k !== void 0 ? _k : loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: (_l = config === null || config === void 0 ? void 0 : config.sha256) !== null && _l !== void 0 ? _l : Hash.bind(null, "sha256"), streamCollector: (_m = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _m !== void 0 ? _m : streamCollector, useDualstackEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_p = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _p !== void 0 ? _p : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _q !== void 0 ? _q : fromUtf8, utf8Encoder: (_r = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _r !== void 0 ? _r : toUtf8 });
22
22
  };