@aws-sdk/client-launch-wizard 3.490.0 → 3.496.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/dist-cjs/LaunchWizard.js +1 -27
- package/dist-cjs/LaunchWizardClient.js +1 -43
- package/dist-cjs/commands/CreateDeploymentCommand.js +1 -29
- package/dist-cjs/commands/DeleteDeploymentCommand.js +1 -28
- package/dist-cjs/commands/GetDeploymentCommand.js +1 -29
- package/dist-cjs/commands/GetWorkloadCommand.js +1 -28
- package/dist-cjs/commands/ListDeploymentEventsCommand.js +1 -28
- package/dist-cjs/commands/ListDeploymentsCommand.js +1 -28
- package/dist-cjs/commands/ListWorkloadDeploymentPatternsCommand.js +1 -28
- package/dist-cjs/commands/ListWorkloadsCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -11
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +1076 -11
- package/dist-cjs/models/LaunchWizardServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -109
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListDeploymentEventsPaginator.js +1 -7
- package/dist-cjs/pagination/ListDeploymentsPaginator.js +1 -7
- package/dist-cjs/pagination/ListWorkloadDeploymentPatternsPaginator.js +1 -7
- package/dist-cjs/pagination/ListWorkloadsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -8
- package/dist-cjs/protocols/Aws_restJson1.js +1 -605
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,605 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_ListWorkloadsCommand = exports.de_ListWorkloadDeploymentPatternsCommand = exports.de_ListDeploymentsCommand = exports.de_ListDeploymentEventsCommand = exports.de_GetWorkloadCommand = exports.de_GetDeploymentCommand = exports.de_DeleteDeploymentCommand = exports.de_CreateDeploymentCommand = exports.se_ListWorkloadsCommand = exports.se_ListWorkloadDeploymentPatternsCommand = exports.se_ListDeploymentsCommand = exports.se_ListDeploymentEventsCommand = exports.se_GetWorkloadCommand = exports.se_GetDeploymentCommand = exports.se_DeleteDeploymentCommand = exports.se_CreateDeploymentCommand = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const LaunchWizardServiceException_1 = require("../models/LaunchWizardServiceException");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const se_CreateDeploymentCommand = async (input, context) => {
|
|
9
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
|
-
const headers = {
|
|
11
|
-
"content-type": "application/json",
|
|
12
|
-
};
|
|
13
|
-
b.bp("/createDeployment");
|
|
14
|
-
let body;
|
|
15
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
16
|
-
deploymentPatternName: [],
|
|
17
|
-
dryRun: [],
|
|
18
|
-
name: [],
|
|
19
|
-
specifications: (_) => (0, smithy_client_1._json)(_),
|
|
20
|
-
workloadName: [],
|
|
21
|
-
}));
|
|
22
|
-
b.m("POST").h(headers).b(body);
|
|
23
|
-
return b.build();
|
|
24
|
-
};
|
|
25
|
-
exports.se_CreateDeploymentCommand = se_CreateDeploymentCommand;
|
|
26
|
-
const se_DeleteDeploymentCommand = async (input, context) => {
|
|
27
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
28
|
-
const headers = {
|
|
29
|
-
"content-type": "application/json",
|
|
30
|
-
};
|
|
31
|
-
b.bp("/deleteDeployment");
|
|
32
|
-
let body;
|
|
33
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
34
|
-
deploymentId: [],
|
|
35
|
-
}));
|
|
36
|
-
b.m("POST").h(headers).b(body);
|
|
37
|
-
return b.build();
|
|
38
|
-
};
|
|
39
|
-
exports.se_DeleteDeploymentCommand = se_DeleteDeploymentCommand;
|
|
40
|
-
const se_GetDeploymentCommand = async (input, context) => {
|
|
41
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
42
|
-
const headers = {
|
|
43
|
-
"content-type": "application/json",
|
|
44
|
-
};
|
|
45
|
-
b.bp("/getDeployment");
|
|
46
|
-
let body;
|
|
47
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
48
|
-
deploymentId: [],
|
|
49
|
-
}));
|
|
50
|
-
b.m("POST").h(headers).b(body);
|
|
51
|
-
return b.build();
|
|
52
|
-
};
|
|
53
|
-
exports.se_GetDeploymentCommand = se_GetDeploymentCommand;
|
|
54
|
-
const se_GetWorkloadCommand = async (input, context) => {
|
|
55
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
56
|
-
const headers = {
|
|
57
|
-
"content-type": "application/json",
|
|
58
|
-
};
|
|
59
|
-
b.bp("/getWorkload");
|
|
60
|
-
let body;
|
|
61
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
62
|
-
workloadName: [],
|
|
63
|
-
}));
|
|
64
|
-
b.m("POST").h(headers).b(body);
|
|
65
|
-
return b.build();
|
|
66
|
-
};
|
|
67
|
-
exports.se_GetWorkloadCommand = se_GetWorkloadCommand;
|
|
68
|
-
const se_ListDeploymentEventsCommand = async (input, context) => {
|
|
69
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
70
|
-
const headers = {
|
|
71
|
-
"content-type": "application/json",
|
|
72
|
-
};
|
|
73
|
-
b.bp("/listDeploymentEvents");
|
|
74
|
-
let body;
|
|
75
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
76
|
-
deploymentId: [],
|
|
77
|
-
maxResults: [],
|
|
78
|
-
nextToken: [],
|
|
79
|
-
}));
|
|
80
|
-
b.m("POST").h(headers).b(body);
|
|
81
|
-
return b.build();
|
|
82
|
-
};
|
|
83
|
-
exports.se_ListDeploymentEventsCommand = se_ListDeploymentEventsCommand;
|
|
84
|
-
const se_ListDeploymentsCommand = async (input, context) => {
|
|
85
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
86
|
-
const headers = {
|
|
87
|
-
"content-type": "application/json",
|
|
88
|
-
};
|
|
89
|
-
b.bp("/listDeployments");
|
|
90
|
-
let body;
|
|
91
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
92
|
-
filters: (_) => (0, smithy_client_1._json)(_),
|
|
93
|
-
maxResults: [],
|
|
94
|
-
nextToken: [],
|
|
95
|
-
}));
|
|
96
|
-
b.m("POST").h(headers).b(body);
|
|
97
|
-
return b.build();
|
|
98
|
-
};
|
|
99
|
-
exports.se_ListDeploymentsCommand = se_ListDeploymentsCommand;
|
|
100
|
-
const se_ListWorkloadDeploymentPatternsCommand = async (input, context) => {
|
|
101
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
102
|
-
const headers = {
|
|
103
|
-
"content-type": "application/json",
|
|
104
|
-
};
|
|
105
|
-
b.bp("/listWorkloadDeploymentPatterns");
|
|
106
|
-
let body;
|
|
107
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
108
|
-
maxResults: [],
|
|
109
|
-
nextToken: [],
|
|
110
|
-
workloadName: [],
|
|
111
|
-
}));
|
|
112
|
-
b.m("POST").h(headers).b(body);
|
|
113
|
-
return b.build();
|
|
114
|
-
};
|
|
115
|
-
exports.se_ListWorkloadDeploymentPatternsCommand = se_ListWorkloadDeploymentPatternsCommand;
|
|
116
|
-
const se_ListWorkloadsCommand = async (input, context) => {
|
|
117
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
118
|
-
const headers = {
|
|
119
|
-
"content-type": "application/json",
|
|
120
|
-
};
|
|
121
|
-
b.bp("/listWorkloads");
|
|
122
|
-
let body;
|
|
123
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
124
|
-
maxResults: [],
|
|
125
|
-
nextToken: [],
|
|
126
|
-
}));
|
|
127
|
-
b.m("POST").h(headers).b(body);
|
|
128
|
-
return b.build();
|
|
129
|
-
};
|
|
130
|
-
exports.se_ListWorkloadsCommand = se_ListWorkloadsCommand;
|
|
131
|
-
const de_CreateDeploymentCommand = async (output, context) => {
|
|
132
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
133
|
-
return de_CreateDeploymentCommandError(output, context);
|
|
134
|
-
}
|
|
135
|
-
const contents = (0, smithy_client_1.map)({
|
|
136
|
-
$metadata: deserializeMetadata(output),
|
|
137
|
-
});
|
|
138
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
139
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
140
|
-
deploymentId: smithy_client_1.expectString,
|
|
141
|
-
});
|
|
142
|
-
Object.assign(contents, doc);
|
|
143
|
-
return contents;
|
|
144
|
-
};
|
|
145
|
-
exports.de_CreateDeploymentCommand = de_CreateDeploymentCommand;
|
|
146
|
-
const de_CreateDeploymentCommandError = async (output, context) => {
|
|
147
|
-
const parsedOutput = {
|
|
148
|
-
...output,
|
|
149
|
-
body: await parseErrorBody(output.body, context),
|
|
150
|
-
};
|
|
151
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
152
|
-
switch (errorCode) {
|
|
153
|
-
case "InternalServerException":
|
|
154
|
-
case "com.amazonaws.launchwizard#InternalServerException":
|
|
155
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
156
|
-
case "ResourceLimitException":
|
|
157
|
-
case "com.amazonaws.launchwizard#ResourceLimitException":
|
|
158
|
-
throw await de_ResourceLimitExceptionRes(parsedOutput, context);
|
|
159
|
-
case "ResourceNotFoundException":
|
|
160
|
-
case "com.amazonaws.launchwizard#ResourceNotFoundException":
|
|
161
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
162
|
-
case "ValidationException":
|
|
163
|
-
case "com.amazonaws.launchwizard#ValidationException":
|
|
164
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
165
|
-
default:
|
|
166
|
-
const parsedBody = parsedOutput.body;
|
|
167
|
-
return throwDefaultError({
|
|
168
|
-
output,
|
|
169
|
-
parsedBody,
|
|
170
|
-
errorCode,
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
const de_DeleteDeploymentCommand = async (output, context) => {
|
|
175
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
176
|
-
return de_DeleteDeploymentCommandError(output, context);
|
|
177
|
-
}
|
|
178
|
-
const contents = (0, smithy_client_1.map)({
|
|
179
|
-
$metadata: deserializeMetadata(output),
|
|
180
|
-
});
|
|
181
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
182
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
183
|
-
status: smithy_client_1.expectString,
|
|
184
|
-
statusReason: smithy_client_1.expectString,
|
|
185
|
-
});
|
|
186
|
-
Object.assign(contents, doc);
|
|
187
|
-
return contents;
|
|
188
|
-
};
|
|
189
|
-
exports.de_DeleteDeploymentCommand = de_DeleteDeploymentCommand;
|
|
190
|
-
const de_DeleteDeploymentCommandError = async (output, context) => {
|
|
191
|
-
const parsedOutput = {
|
|
192
|
-
...output,
|
|
193
|
-
body: await parseErrorBody(output.body, context),
|
|
194
|
-
};
|
|
195
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
196
|
-
switch (errorCode) {
|
|
197
|
-
case "InternalServerException":
|
|
198
|
-
case "com.amazonaws.launchwizard#InternalServerException":
|
|
199
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
200
|
-
case "ResourceNotFoundException":
|
|
201
|
-
case "com.amazonaws.launchwizard#ResourceNotFoundException":
|
|
202
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
203
|
-
case "ValidationException":
|
|
204
|
-
case "com.amazonaws.launchwizard#ValidationException":
|
|
205
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
206
|
-
default:
|
|
207
|
-
const parsedBody = parsedOutput.body;
|
|
208
|
-
return throwDefaultError({
|
|
209
|
-
output,
|
|
210
|
-
parsedBody,
|
|
211
|
-
errorCode,
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
const de_GetDeploymentCommand = async (output, context) => {
|
|
216
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
217
|
-
return de_GetDeploymentCommandError(output, context);
|
|
218
|
-
}
|
|
219
|
-
const contents = (0, smithy_client_1.map)({
|
|
220
|
-
$metadata: deserializeMetadata(output),
|
|
221
|
-
});
|
|
222
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
223
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
224
|
-
deployment: (_) => de_DeploymentData(_, context),
|
|
225
|
-
});
|
|
226
|
-
Object.assign(contents, doc);
|
|
227
|
-
return contents;
|
|
228
|
-
};
|
|
229
|
-
exports.de_GetDeploymentCommand = de_GetDeploymentCommand;
|
|
230
|
-
const de_GetDeploymentCommandError = async (output, context) => {
|
|
231
|
-
const parsedOutput = {
|
|
232
|
-
...output,
|
|
233
|
-
body: await parseErrorBody(output.body, context),
|
|
234
|
-
};
|
|
235
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
236
|
-
switch (errorCode) {
|
|
237
|
-
case "InternalServerException":
|
|
238
|
-
case "com.amazonaws.launchwizard#InternalServerException":
|
|
239
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
240
|
-
case "ResourceNotFoundException":
|
|
241
|
-
case "com.amazonaws.launchwizard#ResourceNotFoundException":
|
|
242
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
243
|
-
case "ValidationException":
|
|
244
|
-
case "com.amazonaws.launchwizard#ValidationException":
|
|
245
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
246
|
-
default:
|
|
247
|
-
const parsedBody = parsedOutput.body;
|
|
248
|
-
return throwDefaultError({
|
|
249
|
-
output,
|
|
250
|
-
parsedBody,
|
|
251
|
-
errorCode,
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
const de_GetWorkloadCommand = async (output, context) => {
|
|
256
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
257
|
-
return de_GetWorkloadCommandError(output, context);
|
|
258
|
-
}
|
|
259
|
-
const contents = (0, smithy_client_1.map)({
|
|
260
|
-
$metadata: deserializeMetadata(output),
|
|
261
|
-
});
|
|
262
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
263
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
264
|
-
workload: smithy_client_1._json,
|
|
265
|
-
});
|
|
266
|
-
Object.assign(contents, doc);
|
|
267
|
-
return contents;
|
|
268
|
-
};
|
|
269
|
-
exports.de_GetWorkloadCommand = de_GetWorkloadCommand;
|
|
270
|
-
const de_GetWorkloadCommandError = async (output, context) => {
|
|
271
|
-
const parsedOutput = {
|
|
272
|
-
...output,
|
|
273
|
-
body: await parseErrorBody(output.body, context),
|
|
274
|
-
};
|
|
275
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
276
|
-
switch (errorCode) {
|
|
277
|
-
case "InternalServerException":
|
|
278
|
-
case "com.amazonaws.launchwizard#InternalServerException":
|
|
279
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
280
|
-
case "ResourceNotFoundException":
|
|
281
|
-
case "com.amazonaws.launchwizard#ResourceNotFoundException":
|
|
282
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
283
|
-
case "ValidationException":
|
|
284
|
-
case "com.amazonaws.launchwizard#ValidationException":
|
|
285
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
286
|
-
default:
|
|
287
|
-
const parsedBody = parsedOutput.body;
|
|
288
|
-
return throwDefaultError({
|
|
289
|
-
output,
|
|
290
|
-
parsedBody,
|
|
291
|
-
errorCode,
|
|
292
|
-
});
|
|
293
|
-
}
|
|
294
|
-
};
|
|
295
|
-
const de_ListDeploymentEventsCommand = async (output, context) => {
|
|
296
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
297
|
-
return de_ListDeploymentEventsCommandError(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 parseBody(output.body, context)), "body");
|
|
303
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
304
|
-
deploymentEvents: (_) => de_DeploymentEventDataSummaryList(_, context),
|
|
305
|
-
nextToken: smithy_client_1.expectString,
|
|
306
|
-
});
|
|
307
|
-
Object.assign(contents, doc);
|
|
308
|
-
return contents;
|
|
309
|
-
};
|
|
310
|
-
exports.de_ListDeploymentEventsCommand = de_ListDeploymentEventsCommand;
|
|
311
|
-
const de_ListDeploymentEventsCommandError = async (output, context) => {
|
|
312
|
-
const parsedOutput = {
|
|
313
|
-
...output,
|
|
314
|
-
body: await parseErrorBody(output.body, context),
|
|
315
|
-
};
|
|
316
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
317
|
-
switch (errorCode) {
|
|
318
|
-
case "InternalServerException":
|
|
319
|
-
case "com.amazonaws.launchwizard#InternalServerException":
|
|
320
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
321
|
-
case "ResourceNotFoundException":
|
|
322
|
-
case "com.amazonaws.launchwizard#ResourceNotFoundException":
|
|
323
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
324
|
-
case "ValidationException":
|
|
325
|
-
case "com.amazonaws.launchwizard#ValidationException":
|
|
326
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
327
|
-
default:
|
|
328
|
-
const parsedBody = parsedOutput.body;
|
|
329
|
-
return throwDefaultError({
|
|
330
|
-
output,
|
|
331
|
-
parsedBody,
|
|
332
|
-
errorCode,
|
|
333
|
-
});
|
|
334
|
-
}
|
|
335
|
-
};
|
|
336
|
-
const de_ListDeploymentsCommand = async (output, context) => {
|
|
337
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
338
|
-
return de_ListDeploymentsCommandError(output, context);
|
|
339
|
-
}
|
|
340
|
-
const contents = (0, smithy_client_1.map)({
|
|
341
|
-
$metadata: deserializeMetadata(output),
|
|
342
|
-
});
|
|
343
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
344
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
345
|
-
deployments: (_) => de_DeploymentDataSummaryList(_, context),
|
|
346
|
-
nextToken: smithy_client_1.expectString,
|
|
347
|
-
});
|
|
348
|
-
Object.assign(contents, doc);
|
|
349
|
-
return contents;
|
|
350
|
-
};
|
|
351
|
-
exports.de_ListDeploymentsCommand = de_ListDeploymentsCommand;
|
|
352
|
-
const de_ListDeploymentsCommandError = async (output, context) => {
|
|
353
|
-
const parsedOutput = {
|
|
354
|
-
...output,
|
|
355
|
-
body: await parseErrorBody(output.body, context),
|
|
356
|
-
};
|
|
357
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
358
|
-
switch (errorCode) {
|
|
359
|
-
case "InternalServerException":
|
|
360
|
-
case "com.amazonaws.launchwizard#InternalServerException":
|
|
361
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
362
|
-
case "ValidationException":
|
|
363
|
-
case "com.amazonaws.launchwizard#ValidationException":
|
|
364
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
365
|
-
default:
|
|
366
|
-
const parsedBody = parsedOutput.body;
|
|
367
|
-
return throwDefaultError({
|
|
368
|
-
output,
|
|
369
|
-
parsedBody,
|
|
370
|
-
errorCode,
|
|
371
|
-
});
|
|
372
|
-
}
|
|
373
|
-
};
|
|
374
|
-
const de_ListWorkloadDeploymentPatternsCommand = async (output, context) => {
|
|
375
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
376
|
-
return de_ListWorkloadDeploymentPatternsCommandError(output, context);
|
|
377
|
-
}
|
|
378
|
-
const contents = (0, smithy_client_1.map)({
|
|
379
|
-
$metadata: deserializeMetadata(output),
|
|
380
|
-
});
|
|
381
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
382
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
383
|
-
nextToken: smithy_client_1.expectString,
|
|
384
|
-
workloadDeploymentPatterns: smithy_client_1._json,
|
|
385
|
-
});
|
|
386
|
-
Object.assign(contents, doc);
|
|
387
|
-
return contents;
|
|
388
|
-
};
|
|
389
|
-
exports.de_ListWorkloadDeploymentPatternsCommand = de_ListWorkloadDeploymentPatternsCommand;
|
|
390
|
-
const de_ListWorkloadDeploymentPatternsCommandError = async (output, context) => {
|
|
391
|
-
const parsedOutput = {
|
|
392
|
-
...output,
|
|
393
|
-
body: await parseErrorBody(output.body, context),
|
|
394
|
-
};
|
|
395
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
396
|
-
switch (errorCode) {
|
|
397
|
-
case "InternalServerException":
|
|
398
|
-
case "com.amazonaws.launchwizard#InternalServerException":
|
|
399
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
400
|
-
case "ResourceNotFoundException":
|
|
401
|
-
case "com.amazonaws.launchwizard#ResourceNotFoundException":
|
|
402
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
403
|
-
case "ValidationException":
|
|
404
|
-
case "com.amazonaws.launchwizard#ValidationException":
|
|
405
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
406
|
-
default:
|
|
407
|
-
const parsedBody = parsedOutput.body;
|
|
408
|
-
return throwDefaultError({
|
|
409
|
-
output,
|
|
410
|
-
parsedBody,
|
|
411
|
-
errorCode,
|
|
412
|
-
});
|
|
413
|
-
}
|
|
414
|
-
};
|
|
415
|
-
const de_ListWorkloadsCommand = async (output, context) => {
|
|
416
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
417
|
-
return de_ListWorkloadsCommandError(output, context);
|
|
418
|
-
}
|
|
419
|
-
const contents = (0, smithy_client_1.map)({
|
|
420
|
-
$metadata: deserializeMetadata(output),
|
|
421
|
-
});
|
|
422
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
423
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
424
|
-
nextToken: smithy_client_1.expectString,
|
|
425
|
-
workloads: smithy_client_1._json,
|
|
426
|
-
});
|
|
427
|
-
Object.assign(contents, doc);
|
|
428
|
-
return contents;
|
|
429
|
-
};
|
|
430
|
-
exports.de_ListWorkloadsCommand = de_ListWorkloadsCommand;
|
|
431
|
-
const de_ListWorkloadsCommandError = async (output, context) => {
|
|
432
|
-
const parsedOutput = {
|
|
433
|
-
...output,
|
|
434
|
-
body: await parseErrorBody(output.body, context),
|
|
435
|
-
};
|
|
436
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
437
|
-
switch (errorCode) {
|
|
438
|
-
case "InternalServerException":
|
|
439
|
-
case "com.amazonaws.launchwizard#InternalServerException":
|
|
440
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
441
|
-
case "ValidationException":
|
|
442
|
-
case "com.amazonaws.launchwizard#ValidationException":
|
|
443
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
444
|
-
default:
|
|
445
|
-
const parsedBody = parsedOutput.body;
|
|
446
|
-
return throwDefaultError({
|
|
447
|
-
output,
|
|
448
|
-
parsedBody,
|
|
449
|
-
errorCode,
|
|
450
|
-
});
|
|
451
|
-
}
|
|
452
|
-
};
|
|
453
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(LaunchWizardServiceException_1.LaunchWizardServiceException);
|
|
454
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
455
|
-
const contents = (0, smithy_client_1.map)({});
|
|
456
|
-
const data = parsedOutput.body;
|
|
457
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
458
|
-
message: smithy_client_1.expectString,
|
|
459
|
-
});
|
|
460
|
-
Object.assign(contents, doc);
|
|
461
|
-
const exception = new models_0_1.InternalServerException({
|
|
462
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
463
|
-
...contents,
|
|
464
|
-
});
|
|
465
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
466
|
-
};
|
|
467
|
-
const de_ResourceLimitExceptionRes = async (parsedOutput, context) => {
|
|
468
|
-
const contents = (0, smithy_client_1.map)({});
|
|
469
|
-
const data = parsedOutput.body;
|
|
470
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
471
|
-
message: smithy_client_1.expectString,
|
|
472
|
-
});
|
|
473
|
-
Object.assign(contents, doc);
|
|
474
|
-
const exception = new models_0_1.ResourceLimitException({
|
|
475
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
476
|
-
...contents,
|
|
477
|
-
});
|
|
478
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
479
|
-
};
|
|
480
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
481
|
-
const contents = (0, smithy_client_1.map)({});
|
|
482
|
-
const data = parsedOutput.body;
|
|
483
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
484
|
-
message: smithy_client_1.expectString,
|
|
485
|
-
});
|
|
486
|
-
Object.assign(contents, doc);
|
|
487
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
488
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
489
|
-
...contents,
|
|
490
|
-
});
|
|
491
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
492
|
-
};
|
|
493
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
494
|
-
const contents = (0, smithy_client_1.map)({});
|
|
495
|
-
const data = parsedOutput.body;
|
|
496
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
497
|
-
message: smithy_client_1.expectString,
|
|
498
|
-
});
|
|
499
|
-
Object.assign(contents, doc);
|
|
500
|
-
const exception = new models_0_1.ValidationException({
|
|
501
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
502
|
-
...contents,
|
|
503
|
-
});
|
|
504
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
505
|
-
};
|
|
506
|
-
const de_DeploymentData = (output, context) => {
|
|
507
|
-
return (0, smithy_client_1.take)(output, {
|
|
508
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
509
|
-
deletedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
510
|
-
id: smithy_client_1.expectString,
|
|
511
|
-
name: smithy_client_1.expectString,
|
|
512
|
-
patternName: smithy_client_1.expectString,
|
|
513
|
-
resourceGroup: smithy_client_1.expectString,
|
|
514
|
-
specifications: smithy_client_1._json,
|
|
515
|
-
status: smithy_client_1.expectString,
|
|
516
|
-
workloadName: smithy_client_1.expectString,
|
|
517
|
-
});
|
|
518
|
-
};
|
|
519
|
-
const de_DeploymentDataSummary = (output, context) => {
|
|
520
|
-
return (0, smithy_client_1.take)(output, {
|
|
521
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
522
|
-
id: smithy_client_1.expectString,
|
|
523
|
-
name: smithy_client_1.expectString,
|
|
524
|
-
patternName: smithy_client_1.expectString,
|
|
525
|
-
status: smithy_client_1.expectString,
|
|
526
|
-
workloadName: smithy_client_1.expectString,
|
|
527
|
-
});
|
|
528
|
-
};
|
|
529
|
-
const de_DeploymentDataSummaryList = (output, context) => {
|
|
530
|
-
const retVal = (output || [])
|
|
531
|
-
.filter((e) => e != null)
|
|
532
|
-
.map((entry) => {
|
|
533
|
-
return de_DeploymentDataSummary(entry, context);
|
|
534
|
-
});
|
|
535
|
-
return retVal;
|
|
536
|
-
};
|
|
537
|
-
const de_DeploymentEventDataSummary = (output, context) => {
|
|
538
|
-
return (0, smithy_client_1.take)(output, {
|
|
539
|
-
description: smithy_client_1.expectString,
|
|
540
|
-
name: smithy_client_1.expectString,
|
|
541
|
-
status: smithy_client_1.expectString,
|
|
542
|
-
statusReason: smithy_client_1.expectString,
|
|
543
|
-
timestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
544
|
-
});
|
|
545
|
-
};
|
|
546
|
-
const de_DeploymentEventDataSummaryList = (output, context) => {
|
|
547
|
-
const retVal = (output || [])
|
|
548
|
-
.filter((e) => e != null)
|
|
549
|
-
.map((entry) => {
|
|
550
|
-
return de_DeploymentEventDataSummary(entry, context);
|
|
551
|
-
});
|
|
552
|
-
return retVal;
|
|
553
|
-
};
|
|
554
|
-
const deserializeMetadata = (output) => ({
|
|
555
|
-
httpStatusCode: output.statusCode,
|
|
556
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
557
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
558
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
559
|
-
});
|
|
560
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
561
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
562
|
-
value !== null &&
|
|
563
|
-
value !== "" &&
|
|
564
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
565
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
566
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
567
|
-
if (encoded.length) {
|
|
568
|
-
return JSON.parse(encoded);
|
|
569
|
-
}
|
|
570
|
-
return {};
|
|
571
|
-
});
|
|
572
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
573
|
-
const value = await parseBody(errorBody, context);
|
|
574
|
-
value.message = value.message ?? value.Message;
|
|
575
|
-
return value;
|
|
576
|
-
};
|
|
577
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
578
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
579
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
580
|
-
let cleanValue = rawValue;
|
|
581
|
-
if (typeof cleanValue === "number") {
|
|
582
|
-
cleanValue = cleanValue.toString();
|
|
583
|
-
}
|
|
584
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
585
|
-
cleanValue = cleanValue.split(",")[0];
|
|
586
|
-
}
|
|
587
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
588
|
-
cleanValue = cleanValue.split(":")[0];
|
|
589
|
-
}
|
|
590
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
591
|
-
cleanValue = cleanValue.split("#")[1];
|
|
592
|
-
}
|
|
593
|
-
return cleanValue;
|
|
594
|
-
};
|
|
595
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
596
|
-
if (headerKey !== undefined) {
|
|
597
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
598
|
-
}
|
|
599
|
-
if (data.code !== undefined) {
|
|
600
|
-
return sanitizeErrorCode(data.code);
|
|
601
|
-
}
|
|
602
|
-
if (data["__type"] !== undefined) {
|
|
603
|
-
return sanitizeErrorCode(data["__type"]);
|
|
604
|
-
}
|
|
605
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|
|
@@ -1,22 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveRuntimeExtensions = void 0;
|
|
4
|
-
const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
|
|
5
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const asPartial = (t) => t;
|
|
8
|
-
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
9
|
-
const extensionConfiguration = {
|
|
10
|
-
...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
|
|
11
|
-
...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
|
|
12
|
-
...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
|
|
13
|
-
};
|
|
14
|
-
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
15
|
-
return {
|
|
16
|
-
...runtimeConfig,
|
|
17
|
-
...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
18
|
-
...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
19
|
-
...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
|
|
1
|
+
module.exports = require("./index.js");
|