@aws-sdk/client-arc-region-switch 3.891.0 → 3.894.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist-cjs/index.js +1931 -11
  2. package/package.json +19 -19
  3. package/dist-cjs/ARCRegionSwitch.js +0 -51
  4. package/dist-cjs/ARCRegionSwitchClient.js +0 -52
  5. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +0 -43
  6. package/dist-cjs/commands/ApprovePlanExecutionStepCommand.js +0 -26
  7. package/dist-cjs/commands/CancelPlanExecutionCommand.js +0 -26
  8. package/dist-cjs/commands/CreatePlanCommand.js +0 -29
  9. package/dist-cjs/commands/DeletePlanCommand.js +0 -29
  10. package/dist-cjs/commands/GetPlanCommand.js +0 -29
  11. package/dist-cjs/commands/GetPlanEvaluationStatusCommand.js +0 -26
  12. package/dist-cjs/commands/GetPlanExecutionCommand.js +0 -26
  13. package/dist-cjs/commands/GetPlanInRegionCommand.js +0 -26
  14. package/dist-cjs/commands/ListPlanExecutionEventsCommand.js +0 -26
  15. package/dist-cjs/commands/ListPlanExecutionsCommand.js +0 -26
  16. package/dist-cjs/commands/ListPlansCommand.js +0 -29
  17. package/dist-cjs/commands/ListPlansInRegionCommand.js +0 -26
  18. package/dist-cjs/commands/ListRoute53HealthChecksCommand.js +0 -29
  19. package/dist-cjs/commands/ListTagsForResourceCommand.js +0 -29
  20. package/dist-cjs/commands/StartPlanExecutionCommand.js +0 -26
  21. package/dist-cjs/commands/TagResourceCommand.js +0 -29
  22. package/dist-cjs/commands/UntagResourceCommand.js +0 -29
  23. package/dist-cjs/commands/UpdatePlanCommand.js +0 -29
  24. package/dist-cjs/commands/UpdatePlanExecutionCommand.js +0 -26
  25. package/dist-cjs/commands/UpdatePlanExecutionStepCommand.js +0 -26
  26. package/dist-cjs/commands/index.js +0 -23
  27. package/dist-cjs/endpoint/EndpointParameters.js +0 -15
  28. package/dist-cjs/extensionConfiguration.js +0 -2
  29. package/dist-cjs/models/ARCRegionSwitchServiceException.js +0 -12
  30. package/dist-cjs/models/index.js +0 -4
  31. package/dist-cjs/models/models_0.js +0 -233
  32. package/dist-cjs/pagination/GetPlanEvaluationStatusPaginator.js +0 -7
  33. package/dist-cjs/pagination/GetPlanExecutionPaginator.js +0 -7
  34. package/dist-cjs/pagination/Interfaces.js +0 -2
  35. package/dist-cjs/pagination/ListPlanExecutionEventsPaginator.js +0 -7
  36. package/dist-cjs/pagination/ListPlanExecutionsPaginator.js +0 -7
  37. package/dist-cjs/pagination/ListPlansInRegionPaginator.js +0 -7
  38. package/dist-cjs/pagination/ListPlansPaginator.js +0 -7
  39. package/dist-cjs/pagination/ListRoute53HealthChecksPaginator.js +0 -7
  40. package/dist-cjs/pagination/index.js +0 -11
  41. package/dist-cjs/protocols/Aws_json1_0.js +0 -919
  42. package/dist-cjs/runtimeExtensions.js +0 -13
  43. package/dist-cjs/waiters/index.js +0 -5
  44. package/dist-cjs/waiters/waitForPlanEvaluationStatusPassed.js +0 -54
  45. package/dist-cjs/waiters/waitForPlanExecutionCompleted.js +0 -72
@@ -1,919 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UpdatePlanExecutionStepCommand = exports.de_UpdatePlanExecutionCommand = exports.de_UpdatePlanCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartPlanExecutionCommand = exports.de_ListTagsForResourceCommand = exports.de_ListRoute53HealthChecksCommand = exports.de_ListPlansInRegionCommand = exports.de_ListPlansCommand = exports.de_ListPlanExecutionsCommand = exports.de_ListPlanExecutionEventsCommand = exports.de_GetPlanInRegionCommand = exports.de_GetPlanExecutionCommand = exports.de_GetPlanEvaluationStatusCommand = exports.de_GetPlanCommand = exports.de_DeletePlanCommand = exports.de_CreatePlanCommand = exports.de_CancelPlanExecutionCommand = exports.de_ApprovePlanExecutionStepCommand = exports.se_UpdatePlanExecutionStepCommand = exports.se_UpdatePlanExecutionCommand = exports.se_UpdatePlanCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StartPlanExecutionCommand = exports.se_ListTagsForResourceCommand = exports.se_ListRoute53HealthChecksCommand = exports.se_ListPlansInRegionCommand = exports.se_ListPlansCommand = exports.se_ListPlanExecutionsCommand = exports.se_ListPlanExecutionEventsCommand = exports.se_GetPlanInRegionCommand = exports.se_GetPlanExecutionCommand = exports.se_GetPlanEvaluationStatusCommand = exports.se_GetPlanCommand = exports.se_DeletePlanCommand = exports.se_CreatePlanCommand = exports.se_CancelPlanExecutionCommand = exports.se_ApprovePlanExecutionStepCommand = void 0;
4
- const core_1 = require("@aws-sdk/core");
5
- const protocol_http_1 = require("@smithy/protocol-http");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const ARCRegionSwitchServiceException_1 = require("../models/ARCRegionSwitchServiceException");
8
- const models_0_1 = require("../models/models_0");
9
- const se_ApprovePlanExecutionStepCommand = async (input, context) => {
10
- const headers = sharedHeaders("ApprovePlanExecutionStep");
11
- let body;
12
- body = JSON.stringify((0, smithy_client_1._json)(input));
13
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
- };
15
- exports.se_ApprovePlanExecutionStepCommand = se_ApprovePlanExecutionStepCommand;
16
- const se_CancelPlanExecutionCommand = async (input, context) => {
17
- const headers = sharedHeaders("CancelPlanExecution");
18
- let body;
19
- body = JSON.stringify((0, smithy_client_1._json)(input));
20
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
21
- };
22
- exports.se_CancelPlanExecutionCommand = se_CancelPlanExecutionCommand;
23
- const se_CreatePlanCommand = async (input, context) => {
24
- const headers = sharedHeaders("CreatePlan");
25
- let body;
26
- body = JSON.stringify(se_CreatePlanRequest(input, context));
27
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
- };
29
- exports.se_CreatePlanCommand = se_CreatePlanCommand;
30
- const se_DeletePlanCommand = async (input, context) => {
31
- const headers = sharedHeaders("DeletePlan");
32
- let body;
33
- body = JSON.stringify((0, smithy_client_1._json)(input));
34
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
- };
36
- exports.se_DeletePlanCommand = se_DeletePlanCommand;
37
- const se_GetPlanCommand = async (input, context) => {
38
- const headers = sharedHeaders("GetPlan");
39
- let body;
40
- body = JSON.stringify((0, smithy_client_1._json)(input));
41
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
42
- };
43
- exports.se_GetPlanCommand = se_GetPlanCommand;
44
- const se_GetPlanEvaluationStatusCommand = async (input, context) => {
45
- const headers = sharedHeaders("GetPlanEvaluationStatus");
46
- let body;
47
- body = JSON.stringify((0, smithy_client_1._json)(input));
48
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
- };
50
- exports.se_GetPlanEvaluationStatusCommand = se_GetPlanEvaluationStatusCommand;
51
- const se_GetPlanExecutionCommand = async (input, context) => {
52
- const headers = sharedHeaders("GetPlanExecution");
53
- let body;
54
- body = JSON.stringify((0, smithy_client_1._json)(input));
55
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
56
- };
57
- exports.se_GetPlanExecutionCommand = se_GetPlanExecutionCommand;
58
- const se_GetPlanInRegionCommand = async (input, context) => {
59
- const headers = sharedHeaders("GetPlanInRegion");
60
- let body;
61
- body = JSON.stringify((0, smithy_client_1._json)(input));
62
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
63
- };
64
- exports.se_GetPlanInRegionCommand = se_GetPlanInRegionCommand;
65
- const se_ListPlanExecutionEventsCommand = async (input, context) => {
66
- const headers = sharedHeaders("ListPlanExecutionEvents");
67
- let body;
68
- body = JSON.stringify((0, smithy_client_1._json)(input));
69
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
70
- };
71
- exports.se_ListPlanExecutionEventsCommand = se_ListPlanExecutionEventsCommand;
72
- const se_ListPlanExecutionsCommand = async (input, context) => {
73
- const headers = sharedHeaders("ListPlanExecutions");
74
- let body;
75
- body = JSON.stringify((0, smithy_client_1._json)(input));
76
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
- };
78
- exports.se_ListPlanExecutionsCommand = se_ListPlanExecutionsCommand;
79
- const se_ListPlansCommand = async (input, context) => {
80
- const headers = sharedHeaders("ListPlans");
81
- let body;
82
- body = JSON.stringify((0, smithy_client_1._json)(input));
83
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
84
- };
85
- exports.se_ListPlansCommand = se_ListPlansCommand;
86
- const se_ListPlansInRegionCommand = async (input, context) => {
87
- const headers = sharedHeaders("ListPlansInRegion");
88
- let body;
89
- body = JSON.stringify((0, smithy_client_1._json)(input));
90
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
91
- };
92
- exports.se_ListPlansInRegionCommand = se_ListPlansInRegionCommand;
93
- const se_ListRoute53HealthChecksCommand = async (input, context) => {
94
- const headers = sharedHeaders("ListRoute53HealthChecks");
95
- let body;
96
- body = JSON.stringify((0, smithy_client_1._json)(input));
97
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
98
- };
99
- exports.se_ListRoute53HealthChecksCommand = se_ListRoute53HealthChecksCommand;
100
- const se_ListTagsForResourceCommand = async (input, context) => {
101
- const headers = sharedHeaders("ListTagsForResource");
102
- let body;
103
- body = JSON.stringify((0, smithy_client_1._json)(input));
104
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
105
- };
106
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
107
- const se_StartPlanExecutionCommand = async (input, context) => {
108
- const headers = sharedHeaders("StartPlanExecution");
109
- let body;
110
- body = JSON.stringify((0, smithy_client_1._json)(input));
111
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
- };
113
- exports.se_StartPlanExecutionCommand = se_StartPlanExecutionCommand;
114
- const se_TagResourceCommand = async (input, context) => {
115
- const headers = sharedHeaders("TagResource");
116
- let body;
117
- body = JSON.stringify((0, smithy_client_1._json)(input));
118
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
- };
120
- exports.se_TagResourceCommand = se_TagResourceCommand;
121
- const se_UntagResourceCommand = async (input, context) => {
122
- const headers = sharedHeaders("UntagResource");
123
- let body;
124
- body = JSON.stringify((0, smithy_client_1._json)(input));
125
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
126
- };
127
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
128
- const se_UpdatePlanCommand = async (input, context) => {
129
- const headers = sharedHeaders("UpdatePlan");
130
- let body;
131
- body = JSON.stringify(se_UpdatePlanRequest(input, context));
132
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
133
- };
134
- exports.se_UpdatePlanCommand = se_UpdatePlanCommand;
135
- const se_UpdatePlanExecutionCommand = async (input, context) => {
136
- const headers = sharedHeaders("UpdatePlanExecution");
137
- let body;
138
- body = JSON.stringify((0, smithy_client_1._json)(input));
139
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
140
- };
141
- exports.se_UpdatePlanExecutionCommand = se_UpdatePlanExecutionCommand;
142
- const se_UpdatePlanExecutionStepCommand = async (input, context) => {
143
- const headers = sharedHeaders("UpdatePlanExecutionStep");
144
- let body;
145
- body = JSON.stringify((0, smithy_client_1._json)(input));
146
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
147
- };
148
- exports.se_UpdatePlanExecutionStepCommand = se_UpdatePlanExecutionStepCommand;
149
- const de_ApprovePlanExecutionStepCommand = async (output, context) => {
150
- if (output.statusCode >= 300) {
151
- return de_CommandError(output, context);
152
- }
153
- const data = await (0, core_1.parseJsonBody)(output.body, context);
154
- let contents = {};
155
- contents = (0, smithy_client_1._json)(data);
156
- const response = {
157
- $metadata: deserializeMetadata(output),
158
- ...contents,
159
- };
160
- return response;
161
- };
162
- exports.de_ApprovePlanExecutionStepCommand = de_ApprovePlanExecutionStepCommand;
163
- const de_CancelPlanExecutionCommand = async (output, context) => {
164
- if (output.statusCode >= 300) {
165
- return de_CommandError(output, context);
166
- }
167
- const data = await (0, core_1.parseJsonBody)(output.body, context);
168
- let contents = {};
169
- contents = (0, smithy_client_1._json)(data);
170
- const response = {
171
- $metadata: deserializeMetadata(output),
172
- ...contents,
173
- };
174
- return response;
175
- };
176
- exports.de_CancelPlanExecutionCommand = de_CancelPlanExecutionCommand;
177
- const de_CreatePlanCommand = async (output, context) => {
178
- if (output.statusCode >= 300) {
179
- return de_CommandError(output, context);
180
- }
181
- const data = await (0, core_1.parseJsonBody)(output.body, context);
182
- let contents = {};
183
- contents = de_CreatePlanResponse(data, context);
184
- const response = {
185
- $metadata: deserializeMetadata(output),
186
- ...contents,
187
- };
188
- return response;
189
- };
190
- exports.de_CreatePlanCommand = de_CreatePlanCommand;
191
- const de_DeletePlanCommand = async (output, context) => {
192
- if (output.statusCode >= 300) {
193
- return de_CommandError(output, context);
194
- }
195
- const data = await (0, core_1.parseJsonBody)(output.body, context);
196
- let contents = {};
197
- contents = (0, smithy_client_1._json)(data);
198
- const response = {
199
- $metadata: deserializeMetadata(output),
200
- ...contents,
201
- };
202
- return response;
203
- };
204
- exports.de_DeletePlanCommand = de_DeletePlanCommand;
205
- const de_GetPlanCommand = async (output, context) => {
206
- if (output.statusCode >= 300) {
207
- return de_CommandError(output, context);
208
- }
209
- const data = await (0, core_1.parseJsonBody)(output.body, context);
210
- let contents = {};
211
- contents = de_GetPlanResponse(data, context);
212
- const response = {
213
- $metadata: deserializeMetadata(output),
214
- ...contents,
215
- };
216
- return response;
217
- };
218
- exports.de_GetPlanCommand = de_GetPlanCommand;
219
- const de_GetPlanEvaluationStatusCommand = async (output, context) => {
220
- if (output.statusCode >= 300) {
221
- return de_CommandError(output, context);
222
- }
223
- const data = await (0, core_1.parseJsonBody)(output.body, context);
224
- let contents = {};
225
- contents = de_GetPlanEvaluationStatusResponse(data, context);
226
- const response = {
227
- $metadata: deserializeMetadata(output),
228
- ...contents,
229
- };
230
- return response;
231
- };
232
- exports.de_GetPlanEvaluationStatusCommand = de_GetPlanEvaluationStatusCommand;
233
- const de_GetPlanExecutionCommand = async (output, context) => {
234
- if (output.statusCode >= 300) {
235
- return de_CommandError(output, context);
236
- }
237
- const data = await (0, core_1.parseJsonBody)(output.body, context);
238
- let contents = {};
239
- contents = de_GetPlanExecutionResponse(data, context);
240
- const response = {
241
- $metadata: deserializeMetadata(output),
242
- ...contents,
243
- };
244
- return response;
245
- };
246
- exports.de_GetPlanExecutionCommand = de_GetPlanExecutionCommand;
247
- const de_GetPlanInRegionCommand = async (output, context) => {
248
- if (output.statusCode >= 300) {
249
- return de_CommandError(output, context);
250
- }
251
- const data = await (0, core_1.parseJsonBody)(output.body, context);
252
- let contents = {};
253
- contents = de_GetPlanInRegionResponse(data, context);
254
- const response = {
255
- $metadata: deserializeMetadata(output),
256
- ...contents,
257
- };
258
- return response;
259
- };
260
- exports.de_GetPlanInRegionCommand = de_GetPlanInRegionCommand;
261
- const de_ListPlanExecutionEventsCommand = async (output, context) => {
262
- if (output.statusCode >= 300) {
263
- return de_CommandError(output, context);
264
- }
265
- const data = await (0, core_1.parseJsonBody)(output.body, context);
266
- let contents = {};
267
- contents = de_ListPlanExecutionEventsResponse(data, context);
268
- const response = {
269
- $metadata: deserializeMetadata(output),
270
- ...contents,
271
- };
272
- return response;
273
- };
274
- exports.de_ListPlanExecutionEventsCommand = de_ListPlanExecutionEventsCommand;
275
- const de_ListPlanExecutionsCommand = async (output, context) => {
276
- if (output.statusCode >= 300) {
277
- return de_CommandError(output, context);
278
- }
279
- const data = await (0, core_1.parseJsonBody)(output.body, context);
280
- let contents = {};
281
- contents = de_ListPlanExecutionsResponse(data, context);
282
- const response = {
283
- $metadata: deserializeMetadata(output),
284
- ...contents,
285
- };
286
- return response;
287
- };
288
- exports.de_ListPlanExecutionsCommand = de_ListPlanExecutionsCommand;
289
- const de_ListPlansCommand = async (output, context) => {
290
- if (output.statusCode >= 300) {
291
- return de_CommandError(output, context);
292
- }
293
- const data = await (0, core_1.parseJsonBody)(output.body, context);
294
- let contents = {};
295
- contents = de_ListPlansResponse(data, context);
296
- const response = {
297
- $metadata: deserializeMetadata(output),
298
- ...contents,
299
- };
300
- return response;
301
- };
302
- exports.de_ListPlansCommand = de_ListPlansCommand;
303
- const de_ListPlansInRegionCommand = async (output, context) => {
304
- if (output.statusCode >= 300) {
305
- return de_CommandError(output, context);
306
- }
307
- const data = await (0, core_1.parseJsonBody)(output.body, context);
308
- let contents = {};
309
- contents = de_ListPlansInRegionResponse(data, context);
310
- const response = {
311
- $metadata: deserializeMetadata(output),
312
- ...contents,
313
- };
314
- return response;
315
- };
316
- exports.de_ListPlansInRegionCommand = de_ListPlansInRegionCommand;
317
- const de_ListRoute53HealthChecksCommand = async (output, context) => {
318
- if (output.statusCode >= 300) {
319
- return de_CommandError(output, context);
320
- }
321
- const data = await (0, core_1.parseJsonBody)(output.body, context);
322
- let contents = {};
323
- contents = (0, smithy_client_1._json)(data);
324
- const response = {
325
- $metadata: deserializeMetadata(output),
326
- ...contents,
327
- };
328
- return response;
329
- };
330
- exports.de_ListRoute53HealthChecksCommand = de_ListRoute53HealthChecksCommand;
331
- const de_ListTagsForResourceCommand = async (output, context) => {
332
- if (output.statusCode >= 300) {
333
- return de_CommandError(output, context);
334
- }
335
- const data = await (0, core_1.parseJsonBody)(output.body, context);
336
- let contents = {};
337
- contents = (0, smithy_client_1._json)(data);
338
- const response = {
339
- $metadata: deserializeMetadata(output),
340
- ...contents,
341
- };
342
- return response;
343
- };
344
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
345
- const de_StartPlanExecutionCommand = async (output, context) => {
346
- if (output.statusCode >= 300) {
347
- return de_CommandError(output, context);
348
- }
349
- const data = await (0, core_1.parseJsonBody)(output.body, context);
350
- let contents = {};
351
- contents = (0, smithy_client_1._json)(data);
352
- const response = {
353
- $metadata: deserializeMetadata(output),
354
- ...contents,
355
- };
356
- return response;
357
- };
358
- exports.de_StartPlanExecutionCommand = de_StartPlanExecutionCommand;
359
- const de_TagResourceCommand = async (output, context) => {
360
- if (output.statusCode >= 300) {
361
- return de_CommandError(output, context);
362
- }
363
- const data = await (0, core_1.parseJsonBody)(output.body, context);
364
- let contents = {};
365
- contents = (0, smithy_client_1._json)(data);
366
- const response = {
367
- $metadata: deserializeMetadata(output),
368
- ...contents,
369
- };
370
- return response;
371
- };
372
- exports.de_TagResourceCommand = de_TagResourceCommand;
373
- const de_UntagResourceCommand = async (output, context) => {
374
- if (output.statusCode >= 300) {
375
- return de_CommandError(output, context);
376
- }
377
- const data = await (0, core_1.parseJsonBody)(output.body, context);
378
- let contents = {};
379
- contents = (0, smithy_client_1._json)(data);
380
- const response = {
381
- $metadata: deserializeMetadata(output),
382
- ...contents,
383
- };
384
- return response;
385
- };
386
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
387
- const de_UpdatePlanCommand = async (output, context) => {
388
- if (output.statusCode >= 300) {
389
- return de_CommandError(output, context);
390
- }
391
- const data = await (0, core_1.parseJsonBody)(output.body, context);
392
- let contents = {};
393
- contents = de_UpdatePlanResponse(data, context);
394
- const response = {
395
- $metadata: deserializeMetadata(output),
396
- ...contents,
397
- };
398
- return response;
399
- };
400
- exports.de_UpdatePlanCommand = de_UpdatePlanCommand;
401
- const de_UpdatePlanExecutionCommand = async (output, context) => {
402
- if (output.statusCode >= 300) {
403
- return de_CommandError(output, context);
404
- }
405
- const data = await (0, core_1.parseJsonBody)(output.body, context);
406
- let contents = {};
407
- contents = (0, smithy_client_1._json)(data);
408
- const response = {
409
- $metadata: deserializeMetadata(output),
410
- ...contents,
411
- };
412
- return response;
413
- };
414
- exports.de_UpdatePlanExecutionCommand = de_UpdatePlanExecutionCommand;
415
- const de_UpdatePlanExecutionStepCommand = async (output, context) => {
416
- if (output.statusCode >= 300) {
417
- return de_CommandError(output, context);
418
- }
419
- const data = await (0, core_1.parseJsonBody)(output.body, context);
420
- let contents = {};
421
- contents = (0, smithy_client_1._json)(data);
422
- const response = {
423
- $metadata: deserializeMetadata(output),
424
- ...contents,
425
- };
426
- return response;
427
- };
428
- exports.de_UpdatePlanExecutionStepCommand = de_UpdatePlanExecutionStepCommand;
429
- const de_CommandError = async (output, context) => {
430
- const parsedOutput = {
431
- ...output,
432
- body: await (0, core_1.parseJsonErrorBody)(output.body, context),
433
- };
434
- const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
435
- switch (errorCode) {
436
- case "AccessDeniedException":
437
- case "com.amazonaws.arcregionswitch#AccessDeniedException":
438
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
439
- case "ResourceNotFoundException":
440
- case "com.amazonaws.arcregionswitch#ResourceNotFoundException":
441
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
442
- case "IllegalStateException":
443
- case "com.amazonaws.arcregionswitch#IllegalStateException":
444
- throw await de_IllegalStateExceptionRes(parsedOutput, context);
445
- case "InternalServerException":
446
- case "com.amazonaws.arcregionswitch#InternalServerException":
447
- throw await de_InternalServerExceptionRes(parsedOutput, context);
448
- case "IllegalArgumentException":
449
- case "com.amazonaws.arcregionswitch#IllegalArgumentException":
450
- throw await de_IllegalArgumentExceptionRes(parsedOutput, context);
451
- default:
452
- const parsedBody = parsedOutput.body;
453
- return throwDefaultError({
454
- output,
455
- parsedBody,
456
- errorCode,
457
- });
458
- }
459
- };
460
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
461
- const body = parsedOutput.body;
462
- const deserialized = (0, smithy_client_1._json)(body);
463
- const exception = new models_0_1.AccessDeniedException({
464
- $metadata: deserializeMetadata(parsedOutput),
465
- ...deserialized,
466
- });
467
- return (0, smithy_client_1.decorateServiceException)(exception, body);
468
- };
469
- const de_IllegalArgumentExceptionRes = async (parsedOutput, context) => {
470
- const body = parsedOutput.body;
471
- const deserialized = (0, smithy_client_1._json)(body);
472
- const exception = new models_0_1.IllegalArgumentException({
473
- $metadata: deserializeMetadata(parsedOutput),
474
- ...deserialized,
475
- });
476
- return (0, smithy_client_1.decorateServiceException)(exception, body);
477
- };
478
- const de_IllegalStateExceptionRes = async (parsedOutput, context) => {
479
- const body = parsedOutput.body;
480
- const deserialized = (0, smithy_client_1._json)(body);
481
- const exception = new models_0_1.IllegalStateException({
482
- $metadata: deserializeMetadata(parsedOutput),
483
- ...deserialized,
484
- });
485
- return (0, smithy_client_1.decorateServiceException)(exception, body);
486
- };
487
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
488
- const body = parsedOutput.body;
489
- const deserialized = (0, smithy_client_1._json)(body);
490
- const exception = new models_0_1.InternalServerException({
491
- $metadata: deserializeMetadata(parsedOutput),
492
- ...deserialized,
493
- });
494
- return (0, smithy_client_1.decorateServiceException)(exception, body);
495
- };
496
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
497
- const body = parsedOutput.body;
498
- const deserialized = (0, smithy_client_1._json)(body);
499
- const exception = new models_0_1.ResourceNotFoundException({
500
- $metadata: deserializeMetadata(parsedOutput),
501
- ...deserialized,
502
- });
503
- return (0, smithy_client_1.decorateServiceException)(exception, body);
504
- };
505
- const se_CreatePlanRequest = (input, context) => {
506
- return (0, smithy_client_1.take)(input, {
507
- associatedAlarms: smithy_client_1._json,
508
- description: [],
509
- executionRole: [],
510
- name: [],
511
- primaryRegion: [],
512
- recoveryApproach: [],
513
- recoveryTimeObjectiveMinutes: [],
514
- regions: smithy_client_1._json,
515
- tags: smithy_client_1._json,
516
- triggers: smithy_client_1._json,
517
- workflows: (_) => se_WorkflowList(_, context),
518
- });
519
- };
520
- const se_CustomActionLambdaConfiguration = (input, context) => {
521
- return (0, smithy_client_1.take)(input, {
522
- lambdas: smithy_client_1._json,
523
- regionToRun: [],
524
- retryIntervalMinutes: smithy_client_1.serializeFloat,
525
- timeoutMinutes: [],
526
- ungraceful: smithy_client_1._json,
527
- });
528
- };
529
- const se_ExecutionBlockConfiguration = (input, context) => {
530
- return models_0_1.ExecutionBlockConfiguration.visit(input, {
531
- arcRoutingControlConfig: (value) => ({ arcRoutingControlConfig: (0, smithy_client_1._json)(value) }),
532
- customActionLambdaConfig: (value) => ({
533
- customActionLambdaConfig: se_CustomActionLambdaConfiguration(value, context),
534
- }),
535
- ec2AsgCapacityIncreaseConfig: (value) => ({ ec2AsgCapacityIncreaseConfig: (0, smithy_client_1._json)(value) }),
536
- ecsCapacityIncreaseConfig: (value) => ({ ecsCapacityIncreaseConfig: (0, smithy_client_1._json)(value) }),
537
- eksResourceScalingConfig: (value) => ({ eksResourceScalingConfig: (0, smithy_client_1._json)(value) }),
538
- executionApprovalConfig: (value) => ({ executionApprovalConfig: (0, smithy_client_1._json)(value) }),
539
- globalAuroraConfig: (value) => ({ globalAuroraConfig: (0, smithy_client_1._json)(value) }),
540
- parallelConfig: (value) => ({ parallelConfig: se_ParallelExecutionBlockConfiguration(value, context) }),
541
- regionSwitchPlanConfig: (value) => ({ regionSwitchPlanConfig: (0, smithy_client_1._json)(value) }),
542
- route53HealthCheckConfig: (value) => ({ route53HealthCheckConfig: (0, smithy_client_1._json)(value) }),
543
- _: (name, value) => ({ [name]: value }),
544
- });
545
- };
546
- const se_ParallelExecutionBlockConfiguration = (input, context) => {
547
- return (0, smithy_client_1.take)(input, {
548
- steps: (_) => se_Steps(_, context),
549
- });
550
- };
551
- const se_Step = (input, context) => {
552
- return (0, smithy_client_1.take)(input, {
553
- description: [],
554
- executionBlockConfiguration: (_) => se_ExecutionBlockConfiguration(_, context),
555
- executionBlockType: [],
556
- name: [],
557
- });
558
- };
559
- const se_Steps = (input, context) => {
560
- return input
561
- .filter((e) => e != null)
562
- .map((entry) => {
563
- return se_Step(entry, context);
564
- });
565
- };
566
- const se_UpdatePlanRequest = (input, context) => {
567
- return (0, smithy_client_1.take)(input, {
568
- arn: [],
569
- associatedAlarms: smithy_client_1._json,
570
- description: [],
571
- executionRole: [],
572
- recoveryTimeObjectiveMinutes: [],
573
- triggers: smithy_client_1._json,
574
- workflows: (_) => se_WorkflowList(_, context),
575
- });
576
- };
577
- const se_Workflow = (input, context) => {
578
- return (0, smithy_client_1.take)(input, {
579
- steps: (_) => se_Steps(_, context),
580
- workflowDescription: [],
581
- workflowTargetAction: [],
582
- workflowTargetRegion: [],
583
- });
584
- };
585
- const se_WorkflowList = (input, context) => {
586
- return input
587
- .filter((e) => e != null)
588
- .map((entry) => {
589
- return se_Workflow(entry, context);
590
- });
591
- };
592
- const de_AbbreviatedExecution = (output, context) => {
593
- return (0, smithy_client_1.take)(output, {
594
- actualRecoveryTime: smithy_client_1.expectString,
595
- comment: smithy_client_1.expectString,
596
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
597
- executionAction: smithy_client_1.expectString,
598
- executionId: smithy_client_1.expectString,
599
- executionRegion: smithy_client_1.expectString,
600
- executionState: smithy_client_1.expectString,
601
- mode: smithy_client_1.expectString,
602
- planArn: smithy_client_1.expectString,
603
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
604
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
605
- version: smithy_client_1.expectString,
606
- });
607
- };
608
- const de_AbbreviatedExecutionsList = (output, context) => {
609
- const retVal = (output || [])
610
- .filter((e) => e != null)
611
- .map((entry) => {
612
- return de_AbbreviatedExecution(entry, context);
613
- });
614
- return retVal;
615
- };
616
- const de_AbbreviatedPlan = (output, context) => {
617
- return (0, smithy_client_1.take)(output, {
618
- activePlanExecution: smithy_client_1.expectString,
619
- arn: smithy_client_1.expectString,
620
- description: smithy_client_1.expectString,
621
- executionRole: smithy_client_1.expectString,
622
- name: smithy_client_1.expectString,
623
- owner: smithy_client_1.expectString,
624
- primaryRegion: smithy_client_1.expectString,
625
- recoveryApproach: smithy_client_1.expectString,
626
- recoveryTimeObjectiveMinutes: smithy_client_1.expectInt32,
627
- regions: smithy_client_1._json,
628
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
629
- version: smithy_client_1.expectString,
630
- });
631
- };
632
- const de_CreatePlanResponse = (output, context) => {
633
- return (0, smithy_client_1.take)(output, {
634
- plan: (_) => de_Plan(_, context),
635
- });
636
- };
637
- const de_CustomActionLambdaConfiguration = (output, context) => {
638
- return (0, smithy_client_1.take)(output, {
639
- lambdas: smithy_client_1._json,
640
- regionToRun: smithy_client_1.expectString,
641
- retryIntervalMinutes: smithy_client_1.limitedParseFloat32,
642
- timeoutMinutes: smithy_client_1.expectInt32,
643
- ungraceful: smithy_client_1._json,
644
- });
645
- };
646
- const de_ExecutionBlockConfiguration = (output, context) => {
647
- if (output.arcRoutingControlConfig != null) {
648
- return {
649
- arcRoutingControlConfig: (0, smithy_client_1._json)(output.arcRoutingControlConfig),
650
- };
651
- }
652
- if (output.customActionLambdaConfig != null) {
653
- return {
654
- customActionLambdaConfig: de_CustomActionLambdaConfiguration(output.customActionLambdaConfig, context),
655
- };
656
- }
657
- if (output.ec2AsgCapacityIncreaseConfig != null) {
658
- return {
659
- ec2AsgCapacityIncreaseConfig: (0, smithy_client_1._json)(output.ec2AsgCapacityIncreaseConfig),
660
- };
661
- }
662
- if (output.ecsCapacityIncreaseConfig != null) {
663
- return {
664
- ecsCapacityIncreaseConfig: (0, smithy_client_1._json)(output.ecsCapacityIncreaseConfig),
665
- };
666
- }
667
- if (output.eksResourceScalingConfig != null) {
668
- return {
669
- eksResourceScalingConfig: (0, smithy_client_1._json)(output.eksResourceScalingConfig),
670
- };
671
- }
672
- if (output.executionApprovalConfig != null) {
673
- return {
674
- executionApprovalConfig: (0, smithy_client_1._json)(output.executionApprovalConfig),
675
- };
676
- }
677
- if (output.globalAuroraConfig != null) {
678
- return {
679
- globalAuroraConfig: (0, smithy_client_1._json)(output.globalAuroraConfig),
680
- };
681
- }
682
- if (output.parallelConfig != null) {
683
- return {
684
- parallelConfig: de_ParallelExecutionBlockConfiguration(output.parallelConfig, context),
685
- };
686
- }
687
- if (output.regionSwitchPlanConfig != null) {
688
- return {
689
- regionSwitchPlanConfig: (0, smithy_client_1._json)(output.regionSwitchPlanConfig),
690
- };
691
- }
692
- if (output.route53HealthCheckConfig != null) {
693
- return {
694
- route53HealthCheckConfig: (0, smithy_client_1._json)(output.route53HealthCheckConfig),
695
- };
696
- }
697
- return { $unknown: Object.entries(output)[0] };
698
- };
699
- const de_ExecutionEvent = (output, context) => {
700
- return (0, smithy_client_1.take)(output, {
701
- description: smithy_client_1.expectString,
702
- error: smithy_client_1.expectString,
703
- eventId: smithy_client_1.expectString,
704
- executionBlockType: smithy_client_1.expectString,
705
- previousEventId: smithy_client_1.expectString,
706
- resources: smithy_client_1._json,
707
- stepName: smithy_client_1.expectString,
708
- timestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
709
- type: smithy_client_1.expectString,
710
- });
711
- };
712
- const de_ExecutionEventList = (output, context) => {
713
- const retVal = (output || [])
714
- .filter((e) => e != null)
715
- .map((entry) => {
716
- return de_ExecutionEvent(entry, context);
717
- });
718
- return retVal;
719
- };
720
- const de_GetPlanEvaluationStatusResponse = (output, context) => {
721
- return (0, smithy_client_1.take)(output, {
722
- evaluationState: smithy_client_1.expectString,
723
- lastEvaluatedVersion: smithy_client_1.expectString,
724
- lastEvaluationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
725
- nextToken: smithy_client_1.expectString,
726
- planArn: smithy_client_1.expectString,
727
- region: smithy_client_1.expectString,
728
- warnings: (_) => de_PlanWarnings(_, context),
729
- });
730
- };
731
- const de_GetPlanExecutionResponse = (output, context) => {
732
- return (0, smithy_client_1.take)(output, {
733
- actualRecoveryTime: smithy_client_1.expectString,
734
- comment: smithy_client_1.expectString,
735
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
736
- executionAction: smithy_client_1.expectString,
737
- executionId: smithy_client_1.expectString,
738
- executionRegion: smithy_client_1.expectString,
739
- executionState: smithy_client_1.expectString,
740
- mode: smithy_client_1.expectString,
741
- nextToken: smithy_client_1.expectString,
742
- plan: (_) => de_Plan(_, context),
743
- planArn: smithy_client_1.expectString,
744
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
745
- stepStates: (_) => de_StepStates(_, context),
746
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
747
- version: smithy_client_1.expectString,
748
- });
749
- };
750
- const de_GetPlanInRegionResponse = (output, context) => {
751
- return (0, smithy_client_1.take)(output, {
752
- plan: (_) => de_Plan(_, context),
753
- });
754
- };
755
- const de_GetPlanResponse = (output, context) => {
756
- return (0, smithy_client_1.take)(output, {
757
- plan: (_) => de_Plan(_, context),
758
- });
759
- };
760
- const de_ListPlanExecutionEventsResponse = (output, context) => {
761
- return (0, smithy_client_1.take)(output, {
762
- items: (_) => de_ExecutionEventList(_, context),
763
- nextToken: smithy_client_1.expectString,
764
- });
765
- };
766
- const de_ListPlanExecutionsResponse = (output, context) => {
767
- return (0, smithy_client_1.take)(output, {
768
- items: (_) => de_AbbreviatedExecutionsList(_, context),
769
- nextToken: smithy_client_1.expectString,
770
- });
771
- };
772
- const de_ListPlansInRegionResponse = (output, context) => {
773
- return (0, smithy_client_1.take)(output, {
774
- nextToken: smithy_client_1.expectString,
775
- plans: (_) => de_PlanList(_, context),
776
- });
777
- };
778
- const de_ListPlansResponse = (output, context) => {
779
- return (0, smithy_client_1.take)(output, {
780
- nextToken: smithy_client_1.expectString,
781
- plans: (_) => de_PlanList(_, context),
782
- });
783
- };
784
- const de_ParallelExecutionBlockConfiguration = (output, context) => {
785
- return (0, smithy_client_1.take)(output, {
786
- steps: (_) => de_Steps(_, context),
787
- });
788
- };
789
- const de_Plan = (output, context) => {
790
- return (0, smithy_client_1.take)(output, {
791
- arn: smithy_client_1.expectString,
792
- associatedAlarms: smithy_client_1._json,
793
- description: smithy_client_1.expectString,
794
- executionRole: smithy_client_1.expectString,
795
- name: smithy_client_1.expectString,
796
- owner: smithy_client_1.expectString,
797
- primaryRegion: smithy_client_1.expectString,
798
- recoveryApproach: smithy_client_1.expectString,
799
- recoveryTimeObjectiveMinutes: smithy_client_1.expectInt32,
800
- regions: smithy_client_1._json,
801
- triggers: smithy_client_1._json,
802
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
803
- version: smithy_client_1.expectString,
804
- workflows: (_) => de_WorkflowList(_, context),
805
- });
806
- };
807
- const de_PlanList = (output, context) => {
808
- const retVal = (output || [])
809
- .filter((e) => e != null)
810
- .map((entry) => {
811
- return de_AbbreviatedPlan(entry, context);
812
- });
813
- return retVal;
814
- };
815
- const de_PlanWarnings = (output, context) => {
816
- const retVal = (output || [])
817
- .filter((e) => e != null)
818
- .map((entry) => {
819
- return de_ResourceWarning(entry, context);
820
- });
821
- return retVal;
822
- };
823
- const de_ResourceWarning = (output, context) => {
824
- return (0, smithy_client_1.take)(output, {
825
- resourceArn: smithy_client_1.expectString,
826
- stepName: smithy_client_1.expectString,
827
- version: smithy_client_1.expectString,
828
- warningMessage: smithy_client_1.expectString,
829
- warningStatus: smithy_client_1.expectString,
830
- warningUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
831
- workflow: smithy_client_1._json,
832
- });
833
- };
834
- const de_Step = (output, context) => {
835
- return (0, smithy_client_1.take)(output, {
836
- description: smithy_client_1.expectString,
837
- executionBlockConfiguration: (_) => de_ExecutionBlockConfiguration((0, core_1.awsExpectUnion)(_), context),
838
- executionBlockType: smithy_client_1.expectString,
839
- name: smithy_client_1.expectString,
840
- });
841
- };
842
- const de_Steps = (output, context) => {
843
- const retVal = (output || [])
844
- .filter((e) => e != null)
845
- .map((entry) => {
846
- return de_Step(entry, context);
847
- });
848
- return retVal;
849
- };
850
- const de_StepState = (output, context) => {
851
- return (0, smithy_client_1.take)(output, {
852
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
853
- name: smithy_client_1.expectString,
854
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
855
- status: smithy_client_1.expectString,
856
- stepMode: smithy_client_1.expectString,
857
- });
858
- };
859
- const de_StepStates = (output, context) => {
860
- const retVal = (output || [])
861
- .filter((e) => e != null)
862
- .map((entry) => {
863
- return de_StepState(entry, context);
864
- });
865
- return retVal;
866
- };
867
- const de_UpdatePlanResponse = (output, context) => {
868
- return (0, smithy_client_1.take)(output, {
869
- plan: (_) => de_Plan(_, context),
870
- });
871
- };
872
- const de_Workflow = (output, context) => {
873
- return (0, smithy_client_1.take)(output, {
874
- steps: (_) => de_Steps(_, context),
875
- workflowDescription: smithy_client_1.expectString,
876
- workflowTargetAction: smithy_client_1.expectString,
877
- workflowTargetRegion: smithy_client_1.expectString,
878
- });
879
- };
880
- const de_WorkflowList = (output, context) => {
881
- const retVal = (output || [])
882
- .filter((e) => e != null)
883
- .map((entry) => {
884
- return de_Workflow(entry, context);
885
- });
886
- return retVal;
887
- };
888
- const deserializeMetadata = (output) => ({
889
- httpStatusCode: output.statusCode,
890
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
891
- extendedRequestId: output.headers["x-amz-id-2"],
892
- cfId: output.headers["x-amz-cf-id"],
893
- });
894
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
895
- const throwDefaultError = (0, smithy_client_1.withBaseException)(ARCRegionSwitchServiceException_1.ARCRegionSwitchServiceException);
896
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
897
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
898
- const contents = {
899
- protocol,
900
- hostname,
901
- port,
902
- method: "POST",
903
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
904
- headers,
905
- };
906
- if (resolvedHostname !== undefined) {
907
- contents.hostname = resolvedHostname;
908
- }
909
- if (body !== undefined) {
910
- contents.body = body;
911
- }
912
- return new protocol_http_1.HttpRequest(contents);
913
- };
914
- function sharedHeaders(operation) {
915
- return {
916
- "content-type": "application/x-amz-json-1.0",
917
- "x-amz-target": `ArcRegionSwitch.${operation}`,
918
- };
919
- }