@aws-sdk/client-dynamodb 3.39.0 → 3.43.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.
- package/CHANGELOG.md +44 -0
- package/README.md +18 -16
- package/dist-cjs/endpoints.js +157 -27
- package/dist-cjs/models/models_0.js +13 -13
- package/dist-cjs/protocols/Aws_json1_0.js +15 -0
- package/dist-cjs/runtimeConfig.browser.js +6 -3
- package/dist-cjs/runtimeConfig.js +5 -3
- package/dist-es/endpoints.js +157 -27
- package/dist-es/models/models_0.js +8 -8
- package/dist-es/protocols/Aws_json1_0.js +16 -4
- package/dist-es/runtimeConfig.browser.js +3 -2
- package/dist-es/runtimeConfig.js +3 -3
- package/dist-types/DynamoDB.d.ts +606 -567
- package/dist-types/DynamoDBClient.d.ts +24 -15
- package/dist-types/commands/BatchExecuteStatementCommand.d.ts +7 -4
- package/dist-types/commands/BatchGetItemCommand.d.ts +27 -26
- package/dist-types/commands/BatchWriteItemCommand.d.ts +51 -47
- package/dist-types/commands/CreateBackupCommand.d.ts +19 -19
- package/dist-types/commands/CreateGlobalTableCommand.d.ts +32 -43
- package/dist-types/commands/CreateTableCommand.d.ts +14 -14
- package/dist-types/commands/DeleteBackupCommand.d.ts +3 -2
- package/dist-types/commands/DeleteItemCommand.d.ts +12 -7
- package/dist-types/commands/DeleteTableCommand.d.ts +18 -16
- package/dist-types/commands/DescribeBackupCommand.d.ts +3 -2
- package/dist-types/commands/DescribeContinuousBackupsCommand.d.ts +12 -11
- package/dist-types/commands/DescribeContributorInsightsCommand.d.ts +3 -2
- package/dist-types/commands/DescribeEndpointsCommand.d.ts +1 -1
- package/dist-types/commands/DescribeExportCommand.d.ts +1 -1
- package/dist-types/commands/DescribeGlobalTableCommand.d.ts +6 -5
- package/dist-types/commands/DescribeGlobalTableSettingsCommand.d.ts +5 -4
- package/dist-types/commands/DescribeKinesisStreamingDestinationCommand.d.ts +1 -1
- package/dist-types/commands/DescribeLimitsCommand.d.ts +51 -41
- package/dist-types/commands/DescribeTableCommand.d.ts +11 -8
- package/dist-types/commands/DescribeTableReplicaAutoScalingCommand.d.ts +5 -4
- package/dist-types/commands/DescribeTimeToLiveCommand.d.ts +1 -1
- package/dist-types/commands/DisableKinesisStreamingDestinationCommand.d.ts +1 -1
- package/dist-types/commands/EnableKinesisStreamingDestinationCommand.d.ts +5 -5
- package/dist-types/commands/ExecuteStatementCommand.d.ts +3 -4
- package/dist-types/commands/ExecuteTransactionCommand.d.ts +9 -4
- package/dist-types/commands/ExportTableToPointInTimeCommand.d.ts +1 -1
- package/dist-types/commands/GetItemCommand.d.ts +9 -8
- package/dist-types/commands/ListBackupsCommand.d.ts +7 -7
- package/dist-types/commands/ListContributorInsightsCommand.d.ts +3 -2
- package/dist-types/commands/ListExportsCommand.d.ts +1 -1
- package/dist-types/commands/ListGlobalTablesCommand.d.ts +5 -4
- package/dist-types/commands/ListTablesCommand.d.ts +4 -4
- package/dist-types/commands/ListTagsOfResourceCommand.d.ts +5 -5
- package/dist-types/commands/PutItemCommand.d.ts +52 -45
- package/dist-types/commands/QueryCommand.d.ts +40 -44
- package/dist-types/commands/RestoreTableFromBackupCommand.d.ts +19 -19
- package/dist-types/commands/RestoreTableToPointInTimeCommand.d.ts +36 -41
- package/dist-types/commands/ScanCommand.d.ts +17 -16
- package/dist-types/commands/TagResourceCommand.d.ts +3 -4
- package/dist-types/commands/TransactGetItemsCommand.d.ts +12 -11
- package/dist-types/commands/TransactWriteItemsCommand.d.ts +49 -47
- package/dist-types/commands/UntagResourceCommand.d.ts +3 -4
- package/dist-types/commands/UpdateContinuousBackupsCommand.d.ts +10 -10
- package/dist-types/commands/UpdateContributorInsightsCommand.d.ts +7 -2
- package/dist-types/commands/UpdateGlobalTableCommand.d.ts +12 -17
- package/dist-types/commands/UpdateGlobalTableSettingsCommand.d.ts +1 -1
- package/dist-types/commands/UpdateItemCommand.d.ts +8 -4
- package/dist-types/commands/UpdateTableCommand.d.ts +15 -13
- package/dist-types/commands/UpdateTableReplicaAutoScalingCommand.d.ts +5 -4
- package/dist-types/commands/UpdateTimeToLiveCommand.d.ts +15 -15
- package/dist-types/models/models_0.d.ts +3552 -2839
- package/dist-types/runtimeConfig.browser.d.ts +2 -0
- package/dist-types/runtimeConfig.d.ts +2 -0
- package/dist-types/runtimeConfig.native.d.ts +2 -0
- package/dist-types/ts3.4/DynamoDBClient.d.ts +4 -0
- package/dist-types/ts3.4/models/models_0.d.ts +51 -39
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +2 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
- package/package.json +25 -25
package/dist-es/endpoints.js
CHANGED
|
@@ -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
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
17
|
+
variants: [
|
|
18
|
+
{
|
|
19
|
+
hostname: "localhost:8000",
|
|
20
|
+
tags: [],
|
|
21
|
+
},
|
|
22
|
+
],
|
|
10
23
|
signingRegion: "us-east-1",
|
|
11
24
|
},
|
|
12
|
-
"us-east-1
|
|
13
|
-
|
|
14
|
-
|
|
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
|
|
17
|
-
|
|
18
|
-
|
|
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
|
|
21
|
-
|
|
22
|
-
|
|
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
|
|
25
|
-
|
|
26
|
-
|
|
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
|
|
29
|
-
|
|
30
|
-
|
|
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
|
|
33
|
-
|
|
34
|
-
|
|
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 = {
|
|
@@ -66,27 +127,96 @@ var partitionHash = {
|
|
|
66
127
|
"us-west-2-fips",
|
|
67
128
|
],
|
|
68
129
|
regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
|
|
69
|
-
|
|
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
|
+
],
|
|
70
148
|
},
|
|
71
149
|
"aws-cn": {
|
|
72
150
|
regions: ["cn-north-1", "cn-northwest-1"],
|
|
73
151
|
regionRegex: "^cn\\-\\w+\\-\\d+$",
|
|
74
|
-
|
|
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
|
+
],
|
|
75
170
|
},
|
|
76
171
|
"aws-iso": {
|
|
77
172
|
regions: ["us-iso-east-1", "us-iso-west-1"],
|
|
78
173
|
regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
|
|
79
|
-
|
|
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
|
+
],
|
|
80
184
|
},
|
|
81
185
|
"aws-iso-b": {
|
|
82
186
|
regions: ["us-isob-east-1"],
|
|
83
187
|
regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
|
|
84
|
-
|
|
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
|
+
],
|
|
85
198
|
},
|
|
86
199
|
"aws-us-gov": {
|
|
87
200
|
regions: ["us-gov-east-1", "us-gov-east-1-fips", "us-gov-west-1", "us-gov-west-1-fips"],
|
|
88
201
|
regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
|
|
89
|
-
|
|
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
|
+
],
|
|
90
220
|
},
|
|
91
221
|
};
|
|
92
222
|
export var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -104,6 +104,14 @@ export var BackupTypeFilter;
|
|
|
104
104
|
BackupTypeFilter["SYSTEM"] = "SYSTEM";
|
|
105
105
|
BackupTypeFilter["USER"] = "USER";
|
|
106
106
|
})(BackupTypeFilter || (BackupTypeFilter = {}));
|
|
107
|
+
export var Capacity;
|
|
108
|
+
(function (Capacity) {
|
|
109
|
+
Capacity.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
110
|
+
})(Capacity || (Capacity = {}));
|
|
111
|
+
export var ConsumedCapacity;
|
|
112
|
+
(function (ConsumedCapacity) {
|
|
113
|
+
ConsumedCapacity.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
114
|
+
})(ConsumedCapacity || (ConsumedCapacity = {}));
|
|
107
115
|
export var BatchStatementErrorCodeEnum;
|
|
108
116
|
(function (BatchStatementErrorCodeEnum) {
|
|
109
117
|
BatchStatementErrorCodeEnum["AccessDenied"] = "AccessDenied";
|
|
@@ -130,14 +138,6 @@ export var RequestLimitExceeded;
|
|
|
130
138
|
(function (RequestLimitExceeded) {
|
|
131
139
|
RequestLimitExceeded.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
132
140
|
})(RequestLimitExceeded || (RequestLimitExceeded = {}));
|
|
133
|
-
export var Capacity;
|
|
134
|
-
(function (Capacity) {
|
|
135
|
-
Capacity.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
136
|
-
})(Capacity || (Capacity = {}));
|
|
137
|
-
export var ConsumedCapacity;
|
|
138
|
-
(function (ConsumedCapacity) {
|
|
139
|
-
ConsumedCapacity.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
140
|
-
})(ConsumedCapacity || (ConsumedCapacity = {}));
|
|
141
141
|
export var InvalidEndpointException;
|
|
142
142
|
(function (InvalidEndpointException) {
|
|
143
143
|
InvalidEndpointException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -5095,7 +5095,8 @@ var serializeAws_json1_0AutoScalingTargetTrackingScalingPolicyConfigurationUpdat
|
|
|
5095
5095
|
input.TargetValue !== null && { TargetValue: __serializeFloat(input.TargetValue) }));
|
|
5096
5096
|
};
|
|
5097
5097
|
var serializeAws_json1_0BatchExecuteStatementInput = function (input, context) {
|
|
5098
|
-
return __assign({}, (input.
|
|
5098
|
+
return __assign(__assign({}, (input.ReturnConsumedCapacity !== undefined &&
|
|
5099
|
+
input.ReturnConsumedCapacity !== null && { ReturnConsumedCapacity: input.ReturnConsumedCapacity })), (input.Statements !== undefined &&
|
|
5099
5100
|
input.Statements !== null && { Statements: serializeAws_json1_0PartiQLBatchRequest(input.Statements, context) }));
|
|
5100
5101
|
};
|
|
5101
5102
|
var serializeAws_json1_0BatchGetItemInput = function (input, context) {
|
|
@@ -5307,15 +5308,17 @@ var serializeAws_json1_0DescribeTimeToLiveInput = function (input, context) {
|
|
|
5307
5308
|
return __assign({}, (input.TableName !== undefined && input.TableName !== null && { TableName: input.TableName }));
|
|
5308
5309
|
};
|
|
5309
5310
|
var serializeAws_json1_0ExecuteStatementInput = function (input, context) {
|
|
5310
|
-
return __assign(__assign(__assign(__assign({}, (input.ConsistentRead !== undefined &&
|
|
5311
|
+
return __assign(__assign(__assign(__assign(__assign({}, (input.ConsistentRead !== undefined &&
|
|
5311
5312
|
input.ConsistentRead !== null && { ConsistentRead: input.ConsistentRead })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken })), (input.Parameters !== undefined &&
|
|
5312
5313
|
input.Parameters !== null && {
|
|
5313
5314
|
Parameters: serializeAws_json1_0PreparedStatementParameters(input.Parameters, context),
|
|
5314
|
-
})), (input.
|
|
5315
|
+
})), (input.ReturnConsumedCapacity !== undefined &&
|
|
5316
|
+
input.ReturnConsumedCapacity !== null && { ReturnConsumedCapacity: input.ReturnConsumedCapacity })), (input.Statement !== undefined && input.Statement !== null && { Statement: input.Statement }));
|
|
5315
5317
|
};
|
|
5316
5318
|
var serializeAws_json1_0ExecuteTransactionInput = function (input, context) {
|
|
5317
5319
|
var _a;
|
|
5318
|
-
return __assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.
|
|
5320
|
+
return __assign(__assign({ ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : generateIdempotencyToken() }, (input.ReturnConsumedCapacity !== undefined &&
|
|
5321
|
+
input.ReturnConsumedCapacity !== null && { ReturnConsumedCapacity: input.ReturnConsumedCapacity })), (input.TransactStatements !== undefined &&
|
|
5319
5322
|
input.TransactStatements !== null && {
|
|
5320
5323
|
TransactStatements: serializeAws_json1_0ParameterizedStatements(input.TransactStatements, context),
|
|
5321
5324
|
}));
|
|
@@ -6363,6 +6366,9 @@ var deserializeAws_json1_0BackupSummary = function (output, context) {
|
|
|
6363
6366
|
};
|
|
6364
6367
|
var deserializeAws_json1_0BatchExecuteStatementOutput = function (output, context) {
|
|
6365
6368
|
return {
|
|
6369
|
+
ConsumedCapacity: output.ConsumedCapacity !== undefined && output.ConsumedCapacity !== null
|
|
6370
|
+
? deserializeAws_json1_0ConsumedCapacityMultiple(output.ConsumedCapacity, context)
|
|
6371
|
+
: undefined,
|
|
6366
6372
|
Responses: output.Responses !== undefined && output.Responses !== null
|
|
6367
6373
|
? deserializeAws_json1_0PartiQLBatchResponse(output.Responses, context)
|
|
6368
6374
|
: undefined,
|
|
@@ -6729,6 +6735,9 @@ var deserializeAws_json1_0Endpoints = function (output, context) {
|
|
|
6729
6735
|
};
|
|
6730
6736
|
var deserializeAws_json1_0ExecuteStatementOutput = function (output, context) {
|
|
6731
6737
|
return {
|
|
6738
|
+
ConsumedCapacity: output.ConsumedCapacity !== undefined && output.ConsumedCapacity !== null
|
|
6739
|
+
? deserializeAws_json1_0ConsumedCapacity(output.ConsumedCapacity, context)
|
|
6740
|
+
: undefined,
|
|
6732
6741
|
Items: output.Items !== undefined && output.Items !== null
|
|
6733
6742
|
? deserializeAws_json1_0ItemList(output.Items, context)
|
|
6734
6743
|
: undefined,
|
|
@@ -6737,6 +6746,9 @@ var deserializeAws_json1_0ExecuteStatementOutput = function (output, context) {
|
|
|
6737
6746
|
};
|
|
6738
6747
|
var deserializeAws_json1_0ExecuteTransactionOutput = function (output, context) {
|
|
6739
6748
|
return {
|
|
6749
|
+
ConsumedCapacity: output.ConsumedCapacity !== undefined && output.ConsumedCapacity !== null
|
|
6750
|
+
? deserializeAws_json1_0ConsumedCapacityMultiple(output.ConsumedCapacity, context)
|
|
6751
|
+
: undefined,
|
|
6740
6752
|
Responses: output.Responses !== undefined && output.Responses !== null
|
|
6741
6753
|
? deserializeAws_json1_0ItemResponseList(output.Responses, context)
|
|
6742
6754
|
: undefined,
|
|
@@ -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,
|
|
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
|
};
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -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,
|
|
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
|
};
|