@aws-sdk/client-dataexchange 3.43.0 → 3.47.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 +50 -0
- package/dist-cjs/DataExchange.js +15 -0
- package/dist-cjs/commands/SendApiAssetCommand.js +36 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/endpoints.js +1 -0
- package/dist-cjs/models/models_0.js +41 -45
- package/dist-cjs/protocols/Aws_restJson1.js +188 -2
- package/dist-cjs/runtimeConfig.browser.js +7 -2
- package/dist-cjs/runtimeConfig.js +9 -3
- package/dist-es/DataExchange.js +15 -0
- package/dist-es/commands/SendApiAssetCommand.js +39 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/endpoints.js +1 -0
- package/dist-es/models/models_0.js +29 -28
- package/dist-es/protocols/Aws_restJson1.js +186 -2
- package/dist-es/runtimeConfig.browser.js +12 -3
- package/dist-es/runtimeConfig.js +13 -6
- package/dist-types/DataExchange.d.ts +7 -0
- package/dist-types/DataExchangeClient.d.ts +8 -3
- package/dist-types/commands/SendApiAssetCommand.d.ts +35 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +239 -47
- package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
- package/dist-types/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/runtimeConfig.d.ts +4 -3
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/ts3.4/DataExchange.d.ts +5 -0
- package/dist-types/ts3.4/DataExchangeClient.d.ts +6 -3
- package/dist-types/ts3.4/commands/SendApiAssetCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +132 -28
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +3 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
- package/package.json +38 -45
package/dist-es/DataExchange.js
CHANGED
|
@@ -19,6 +19,7 @@ import { ListEventActionsCommand, } from "./commands/ListEventActionsCommand";
|
|
|
19
19
|
import { ListJobsCommand } from "./commands/ListJobsCommand";
|
|
20
20
|
import { ListRevisionAssetsCommand, } from "./commands/ListRevisionAssetsCommand";
|
|
21
21
|
import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
|
|
22
|
+
import { SendApiAssetCommand, } from "./commands/SendApiAssetCommand";
|
|
22
23
|
import { StartJobCommand } from "./commands/StartJobCommand";
|
|
23
24
|
import { TagResourceCommand } from "./commands/TagResourceCommand";
|
|
24
25
|
import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
|
|
@@ -312,6 +313,20 @@ var DataExchange = (function (_super) {
|
|
|
312
313
|
return this.send(command, optionsOrCb);
|
|
313
314
|
}
|
|
314
315
|
};
|
|
316
|
+
DataExchange.prototype.sendApiAsset = function (args, optionsOrCb, cb) {
|
|
317
|
+
var command = new SendApiAssetCommand(args);
|
|
318
|
+
if (typeof optionsOrCb === "function") {
|
|
319
|
+
this.send(command, optionsOrCb);
|
|
320
|
+
}
|
|
321
|
+
else if (typeof cb === "function") {
|
|
322
|
+
if (typeof optionsOrCb !== "object")
|
|
323
|
+
throw new Error("Expect http options but get " + typeof optionsOrCb);
|
|
324
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
325
|
+
}
|
|
326
|
+
else {
|
|
327
|
+
return this.send(command, optionsOrCb);
|
|
328
|
+
}
|
|
329
|
+
};
|
|
315
330
|
DataExchange.prototype.startJob = function (args, optionsOrCb, cb) {
|
|
316
331
|
var command = new StartJobCommand(args);
|
|
317
332
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { SendApiAssetRequest, SendApiAssetResponse } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_restJson1SendApiAssetCommand, serializeAws_restJson1SendApiAssetCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
var SendApiAssetCommand = (function (_super) {
|
|
7
|
+
__extends(SendApiAssetCommand, _super);
|
|
8
|
+
function SendApiAssetCommand(input) {
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
10
|
+
_this.input = input;
|
|
11
|
+
return _this;
|
|
12
|
+
}
|
|
13
|
+
SendApiAssetCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
+
var stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
var logger = configuration.logger;
|
|
17
|
+
var clientName = "DataExchangeClient";
|
|
18
|
+
var commandName = "SendApiAssetCommand";
|
|
19
|
+
var handlerExecutionContext = {
|
|
20
|
+
logger: logger,
|
|
21
|
+
clientName: clientName,
|
|
22
|
+
commandName: commandName,
|
|
23
|
+
inputFilterSensitiveLog: SendApiAssetRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: SendApiAssetResponse.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
var requestHandler = configuration.requestHandler;
|
|
27
|
+
return stack.resolve(function (request) {
|
|
28
|
+
return requestHandler.handle(request.request, options || {});
|
|
29
|
+
}, handlerExecutionContext);
|
|
30
|
+
};
|
|
31
|
+
SendApiAssetCommand.prototype.serialize = function (input, context) {
|
|
32
|
+
return serializeAws_restJson1SendApiAssetCommand(input, context);
|
|
33
|
+
};
|
|
34
|
+
SendApiAssetCommand.prototype.deserialize = function (output, context) {
|
|
35
|
+
return deserializeAws_restJson1SendApiAssetCommand(output, context);
|
|
36
|
+
};
|
|
37
|
+
return SendApiAssetCommand;
|
|
38
|
+
}($Command));
|
|
39
|
+
export { SendApiAssetCommand };
|
|
@@ -18,6 +18,7 @@ export * from "./ListEventActionsCommand";
|
|
|
18
18
|
export * from "./ListJobsCommand";
|
|
19
19
|
export * from "./ListRevisionAssetsCommand";
|
|
20
20
|
export * from "./ListTagsForResourceCommand";
|
|
21
|
+
export * from "./SendApiAssetCommand";
|
|
21
22
|
export * from "./StartJobCommand";
|
|
22
23
|
export * from "./TagResourceCommand";
|
|
23
24
|
export * from "./UntagResourceCommand";
|
package/dist-es/endpoints.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
|
-
export var AccessDeniedException;
|
|
3
|
-
(function (AccessDeniedException) {
|
|
4
|
-
AccessDeniedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
5
|
-
})(AccessDeniedException || (AccessDeniedException = {}));
|
|
6
2
|
export var ServerSideEncryptionTypes;
|
|
7
3
|
(function (ServerSideEncryptionTypes) {
|
|
8
4
|
ServerSideEncryptionTypes["AES256"] = "AES256";
|
|
@@ -24,6 +20,14 @@ export var Action;
|
|
|
24
20
|
(function (Action) {
|
|
25
21
|
Action.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
26
22
|
})(Action || (Action = {}));
|
|
23
|
+
export var ProtocolType;
|
|
24
|
+
(function (ProtocolType) {
|
|
25
|
+
ProtocolType["REST"] = "REST";
|
|
26
|
+
})(ProtocolType || (ProtocolType = {}));
|
|
27
|
+
export var ApiGatewayApiAsset;
|
|
28
|
+
(function (ApiGatewayApiAsset) {
|
|
29
|
+
ApiGatewayApiAsset.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
30
|
+
})(ApiGatewayApiAsset || (ApiGatewayApiAsset = {}));
|
|
27
31
|
export var AssetDestinationEntry;
|
|
28
32
|
(function (AssetDestinationEntry) {
|
|
29
33
|
AssetDestinationEntry.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -42,6 +46,7 @@ export var AssetDetails;
|
|
|
42
46
|
})(AssetDetails || (AssetDetails = {}));
|
|
43
47
|
export var AssetType;
|
|
44
48
|
(function (AssetType) {
|
|
49
|
+
AssetType["API_GATEWAY_API"] = "API_GATEWAY_API";
|
|
45
50
|
AssetType["REDSHIFT_DATA_SHARE"] = "REDSHIFT_DATA_SHARE";
|
|
46
51
|
AssetType["S3_SNAPSHOT"] = "S3_SNAPSHOT";
|
|
47
52
|
})(AssetType || (AssetType = {}));
|
|
@@ -65,31 +70,11 @@ export var ResourceType;
|
|
|
65
70
|
ResourceType["JOB"] = "JOB";
|
|
66
71
|
ResourceType["REVISION"] = "REVISION";
|
|
67
72
|
})(ResourceType || (ResourceType = {}));
|
|
68
|
-
export var ConflictException;
|
|
69
|
-
(function (ConflictException) {
|
|
70
|
-
ConflictException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
71
|
-
})(ConflictException || (ConflictException = {}));
|
|
72
|
-
export var InternalServerException;
|
|
73
|
-
(function (InternalServerException) {
|
|
74
|
-
InternalServerException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
75
|
-
})(InternalServerException || (InternalServerException = {}));
|
|
76
|
-
export var ResourceNotFoundException;
|
|
77
|
-
(function (ResourceNotFoundException) {
|
|
78
|
-
ResourceNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
79
|
-
})(ResourceNotFoundException || (ResourceNotFoundException = {}));
|
|
80
|
-
export var ThrottlingException;
|
|
81
|
-
(function (ThrottlingException) {
|
|
82
|
-
ThrottlingException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
83
|
-
})(ThrottlingException || (ThrottlingException = {}));
|
|
84
73
|
export var ExceptionCause;
|
|
85
74
|
(function (ExceptionCause) {
|
|
86
75
|
ExceptionCause["InsufficientS3BucketPolicy"] = "InsufficientS3BucketPolicy";
|
|
87
76
|
ExceptionCause["S3AccessDenied"] = "S3AccessDenied";
|
|
88
77
|
})(ExceptionCause || (ExceptionCause = {}));
|
|
89
|
-
export var ValidationException;
|
|
90
|
-
(function (ValidationException) {
|
|
91
|
-
ValidationException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
92
|
-
})(ValidationException || (ValidationException = {}));
|
|
93
78
|
export var Code;
|
|
94
79
|
(function (Code) {
|
|
95
80
|
Code["ACCESS_DENIED_EXCEPTION"] = "ACCESS_DENIED_EXCEPTION";
|
|
@@ -119,6 +104,7 @@ export var CreateDataSetResponse;
|
|
|
119
104
|
})(CreateDataSetResponse || (CreateDataSetResponse = {}));
|
|
120
105
|
export var LimitName;
|
|
121
106
|
(function (LimitName) {
|
|
107
|
+
LimitName["Amazon_API_Gateway_API_assets_per_revision"] = "Amazon API Gateway API assets per revision";
|
|
122
108
|
LimitName["Amazon_Redshift_datashare_assets_per_import_job_from_Redshift"] = "Amazon Redshift datashare assets per import job from Redshift";
|
|
123
109
|
LimitName["Amazon_Redshift_datashare_assets_per_revision"] = "Amazon Redshift datashare assets per revision";
|
|
124
110
|
LimitName["Asset_per_export_job_from_Amazon_S3"] = "Asset per export job from Amazon S3";
|
|
@@ -132,17 +118,15 @@ export var LimitName;
|
|
|
132
118
|
LimitName["Concurrent_in_progress_jobs_to_import_assets_from_Amazon_Redshift_datashares"] = "Concurrent in progress jobs to import assets from Amazon Redshift datashares";
|
|
133
119
|
LimitName["Concurrent_in_progress_jobs_to_import_assets_from_Amazon_S3"] = "Concurrent in progress jobs to import assets from Amazon S3";
|
|
134
120
|
LimitName["Concurrent_in_progress_jobs_to_import_assets_from_a_signed_URL"] = "Concurrent in progress jobs to import assets from a signed URL";
|
|
121
|
+
LimitName["Concurrent_in_progress_jobs_to_import_assets_from_an_API_Gateway_API"] = "Concurrent in progress jobs to import assets from an API Gateway API";
|
|
135
122
|
LimitName["Data_sets_per_account"] = "Data sets per account";
|
|
136
123
|
LimitName["Data_sets_per_product"] = "Data sets per product";
|
|
137
124
|
LimitName["Event_actions_per_account"] = "Event actions per account";
|
|
138
125
|
LimitName["Products_per_account"] = "Products per account";
|
|
126
|
+
LimitName["Revisions_per_Amazon_API_Gateway_API_data_set"] = "Revisions per Amazon API Gateway API data set";
|
|
139
127
|
LimitName["Revisions_per_Amazon_Redshift_datashare_data_set"] = "Revisions per Amazon Redshift datashare data set";
|
|
140
128
|
LimitName["Revisions_per_data_set"] = "Revisions per data set";
|
|
141
129
|
})(LimitName || (LimitName = {}));
|
|
142
|
-
export var ServiceLimitExceededException;
|
|
143
|
-
(function (ServiceLimitExceededException) {
|
|
144
|
-
ServiceLimitExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
145
|
-
})(ServiceLimitExceededException || (ServiceLimitExceededException = {}));
|
|
146
130
|
export var RevisionPublished;
|
|
147
131
|
(function (RevisionPublished) {
|
|
148
132
|
RevisionPublished.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -175,6 +159,10 @@ export var ExportRevisionsToS3RequestDetails;
|
|
|
175
159
|
(function (ExportRevisionsToS3RequestDetails) {
|
|
176
160
|
ExportRevisionsToS3RequestDetails.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
177
161
|
})(ExportRevisionsToS3RequestDetails || (ExportRevisionsToS3RequestDetails = {}));
|
|
162
|
+
export var ImportAssetFromApiGatewayApiRequestDetails;
|
|
163
|
+
(function (ImportAssetFromApiGatewayApiRequestDetails) {
|
|
164
|
+
ImportAssetFromApiGatewayApiRequestDetails.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
165
|
+
})(ImportAssetFromApiGatewayApiRequestDetails || (ImportAssetFromApiGatewayApiRequestDetails = {}));
|
|
178
166
|
export var ImportAssetFromSignedUrlRequestDetails;
|
|
179
167
|
(function (ImportAssetFromSignedUrlRequestDetails) {
|
|
180
168
|
ImportAssetFromSignedUrlRequestDetails.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -202,6 +190,7 @@ export var Type;
|
|
|
202
190
|
Type["EXPORT_REVISIONS_TO_S3"] = "EXPORT_REVISIONS_TO_S3";
|
|
203
191
|
Type["IMPORT_ASSETS_FROM_REDSHIFT_DATA_SHARES"] = "IMPORT_ASSETS_FROM_REDSHIFT_DATA_SHARES";
|
|
204
192
|
Type["IMPORT_ASSETS_FROM_S3"] = "IMPORT_ASSETS_FROM_S3";
|
|
193
|
+
Type["IMPORT_ASSET_FROM_API_GATEWAY_API"] = "IMPORT_ASSET_FROM_API_GATEWAY_API";
|
|
205
194
|
Type["IMPORT_ASSET_FROM_SIGNED_URL"] = "IMPORT_ASSET_FROM_SIGNED_URL";
|
|
206
195
|
})(Type || (Type = {}));
|
|
207
196
|
export var CreateJobRequest;
|
|
@@ -220,6 +209,10 @@ export var ExportRevisionsToS3ResponseDetails;
|
|
|
220
209
|
(function (ExportRevisionsToS3ResponseDetails) {
|
|
221
210
|
ExportRevisionsToS3ResponseDetails.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
222
211
|
})(ExportRevisionsToS3ResponseDetails || (ExportRevisionsToS3ResponseDetails = {}));
|
|
212
|
+
export var ImportAssetFromApiGatewayApiResponseDetails;
|
|
213
|
+
(function (ImportAssetFromApiGatewayApiResponseDetails) {
|
|
214
|
+
ImportAssetFromApiGatewayApiResponseDetails.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
215
|
+
})(ImportAssetFromApiGatewayApiResponseDetails || (ImportAssetFromApiGatewayApiResponseDetails = {}));
|
|
223
216
|
export var ImportAssetFromSignedUrlResponseDetails;
|
|
224
217
|
(function (ImportAssetFromSignedUrlResponseDetails) {
|
|
225
218
|
ImportAssetFromSignedUrlResponseDetails.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -401,6 +394,14 @@ export var ListTagsForResourceResponse;
|
|
|
401
394
|
(function (ListTagsForResourceResponse) {
|
|
402
395
|
ListTagsForResourceResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
403
396
|
})(ListTagsForResourceResponse || (ListTagsForResourceResponse = {}));
|
|
397
|
+
export var SendApiAssetRequest;
|
|
398
|
+
(function (SendApiAssetRequest) {
|
|
399
|
+
SendApiAssetRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
400
|
+
})(SendApiAssetRequest || (SendApiAssetRequest = {}));
|
|
401
|
+
export var SendApiAssetResponse;
|
|
402
|
+
(function (SendApiAssetResponse) {
|
|
403
|
+
SendApiAssetResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
404
|
+
})(SendApiAssetResponse || (SendApiAssetResponse = {}));
|
|
404
405
|
export var StartJobRequest;
|
|
405
406
|
(function (StartJobRequest) {
|
|
406
407
|
StartJobRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
|
-
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
|
+
import { HttpRequest as __HttpRequest, isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http";
|
|
3
3
|
import { expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, parseRfc3339DateTime as __parseRfc3339DateTime, } from "@aws-sdk/smithy-client";
|
|
4
4
|
export var serializeAws_restJson1CancelJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5
5
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
@@ -663,6 +663,45 @@ export var serializeAws_restJson1ListTagsForResourceCommand = function (input, c
|
|
|
663
663
|
}
|
|
664
664
|
});
|
|
665
665
|
}); };
|
|
666
|
+
export var serializeAws_restJson1SendApiAssetCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
667
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body, resolvedHostname;
|
|
668
|
+
return __generator(this, function (_c) {
|
|
669
|
+
switch (_c.label) {
|
|
670
|
+
case 0: return [4, context.endpoint()];
|
|
671
|
+
case 1:
|
|
672
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
673
|
+
headers = __assign(__assign(__assign(__assign(__assign(__assign({ "content-type": "text/plain" }, (isSerializableHeaderValue(input.AssetId) && { "x-amzn-dataexchange-asset-id": input.AssetId })), (isSerializableHeaderValue(input.DataSetId) && { "x-amzn-dataexchange-data-set-id": input.DataSetId })), (isSerializableHeaderValue(input.Method) && { "x-amzn-dataexchange-http-method": input.Method })), (isSerializableHeaderValue(input.Path) && { "x-amzn-dataexchange-path": input.Path })), (isSerializableHeaderValue(input.RevisionId) && { "x-amzn-dataexchange-revision-id": input.RevisionId })), (input.RequestHeaders !== undefined &&
|
|
674
|
+
Object.keys(input.RequestHeaders).reduce(function (acc, suffix) {
|
|
675
|
+
var _a;
|
|
676
|
+
return (__assign(__assign({}, acc), (_a = {}, _a["x-amzn-dataexchange-header-" + suffix.toLowerCase()] = input.RequestHeaders[suffix], _a)));
|
|
677
|
+
}, {})));
|
|
678
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v1";
|
|
679
|
+
query = __assign({}, (input.QueryStringParameters !== undefined && input.QueryStringParameters));
|
|
680
|
+
if (input.Body !== undefined) {
|
|
681
|
+
body = input.Body;
|
|
682
|
+
}
|
|
683
|
+
return [4, context.endpoint()];
|
|
684
|
+
case 2:
|
|
685
|
+
resolvedHostname = (_c.sent()).hostname;
|
|
686
|
+
if (context.disableHostPrefix !== true) {
|
|
687
|
+
resolvedHostname = "api-fulfill." + resolvedHostname;
|
|
688
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
689
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
return [2, new __HttpRequest({
|
|
693
|
+
protocol: protocol,
|
|
694
|
+
hostname: resolvedHostname,
|
|
695
|
+
port: port,
|
|
696
|
+
method: "POST",
|
|
697
|
+
headers: headers,
|
|
698
|
+
path: resolvedPath,
|
|
699
|
+
query: query,
|
|
700
|
+
body: body,
|
|
701
|
+
})];
|
|
702
|
+
}
|
|
703
|
+
});
|
|
704
|
+
}); };
|
|
666
705
|
export var serializeAws_restJson1StartJobCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
667
706
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
668
707
|
return __generator(this, function (_c) {
|
|
@@ -2969,6 +3008,105 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
|
|
|
2969
3008
|
}
|
|
2970
3009
|
});
|
|
2971
3010
|
}); };
|
|
3011
|
+
export var deserializeAws_restJson1SendApiAssetCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3012
|
+
var contents, data;
|
|
3013
|
+
return __generator(this, function (_a) {
|
|
3014
|
+
switch (_a.label) {
|
|
3015
|
+
case 0:
|
|
3016
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3017
|
+
return [2, deserializeAws_restJson1SendApiAssetCommandError(output, context)];
|
|
3018
|
+
}
|
|
3019
|
+
contents = {
|
|
3020
|
+
$metadata: deserializeMetadata(output),
|
|
3021
|
+
Body: undefined,
|
|
3022
|
+
ResponseHeaders: undefined,
|
|
3023
|
+
};
|
|
3024
|
+
Object.keys(output.headers).forEach(function (header) {
|
|
3025
|
+
if (contents.ResponseHeaders === undefined) {
|
|
3026
|
+
contents.ResponseHeaders = {};
|
|
3027
|
+
}
|
|
3028
|
+
if (header.startsWith("")) {
|
|
3029
|
+
contents.ResponseHeaders[header.substring(0)] = output.headers[header];
|
|
3030
|
+
}
|
|
3031
|
+
});
|
|
3032
|
+
return [4, collectBodyString(output.body, context)];
|
|
3033
|
+
case 1:
|
|
3034
|
+
data = _a.sent();
|
|
3035
|
+
contents.Body = __expectString(data);
|
|
3036
|
+
return [2, Promise.resolve(contents)];
|
|
3037
|
+
}
|
|
3038
|
+
});
|
|
3039
|
+
}); };
|
|
3040
|
+
var deserializeAws_restJson1SendApiAssetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3041
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
3042
|
+
var _h;
|
|
3043
|
+
return __generator(this, function (_j) {
|
|
3044
|
+
switch (_j.label) {
|
|
3045
|
+
case 0:
|
|
3046
|
+
_a = [__assign({}, output)];
|
|
3047
|
+
_h = {};
|
|
3048
|
+
return [4, parseBody(output.body, context)];
|
|
3049
|
+
case 1:
|
|
3050
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
3051
|
+
errorCode = "UnknownError";
|
|
3052
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3053
|
+
_b = errorCode;
|
|
3054
|
+
switch (_b) {
|
|
3055
|
+
case "AccessDeniedException": return [3, 2];
|
|
3056
|
+
case "com.amazonaws.dataexchange#AccessDeniedException": return [3, 2];
|
|
3057
|
+
case "InternalServerException": return [3, 4];
|
|
3058
|
+
case "com.amazonaws.dataexchange#InternalServerException": return [3, 4];
|
|
3059
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
3060
|
+
case "com.amazonaws.dataexchange#ResourceNotFoundException": return [3, 6];
|
|
3061
|
+
case "ThrottlingException": return [3, 8];
|
|
3062
|
+
case "com.amazonaws.dataexchange#ThrottlingException": return [3, 8];
|
|
3063
|
+
case "ValidationException": return [3, 10];
|
|
3064
|
+
case "com.amazonaws.dataexchange#ValidationException": return [3, 10];
|
|
3065
|
+
}
|
|
3066
|
+
return [3, 12];
|
|
3067
|
+
case 2:
|
|
3068
|
+
_c = [{}];
|
|
3069
|
+
return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
3070
|
+
case 3:
|
|
3071
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3072
|
+
return [3, 13];
|
|
3073
|
+
case 4:
|
|
3074
|
+
_d = [{}];
|
|
3075
|
+
return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
3076
|
+
case 5:
|
|
3077
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3078
|
+
return [3, 13];
|
|
3079
|
+
case 6:
|
|
3080
|
+
_e = [{}];
|
|
3081
|
+
return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
3082
|
+
case 7:
|
|
3083
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3084
|
+
return [3, 13];
|
|
3085
|
+
case 8:
|
|
3086
|
+
_f = [{}];
|
|
3087
|
+
return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
3088
|
+
case 9:
|
|
3089
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3090
|
+
return [3, 13];
|
|
3091
|
+
case 10:
|
|
3092
|
+
_g = [{}];
|
|
3093
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
3094
|
+
case 11:
|
|
3095
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3096
|
+
return [3, 13];
|
|
3097
|
+
case 12:
|
|
3098
|
+
parsedBody = parsedOutput.body;
|
|
3099
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3100
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
3101
|
+
_j.label = 13;
|
|
3102
|
+
case 13:
|
|
3103
|
+
message = response.message || response.Message || errorCode;
|
|
3104
|
+
response.message = message;
|
|
3105
|
+
delete response.Message;
|
|
3106
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
3107
|
+
}
|
|
3108
|
+
});
|
|
3109
|
+
}); };
|
|
2972
3110
|
export var deserializeAws_restJson1StartJobCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2973
3111
|
var contents;
|
|
2974
3112
|
return __generator(this, function (_a) {
|
|
@@ -3859,6 +3997,11 @@ var serializeAws_restJson1ExportRevisionsToS3RequestDetails = function (input, c
|
|
|
3859
3997
|
var serializeAws_restJson1ExportServerSideEncryption = function (input, context) {
|
|
3860
3998
|
return __assign(__assign({}, (input.KmsKeyArn !== undefined && input.KmsKeyArn !== null && { KmsKeyArn: input.KmsKeyArn })), (input.Type !== undefined && input.Type !== null && { Type: input.Type }));
|
|
3861
3999
|
};
|
|
4000
|
+
var serializeAws_restJson1ImportAssetFromApiGatewayApiRequestDetails = function (input, context) {
|
|
4001
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.ApiDescription !== undefined &&
|
|
4002
|
+
input.ApiDescription !== null && { ApiDescription: input.ApiDescription })), (input.ApiId !== undefined && input.ApiId !== null && { ApiId: input.ApiId })), (input.ApiKey !== undefined && input.ApiKey !== null && { ApiKey: input.ApiKey })), (input.ApiName !== undefined && input.ApiName !== null && { ApiName: input.ApiName })), (input.ApiSpecificationMd5Hash !== undefined &&
|
|
4003
|
+
input.ApiSpecificationMd5Hash !== null && { ApiSpecificationMd5Hash: input.ApiSpecificationMd5Hash })), (input.DataSetId !== undefined && input.DataSetId !== null && { DataSetId: input.DataSetId })), (input.ProtocolType !== undefined && input.ProtocolType !== null && { ProtocolType: input.ProtocolType })), (input.RevisionId !== undefined && input.RevisionId !== null && { RevisionId: input.RevisionId })), (input.Stage !== undefined && input.Stage !== null && { Stage: input.Stage }));
|
|
4004
|
+
};
|
|
3862
4005
|
var serializeAws_restJson1ImportAssetFromSignedUrlRequestDetails = function (input, context) {
|
|
3863
4006
|
return __assign(__assign(__assign(__assign({}, (input.AssetName !== undefined && input.AssetName !== null && { AssetName: input.AssetName })), (input.DataSetId !== undefined && input.DataSetId !== null && { DataSetId: input.DataSetId })), (input.Md5Hash !== undefined && input.Md5Hash !== null && { Md5Hash: input.Md5Hash })), (input.RevisionId !== undefined && input.RevisionId !== null && { RevisionId: input.RevisionId }));
|
|
3864
4007
|
};
|
|
@@ -3928,7 +4071,7 @@ var serializeAws_restJson1RedshiftDataShareAssetSourceEntry = function (input, c
|
|
|
3928
4071
|
return __assign({}, (input.DataShareArn !== undefined && input.DataShareArn !== null && { DataShareArn: input.DataShareArn }));
|
|
3929
4072
|
};
|
|
3930
4073
|
var serializeAws_restJson1RequestDetails = function (input, context) {
|
|
3931
|
-
return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.ExportAssetToSignedUrl !== undefined &&
|
|
4074
|
+
return __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.ExportAssetToSignedUrl !== undefined &&
|
|
3932
4075
|
input.ExportAssetToSignedUrl !== null && {
|
|
3933
4076
|
ExportAssetToSignedUrl: serializeAws_restJson1ExportAssetToSignedUrlRequestDetails(input.ExportAssetToSignedUrl, context),
|
|
3934
4077
|
})), (input.ExportAssetsToS3 !== undefined &&
|
|
@@ -3937,6 +4080,9 @@ var serializeAws_restJson1RequestDetails = function (input, context) {
|
|
|
3937
4080
|
})), (input.ExportRevisionsToS3 !== undefined &&
|
|
3938
4081
|
input.ExportRevisionsToS3 !== null && {
|
|
3939
4082
|
ExportRevisionsToS3: serializeAws_restJson1ExportRevisionsToS3RequestDetails(input.ExportRevisionsToS3, context),
|
|
4083
|
+
})), (input.ImportAssetFromApiGatewayApi !== undefined &&
|
|
4084
|
+
input.ImportAssetFromApiGatewayApi !== null && {
|
|
4085
|
+
ImportAssetFromApiGatewayApi: serializeAws_restJson1ImportAssetFromApiGatewayApiRequestDetails(input.ImportAssetFromApiGatewayApi, context),
|
|
3940
4086
|
})), (input.ImportAssetFromSignedUrl !== undefined &&
|
|
3941
4087
|
input.ImportAssetFromSignedUrl !== null && {
|
|
3942
4088
|
ImportAssetFromSignedUrl: serializeAws_restJson1ImportAssetFromSignedUrlRequestDetails(input.ImportAssetFromSignedUrl, context),
|
|
@@ -3961,6 +4107,21 @@ var deserializeAws_restJson1Action = function (output, context) {
|
|
|
3961
4107
|
: undefined,
|
|
3962
4108
|
};
|
|
3963
4109
|
};
|
|
4110
|
+
var deserializeAws_restJson1ApiGatewayApiAsset = function (output, context) {
|
|
4111
|
+
return {
|
|
4112
|
+
ApiDescription: __expectString(output.ApiDescription),
|
|
4113
|
+
ApiEndpoint: __expectString(output.ApiEndpoint),
|
|
4114
|
+
ApiId: __expectString(output.ApiId),
|
|
4115
|
+
ApiKey: __expectString(output.ApiKey),
|
|
4116
|
+
ApiName: __expectString(output.ApiName),
|
|
4117
|
+
ApiSpecificationDownloadUrl: __expectString(output.ApiSpecificationDownloadUrl),
|
|
4118
|
+
ApiSpecificationDownloadUrlExpiresAt: output.ApiSpecificationDownloadUrlExpiresAt !== undefined && output.ApiSpecificationDownloadUrlExpiresAt !== null
|
|
4119
|
+
? __expectNonNull(__parseRfc3339DateTime(output.ApiSpecificationDownloadUrlExpiresAt))
|
|
4120
|
+
: undefined,
|
|
4121
|
+
ProtocolType: __expectString(output.ProtocolType),
|
|
4122
|
+
Stage: __expectString(output.Stage),
|
|
4123
|
+
};
|
|
4124
|
+
};
|
|
3964
4125
|
var deserializeAws_restJson1AssetDestinationEntry = function (output, context) {
|
|
3965
4126
|
return {
|
|
3966
4127
|
AssetId: __expectString(output.AssetId),
|
|
@@ -3970,6 +4131,9 @@ var deserializeAws_restJson1AssetDestinationEntry = function (output, context) {
|
|
|
3970
4131
|
};
|
|
3971
4132
|
var deserializeAws_restJson1AssetDetails = function (output, context) {
|
|
3972
4133
|
return {
|
|
4134
|
+
ApiGatewayApiAsset: output.ApiGatewayApiAsset !== undefined && output.ApiGatewayApiAsset !== null
|
|
4135
|
+
? deserializeAws_restJson1ApiGatewayApiAsset(output.ApiGatewayApiAsset, context)
|
|
4136
|
+
: undefined,
|
|
3973
4137
|
RedshiftDataShareAsset: output.RedshiftDataShareAsset !== undefined && output.RedshiftDataShareAsset !== null
|
|
3974
4138
|
? deserializeAws_restJson1RedshiftDataShareAsset(output.RedshiftDataShareAsset, context)
|
|
3975
4139
|
: undefined,
|
|
@@ -4117,6 +4281,23 @@ var deserializeAws_restJson1ExportServerSideEncryption = function (output, conte
|
|
|
4117
4281
|
Type: __expectString(output.Type),
|
|
4118
4282
|
};
|
|
4119
4283
|
};
|
|
4284
|
+
var deserializeAws_restJson1ImportAssetFromApiGatewayApiResponseDetails = function (output, context) {
|
|
4285
|
+
return {
|
|
4286
|
+
ApiDescription: __expectString(output.ApiDescription),
|
|
4287
|
+
ApiId: __expectString(output.ApiId),
|
|
4288
|
+
ApiKey: __expectString(output.ApiKey),
|
|
4289
|
+
ApiName: __expectString(output.ApiName),
|
|
4290
|
+
ApiSpecificationMd5Hash: __expectString(output.ApiSpecificationMd5Hash),
|
|
4291
|
+
ApiSpecificationUploadUrl: __expectString(output.ApiSpecificationUploadUrl),
|
|
4292
|
+
ApiSpecificationUploadUrlExpiresAt: output.ApiSpecificationUploadUrlExpiresAt !== undefined && output.ApiSpecificationUploadUrlExpiresAt !== null
|
|
4293
|
+
? __expectNonNull(__parseRfc3339DateTime(output.ApiSpecificationUploadUrlExpiresAt))
|
|
4294
|
+
: undefined,
|
|
4295
|
+
DataSetId: __expectString(output.DataSetId),
|
|
4296
|
+
ProtocolType: __expectString(output.ProtocolType),
|
|
4297
|
+
RevisionId: __expectString(output.RevisionId),
|
|
4298
|
+
Stage: __expectString(output.Stage),
|
|
4299
|
+
};
|
|
4300
|
+
};
|
|
4120
4301
|
var deserializeAws_restJson1ImportAssetFromSignedUrlJobErrorDetails = function (output, context) {
|
|
4121
4302
|
return {
|
|
4122
4303
|
AssetName: __expectString(output.AssetName),
|
|
@@ -4321,6 +4502,9 @@ var deserializeAws_restJson1ResponseDetails = function (output, context) {
|
|
|
4321
4502
|
ExportRevisionsToS3: output.ExportRevisionsToS3 !== undefined && output.ExportRevisionsToS3 !== null
|
|
4322
4503
|
? deserializeAws_restJson1ExportRevisionsToS3ResponseDetails(output.ExportRevisionsToS3, context)
|
|
4323
4504
|
: undefined,
|
|
4505
|
+
ImportAssetFromApiGatewayApi: output.ImportAssetFromApiGatewayApi !== undefined && output.ImportAssetFromApiGatewayApi !== null
|
|
4506
|
+
? deserializeAws_restJson1ImportAssetFromApiGatewayApiResponseDetails(output.ImportAssetFromApiGatewayApi, context)
|
|
4507
|
+
: undefined,
|
|
4324
4508
|
ImportAssetFromSignedUrl: output.ImportAssetFromSignedUrl !== undefined && output.ImportAssetFromSignedUrl !== null
|
|
4325
4509
|
? deserializeAws_restJson1ImportAssetFromSignedUrlResponseDetails(output.ImportAssetFromSignedUrl, context)
|
|
4326
4510
|
: undefined,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
1
|
+
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import packageInfo from "../package.json";
|
|
3
3
|
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
4
4
|
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
|
|
5
|
-
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
|
|
5
|
+
import { FetchHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
|
|
6
6
|
import { invalidProvider } from "@aws-sdk/invalid-dependency";
|
|
7
7
|
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
|
|
8
8
|
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
|
|
@@ -10,8 +10,17 @@ import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
|
|
|
10
10
|
import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
|
|
11
11
|
import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
|
|
12
12
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
13
|
+
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
14
|
+
import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
|
|
13
15
|
export var getRuntimeConfig = function (config) {
|
|
14
16
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
17
|
+
var defaultsMode = resolveDefaultsModeConfig(config);
|
|
18
|
+
var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
|
|
15
19
|
var clientSharedValues = getSharedRuntimeConfig(config);
|
|
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 }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new
|
|
20
|
+
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", defaultsMode: defaultsMode, 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 }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
21
|
+
switch (_a.label) {
|
|
22
|
+
case 0: return [4, defaultConfigProvider()];
|
|
23
|
+
case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
|
|
24
|
+
}
|
|
25
|
+
}); }); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
|
|
17
26
|
};
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -1,21 +1,28 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
1
|
+
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import packageInfo from "../package.json";
|
|
3
3
|
import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
|
|
4
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
|
-
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
|
|
7
|
+
import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@aws-sdk/middleware-retry";
|
|
8
8
|
import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
|
|
9
|
-
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
|
|
9
|
+
import { NodeHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/node-http-handler";
|
|
10
10
|
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
|
|
11
11
|
import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
|
|
12
12
|
import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
|
|
13
13
|
import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
|
|
14
14
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
15
|
-
import {
|
|
15
|
+
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
16
|
+
import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
|
|
16
17
|
export var getRuntimeConfig = function (config) {
|
|
17
18
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
18
|
-
|
|
19
|
+
var defaultsMode = resolveDefaultsModeConfig(config);
|
|
20
|
+
var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
|
|
19
21
|
var clientSharedValues = getSharedRuntimeConfig(config);
|
|
20
|
-
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 }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new
|
|
22
|
+
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", defaultsMode: defaultsMode, 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 }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(__assign(__assign({}, NODE_RETRY_MODE_CONFIG_OPTIONS), { default: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
23
|
+
switch (_a.label) {
|
|
24
|
+
case 0: return [4, defaultConfigProvider()];
|
|
25
|
+
case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
|
|
26
|
+
}
|
|
27
|
+
}); }); } })), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
|
|
21
28
|
};
|
|
@@ -19,6 +19,7 @@ import { ListEventActionsCommandInput, ListEventActionsCommandOutput } from "./c
|
|
|
19
19
|
import { ListJobsCommandInput, ListJobsCommandOutput } from "./commands/ListJobsCommand";
|
|
20
20
|
import { ListRevisionAssetsCommandInput, ListRevisionAssetsCommandOutput } from "./commands/ListRevisionAssetsCommand";
|
|
21
21
|
import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
|
|
22
|
+
import { SendApiAssetCommandInput, SendApiAssetCommandOutput } from "./commands/SendApiAssetCommand";
|
|
22
23
|
import { StartJobCommandInput, StartJobCommandOutput } from "./commands/StartJobCommand";
|
|
23
24
|
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
|
|
24
25
|
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
|
|
@@ -151,6 +152,12 @@ export declare class DataExchange extends DataExchangeClient {
|
|
|
151
152
|
listTagsForResource(args: ListTagsForResourceCommandInput, options?: __HttpHandlerOptions): Promise<ListTagsForResourceCommandOutput>;
|
|
152
153
|
listTagsForResource(args: ListTagsForResourceCommandInput, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
|
|
153
154
|
listTagsForResource(args: ListTagsForResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
|
|
155
|
+
/**
|
|
156
|
+
* <p>This operation invokes an API Gateway API asset. The request is proxied to the provider’s API Gateway API.</p>
|
|
157
|
+
*/
|
|
158
|
+
sendApiAsset(args: SendApiAssetCommandInput, options?: __HttpHandlerOptions): Promise<SendApiAssetCommandOutput>;
|
|
159
|
+
sendApiAsset(args: SendApiAssetCommandInput, cb: (err: any, data?: SendApiAssetCommandOutput) => void): void;
|
|
160
|
+
sendApiAsset(args: SendApiAssetCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SendApiAssetCommandOutput) => void): void;
|
|
154
161
|
/**
|
|
155
162
|
* <p>This operation starts a job.</p>
|
|
156
163
|
*/
|
|
@@ -4,7 +4,7 @@ import { RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry
|
|
|
4
4
|
import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-signing";
|
|
5
5
|
import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
6
6
|
import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
|
|
7
|
-
import { Client as __Client, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
|
|
7
|
+
import { Client as __Client, DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
|
|
8
8
|
import { Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
|
|
9
9
|
import { CancelJobCommandInput, CancelJobCommandOutput } from "./commands/CancelJobCommand";
|
|
10
10
|
import { CreateDataSetCommandInput, CreateDataSetCommandOutput } from "./commands/CreateDataSetCommand";
|
|
@@ -26,6 +26,7 @@ import { ListEventActionsCommandInput, ListEventActionsCommandOutput } from "./c
|
|
|
26
26
|
import { ListJobsCommandInput, ListJobsCommandOutput } from "./commands/ListJobsCommand";
|
|
27
27
|
import { ListRevisionAssetsCommandInput, ListRevisionAssetsCommandOutput } from "./commands/ListRevisionAssetsCommand";
|
|
28
28
|
import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
|
|
29
|
+
import { SendApiAssetCommandInput, SendApiAssetCommandOutput } from "./commands/SendApiAssetCommand";
|
|
29
30
|
import { StartJobCommandInput, StartJobCommandOutput } from "./commands/StartJobCommand";
|
|
30
31
|
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
|
|
31
32
|
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
|
|
@@ -33,8 +34,8 @@ import { UpdateAssetCommandInput, UpdateAssetCommandOutput } from "./commands/Up
|
|
|
33
34
|
import { UpdateDataSetCommandInput, UpdateDataSetCommandOutput } from "./commands/UpdateDataSetCommand";
|
|
34
35
|
import { UpdateEventActionCommandInput, UpdateEventActionCommandOutput } from "./commands/UpdateEventActionCommand";
|
|
35
36
|
import { UpdateRevisionCommandInput, UpdateRevisionCommandOutput } from "./commands/UpdateRevisionCommand";
|
|
36
|
-
export declare type ServiceInputTypes = CancelJobCommandInput | CreateDataSetCommandInput | CreateEventActionCommandInput | CreateJobCommandInput | CreateRevisionCommandInput | DeleteAssetCommandInput | DeleteDataSetCommandInput | DeleteEventActionCommandInput | DeleteRevisionCommandInput | GetAssetCommandInput | GetDataSetCommandInput | GetEventActionCommandInput | GetJobCommandInput | GetRevisionCommandInput | ListDataSetRevisionsCommandInput | ListDataSetsCommandInput | ListEventActionsCommandInput | ListJobsCommandInput | ListRevisionAssetsCommandInput | ListTagsForResourceCommandInput | StartJobCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateAssetCommandInput | UpdateDataSetCommandInput | UpdateEventActionCommandInput | UpdateRevisionCommandInput;
|
|
37
|
-
export declare type ServiceOutputTypes = CancelJobCommandOutput | CreateDataSetCommandOutput | CreateEventActionCommandOutput | CreateJobCommandOutput | CreateRevisionCommandOutput | DeleteAssetCommandOutput | DeleteDataSetCommandOutput | DeleteEventActionCommandOutput | DeleteRevisionCommandOutput | GetAssetCommandOutput | GetDataSetCommandOutput | GetEventActionCommandOutput | GetJobCommandOutput | GetRevisionCommandOutput | ListDataSetRevisionsCommandOutput | ListDataSetsCommandOutput | ListEventActionsCommandOutput | ListJobsCommandOutput | ListRevisionAssetsCommandOutput | ListTagsForResourceCommandOutput | StartJobCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateAssetCommandOutput | UpdateDataSetCommandOutput | UpdateEventActionCommandOutput | UpdateRevisionCommandOutput;
|
|
37
|
+
export declare type ServiceInputTypes = CancelJobCommandInput | CreateDataSetCommandInput | CreateEventActionCommandInput | CreateJobCommandInput | CreateRevisionCommandInput | DeleteAssetCommandInput | DeleteDataSetCommandInput | DeleteEventActionCommandInput | DeleteRevisionCommandInput | GetAssetCommandInput | GetDataSetCommandInput | GetEventActionCommandInput | GetJobCommandInput | GetRevisionCommandInput | ListDataSetRevisionsCommandInput | ListDataSetsCommandInput | ListEventActionsCommandInput | ListJobsCommandInput | ListRevisionAssetsCommandInput | ListTagsForResourceCommandInput | SendApiAssetCommandInput | StartJobCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateAssetCommandInput | UpdateDataSetCommandInput | UpdateEventActionCommandInput | UpdateRevisionCommandInput;
|
|
38
|
+
export declare type ServiceOutputTypes = CancelJobCommandOutput | CreateDataSetCommandOutput | CreateEventActionCommandOutput | CreateJobCommandOutput | CreateRevisionCommandOutput | DeleteAssetCommandOutput | DeleteDataSetCommandOutput | DeleteEventActionCommandOutput | DeleteRevisionCommandOutput | GetAssetCommandOutput | GetDataSetCommandOutput | GetEventActionCommandOutput | GetJobCommandOutput | GetRevisionCommandOutput | ListDataSetRevisionsCommandOutput | ListDataSetsCommandOutput | ListEventActionsCommandOutput | ListJobsCommandOutput | ListRevisionAssetsCommandOutput | ListTagsForResourceCommandOutput | SendApiAssetCommandOutput | StartJobCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateAssetCommandOutput | UpdateDataSetCommandOutput | UpdateEventActionCommandOutput | UpdateRevisionCommandOutput;
|
|
38
39
|
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
|
|
39
40
|
/**
|
|
40
41
|
* The HTTP handler to use. Fetch in browser and Https in Nodejs.
|
|
@@ -135,6 +136,10 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
|
|
|
135
136
|
* @internal
|
|
136
137
|
*/
|
|
137
138
|
defaultUserAgentProvider?: Provider<__UserAgent>;
|
|
139
|
+
/**
|
|
140
|
+
* The {@link DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
141
|
+
*/
|
|
142
|
+
defaultsMode?: DefaultsMode | Provider<DefaultsMode>;
|
|
138
143
|
}
|
|
139
144
|
declare type DataExchangeClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointsInputConfig & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig;
|
|
140
145
|
/**
|