@aws-sdk/client-cloudcontrol 3.310.0 → 3.315.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/protocols/Aws_json1_0.js +110 -334
- package/dist-es/protocols/Aws_json1_0.js +111 -335
- package/package.json +6 -6
|
@@ -7,80 +7,56 @@ const uuid_1 = require("uuid");
|
|
|
7
7
|
const CloudControlServiceException_1 = require("../models/CloudControlServiceException");
|
|
8
8
|
const models_0_1 = require("../models/models_0");
|
|
9
9
|
const se_CancelResourceRequestCommand = async (input, context) => {
|
|
10
|
-
const headers =
|
|
11
|
-
"content-type": "application/x-amz-json-1.0",
|
|
12
|
-
"x-amz-target": "CloudApiService.CancelResourceRequest",
|
|
13
|
-
};
|
|
10
|
+
const headers = sharedHeaders("CancelResourceRequest");
|
|
14
11
|
let body;
|
|
15
|
-
body = JSON.stringify(
|
|
12
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
16
13
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
17
14
|
};
|
|
18
15
|
exports.se_CancelResourceRequestCommand = se_CancelResourceRequestCommand;
|
|
19
16
|
const se_CreateResourceCommand = async (input, context) => {
|
|
20
|
-
const headers =
|
|
21
|
-
"content-type": "application/x-amz-json-1.0",
|
|
22
|
-
"x-amz-target": "CloudApiService.CreateResource",
|
|
23
|
-
};
|
|
17
|
+
const headers = sharedHeaders("CreateResource");
|
|
24
18
|
let body;
|
|
25
19
|
body = JSON.stringify(se_CreateResourceInput(input, context));
|
|
26
20
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
27
21
|
};
|
|
28
22
|
exports.se_CreateResourceCommand = se_CreateResourceCommand;
|
|
29
23
|
const se_DeleteResourceCommand = async (input, context) => {
|
|
30
|
-
const headers =
|
|
31
|
-
"content-type": "application/x-amz-json-1.0",
|
|
32
|
-
"x-amz-target": "CloudApiService.DeleteResource",
|
|
33
|
-
};
|
|
24
|
+
const headers = sharedHeaders("DeleteResource");
|
|
34
25
|
let body;
|
|
35
26
|
body = JSON.stringify(se_DeleteResourceInput(input, context));
|
|
36
27
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
37
28
|
};
|
|
38
29
|
exports.se_DeleteResourceCommand = se_DeleteResourceCommand;
|
|
39
30
|
const se_GetResourceCommand = async (input, context) => {
|
|
40
|
-
const headers =
|
|
41
|
-
"content-type": "application/x-amz-json-1.0",
|
|
42
|
-
"x-amz-target": "CloudApiService.GetResource",
|
|
43
|
-
};
|
|
31
|
+
const headers = sharedHeaders("GetResource");
|
|
44
32
|
let body;
|
|
45
|
-
body = JSON.stringify(
|
|
33
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
46
34
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
47
35
|
};
|
|
48
36
|
exports.se_GetResourceCommand = se_GetResourceCommand;
|
|
49
37
|
const se_GetResourceRequestStatusCommand = async (input, context) => {
|
|
50
|
-
const headers =
|
|
51
|
-
"content-type": "application/x-amz-json-1.0",
|
|
52
|
-
"x-amz-target": "CloudApiService.GetResourceRequestStatus",
|
|
53
|
-
};
|
|
38
|
+
const headers = sharedHeaders("GetResourceRequestStatus");
|
|
54
39
|
let body;
|
|
55
|
-
body = JSON.stringify(
|
|
40
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
56
41
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
57
42
|
};
|
|
58
43
|
exports.se_GetResourceRequestStatusCommand = se_GetResourceRequestStatusCommand;
|
|
59
44
|
const se_ListResourceRequestsCommand = async (input, context) => {
|
|
60
|
-
const headers =
|
|
61
|
-
"content-type": "application/x-amz-json-1.0",
|
|
62
|
-
"x-amz-target": "CloudApiService.ListResourceRequests",
|
|
63
|
-
};
|
|
45
|
+
const headers = sharedHeaders("ListResourceRequests");
|
|
64
46
|
let body;
|
|
65
|
-
body = JSON.stringify(
|
|
47
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
66
48
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
67
49
|
};
|
|
68
50
|
exports.se_ListResourceRequestsCommand = se_ListResourceRequestsCommand;
|
|
69
51
|
const se_ListResourcesCommand = async (input, context) => {
|
|
70
|
-
const headers =
|
|
71
|
-
"content-type": "application/x-amz-json-1.0",
|
|
72
|
-
"x-amz-target": "CloudApiService.ListResources",
|
|
73
|
-
};
|
|
52
|
+
const headers = sharedHeaders("ListResources");
|
|
74
53
|
let body;
|
|
75
|
-
body = JSON.stringify(
|
|
54
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
76
55
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
77
56
|
};
|
|
78
57
|
exports.se_ListResourcesCommand = se_ListResourcesCommand;
|
|
79
58
|
const se_UpdateResourceCommand = async (input, context) => {
|
|
80
|
-
const headers =
|
|
81
|
-
"content-type": "application/x-amz-json-1.0",
|
|
82
|
-
"x-amz-target": "CloudApiService.UpdateResource",
|
|
83
|
-
};
|
|
59
|
+
const headers = sharedHeaders("UpdateResource");
|
|
84
60
|
let body;
|
|
85
61
|
body = JSON.stringify(se_UpdateResourceInput(input, context));
|
|
86
62
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
@@ -97,7 +73,7 @@ const de_CancelResourceRequestCommand = async (output, context) => {
|
|
|
97
73
|
$metadata: deserializeMetadata(output),
|
|
98
74
|
...contents,
|
|
99
75
|
};
|
|
100
|
-
return
|
|
76
|
+
return response;
|
|
101
77
|
};
|
|
102
78
|
exports.de_CancelResourceRequestCommand = de_CancelResourceRequestCommand;
|
|
103
79
|
const de_CancelResourceRequestCommandError = async (output, context) => {
|
|
@@ -115,10 +91,9 @@ const de_CancelResourceRequestCommandError = async (output, context) => {
|
|
|
115
91
|
throw await de_RequestTokenNotFoundExceptionRes(parsedOutput, context);
|
|
116
92
|
default:
|
|
117
93
|
const parsedBody = parsedOutput.body;
|
|
118
|
-
|
|
94
|
+
return throwDefaultError({
|
|
119
95
|
output,
|
|
120
96
|
parsedBody,
|
|
121
|
-
exceptionCtor: CloudControlServiceException_1.CloudControlServiceException,
|
|
122
97
|
errorCode,
|
|
123
98
|
});
|
|
124
99
|
}
|
|
@@ -134,7 +109,7 @@ const de_CreateResourceCommand = async (output, context) => {
|
|
|
134
109
|
$metadata: deserializeMetadata(output),
|
|
135
110
|
...contents,
|
|
136
111
|
};
|
|
137
|
-
return
|
|
112
|
+
return response;
|
|
138
113
|
};
|
|
139
114
|
exports.de_CreateResourceCommand = de_CreateResourceCommand;
|
|
140
115
|
const de_CreateResourceCommandError = async (output, context) => {
|
|
@@ -203,10 +178,9 @@ const de_CreateResourceCommandError = async (output, context) => {
|
|
|
203
178
|
throw await de_UnsupportedActionExceptionRes(parsedOutput, context);
|
|
204
179
|
default:
|
|
205
180
|
const parsedBody = parsedOutput.body;
|
|
206
|
-
|
|
181
|
+
return throwDefaultError({
|
|
207
182
|
output,
|
|
208
183
|
parsedBody,
|
|
209
|
-
exceptionCtor: CloudControlServiceException_1.CloudControlServiceException,
|
|
210
184
|
errorCode,
|
|
211
185
|
});
|
|
212
186
|
}
|
|
@@ -222,7 +196,7 @@ const de_DeleteResourceCommand = async (output, context) => {
|
|
|
222
196
|
$metadata: deserializeMetadata(output),
|
|
223
197
|
...contents,
|
|
224
198
|
};
|
|
225
|
-
return
|
|
199
|
+
return response;
|
|
226
200
|
};
|
|
227
201
|
exports.de_DeleteResourceCommand = de_DeleteResourceCommand;
|
|
228
202
|
const de_DeleteResourceCommandError = async (output, context) => {
|
|
@@ -291,10 +265,9 @@ const de_DeleteResourceCommandError = async (output, context) => {
|
|
|
291
265
|
throw await de_UnsupportedActionExceptionRes(parsedOutput, context);
|
|
292
266
|
default:
|
|
293
267
|
const parsedBody = parsedOutput.body;
|
|
294
|
-
|
|
268
|
+
return throwDefaultError({
|
|
295
269
|
output,
|
|
296
270
|
parsedBody,
|
|
297
|
-
exceptionCtor: CloudControlServiceException_1.CloudControlServiceException,
|
|
298
271
|
errorCode,
|
|
299
272
|
});
|
|
300
273
|
}
|
|
@@ -305,12 +278,12 @@ const de_GetResourceCommand = async (output, context) => {
|
|
|
305
278
|
}
|
|
306
279
|
const data = await parseBody(output.body, context);
|
|
307
280
|
let contents = {};
|
|
308
|
-
contents =
|
|
281
|
+
contents = (0, smithy_client_1._json)(data);
|
|
309
282
|
const response = {
|
|
310
283
|
$metadata: deserializeMetadata(output),
|
|
311
284
|
...contents,
|
|
312
285
|
};
|
|
313
|
-
return
|
|
286
|
+
return response;
|
|
314
287
|
};
|
|
315
288
|
exports.de_GetResourceCommand = de_GetResourceCommand;
|
|
316
289
|
const de_GetResourceCommandError = async (output, context) => {
|
|
@@ -373,10 +346,9 @@ const de_GetResourceCommandError = async (output, context) => {
|
|
|
373
346
|
throw await de_UnsupportedActionExceptionRes(parsedOutput, context);
|
|
374
347
|
default:
|
|
375
348
|
const parsedBody = parsedOutput.body;
|
|
376
|
-
|
|
349
|
+
return throwDefaultError({
|
|
377
350
|
output,
|
|
378
351
|
parsedBody,
|
|
379
|
-
exceptionCtor: CloudControlServiceException_1.CloudControlServiceException,
|
|
380
352
|
errorCode,
|
|
381
353
|
});
|
|
382
354
|
}
|
|
@@ -392,7 +364,7 @@ const de_GetResourceRequestStatusCommand = async (output, context) => {
|
|
|
392
364
|
$metadata: deserializeMetadata(output),
|
|
393
365
|
...contents,
|
|
394
366
|
};
|
|
395
|
-
return
|
|
367
|
+
return response;
|
|
396
368
|
};
|
|
397
369
|
exports.de_GetResourceRequestStatusCommand = de_GetResourceRequestStatusCommand;
|
|
398
370
|
const de_GetResourceRequestStatusCommandError = async (output, context) => {
|
|
@@ -407,10 +379,9 @@ const de_GetResourceRequestStatusCommandError = async (output, context) => {
|
|
|
407
379
|
throw await de_RequestTokenNotFoundExceptionRes(parsedOutput, context);
|
|
408
380
|
default:
|
|
409
381
|
const parsedBody = parsedOutput.body;
|
|
410
|
-
|
|
382
|
+
return throwDefaultError({
|
|
411
383
|
output,
|
|
412
384
|
parsedBody,
|
|
413
|
-
exceptionCtor: CloudControlServiceException_1.CloudControlServiceException,
|
|
414
385
|
errorCode,
|
|
415
386
|
});
|
|
416
387
|
}
|
|
@@ -426,7 +397,7 @@ const de_ListResourceRequestsCommand = async (output, context) => {
|
|
|
426
397
|
$metadata: deserializeMetadata(output),
|
|
427
398
|
...contents,
|
|
428
399
|
};
|
|
429
|
-
return
|
|
400
|
+
return response;
|
|
430
401
|
};
|
|
431
402
|
exports.de_ListResourceRequestsCommand = de_ListResourceRequestsCommand;
|
|
432
403
|
const de_ListResourceRequestsCommandError = async (output, context) => {
|
|
@@ -436,10 +407,9 @@ const de_ListResourceRequestsCommandError = async (output, context) => {
|
|
|
436
407
|
};
|
|
437
408
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
438
409
|
const parsedBody = parsedOutput.body;
|
|
439
|
-
|
|
410
|
+
return throwDefaultError({
|
|
440
411
|
output,
|
|
441
412
|
parsedBody,
|
|
442
|
-
exceptionCtor: CloudControlServiceException_1.CloudControlServiceException,
|
|
443
413
|
errorCode,
|
|
444
414
|
});
|
|
445
415
|
};
|
|
@@ -449,12 +419,12 @@ const de_ListResourcesCommand = async (output, context) => {
|
|
|
449
419
|
}
|
|
450
420
|
const data = await parseBody(output.body, context);
|
|
451
421
|
let contents = {};
|
|
452
|
-
contents =
|
|
422
|
+
contents = (0, smithy_client_1._json)(data);
|
|
453
423
|
const response = {
|
|
454
424
|
$metadata: deserializeMetadata(output),
|
|
455
425
|
...contents,
|
|
456
426
|
};
|
|
457
|
-
return
|
|
427
|
+
return response;
|
|
458
428
|
};
|
|
459
429
|
exports.de_ListResourcesCommand = de_ListResourcesCommand;
|
|
460
430
|
const de_ListResourcesCommandError = async (output, context) => {
|
|
@@ -517,10 +487,9 @@ const de_ListResourcesCommandError = async (output, context) => {
|
|
|
517
487
|
throw await de_UnsupportedActionExceptionRes(parsedOutput, context);
|
|
518
488
|
default:
|
|
519
489
|
const parsedBody = parsedOutput.body;
|
|
520
|
-
|
|
490
|
+
return throwDefaultError({
|
|
521
491
|
output,
|
|
522
492
|
parsedBody,
|
|
523
|
-
exceptionCtor: CloudControlServiceException_1.CloudControlServiceException,
|
|
524
493
|
errorCode,
|
|
525
494
|
});
|
|
526
495
|
}
|
|
@@ -536,7 +505,7 @@ const de_UpdateResourceCommand = async (output, context) => {
|
|
|
536
505
|
$metadata: deserializeMetadata(output),
|
|
537
506
|
...contents,
|
|
538
507
|
};
|
|
539
|
-
return
|
|
508
|
+
return response;
|
|
540
509
|
};
|
|
541
510
|
exports.de_UpdateResourceCommand = de_UpdateResourceCommand;
|
|
542
511
|
const de_UpdateResourceCommandError = async (output, context) => {
|
|
@@ -605,17 +574,16 @@ const de_UpdateResourceCommandError = async (output, context) => {
|
|
|
605
574
|
throw await de_UnsupportedActionExceptionRes(parsedOutput, context);
|
|
606
575
|
default:
|
|
607
576
|
const parsedBody = parsedOutput.body;
|
|
608
|
-
|
|
577
|
+
return throwDefaultError({
|
|
609
578
|
output,
|
|
610
579
|
parsedBody,
|
|
611
|
-
exceptionCtor: CloudControlServiceException_1.CloudControlServiceException,
|
|
612
580
|
errorCode,
|
|
613
581
|
});
|
|
614
582
|
}
|
|
615
583
|
};
|
|
616
584
|
const de_AlreadyExistsExceptionRes = async (parsedOutput, context) => {
|
|
617
585
|
const body = parsedOutput.body;
|
|
618
|
-
const deserialized =
|
|
586
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
619
587
|
const exception = new models_0_1.AlreadyExistsException({
|
|
620
588
|
$metadata: deserializeMetadata(parsedOutput),
|
|
621
589
|
...deserialized,
|
|
@@ -624,7 +592,7 @@ const de_AlreadyExistsExceptionRes = async (parsedOutput, context) => {
|
|
|
624
592
|
};
|
|
625
593
|
const de_ClientTokenConflictExceptionRes = async (parsedOutput, context) => {
|
|
626
594
|
const body = parsedOutput.body;
|
|
627
|
-
const deserialized =
|
|
595
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
628
596
|
const exception = new models_0_1.ClientTokenConflictException({
|
|
629
597
|
$metadata: deserializeMetadata(parsedOutput),
|
|
630
598
|
...deserialized,
|
|
@@ -633,7 +601,7 @@ const de_ClientTokenConflictExceptionRes = async (parsedOutput, context) => {
|
|
|
633
601
|
};
|
|
634
602
|
const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
|
|
635
603
|
const body = parsedOutput.body;
|
|
636
|
-
const deserialized =
|
|
604
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
637
605
|
const exception = new models_0_1.ConcurrentModificationException({
|
|
638
606
|
$metadata: deserializeMetadata(parsedOutput),
|
|
639
607
|
...deserialized,
|
|
@@ -642,7 +610,7 @@ const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
|
|
|
642
610
|
};
|
|
643
611
|
const de_ConcurrentOperationExceptionRes = async (parsedOutput, context) => {
|
|
644
612
|
const body = parsedOutput.body;
|
|
645
|
-
const deserialized =
|
|
613
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
646
614
|
const exception = new models_0_1.ConcurrentOperationException({
|
|
647
615
|
$metadata: deserializeMetadata(parsedOutput),
|
|
648
616
|
...deserialized,
|
|
@@ -651,7 +619,7 @@ const de_ConcurrentOperationExceptionRes = async (parsedOutput, context) => {
|
|
|
651
619
|
};
|
|
652
620
|
const de_GeneralServiceExceptionRes = async (parsedOutput, context) => {
|
|
653
621
|
const body = parsedOutput.body;
|
|
654
|
-
const deserialized =
|
|
622
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
655
623
|
const exception = new models_0_1.GeneralServiceException({
|
|
656
624
|
$metadata: deserializeMetadata(parsedOutput),
|
|
657
625
|
...deserialized,
|
|
@@ -660,7 +628,7 @@ const de_GeneralServiceExceptionRes = async (parsedOutput, context) => {
|
|
|
660
628
|
};
|
|
661
629
|
const de_HandlerFailureExceptionRes = async (parsedOutput, context) => {
|
|
662
630
|
const body = parsedOutput.body;
|
|
663
|
-
const deserialized =
|
|
631
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
664
632
|
const exception = new models_0_1.HandlerFailureException({
|
|
665
633
|
$metadata: deserializeMetadata(parsedOutput),
|
|
666
634
|
...deserialized,
|
|
@@ -669,7 +637,7 @@ const de_HandlerFailureExceptionRes = async (parsedOutput, context) => {
|
|
|
669
637
|
};
|
|
670
638
|
const de_HandlerInternalFailureExceptionRes = async (parsedOutput, context) => {
|
|
671
639
|
const body = parsedOutput.body;
|
|
672
|
-
const deserialized =
|
|
640
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
673
641
|
const exception = new models_0_1.HandlerInternalFailureException({
|
|
674
642
|
$metadata: deserializeMetadata(parsedOutput),
|
|
675
643
|
...deserialized,
|
|
@@ -678,7 +646,7 @@ const de_HandlerInternalFailureExceptionRes = async (parsedOutput, context) => {
|
|
|
678
646
|
};
|
|
679
647
|
const de_InvalidCredentialsExceptionRes = async (parsedOutput, context) => {
|
|
680
648
|
const body = parsedOutput.body;
|
|
681
|
-
const deserialized =
|
|
649
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
682
650
|
const exception = new models_0_1.InvalidCredentialsException({
|
|
683
651
|
$metadata: deserializeMetadata(parsedOutput),
|
|
684
652
|
...deserialized,
|
|
@@ -687,7 +655,7 @@ const de_InvalidCredentialsExceptionRes = async (parsedOutput, context) => {
|
|
|
687
655
|
};
|
|
688
656
|
const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
689
657
|
const body = parsedOutput.body;
|
|
690
|
-
const deserialized =
|
|
658
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
691
659
|
const exception = new models_0_1.InvalidRequestException({
|
|
692
660
|
$metadata: deserializeMetadata(parsedOutput),
|
|
693
661
|
...deserialized,
|
|
@@ -696,7 +664,7 @@ const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
|
696
664
|
};
|
|
697
665
|
const de_NetworkFailureExceptionRes = async (parsedOutput, context) => {
|
|
698
666
|
const body = parsedOutput.body;
|
|
699
|
-
const deserialized =
|
|
667
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
700
668
|
const exception = new models_0_1.NetworkFailureException({
|
|
701
669
|
$metadata: deserializeMetadata(parsedOutput),
|
|
702
670
|
...deserialized,
|
|
@@ -705,7 +673,7 @@ const de_NetworkFailureExceptionRes = async (parsedOutput, context) => {
|
|
|
705
673
|
};
|
|
706
674
|
const de_NotStabilizedExceptionRes = async (parsedOutput, context) => {
|
|
707
675
|
const body = parsedOutput.body;
|
|
708
|
-
const deserialized =
|
|
676
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
709
677
|
const exception = new models_0_1.NotStabilizedException({
|
|
710
678
|
$metadata: deserializeMetadata(parsedOutput),
|
|
711
679
|
...deserialized,
|
|
@@ -714,7 +682,7 @@ const de_NotStabilizedExceptionRes = async (parsedOutput, context) => {
|
|
|
714
682
|
};
|
|
715
683
|
const de_NotUpdatableExceptionRes = async (parsedOutput, context) => {
|
|
716
684
|
const body = parsedOutput.body;
|
|
717
|
-
const deserialized =
|
|
685
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
718
686
|
const exception = new models_0_1.NotUpdatableException({
|
|
719
687
|
$metadata: deserializeMetadata(parsedOutput),
|
|
720
688
|
...deserialized,
|
|
@@ -723,7 +691,7 @@ const de_NotUpdatableExceptionRes = async (parsedOutput, context) => {
|
|
|
723
691
|
};
|
|
724
692
|
const de_PrivateTypeExceptionRes = async (parsedOutput, context) => {
|
|
725
693
|
const body = parsedOutput.body;
|
|
726
|
-
const deserialized =
|
|
694
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
727
695
|
const exception = new models_0_1.PrivateTypeException({
|
|
728
696
|
$metadata: deserializeMetadata(parsedOutput),
|
|
729
697
|
...deserialized,
|
|
@@ -732,7 +700,7 @@ const de_PrivateTypeExceptionRes = async (parsedOutput, context) => {
|
|
|
732
700
|
};
|
|
733
701
|
const de_RequestTokenNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
734
702
|
const body = parsedOutput.body;
|
|
735
|
-
const deserialized =
|
|
703
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
736
704
|
const exception = new models_0_1.RequestTokenNotFoundException({
|
|
737
705
|
$metadata: deserializeMetadata(parsedOutput),
|
|
738
706
|
...deserialized,
|
|
@@ -741,7 +709,7 @@ const de_RequestTokenNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
741
709
|
};
|
|
742
710
|
const de_ResourceConflictExceptionRes = async (parsedOutput, context) => {
|
|
743
711
|
const body = parsedOutput.body;
|
|
744
|
-
const deserialized =
|
|
712
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
745
713
|
const exception = new models_0_1.ResourceConflictException({
|
|
746
714
|
$metadata: deserializeMetadata(parsedOutput),
|
|
747
715
|
...deserialized,
|
|
@@ -750,7 +718,7 @@ const de_ResourceConflictExceptionRes = async (parsedOutput, context) => {
|
|
|
750
718
|
};
|
|
751
719
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
752
720
|
const body = parsedOutput.body;
|
|
753
|
-
const deserialized =
|
|
721
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
754
722
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
755
723
|
$metadata: deserializeMetadata(parsedOutput),
|
|
756
724
|
...deserialized,
|
|
@@ -759,7 +727,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
759
727
|
};
|
|
760
728
|
const de_ServiceInternalErrorExceptionRes = async (parsedOutput, context) => {
|
|
761
729
|
const body = parsedOutput.body;
|
|
762
|
-
const deserialized =
|
|
730
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
763
731
|
const exception = new models_0_1.ServiceInternalErrorException({
|
|
764
732
|
$metadata: deserializeMetadata(parsedOutput),
|
|
765
733
|
...deserialized,
|
|
@@ -768,7 +736,7 @@ const de_ServiceInternalErrorExceptionRes = async (parsedOutput, context) => {
|
|
|
768
736
|
};
|
|
769
737
|
const de_ServiceLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
770
738
|
const body = parsedOutput.body;
|
|
771
|
-
const deserialized =
|
|
739
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
772
740
|
const exception = new models_0_1.ServiceLimitExceededException({
|
|
773
741
|
$metadata: deserializeMetadata(parsedOutput),
|
|
774
742
|
...deserialized,
|
|
@@ -777,7 +745,7 @@ const de_ServiceLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
777
745
|
};
|
|
778
746
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
779
747
|
const body = parsedOutput.body;
|
|
780
|
-
const deserialized =
|
|
748
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
781
749
|
const exception = new models_0_1.ThrottlingException({
|
|
782
750
|
$metadata: deserializeMetadata(parsedOutput),
|
|
783
751
|
...deserialized,
|
|
@@ -786,7 +754,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
|
786
754
|
};
|
|
787
755
|
const de_TypeNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
788
756
|
const body = parsedOutput.body;
|
|
789
|
-
const deserialized =
|
|
757
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
790
758
|
const exception = new models_0_1.TypeNotFoundException({
|
|
791
759
|
$metadata: deserializeMetadata(parsedOutput),
|
|
792
760
|
...deserialized,
|
|
@@ -795,292 +763,93 @@ const de_TypeNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
795
763
|
};
|
|
796
764
|
const de_UnsupportedActionExceptionRes = async (parsedOutput, context) => {
|
|
797
765
|
const body = parsedOutput.body;
|
|
798
|
-
const deserialized =
|
|
766
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
799
767
|
const exception = new models_0_1.UnsupportedActionException({
|
|
800
768
|
$metadata: deserializeMetadata(parsedOutput),
|
|
801
769
|
...deserialized,
|
|
802
770
|
});
|
|
803
771
|
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
804
772
|
};
|
|
805
|
-
const se_CancelResourceRequestInput = (input, context) => {
|
|
806
|
-
return {
|
|
807
|
-
...(input.RequestToken != null && { RequestToken: input.RequestToken }),
|
|
808
|
-
};
|
|
809
|
-
};
|
|
810
773
|
const se_CreateResourceInput = (input, context) => {
|
|
811
|
-
return {
|
|
812
|
-
ClientToken:
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
};
|
|
818
|
-
};
|
|
819
|
-
const se_DeleteResourceInput = (input, context) => {
|
|
820
|
-
return {
|
|
821
|
-
ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
|
|
822
|
-
...(input.Identifier != null && { Identifier: input.Identifier }),
|
|
823
|
-
...(input.RoleArn != null && { RoleArn: input.RoleArn }),
|
|
824
|
-
...(input.TypeName != null && { TypeName: input.TypeName }),
|
|
825
|
-
...(input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }),
|
|
826
|
-
};
|
|
827
|
-
};
|
|
828
|
-
const se_GetResourceInput = (input, context) => {
|
|
829
|
-
return {
|
|
830
|
-
...(input.Identifier != null && { Identifier: input.Identifier }),
|
|
831
|
-
...(input.RoleArn != null && { RoleArn: input.RoleArn }),
|
|
832
|
-
...(input.TypeName != null && { TypeName: input.TypeName }),
|
|
833
|
-
...(input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }),
|
|
834
|
-
};
|
|
835
|
-
};
|
|
836
|
-
const se_GetResourceRequestStatusInput = (input, context) => {
|
|
837
|
-
return {
|
|
838
|
-
...(input.RequestToken != null && { RequestToken: input.RequestToken }),
|
|
839
|
-
};
|
|
840
|
-
};
|
|
841
|
-
const se_ListResourceRequestsInput = (input, context) => {
|
|
842
|
-
return {
|
|
843
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
844
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
845
|
-
...(input.ResourceRequestStatusFilter != null && {
|
|
846
|
-
ResourceRequestStatusFilter: se_ResourceRequestStatusFilter(input.ResourceRequestStatusFilter, context),
|
|
847
|
-
}),
|
|
848
|
-
};
|
|
849
|
-
};
|
|
850
|
-
const se_ListResourcesInput = (input, context) => {
|
|
851
|
-
return {
|
|
852
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
853
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
854
|
-
...(input.ResourceModel != null && { ResourceModel: input.ResourceModel }),
|
|
855
|
-
...(input.RoleArn != null && { RoleArn: input.RoleArn }),
|
|
856
|
-
...(input.TypeName != null && { TypeName: input.TypeName }),
|
|
857
|
-
...(input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }),
|
|
858
|
-
};
|
|
859
|
-
};
|
|
860
|
-
const se_Operations = (input, context) => {
|
|
861
|
-
return input
|
|
862
|
-
.filter((e) => e != null)
|
|
863
|
-
.map((entry) => {
|
|
864
|
-
return entry;
|
|
774
|
+
return (0, smithy_client_1.take)(input, {
|
|
775
|
+
ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
|
|
776
|
+
DesiredState: [],
|
|
777
|
+
RoleArn: [],
|
|
778
|
+
TypeName: [],
|
|
779
|
+
TypeVersionId: [],
|
|
865
780
|
});
|
|
866
781
|
};
|
|
867
|
-
const
|
|
868
|
-
return input
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
782
|
+
const se_DeleteResourceInput = (input, context) => {
|
|
783
|
+
return (0, smithy_client_1.take)(input, {
|
|
784
|
+
ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
|
|
785
|
+
Identifier: [],
|
|
786
|
+
RoleArn: [],
|
|
787
|
+
TypeName: [],
|
|
788
|
+
TypeVersionId: [],
|
|
872
789
|
});
|
|
873
790
|
};
|
|
874
|
-
const se_ResourceRequestStatusFilter = (input, context) => {
|
|
875
|
-
return {
|
|
876
|
-
...(input.OperationStatuses != null && {
|
|
877
|
-
OperationStatuses: se_OperationStatuses(input.OperationStatuses, context),
|
|
878
|
-
}),
|
|
879
|
-
...(input.Operations != null && { Operations: se_Operations(input.Operations, context) }),
|
|
880
|
-
};
|
|
881
|
-
};
|
|
882
791
|
const se_UpdateResourceInput = (input, context) => {
|
|
883
|
-
return {
|
|
884
|
-
ClientToken:
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
};
|
|
891
|
-
};
|
|
892
|
-
const de_AlreadyExistsException = (output, context) => {
|
|
893
|
-
return {
|
|
894
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
895
|
-
};
|
|
792
|
+
return (0, smithy_client_1.take)(input, {
|
|
793
|
+
ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
|
|
794
|
+
Identifier: [],
|
|
795
|
+
PatchDocument: [],
|
|
796
|
+
RoleArn: [],
|
|
797
|
+
TypeName: [],
|
|
798
|
+
TypeVersionId: [],
|
|
799
|
+
});
|
|
896
800
|
};
|
|
897
801
|
const de_CancelResourceRequestOutput = (output, context) => {
|
|
898
|
-
return {
|
|
899
|
-
ProgressEvent:
|
|
900
|
-
};
|
|
901
|
-
};
|
|
902
|
-
const de_ClientTokenConflictException = (output, context) => {
|
|
903
|
-
return {
|
|
904
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
905
|
-
};
|
|
906
|
-
};
|
|
907
|
-
const de_ConcurrentModificationException = (output, context) => {
|
|
908
|
-
return {
|
|
909
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
910
|
-
};
|
|
911
|
-
};
|
|
912
|
-
const de_ConcurrentOperationException = (output, context) => {
|
|
913
|
-
return {
|
|
914
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
915
|
-
};
|
|
802
|
+
return (0, smithy_client_1.take)(output, {
|
|
803
|
+
ProgressEvent: (_) => de_ProgressEvent(_, context),
|
|
804
|
+
});
|
|
916
805
|
};
|
|
917
806
|
const de_CreateResourceOutput = (output, context) => {
|
|
918
|
-
return {
|
|
919
|
-
ProgressEvent:
|
|
920
|
-
};
|
|
807
|
+
return (0, smithy_client_1.take)(output, {
|
|
808
|
+
ProgressEvent: (_) => de_ProgressEvent(_, context),
|
|
809
|
+
});
|
|
921
810
|
};
|
|
922
811
|
const de_DeleteResourceOutput = (output, context) => {
|
|
923
|
-
return {
|
|
924
|
-
ProgressEvent:
|
|
925
|
-
};
|
|
926
|
-
};
|
|
927
|
-
const de_GeneralServiceException = (output, context) => {
|
|
928
|
-
return {
|
|
929
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
930
|
-
};
|
|
931
|
-
};
|
|
932
|
-
const de_GetResourceOutput = (output, context) => {
|
|
933
|
-
return {
|
|
934
|
-
ResourceDescription: output.ResourceDescription != null ? de_ResourceDescription(output.ResourceDescription, context) : undefined,
|
|
935
|
-
TypeName: (0, smithy_client_1.expectString)(output.TypeName),
|
|
936
|
-
};
|
|
812
|
+
return (0, smithy_client_1.take)(output, {
|
|
813
|
+
ProgressEvent: (_) => de_ProgressEvent(_, context),
|
|
814
|
+
});
|
|
937
815
|
};
|
|
938
816
|
const de_GetResourceRequestStatusOutput = (output, context) => {
|
|
939
|
-
return {
|
|
940
|
-
ProgressEvent:
|
|
941
|
-
};
|
|
942
|
-
};
|
|
943
|
-
const de_HandlerFailureException = (output, context) => {
|
|
944
|
-
return {
|
|
945
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
946
|
-
};
|
|
947
|
-
};
|
|
948
|
-
const de_HandlerInternalFailureException = (output, context) => {
|
|
949
|
-
return {
|
|
950
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
951
|
-
};
|
|
952
|
-
};
|
|
953
|
-
const de_InvalidCredentialsException = (output, context) => {
|
|
954
|
-
return {
|
|
955
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
956
|
-
};
|
|
957
|
-
};
|
|
958
|
-
const de_InvalidRequestException = (output, context) => {
|
|
959
|
-
return {
|
|
960
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
961
|
-
};
|
|
817
|
+
return (0, smithy_client_1.take)(output, {
|
|
818
|
+
ProgressEvent: (_) => de_ProgressEvent(_, context),
|
|
819
|
+
});
|
|
962
820
|
};
|
|
963
821
|
const de_ListResourceRequestsOutput = (output, context) => {
|
|
964
|
-
return {
|
|
965
|
-
NextToken:
|
|
966
|
-
ResourceRequestStatusSummaries:
|
|
967
|
-
|
|
968
|
-
: undefined,
|
|
969
|
-
};
|
|
970
|
-
};
|
|
971
|
-
const de_ListResourcesOutput = (output, context) => {
|
|
972
|
-
return {
|
|
973
|
-
NextToken: (0, smithy_client_1.expectString)(output.NextToken),
|
|
974
|
-
ResourceDescriptions: output.ResourceDescriptions != null ? de_ResourceDescriptions(output.ResourceDescriptions, context) : undefined,
|
|
975
|
-
TypeName: (0, smithy_client_1.expectString)(output.TypeName),
|
|
976
|
-
};
|
|
977
|
-
};
|
|
978
|
-
const de_NetworkFailureException = (output, context) => {
|
|
979
|
-
return {
|
|
980
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
981
|
-
};
|
|
982
|
-
};
|
|
983
|
-
const de_NotStabilizedException = (output, context) => {
|
|
984
|
-
return {
|
|
985
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
986
|
-
};
|
|
987
|
-
};
|
|
988
|
-
const de_NotUpdatableException = (output, context) => {
|
|
989
|
-
return {
|
|
990
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
991
|
-
};
|
|
992
|
-
};
|
|
993
|
-
const de_PrivateTypeException = (output, context) => {
|
|
994
|
-
return {
|
|
995
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
996
|
-
};
|
|
822
|
+
return (0, smithy_client_1.take)(output, {
|
|
823
|
+
NextToken: smithy_client_1.expectString,
|
|
824
|
+
ResourceRequestStatusSummaries: (_) => de_ResourceRequestStatusSummaries(_, context),
|
|
825
|
+
});
|
|
997
826
|
};
|
|
998
827
|
const de_ProgressEvent = (output, context) => {
|
|
999
|
-
return {
|
|
1000
|
-
ErrorCode:
|
|
1001
|
-
EventTime:
|
|
1002
|
-
Identifier:
|
|
1003
|
-
Operation:
|
|
1004
|
-
OperationStatus:
|
|
1005
|
-
RequestToken:
|
|
1006
|
-
ResourceModel:
|
|
1007
|
-
RetryAfter:
|
|
1008
|
-
StatusMessage:
|
|
1009
|
-
TypeName:
|
|
1010
|
-
};
|
|
1011
|
-
};
|
|
1012
|
-
const de_RequestTokenNotFoundException = (output, context) => {
|
|
1013
|
-
return {
|
|
1014
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1015
|
-
};
|
|
1016
|
-
};
|
|
1017
|
-
const de_ResourceConflictException = (output, context) => {
|
|
1018
|
-
return {
|
|
1019
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1020
|
-
};
|
|
1021
|
-
};
|
|
1022
|
-
const de_ResourceDescription = (output, context) => {
|
|
1023
|
-
return {
|
|
1024
|
-
Identifier: (0, smithy_client_1.expectString)(output.Identifier),
|
|
1025
|
-
Properties: (0, smithy_client_1.expectString)(output.Properties),
|
|
1026
|
-
};
|
|
1027
|
-
};
|
|
1028
|
-
const de_ResourceDescriptions = (output, context) => {
|
|
1029
|
-
const retVal = (output || [])
|
|
1030
|
-
.filter((e) => e != null)
|
|
1031
|
-
.map((entry) => {
|
|
1032
|
-
if (entry === null) {
|
|
1033
|
-
return null;
|
|
1034
|
-
}
|
|
1035
|
-
return de_ResourceDescription(entry, context);
|
|
828
|
+
return (0, smithy_client_1.take)(output, {
|
|
829
|
+
ErrorCode: smithy_client_1.expectString,
|
|
830
|
+
EventTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
831
|
+
Identifier: smithy_client_1.expectString,
|
|
832
|
+
Operation: smithy_client_1.expectString,
|
|
833
|
+
OperationStatus: smithy_client_1.expectString,
|
|
834
|
+
RequestToken: smithy_client_1.expectString,
|
|
835
|
+
ResourceModel: smithy_client_1.expectString,
|
|
836
|
+
RetryAfter: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
837
|
+
StatusMessage: smithy_client_1.expectString,
|
|
838
|
+
TypeName: smithy_client_1.expectString,
|
|
1036
839
|
});
|
|
1037
|
-
return retVal;
|
|
1038
|
-
};
|
|
1039
|
-
const de_ResourceNotFoundException = (output, context) => {
|
|
1040
|
-
return {
|
|
1041
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1042
|
-
};
|
|
1043
840
|
};
|
|
1044
841
|
const de_ResourceRequestStatusSummaries = (output, context) => {
|
|
1045
842
|
const retVal = (output || [])
|
|
1046
843
|
.filter((e) => e != null)
|
|
1047
844
|
.map((entry) => {
|
|
1048
|
-
if (entry === null) {
|
|
1049
|
-
return null;
|
|
1050
|
-
}
|
|
1051
845
|
return de_ProgressEvent(entry, context);
|
|
1052
846
|
});
|
|
1053
847
|
return retVal;
|
|
1054
848
|
};
|
|
1055
|
-
const de_ServiceInternalErrorException = (output, context) => {
|
|
1056
|
-
return {
|
|
1057
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1058
|
-
};
|
|
1059
|
-
};
|
|
1060
|
-
const de_ServiceLimitExceededException = (output, context) => {
|
|
1061
|
-
return {
|
|
1062
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1063
|
-
};
|
|
1064
|
-
};
|
|
1065
|
-
const de_ThrottlingException = (output, context) => {
|
|
1066
|
-
return {
|
|
1067
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1068
|
-
};
|
|
1069
|
-
};
|
|
1070
|
-
const de_TypeNotFoundException = (output, context) => {
|
|
1071
|
-
return {
|
|
1072
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1073
|
-
};
|
|
1074
|
-
};
|
|
1075
|
-
const de_UnsupportedActionException = (output, context) => {
|
|
1076
|
-
return {
|
|
1077
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1078
|
-
};
|
|
1079
|
-
};
|
|
1080
849
|
const de_UpdateResourceOutput = (output, context) => {
|
|
1081
|
-
return {
|
|
1082
|
-
ProgressEvent:
|
|
1083
|
-
};
|
|
850
|
+
return (0, smithy_client_1.take)(output, {
|
|
851
|
+
ProgressEvent: (_) => de_ProgressEvent(_, context),
|
|
852
|
+
});
|
|
1084
853
|
};
|
|
1085
854
|
const deserializeMetadata = (output) => ({
|
|
1086
855
|
httpStatusCode: output.statusCode,
|
|
@@ -1095,6 +864,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
|
1095
864
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1096
865
|
};
|
|
1097
866
|
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
867
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(CloudControlServiceException_1.CloudControlServiceException);
|
|
1098
868
|
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
1099
869
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1100
870
|
const contents = {
|
|
@@ -1113,6 +883,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
|
|
|
1113
883
|
}
|
|
1114
884
|
return new protocol_http_1.HttpRequest(contents);
|
|
1115
885
|
};
|
|
886
|
+
function sharedHeaders(operation) {
|
|
887
|
+
return {
|
|
888
|
+
"content-type": "application/x-amz-json-1.0",
|
|
889
|
+
"x-amz-target": `CloudApiService.${operation}`,
|
|
890
|
+
};
|
|
891
|
+
}
|
|
1116
892
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1117
893
|
if (encoded.length) {
|
|
1118
894
|
return JSON.parse(encoded);
|