@aws-sdk/client-bedrock-data-automation 3.706.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/LICENSE +201 -0
- package/README.md +293 -0
- package/dist-cjs/BedrockDataAutomation.js +33 -0
- package/dist-cjs/BedrockDataAutomationClient.js +50 -0
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
- package/dist-cjs/commands/CreateBlueprintCommand.js +27 -0
- package/dist-cjs/commands/CreateBlueprintVersionCommand.js +27 -0
- package/dist-cjs/commands/CreateDataAutomationProjectCommand.js +27 -0
- package/dist-cjs/commands/DeleteBlueprintCommand.js +26 -0
- package/dist-cjs/commands/DeleteDataAutomationProjectCommand.js +26 -0
- package/dist-cjs/commands/GetBlueprintCommand.js +27 -0
- package/dist-cjs/commands/GetDataAutomationProjectCommand.js +27 -0
- package/dist-cjs/commands/ListBlueprintsCommand.js +27 -0
- package/dist-cjs/commands/ListDataAutomationProjectsCommand.js +27 -0
- package/dist-cjs/commands/UpdateBlueprintCommand.js +27 -0
- package/dist-cjs/commands/UpdateDataAutomationProjectCommand.js +27 -0
- package/dist-cjs/commands/index.js +14 -0
- package/dist-cjs/endpoint/EndpointParameters.js +18 -0
- package/dist-cjs/endpoint/endpointResolver.js +18 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/extensionConfiguration.js +2 -0
- package/dist-cjs/index.js +11 -0
- package/dist-cjs/models/BedrockDataAutomationServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +252 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListBlueprintsPaginator.js +7 -0
- package/dist-cjs/pagination/ListDataAutomationProjectsPaginator.js +7 -0
- package/dist-cjs/pagination/index.js +6 -0
- package/dist-cjs/protocols/Aws_restJson1.js +560 -0
- package/dist-cjs/runtimeConfig.browser.js +39 -0
- package/dist-cjs/runtimeConfig.js +50 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +34 -0
- package/dist-cjs/runtimeExtensions.js +25 -0
- package/dist-es/BedrockDataAutomation.js +29 -0
- package/dist-es/BedrockDataAutomationClient.js +46 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
- package/dist-es/commands/CreateBlueprintCommand.js +23 -0
- package/dist-es/commands/CreateBlueprintVersionCommand.js +23 -0
- package/dist-es/commands/CreateDataAutomationProjectCommand.js +23 -0
- package/dist-es/commands/DeleteBlueprintCommand.js +22 -0
- package/dist-es/commands/DeleteDataAutomationProjectCommand.js +22 -0
- package/dist-es/commands/GetBlueprintCommand.js +23 -0
- package/dist-es/commands/GetDataAutomationProjectCommand.js +23 -0
- package/dist-es/commands/ListBlueprintsCommand.js +23 -0
- package/dist-es/commands/ListDataAutomationProjectsCommand.js +23 -0
- package/dist-es/commands/UpdateBlueprintCommand.js +23 -0
- package/dist-es/commands/UpdateDataAutomationProjectCommand.js +23 -0
- package/dist-es/commands/index.js +11 -0
- package/dist-es/endpoint/EndpointParameters.js +14 -0
- package/dist-es/endpoint/endpointResolver.js +14 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +6 -0
- package/dist-es/models/BedrockDataAutomationServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +227 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListBlueprintsPaginator.js +4 -0
- package/dist-es/pagination/ListDataAutomationProjectsPaginator.js +4 -0
- package/dist-es/pagination/index.js +3 -0
- package/dist-es/protocols/Aws_restJson1.js +535 -0
- package/dist-es/runtimeConfig.browser.js +34 -0
- package/dist-es/runtimeConfig.js +45 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +30 -0
- package/dist-es/runtimeExtensions.js +21 -0
- package/dist-types/BedrockDataAutomation.d.ts +89 -0
- package/dist-types/BedrockDataAutomationClient.d.ts +180 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
- package/dist-types/commands/CreateBlueprintCommand.d.ts +112 -0
- package/dist-types/commands/CreateBlueprintVersionCommand.d.ts +103 -0
- package/dist-types/commands/CreateDataAutomationProjectCommand.d.ts +197 -0
- package/dist-types/commands/DeleteBlueprintCommand.d.ts +85 -0
- package/dist-types/commands/DeleteDataAutomationProjectCommand.d.ts +87 -0
- package/dist-types/commands/GetBlueprintCommand.d.ts +101 -0
- package/dist-types/commands/GetDataAutomationProjectCommand.d.ts +196 -0
- package/dist-types/commands/ListBlueprintsCommand.d.ts +104 -0
- package/dist-types/commands/ListDataAutomationProjectsCommand.d.ts +102 -0
- package/dist-types/commands/UpdateBlueprintCommand.d.ts +104 -0
- package/dist-types/commands/UpdateDataAutomationProjectCommand.d.ts +190 -0
- package/dist-types/commands/index.d.ts +11 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +40 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +9 -0
- package/dist-types/index.d.ts +14 -0
- package/dist-types/models/BedrockDataAutomationServiceException.d.ts +14 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +1453 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListBlueprintsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListDataAutomationProjectsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +3 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +101 -0
- package/dist-types/runtimeConfig.browser.d.ts +48 -0
- package/dist-types/runtimeConfig.d.ts +48 -0
- package/dist-types/runtimeConfig.native.d.ts +47 -0
- package/dist-types/runtimeConfig.shared.d.ts +21 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/ts3.4/BedrockDataAutomation.d.ts +196 -0
- package/dist-types/ts3.4/BedrockDataAutomationClient.d.ts +187 -0
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +44 -0
- package/dist-types/ts3.4/commands/CreateBlueprintCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/CreateBlueprintVersionCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/CreateDataAutomationProjectCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/DeleteBlueprintCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/DeleteDataAutomationProjectCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetBlueprintCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/GetDataAutomationProjectCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ListBlueprintsCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/ListDataAutomationProjectsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/UpdateBlueprintCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/UpdateDataAutomationProjectCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +11 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +51 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
- package/dist-types/ts3.4/index.d.ts +9 -0
- package/dist-types/ts3.4/models/BedrockDataAutomationServiceException.d.ts +9 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +463 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListBlueprintsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListDataAutomationProjectsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +3 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +137 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +95 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +96 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +89 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +23 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +13 -0
- package/package.json +103 -0
|
@@ -0,0 +1,560 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.de_UpdateDataAutomationProjectCommand = exports.de_UpdateBlueprintCommand = exports.de_ListDataAutomationProjectsCommand = exports.de_ListBlueprintsCommand = exports.de_GetDataAutomationProjectCommand = exports.de_GetBlueprintCommand = exports.de_DeleteDataAutomationProjectCommand = exports.de_DeleteBlueprintCommand = exports.de_CreateDataAutomationProjectCommand = exports.de_CreateBlueprintVersionCommand = exports.de_CreateBlueprintCommand = exports.se_UpdateDataAutomationProjectCommand = exports.se_UpdateBlueprintCommand = exports.se_ListDataAutomationProjectsCommand = exports.se_ListBlueprintsCommand = exports.se_GetDataAutomationProjectCommand = exports.se_GetBlueprintCommand = exports.se_DeleteDataAutomationProjectCommand = exports.se_DeleteBlueprintCommand = exports.se_CreateDataAutomationProjectCommand = exports.se_CreateBlueprintVersionCommand = exports.se_CreateBlueprintCommand = void 0;
|
|
4
|
+
const core_1 = require("@aws-sdk/core");
|
|
5
|
+
const core_2 = require("@smithy/core");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
const uuid_1 = require("uuid");
|
|
8
|
+
const BedrockDataAutomationServiceException_1 = require("../models/BedrockDataAutomationServiceException");
|
|
9
|
+
const models_0_1 = require("../models/models_0");
|
|
10
|
+
const se_CreateBlueprintCommand = async (input, context) => {
|
|
11
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
12
|
+
const headers = {
|
|
13
|
+
"content-type": "application/json",
|
|
14
|
+
};
|
|
15
|
+
b.bp("/blueprints");
|
|
16
|
+
let body;
|
|
17
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
18
|
+
blueprintName: [],
|
|
19
|
+
blueprintStage: [],
|
|
20
|
+
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
21
|
+
encryptionConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
22
|
+
schema: [],
|
|
23
|
+
type: [],
|
|
24
|
+
}));
|
|
25
|
+
b.m("PUT").h(headers).b(body);
|
|
26
|
+
return b.build();
|
|
27
|
+
};
|
|
28
|
+
exports.se_CreateBlueprintCommand = se_CreateBlueprintCommand;
|
|
29
|
+
const se_CreateBlueprintVersionCommand = async (input, context) => {
|
|
30
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
31
|
+
const headers = {
|
|
32
|
+
"content-type": "application/json",
|
|
33
|
+
};
|
|
34
|
+
b.bp("/blueprints/{blueprintArn}/versions");
|
|
35
|
+
b.p("blueprintArn", () => input.blueprintArn, "{blueprintArn}", false);
|
|
36
|
+
let body;
|
|
37
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
38
|
+
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
39
|
+
}));
|
|
40
|
+
b.m("POST").h(headers).b(body);
|
|
41
|
+
return b.build();
|
|
42
|
+
};
|
|
43
|
+
exports.se_CreateBlueprintVersionCommand = se_CreateBlueprintVersionCommand;
|
|
44
|
+
const se_CreateDataAutomationProjectCommand = async (input, context) => {
|
|
45
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
46
|
+
const headers = {
|
|
47
|
+
"content-type": "application/json",
|
|
48
|
+
};
|
|
49
|
+
b.bp("/data-automation-projects");
|
|
50
|
+
let body;
|
|
51
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
52
|
+
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
53
|
+
customOutputConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
54
|
+
encryptionConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
55
|
+
overrideConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
56
|
+
projectDescription: [],
|
|
57
|
+
projectName: [],
|
|
58
|
+
projectStage: [],
|
|
59
|
+
standardOutputConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
60
|
+
}));
|
|
61
|
+
b.m("PUT").h(headers).b(body);
|
|
62
|
+
return b.build();
|
|
63
|
+
};
|
|
64
|
+
exports.se_CreateDataAutomationProjectCommand = se_CreateDataAutomationProjectCommand;
|
|
65
|
+
const se_DeleteBlueprintCommand = async (input, context) => {
|
|
66
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
67
|
+
const headers = {};
|
|
68
|
+
b.bp("/blueprints/{blueprintArn}");
|
|
69
|
+
b.p("blueprintArn", () => input.blueprintArn, "{blueprintArn}", false);
|
|
70
|
+
const query = (0, smithy_client_1.map)({
|
|
71
|
+
[_bV]: [, input[_bV]],
|
|
72
|
+
});
|
|
73
|
+
let body;
|
|
74
|
+
b.m("DELETE").h(headers).q(query).b(body);
|
|
75
|
+
return b.build();
|
|
76
|
+
};
|
|
77
|
+
exports.se_DeleteBlueprintCommand = se_DeleteBlueprintCommand;
|
|
78
|
+
const se_DeleteDataAutomationProjectCommand = async (input, context) => {
|
|
79
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
80
|
+
const headers = {};
|
|
81
|
+
b.bp("/data-automation-projects/{projectArn}");
|
|
82
|
+
b.p("projectArn", () => input.projectArn, "{projectArn}", false);
|
|
83
|
+
let body;
|
|
84
|
+
b.m("DELETE").h(headers).b(body);
|
|
85
|
+
return b.build();
|
|
86
|
+
};
|
|
87
|
+
exports.se_DeleteDataAutomationProjectCommand = se_DeleteDataAutomationProjectCommand;
|
|
88
|
+
const se_GetBlueprintCommand = async (input, context) => {
|
|
89
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
90
|
+
const headers = {
|
|
91
|
+
"content-type": "application/json",
|
|
92
|
+
};
|
|
93
|
+
b.bp("/blueprints/{blueprintArn}");
|
|
94
|
+
b.p("blueprintArn", () => input.blueprintArn, "{blueprintArn}", false);
|
|
95
|
+
let body;
|
|
96
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
97
|
+
blueprintStage: [],
|
|
98
|
+
blueprintVersion: [],
|
|
99
|
+
}));
|
|
100
|
+
b.m("POST").h(headers).b(body);
|
|
101
|
+
return b.build();
|
|
102
|
+
};
|
|
103
|
+
exports.se_GetBlueprintCommand = se_GetBlueprintCommand;
|
|
104
|
+
const se_GetDataAutomationProjectCommand = async (input, context) => {
|
|
105
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
106
|
+
const headers = {
|
|
107
|
+
"content-type": "application/json",
|
|
108
|
+
};
|
|
109
|
+
b.bp("/data-automation-projects/{projectArn}");
|
|
110
|
+
b.p("projectArn", () => input.projectArn, "{projectArn}", false);
|
|
111
|
+
let body;
|
|
112
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
113
|
+
projectStage: [],
|
|
114
|
+
}));
|
|
115
|
+
b.m("POST").h(headers).b(body);
|
|
116
|
+
return b.build();
|
|
117
|
+
};
|
|
118
|
+
exports.se_GetDataAutomationProjectCommand = se_GetDataAutomationProjectCommand;
|
|
119
|
+
const se_ListBlueprintsCommand = async (input, context) => {
|
|
120
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
121
|
+
const headers = {
|
|
122
|
+
"content-type": "application/json",
|
|
123
|
+
};
|
|
124
|
+
b.bp("/blueprints");
|
|
125
|
+
let body;
|
|
126
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
127
|
+
blueprintArn: [],
|
|
128
|
+
blueprintStageFilter: [],
|
|
129
|
+
maxResults: [],
|
|
130
|
+
nextToken: [],
|
|
131
|
+
projectFilter: (_) => (0, smithy_client_1._json)(_),
|
|
132
|
+
resourceOwner: [],
|
|
133
|
+
}));
|
|
134
|
+
b.m("POST").h(headers).b(body);
|
|
135
|
+
return b.build();
|
|
136
|
+
};
|
|
137
|
+
exports.se_ListBlueprintsCommand = se_ListBlueprintsCommand;
|
|
138
|
+
const se_ListDataAutomationProjectsCommand = async (input, context) => {
|
|
139
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
140
|
+
const headers = {
|
|
141
|
+
"content-type": "application/json",
|
|
142
|
+
};
|
|
143
|
+
b.bp("/data-automation-projects");
|
|
144
|
+
let body;
|
|
145
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
146
|
+
blueprintFilter: (_) => (0, smithy_client_1._json)(_),
|
|
147
|
+
maxResults: [],
|
|
148
|
+
nextToken: [],
|
|
149
|
+
projectStageFilter: [],
|
|
150
|
+
resourceOwner: [],
|
|
151
|
+
}));
|
|
152
|
+
b.m("POST").h(headers).b(body);
|
|
153
|
+
return b.build();
|
|
154
|
+
};
|
|
155
|
+
exports.se_ListDataAutomationProjectsCommand = se_ListDataAutomationProjectsCommand;
|
|
156
|
+
const se_UpdateBlueprintCommand = async (input, context) => {
|
|
157
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
158
|
+
const headers = {
|
|
159
|
+
"content-type": "application/json",
|
|
160
|
+
};
|
|
161
|
+
b.bp("/blueprints/{blueprintArn}");
|
|
162
|
+
b.p("blueprintArn", () => input.blueprintArn, "{blueprintArn}", false);
|
|
163
|
+
let body;
|
|
164
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
165
|
+
blueprintStage: [],
|
|
166
|
+
schema: [],
|
|
167
|
+
}));
|
|
168
|
+
b.m("PUT").h(headers).b(body);
|
|
169
|
+
return b.build();
|
|
170
|
+
};
|
|
171
|
+
exports.se_UpdateBlueprintCommand = se_UpdateBlueprintCommand;
|
|
172
|
+
const se_UpdateDataAutomationProjectCommand = async (input, context) => {
|
|
173
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
174
|
+
const headers = {
|
|
175
|
+
"content-type": "application/json",
|
|
176
|
+
};
|
|
177
|
+
b.bp("/data-automation-projects/{projectArn}");
|
|
178
|
+
b.p("projectArn", () => input.projectArn, "{projectArn}", false);
|
|
179
|
+
let body;
|
|
180
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
181
|
+
customOutputConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
182
|
+
overrideConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
183
|
+
projectDescription: [],
|
|
184
|
+
projectStage: [],
|
|
185
|
+
standardOutputConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
186
|
+
}));
|
|
187
|
+
b.m("PUT").h(headers).b(body);
|
|
188
|
+
return b.build();
|
|
189
|
+
};
|
|
190
|
+
exports.se_UpdateDataAutomationProjectCommand = se_UpdateDataAutomationProjectCommand;
|
|
191
|
+
const de_CreateBlueprintCommand = async (output, context) => {
|
|
192
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
193
|
+
return de_CommandError(output, context);
|
|
194
|
+
}
|
|
195
|
+
const contents = (0, smithy_client_1.map)({
|
|
196
|
+
$metadata: deserializeMetadata(output),
|
|
197
|
+
});
|
|
198
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
199
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
200
|
+
blueprint: (_) => de_Blueprint(_, context),
|
|
201
|
+
});
|
|
202
|
+
Object.assign(contents, doc);
|
|
203
|
+
return contents;
|
|
204
|
+
};
|
|
205
|
+
exports.de_CreateBlueprintCommand = de_CreateBlueprintCommand;
|
|
206
|
+
const de_CreateBlueprintVersionCommand = async (output, context) => {
|
|
207
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
208
|
+
return de_CommandError(output, context);
|
|
209
|
+
}
|
|
210
|
+
const contents = (0, smithy_client_1.map)({
|
|
211
|
+
$metadata: deserializeMetadata(output),
|
|
212
|
+
});
|
|
213
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
214
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
215
|
+
blueprint: (_) => de_Blueprint(_, context),
|
|
216
|
+
});
|
|
217
|
+
Object.assign(contents, doc);
|
|
218
|
+
return contents;
|
|
219
|
+
};
|
|
220
|
+
exports.de_CreateBlueprintVersionCommand = de_CreateBlueprintVersionCommand;
|
|
221
|
+
const de_CreateDataAutomationProjectCommand = async (output, context) => {
|
|
222
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
223
|
+
return de_CommandError(output, context);
|
|
224
|
+
}
|
|
225
|
+
const contents = (0, smithy_client_1.map)({
|
|
226
|
+
$metadata: deserializeMetadata(output),
|
|
227
|
+
});
|
|
228
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
229
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
230
|
+
projectArn: smithy_client_1.expectString,
|
|
231
|
+
projectStage: smithy_client_1.expectString,
|
|
232
|
+
status: smithy_client_1.expectString,
|
|
233
|
+
});
|
|
234
|
+
Object.assign(contents, doc);
|
|
235
|
+
return contents;
|
|
236
|
+
};
|
|
237
|
+
exports.de_CreateDataAutomationProjectCommand = de_CreateDataAutomationProjectCommand;
|
|
238
|
+
const de_DeleteBlueprintCommand = async (output, context) => {
|
|
239
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
240
|
+
return de_CommandError(output, context);
|
|
241
|
+
}
|
|
242
|
+
const contents = (0, smithy_client_1.map)({
|
|
243
|
+
$metadata: deserializeMetadata(output),
|
|
244
|
+
});
|
|
245
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
246
|
+
return contents;
|
|
247
|
+
};
|
|
248
|
+
exports.de_DeleteBlueprintCommand = de_DeleteBlueprintCommand;
|
|
249
|
+
const de_DeleteDataAutomationProjectCommand = async (output, context) => {
|
|
250
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
251
|
+
return de_CommandError(output, context);
|
|
252
|
+
}
|
|
253
|
+
const contents = (0, smithy_client_1.map)({
|
|
254
|
+
$metadata: deserializeMetadata(output),
|
|
255
|
+
});
|
|
256
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
257
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
258
|
+
projectArn: smithy_client_1.expectString,
|
|
259
|
+
status: smithy_client_1.expectString,
|
|
260
|
+
});
|
|
261
|
+
Object.assign(contents, doc);
|
|
262
|
+
return contents;
|
|
263
|
+
};
|
|
264
|
+
exports.de_DeleteDataAutomationProjectCommand = de_DeleteDataAutomationProjectCommand;
|
|
265
|
+
const de_GetBlueprintCommand = async (output, context) => {
|
|
266
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
267
|
+
return de_CommandError(output, context);
|
|
268
|
+
}
|
|
269
|
+
const contents = (0, smithy_client_1.map)({
|
|
270
|
+
$metadata: deserializeMetadata(output),
|
|
271
|
+
});
|
|
272
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
273
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
274
|
+
blueprint: (_) => de_Blueprint(_, context),
|
|
275
|
+
});
|
|
276
|
+
Object.assign(contents, doc);
|
|
277
|
+
return contents;
|
|
278
|
+
};
|
|
279
|
+
exports.de_GetBlueprintCommand = de_GetBlueprintCommand;
|
|
280
|
+
const de_GetDataAutomationProjectCommand = async (output, context) => {
|
|
281
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
282
|
+
return de_CommandError(output, context);
|
|
283
|
+
}
|
|
284
|
+
const contents = (0, smithy_client_1.map)({
|
|
285
|
+
$metadata: deserializeMetadata(output),
|
|
286
|
+
});
|
|
287
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
288
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
289
|
+
project: (_) => de_DataAutomationProject(_, context),
|
|
290
|
+
});
|
|
291
|
+
Object.assign(contents, doc);
|
|
292
|
+
return contents;
|
|
293
|
+
};
|
|
294
|
+
exports.de_GetDataAutomationProjectCommand = de_GetDataAutomationProjectCommand;
|
|
295
|
+
const de_ListBlueprintsCommand = async (output, context) => {
|
|
296
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
297
|
+
return de_CommandError(output, context);
|
|
298
|
+
}
|
|
299
|
+
const contents = (0, smithy_client_1.map)({
|
|
300
|
+
$metadata: deserializeMetadata(output),
|
|
301
|
+
});
|
|
302
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
303
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
304
|
+
blueprints: (_) => de_Blueprints(_, context),
|
|
305
|
+
nextToken: smithy_client_1.expectString,
|
|
306
|
+
});
|
|
307
|
+
Object.assign(contents, doc);
|
|
308
|
+
return contents;
|
|
309
|
+
};
|
|
310
|
+
exports.de_ListBlueprintsCommand = de_ListBlueprintsCommand;
|
|
311
|
+
const de_ListDataAutomationProjectsCommand = async (output, context) => {
|
|
312
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
313
|
+
return de_CommandError(output, context);
|
|
314
|
+
}
|
|
315
|
+
const contents = (0, smithy_client_1.map)({
|
|
316
|
+
$metadata: deserializeMetadata(output),
|
|
317
|
+
});
|
|
318
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
319
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
320
|
+
nextToken: smithy_client_1.expectString,
|
|
321
|
+
projects: (_) => de_DataAutomationProjectSummaries(_, context),
|
|
322
|
+
});
|
|
323
|
+
Object.assign(contents, doc);
|
|
324
|
+
return contents;
|
|
325
|
+
};
|
|
326
|
+
exports.de_ListDataAutomationProjectsCommand = de_ListDataAutomationProjectsCommand;
|
|
327
|
+
const de_UpdateBlueprintCommand = async (output, context) => {
|
|
328
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
329
|
+
return de_CommandError(output, context);
|
|
330
|
+
}
|
|
331
|
+
const contents = (0, smithy_client_1.map)({
|
|
332
|
+
$metadata: deserializeMetadata(output),
|
|
333
|
+
});
|
|
334
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
335
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
336
|
+
blueprint: (_) => de_Blueprint(_, context),
|
|
337
|
+
});
|
|
338
|
+
Object.assign(contents, doc);
|
|
339
|
+
return contents;
|
|
340
|
+
};
|
|
341
|
+
exports.de_UpdateBlueprintCommand = de_UpdateBlueprintCommand;
|
|
342
|
+
const de_UpdateDataAutomationProjectCommand = async (output, context) => {
|
|
343
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
344
|
+
return de_CommandError(output, context);
|
|
345
|
+
}
|
|
346
|
+
const contents = (0, smithy_client_1.map)({
|
|
347
|
+
$metadata: deserializeMetadata(output),
|
|
348
|
+
});
|
|
349
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
350
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
351
|
+
projectArn: smithy_client_1.expectString,
|
|
352
|
+
projectStage: smithy_client_1.expectString,
|
|
353
|
+
status: smithy_client_1.expectString,
|
|
354
|
+
});
|
|
355
|
+
Object.assign(contents, doc);
|
|
356
|
+
return contents;
|
|
357
|
+
};
|
|
358
|
+
exports.de_UpdateDataAutomationProjectCommand = de_UpdateDataAutomationProjectCommand;
|
|
359
|
+
const de_CommandError = async (output, context) => {
|
|
360
|
+
const parsedOutput = {
|
|
361
|
+
...output,
|
|
362
|
+
body: await (0, core_1.parseJsonErrorBody)(output.body, context),
|
|
363
|
+
};
|
|
364
|
+
const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
365
|
+
switch (errorCode) {
|
|
366
|
+
case "AccessDeniedException":
|
|
367
|
+
case "com.amazonaws.bedrockdataautomation#AccessDeniedException":
|
|
368
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
369
|
+
case "ConflictException":
|
|
370
|
+
case "com.amazonaws.bedrockdataautomation#ConflictException":
|
|
371
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
372
|
+
case "InternalServerException":
|
|
373
|
+
case "com.amazonaws.bedrockdataautomation#InternalServerException":
|
|
374
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
375
|
+
case "ServiceQuotaExceededException":
|
|
376
|
+
case "com.amazonaws.bedrockdataautomation#ServiceQuotaExceededException":
|
|
377
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
378
|
+
case "ThrottlingException":
|
|
379
|
+
case "com.amazonaws.bedrockdataautomation#ThrottlingException":
|
|
380
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
381
|
+
case "ValidationException":
|
|
382
|
+
case "com.amazonaws.bedrockdataautomation#ValidationException":
|
|
383
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
384
|
+
case "ResourceNotFoundException":
|
|
385
|
+
case "com.amazonaws.bedrockdataautomation#ResourceNotFoundException":
|
|
386
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
387
|
+
default:
|
|
388
|
+
const parsedBody = parsedOutput.body;
|
|
389
|
+
return throwDefaultError({
|
|
390
|
+
output,
|
|
391
|
+
parsedBody,
|
|
392
|
+
errorCode,
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(BedrockDataAutomationServiceException_1.BedrockDataAutomationServiceException);
|
|
397
|
+
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
398
|
+
const contents = (0, smithy_client_1.map)({});
|
|
399
|
+
const data = parsedOutput.body;
|
|
400
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
401
|
+
message: smithy_client_1.expectString,
|
|
402
|
+
});
|
|
403
|
+
Object.assign(contents, doc);
|
|
404
|
+
const exception = new models_0_1.AccessDeniedException({
|
|
405
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
406
|
+
...contents,
|
|
407
|
+
});
|
|
408
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
409
|
+
};
|
|
410
|
+
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
411
|
+
const contents = (0, smithy_client_1.map)({});
|
|
412
|
+
const data = parsedOutput.body;
|
|
413
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
414
|
+
message: smithy_client_1.expectString,
|
|
415
|
+
});
|
|
416
|
+
Object.assign(contents, doc);
|
|
417
|
+
const exception = new models_0_1.ConflictException({
|
|
418
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
419
|
+
...contents,
|
|
420
|
+
});
|
|
421
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
422
|
+
};
|
|
423
|
+
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
424
|
+
const contents = (0, smithy_client_1.map)({});
|
|
425
|
+
const data = parsedOutput.body;
|
|
426
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
427
|
+
message: smithy_client_1.expectString,
|
|
428
|
+
});
|
|
429
|
+
Object.assign(contents, doc);
|
|
430
|
+
const exception = new models_0_1.InternalServerException({
|
|
431
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
432
|
+
...contents,
|
|
433
|
+
});
|
|
434
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
435
|
+
};
|
|
436
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
437
|
+
const contents = (0, smithy_client_1.map)({});
|
|
438
|
+
const data = parsedOutput.body;
|
|
439
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
440
|
+
message: smithy_client_1.expectString,
|
|
441
|
+
});
|
|
442
|
+
Object.assign(contents, doc);
|
|
443
|
+
const exception = new models_0_1.ResourceNotFoundException({
|
|
444
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
445
|
+
...contents,
|
|
446
|
+
});
|
|
447
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
448
|
+
};
|
|
449
|
+
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
450
|
+
const contents = (0, smithy_client_1.map)({});
|
|
451
|
+
const data = parsedOutput.body;
|
|
452
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
453
|
+
message: smithy_client_1.expectString,
|
|
454
|
+
});
|
|
455
|
+
Object.assign(contents, doc);
|
|
456
|
+
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
457
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
458
|
+
...contents,
|
|
459
|
+
});
|
|
460
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
461
|
+
};
|
|
462
|
+
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
463
|
+
const contents = (0, smithy_client_1.map)({});
|
|
464
|
+
const data = parsedOutput.body;
|
|
465
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
466
|
+
message: smithy_client_1.expectString,
|
|
467
|
+
});
|
|
468
|
+
Object.assign(contents, doc);
|
|
469
|
+
const exception = new models_0_1.ThrottlingException({
|
|
470
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
471
|
+
...contents,
|
|
472
|
+
});
|
|
473
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
474
|
+
};
|
|
475
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
476
|
+
const contents = (0, smithy_client_1.map)({});
|
|
477
|
+
const data = parsedOutput.body;
|
|
478
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
479
|
+
fieldList: smithy_client_1._json,
|
|
480
|
+
message: smithy_client_1.expectString,
|
|
481
|
+
});
|
|
482
|
+
Object.assign(contents, doc);
|
|
483
|
+
const exception = new models_0_1.ValidationException({
|
|
484
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
485
|
+
...contents,
|
|
486
|
+
});
|
|
487
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
488
|
+
};
|
|
489
|
+
const de_Blueprint = (output, context) => {
|
|
490
|
+
return (0, smithy_client_1.take)(output, {
|
|
491
|
+
blueprintArn: smithy_client_1.expectString,
|
|
492
|
+
blueprintName: smithy_client_1.expectString,
|
|
493
|
+
blueprintStage: smithy_client_1.expectString,
|
|
494
|
+
blueprintVersion: smithy_client_1.expectString,
|
|
495
|
+
creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
496
|
+
kmsEncryptionContext: smithy_client_1._json,
|
|
497
|
+
kmsKeyId: smithy_client_1.expectString,
|
|
498
|
+
lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
499
|
+
schema: smithy_client_1.expectString,
|
|
500
|
+
type: smithy_client_1.expectString,
|
|
501
|
+
});
|
|
502
|
+
};
|
|
503
|
+
const de_Blueprints = (output, context) => {
|
|
504
|
+
const retVal = (output || [])
|
|
505
|
+
.filter((e) => e != null)
|
|
506
|
+
.map((entry) => {
|
|
507
|
+
return de_BlueprintSummary(entry, context);
|
|
508
|
+
});
|
|
509
|
+
return retVal;
|
|
510
|
+
};
|
|
511
|
+
const de_BlueprintSummary = (output, context) => {
|
|
512
|
+
return (0, smithy_client_1.take)(output, {
|
|
513
|
+
blueprintArn: smithy_client_1.expectString,
|
|
514
|
+
blueprintName: smithy_client_1.expectString,
|
|
515
|
+
blueprintStage: smithy_client_1.expectString,
|
|
516
|
+
blueprintVersion: smithy_client_1.expectString,
|
|
517
|
+
creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
518
|
+
lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
519
|
+
});
|
|
520
|
+
};
|
|
521
|
+
const de_DataAutomationProject = (output, context) => {
|
|
522
|
+
return (0, smithy_client_1.take)(output, {
|
|
523
|
+
creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
524
|
+
customOutputConfiguration: smithy_client_1._json,
|
|
525
|
+
kmsEncryptionContext: smithy_client_1._json,
|
|
526
|
+
kmsKeyId: smithy_client_1.expectString,
|
|
527
|
+
lastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
528
|
+
overrideConfiguration: smithy_client_1._json,
|
|
529
|
+
projectArn: smithy_client_1.expectString,
|
|
530
|
+
projectDescription: smithy_client_1.expectString,
|
|
531
|
+
projectName: smithy_client_1.expectString,
|
|
532
|
+
projectStage: smithy_client_1.expectString,
|
|
533
|
+
standardOutputConfiguration: smithy_client_1._json,
|
|
534
|
+
status: smithy_client_1.expectString,
|
|
535
|
+
});
|
|
536
|
+
};
|
|
537
|
+
const de_DataAutomationProjectSummaries = (output, context) => {
|
|
538
|
+
const retVal = (output || [])
|
|
539
|
+
.filter((e) => e != null)
|
|
540
|
+
.map((entry) => {
|
|
541
|
+
return de_DataAutomationProjectSummary(entry, context);
|
|
542
|
+
});
|
|
543
|
+
return retVal;
|
|
544
|
+
};
|
|
545
|
+
const de_DataAutomationProjectSummary = (output, context) => {
|
|
546
|
+
return (0, smithy_client_1.take)(output, {
|
|
547
|
+
creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
548
|
+
projectArn: smithy_client_1.expectString,
|
|
549
|
+
projectName: smithy_client_1.expectString,
|
|
550
|
+
projectStage: smithy_client_1.expectString,
|
|
551
|
+
});
|
|
552
|
+
};
|
|
553
|
+
const deserializeMetadata = (output) => ({
|
|
554
|
+
httpStatusCode: output.statusCode,
|
|
555
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
556
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
557
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
558
|
+
});
|
|
559
|
+
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
560
|
+
const _bV = "blueprintVersion";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
|
6
|
+
const sha256_browser_1 = require("@aws-crypto/sha256-browser");
|
|
7
|
+
const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
|
|
8
|
+
const config_resolver_1 = require("@smithy/config-resolver");
|
|
9
|
+
const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
|
|
10
|
+
const invalid_dependency_1 = require("@smithy/invalid-dependency");
|
|
11
|
+
const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
|
|
12
|
+
const util_retry_1 = require("@smithy/util-retry");
|
|
13
|
+
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
14
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
15
|
+
const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser");
|
|
16
|
+
const getRuntimeConfig = (config) => {
|
|
17
|
+
const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
|
|
18
|
+
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
|
19
|
+
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
|
20
|
+
return {
|
|
21
|
+
...clientSharedValues,
|
|
22
|
+
...config,
|
|
23
|
+
runtime: "browser",
|
|
24
|
+
defaultsMode,
|
|
25
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
|
|
26
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
27
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
28
|
+
(0, util_user_agent_browser_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
29
|
+
maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
|
|
30
|
+
region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
|
|
31
|
+
requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
32
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
|
|
33
|
+
sha256: config?.sha256 ?? sha256_browser_1.Sha256,
|
|
34
|
+
streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
|
|
35
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
36
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
|
6
|
+
const core_1 = require("@aws-sdk/core");
|
|
7
|
+
const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
|
|
8
|
+
const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
|
|
9
|
+
const config_resolver_1 = require("@smithy/config-resolver");
|
|
10
|
+
const hash_node_1 = require("@smithy/hash-node");
|
|
11
|
+
const middleware_retry_1 = require("@smithy/middleware-retry");
|
|
12
|
+
const node_config_provider_1 = require("@smithy/node-config-provider");
|
|
13
|
+
const node_http_handler_1 = require("@smithy/node-http-handler");
|
|
14
|
+
const util_body_length_node_1 = require("@smithy/util-body-length-node");
|
|
15
|
+
const util_retry_1 = require("@smithy/util-retry");
|
|
16
|
+
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
17
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
18
|
+
const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node");
|
|
19
|
+
const smithy_client_2 = require("@smithy/smithy-client");
|
|
20
|
+
const getRuntimeConfig = (config) => {
|
|
21
|
+
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
|
|
22
|
+
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
|
|
23
|
+
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
|
24
|
+
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
|
25
|
+
(0, core_1.emitWarningIfUnsupportedVersion)(process.version);
|
|
26
|
+
return {
|
|
27
|
+
...clientSharedValues,
|
|
28
|
+
...config,
|
|
29
|
+
runtime: "node",
|
|
30
|
+
defaultsMode,
|
|
31
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
|
|
32
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
|
|
33
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
34
|
+
(0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
35
|
+
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
36
|
+
region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
37
|
+
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
38
|
+
retryMode: config?.retryMode ??
|
|
39
|
+
(0, node_config_provider_1.loadConfig)({
|
|
40
|
+
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
41
|
+
default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
|
|
42
|
+
}),
|
|
43
|
+
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
|
|
44
|
+
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
|
|
45
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
|
|
46
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
|
|
47
|
+
userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS),
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const sha256_js_1 = require("@aws-crypto/sha256-js");
|
|
5
|
+
const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
|
|
6
|
+
const getRuntimeConfig = (config) => {
|
|
7
|
+
const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
|
|
8
|
+
return {
|
|
9
|
+
...browserDefaults,
|
|
10
|
+
...config,
|
|
11
|
+
runtime: "react-native",
|
|
12
|
+
sha256: config?.sha256 ?? sha256_js_1.Sha256,
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|