@aws-sdk/client-cloudhsm-v2 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_1.js +142 -487
- package/dist-es/protocols/Aws_json1_1.js +143 -488
- package/package.json +6 -6
|
@@ -6,152 +6,107 @@ const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
|
6
6
|
const CloudHSMV2ServiceException_1 = require("../models/CloudHSMV2ServiceException");
|
|
7
7
|
const models_0_1 = require("../models/models_0");
|
|
8
8
|
const se_CopyBackupToRegionCommand = async (input, context) => {
|
|
9
|
-
const headers =
|
|
10
|
-
"content-type": "application/x-amz-json-1.1",
|
|
11
|
-
"x-amz-target": "BaldrApiService.CopyBackupToRegion",
|
|
12
|
-
};
|
|
9
|
+
const headers = sharedHeaders("CopyBackupToRegion");
|
|
13
10
|
let body;
|
|
14
|
-
body = JSON.stringify(
|
|
11
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
15
12
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
16
13
|
};
|
|
17
14
|
exports.se_CopyBackupToRegionCommand = se_CopyBackupToRegionCommand;
|
|
18
15
|
const se_CreateClusterCommand = async (input, context) => {
|
|
19
|
-
const headers =
|
|
20
|
-
"content-type": "application/x-amz-json-1.1",
|
|
21
|
-
"x-amz-target": "BaldrApiService.CreateCluster",
|
|
22
|
-
};
|
|
16
|
+
const headers = sharedHeaders("CreateCluster");
|
|
23
17
|
let body;
|
|
24
|
-
body = JSON.stringify(
|
|
18
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
25
19
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
26
20
|
};
|
|
27
21
|
exports.se_CreateClusterCommand = se_CreateClusterCommand;
|
|
28
22
|
const se_CreateHsmCommand = async (input, context) => {
|
|
29
|
-
const headers =
|
|
30
|
-
"content-type": "application/x-amz-json-1.1",
|
|
31
|
-
"x-amz-target": "BaldrApiService.CreateHsm",
|
|
32
|
-
};
|
|
23
|
+
const headers = sharedHeaders("CreateHsm");
|
|
33
24
|
let body;
|
|
34
|
-
body = JSON.stringify(
|
|
25
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
35
26
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
36
27
|
};
|
|
37
28
|
exports.se_CreateHsmCommand = se_CreateHsmCommand;
|
|
38
29
|
const se_DeleteBackupCommand = async (input, context) => {
|
|
39
|
-
const headers =
|
|
40
|
-
"content-type": "application/x-amz-json-1.1",
|
|
41
|
-
"x-amz-target": "BaldrApiService.DeleteBackup",
|
|
42
|
-
};
|
|
30
|
+
const headers = sharedHeaders("DeleteBackup");
|
|
43
31
|
let body;
|
|
44
|
-
body = JSON.stringify(
|
|
32
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
45
33
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
46
34
|
};
|
|
47
35
|
exports.se_DeleteBackupCommand = se_DeleteBackupCommand;
|
|
48
36
|
const se_DeleteClusterCommand = async (input, context) => {
|
|
49
|
-
const headers =
|
|
50
|
-
"content-type": "application/x-amz-json-1.1",
|
|
51
|
-
"x-amz-target": "BaldrApiService.DeleteCluster",
|
|
52
|
-
};
|
|
37
|
+
const headers = sharedHeaders("DeleteCluster");
|
|
53
38
|
let body;
|
|
54
|
-
body = JSON.stringify(
|
|
39
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
55
40
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
56
41
|
};
|
|
57
42
|
exports.se_DeleteClusterCommand = se_DeleteClusterCommand;
|
|
58
43
|
const se_DeleteHsmCommand = async (input, context) => {
|
|
59
|
-
const headers =
|
|
60
|
-
"content-type": "application/x-amz-json-1.1",
|
|
61
|
-
"x-amz-target": "BaldrApiService.DeleteHsm",
|
|
62
|
-
};
|
|
44
|
+
const headers = sharedHeaders("DeleteHsm");
|
|
63
45
|
let body;
|
|
64
|
-
body = JSON.stringify(
|
|
46
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
65
47
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
66
48
|
};
|
|
67
49
|
exports.se_DeleteHsmCommand = se_DeleteHsmCommand;
|
|
68
50
|
const se_DescribeBackupsCommand = async (input, context) => {
|
|
69
|
-
const headers =
|
|
70
|
-
"content-type": "application/x-amz-json-1.1",
|
|
71
|
-
"x-amz-target": "BaldrApiService.DescribeBackups",
|
|
72
|
-
};
|
|
51
|
+
const headers = sharedHeaders("DescribeBackups");
|
|
73
52
|
let body;
|
|
74
|
-
body = JSON.stringify(
|
|
53
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
75
54
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
76
55
|
};
|
|
77
56
|
exports.se_DescribeBackupsCommand = se_DescribeBackupsCommand;
|
|
78
57
|
const se_DescribeClustersCommand = async (input, context) => {
|
|
79
|
-
const headers =
|
|
80
|
-
"content-type": "application/x-amz-json-1.1",
|
|
81
|
-
"x-amz-target": "BaldrApiService.DescribeClusters",
|
|
82
|
-
};
|
|
58
|
+
const headers = sharedHeaders("DescribeClusters");
|
|
83
59
|
let body;
|
|
84
|
-
body = JSON.stringify(
|
|
60
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
85
61
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
86
62
|
};
|
|
87
63
|
exports.se_DescribeClustersCommand = se_DescribeClustersCommand;
|
|
88
64
|
const se_InitializeClusterCommand = async (input, context) => {
|
|
89
|
-
const headers =
|
|
90
|
-
"content-type": "application/x-amz-json-1.1",
|
|
91
|
-
"x-amz-target": "BaldrApiService.InitializeCluster",
|
|
92
|
-
};
|
|
65
|
+
const headers = sharedHeaders("InitializeCluster");
|
|
93
66
|
let body;
|
|
94
|
-
body = JSON.stringify(
|
|
67
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
95
68
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
96
69
|
};
|
|
97
70
|
exports.se_InitializeClusterCommand = se_InitializeClusterCommand;
|
|
98
71
|
const se_ListTagsCommand = async (input, context) => {
|
|
99
|
-
const headers =
|
|
100
|
-
"content-type": "application/x-amz-json-1.1",
|
|
101
|
-
"x-amz-target": "BaldrApiService.ListTags",
|
|
102
|
-
};
|
|
72
|
+
const headers = sharedHeaders("ListTags");
|
|
103
73
|
let body;
|
|
104
|
-
body = JSON.stringify(
|
|
74
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
105
75
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
106
76
|
};
|
|
107
77
|
exports.se_ListTagsCommand = se_ListTagsCommand;
|
|
108
78
|
const se_ModifyBackupAttributesCommand = async (input, context) => {
|
|
109
|
-
const headers =
|
|
110
|
-
"content-type": "application/x-amz-json-1.1",
|
|
111
|
-
"x-amz-target": "BaldrApiService.ModifyBackupAttributes",
|
|
112
|
-
};
|
|
79
|
+
const headers = sharedHeaders("ModifyBackupAttributes");
|
|
113
80
|
let body;
|
|
114
|
-
body = JSON.stringify(
|
|
81
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
115
82
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
116
83
|
};
|
|
117
84
|
exports.se_ModifyBackupAttributesCommand = se_ModifyBackupAttributesCommand;
|
|
118
85
|
const se_ModifyClusterCommand = async (input, context) => {
|
|
119
|
-
const headers =
|
|
120
|
-
"content-type": "application/x-amz-json-1.1",
|
|
121
|
-
"x-amz-target": "BaldrApiService.ModifyCluster",
|
|
122
|
-
};
|
|
86
|
+
const headers = sharedHeaders("ModifyCluster");
|
|
123
87
|
let body;
|
|
124
|
-
body = JSON.stringify(
|
|
88
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
125
89
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
126
90
|
};
|
|
127
91
|
exports.se_ModifyClusterCommand = se_ModifyClusterCommand;
|
|
128
92
|
const se_RestoreBackupCommand = async (input, context) => {
|
|
129
|
-
const headers =
|
|
130
|
-
"content-type": "application/x-amz-json-1.1",
|
|
131
|
-
"x-amz-target": "BaldrApiService.RestoreBackup",
|
|
132
|
-
};
|
|
93
|
+
const headers = sharedHeaders("RestoreBackup");
|
|
133
94
|
let body;
|
|
134
|
-
body = JSON.stringify(
|
|
95
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
135
96
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
136
97
|
};
|
|
137
98
|
exports.se_RestoreBackupCommand = se_RestoreBackupCommand;
|
|
138
99
|
const se_TagResourceCommand = async (input, context) => {
|
|
139
|
-
const headers =
|
|
140
|
-
"content-type": "application/x-amz-json-1.1",
|
|
141
|
-
"x-amz-target": "BaldrApiService.TagResource",
|
|
142
|
-
};
|
|
100
|
+
const headers = sharedHeaders("TagResource");
|
|
143
101
|
let body;
|
|
144
|
-
body = JSON.stringify(
|
|
102
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
145
103
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
146
104
|
};
|
|
147
105
|
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
148
106
|
const se_UntagResourceCommand = async (input, context) => {
|
|
149
|
-
const headers =
|
|
150
|
-
"content-type": "application/x-amz-json-1.1",
|
|
151
|
-
"x-amz-target": "BaldrApiService.UntagResource",
|
|
152
|
-
};
|
|
107
|
+
const headers = sharedHeaders("UntagResource");
|
|
153
108
|
let body;
|
|
154
|
-
body = JSON.stringify(
|
|
109
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
155
110
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
156
111
|
};
|
|
157
112
|
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
@@ -166,7 +121,7 @@ const de_CopyBackupToRegionCommand = async (output, context) => {
|
|
|
166
121
|
$metadata: deserializeMetadata(output),
|
|
167
122
|
...contents,
|
|
168
123
|
};
|
|
169
|
-
return
|
|
124
|
+
return response;
|
|
170
125
|
};
|
|
171
126
|
exports.de_CopyBackupToRegionCommand = de_CopyBackupToRegionCommand;
|
|
172
127
|
const de_CopyBackupToRegionCommandError = async (output, context) => {
|
|
@@ -196,10 +151,9 @@ const de_CopyBackupToRegionCommandError = async (output, context) => {
|
|
|
196
151
|
throw await de_CloudHsmTagExceptionRes(parsedOutput, context);
|
|
197
152
|
default:
|
|
198
153
|
const parsedBody = parsedOutput.body;
|
|
199
|
-
|
|
154
|
+
return throwDefaultError({
|
|
200
155
|
output,
|
|
201
156
|
parsedBody,
|
|
202
|
-
exceptionCtor: CloudHSMV2ServiceException_1.CloudHSMV2ServiceException,
|
|
203
157
|
errorCode,
|
|
204
158
|
});
|
|
205
159
|
}
|
|
@@ -215,7 +169,7 @@ const de_CreateClusterCommand = async (output, context) => {
|
|
|
215
169
|
$metadata: deserializeMetadata(output),
|
|
216
170
|
...contents,
|
|
217
171
|
};
|
|
218
|
-
return
|
|
172
|
+
return response;
|
|
219
173
|
};
|
|
220
174
|
exports.de_CreateClusterCommand = de_CreateClusterCommand;
|
|
221
175
|
const de_CreateClusterCommandError = async (output, context) => {
|
|
@@ -245,10 +199,9 @@ const de_CreateClusterCommandError = async (output, context) => {
|
|
|
245
199
|
throw await de_CloudHsmTagExceptionRes(parsedOutput, context);
|
|
246
200
|
default:
|
|
247
201
|
const parsedBody = parsedOutput.body;
|
|
248
|
-
|
|
202
|
+
return throwDefaultError({
|
|
249
203
|
output,
|
|
250
204
|
parsedBody,
|
|
251
|
-
exceptionCtor: CloudHSMV2ServiceException_1.CloudHSMV2ServiceException,
|
|
252
205
|
errorCode,
|
|
253
206
|
});
|
|
254
207
|
}
|
|
@@ -259,12 +212,12 @@ const de_CreateHsmCommand = async (output, context) => {
|
|
|
259
212
|
}
|
|
260
213
|
const data = await parseBody(output.body, context);
|
|
261
214
|
let contents = {};
|
|
262
|
-
contents =
|
|
215
|
+
contents = (0, smithy_client_1._json)(data);
|
|
263
216
|
const response = {
|
|
264
217
|
$metadata: deserializeMetadata(output),
|
|
265
218
|
...contents,
|
|
266
219
|
};
|
|
267
|
-
return
|
|
220
|
+
return response;
|
|
268
221
|
};
|
|
269
222
|
exports.de_CreateHsmCommand = de_CreateHsmCommand;
|
|
270
223
|
const de_CreateHsmCommandError = async (output, context) => {
|
|
@@ -291,10 +244,9 @@ const de_CreateHsmCommandError = async (output, context) => {
|
|
|
291
244
|
throw await de_CloudHsmServiceExceptionRes(parsedOutput, context);
|
|
292
245
|
default:
|
|
293
246
|
const parsedBody = parsedOutput.body;
|
|
294
|
-
|
|
247
|
+
return throwDefaultError({
|
|
295
248
|
output,
|
|
296
249
|
parsedBody,
|
|
297
|
-
exceptionCtor: CloudHSMV2ServiceException_1.CloudHSMV2ServiceException,
|
|
298
250
|
errorCode,
|
|
299
251
|
});
|
|
300
252
|
}
|
|
@@ -310,7 +262,7 @@ const de_DeleteBackupCommand = async (output, context) => {
|
|
|
310
262
|
$metadata: deserializeMetadata(output),
|
|
311
263
|
...contents,
|
|
312
264
|
};
|
|
313
|
-
return
|
|
265
|
+
return response;
|
|
314
266
|
};
|
|
315
267
|
exports.de_DeleteBackupCommand = de_DeleteBackupCommand;
|
|
316
268
|
const de_DeleteBackupCommandError = async (output, context) => {
|
|
@@ -337,10 +289,9 @@ const de_DeleteBackupCommandError = async (output, context) => {
|
|
|
337
289
|
throw await de_CloudHsmServiceExceptionRes(parsedOutput, context);
|
|
338
290
|
default:
|
|
339
291
|
const parsedBody = parsedOutput.body;
|
|
340
|
-
|
|
292
|
+
return throwDefaultError({
|
|
341
293
|
output,
|
|
342
294
|
parsedBody,
|
|
343
|
-
exceptionCtor: CloudHSMV2ServiceException_1.CloudHSMV2ServiceException,
|
|
344
295
|
errorCode,
|
|
345
296
|
});
|
|
346
297
|
}
|
|
@@ -356,7 +307,7 @@ const de_DeleteClusterCommand = async (output, context) => {
|
|
|
356
307
|
$metadata: deserializeMetadata(output),
|
|
357
308
|
...contents,
|
|
358
309
|
};
|
|
359
|
-
return
|
|
310
|
+
return response;
|
|
360
311
|
};
|
|
361
312
|
exports.de_DeleteClusterCommand = de_DeleteClusterCommand;
|
|
362
313
|
const de_DeleteClusterCommandError = async (output, context) => {
|
|
@@ -386,10 +337,9 @@ const de_DeleteClusterCommandError = async (output, context) => {
|
|
|
386
337
|
throw await de_CloudHsmTagExceptionRes(parsedOutput, context);
|
|
387
338
|
default:
|
|
388
339
|
const parsedBody = parsedOutput.body;
|
|
389
|
-
|
|
340
|
+
return throwDefaultError({
|
|
390
341
|
output,
|
|
391
342
|
parsedBody,
|
|
392
|
-
exceptionCtor: CloudHSMV2ServiceException_1.CloudHSMV2ServiceException,
|
|
393
343
|
errorCode,
|
|
394
344
|
});
|
|
395
345
|
}
|
|
@@ -400,12 +350,12 @@ const de_DeleteHsmCommand = async (output, context) => {
|
|
|
400
350
|
}
|
|
401
351
|
const data = await parseBody(output.body, context);
|
|
402
352
|
let contents = {};
|
|
403
|
-
contents =
|
|
353
|
+
contents = (0, smithy_client_1._json)(data);
|
|
404
354
|
const response = {
|
|
405
355
|
$metadata: deserializeMetadata(output),
|
|
406
356
|
...contents,
|
|
407
357
|
};
|
|
408
|
-
return
|
|
358
|
+
return response;
|
|
409
359
|
};
|
|
410
360
|
exports.de_DeleteHsmCommand = de_DeleteHsmCommand;
|
|
411
361
|
const de_DeleteHsmCommandError = async (output, context) => {
|
|
@@ -432,10 +382,9 @@ const de_DeleteHsmCommandError = async (output, context) => {
|
|
|
432
382
|
throw await de_CloudHsmServiceExceptionRes(parsedOutput, context);
|
|
433
383
|
default:
|
|
434
384
|
const parsedBody = parsedOutput.body;
|
|
435
|
-
|
|
385
|
+
return throwDefaultError({
|
|
436
386
|
output,
|
|
437
387
|
parsedBody,
|
|
438
|
-
exceptionCtor: CloudHSMV2ServiceException_1.CloudHSMV2ServiceException,
|
|
439
388
|
errorCode,
|
|
440
389
|
});
|
|
441
390
|
}
|
|
@@ -451,7 +400,7 @@ const de_DescribeBackupsCommand = async (output, context) => {
|
|
|
451
400
|
$metadata: deserializeMetadata(output),
|
|
452
401
|
...contents,
|
|
453
402
|
};
|
|
454
|
-
return
|
|
403
|
+
return response;
|
|
455
404
|
};
|
|
456
405
|
exports.de_DescribeBackupsCommand = de_DescribeBackupsCommand;
|
|
457
406
|
const de_DescribeBackupsCommandError = async (output, context) => {
|
|
@@ -481,10 +430,9 @@ const de_DescribeBackupsCommandError = async (output, context) => {
|
|
|
481
430
|
throw await de_CloudHsmTagExceptionRes(parsedOutput, context);
|
|
482
431
|
default:
|
|
483
432
|
const parsedBody = parsedOutput.body;
|
|
484
|
-
|
|
433
|
+
return throwDefaultError({
|
|
485
434
|
output,
|
|
486
435
|
parsedBody,
|
|
487
|
-
exceptionCtor: CloudHSMV2ServiceException_1.CloudHSMV2ServiceException,
|
|
488
436
|
errorCode,
|
|
489
437
|
});
|
|
490
438
|
}
|
|
@@ -500,7 +448,7 @@ const de_DescribeClustersCommand = async (output, context) => {
|
|
|
500
448
|
$metadata: deserializeMetadata(output),
|
|
501
449
|
...contents,
|
|
502
450
|
};
|
|
503
|
-
return
|
|
451
|
+
return response;
|
|
504
452
|
};
|
|
505
453
|
exports.de_DescribeClustersCommand = de_DescribeClustersCommand;
|
|
506
454
|
const de_DescribeClustersCommandError = async (output, context) => {
|
|
@@ -527,10 +475,9 @@ const de_DescribeClustersCommandError = async (output, context) => {
|
|
|
527
475
|
throw await de_CloudHsmTagExceptionRes(parsedOutput, context);
|
|
528
476
|
default:
|
|
529
477
|
const parsedBody = parsedOutput.body;
|
|
530
|
-
|
|
478
|
+
return throwDefaultError({
|
|
531
479
|
output,
|
|
532
480
|
parsedBody,
|
|
533
|
-
exceptionCtor: CloudHSMV2ServiceException_1.CloudHSMV2ServiceException,
|
|
534
481
|
errorCode,
|
|
535
482
|
});
|
|
536
483
|
}
|
|
@@ -541,12 +488,12 @@ const de_InitializeClusterCommand = async (output, context) => {
|
|
|
541
488
|
}
|
|
542
489
|
const data = await parseBody(output.body, context);
|
|
543
490
|
let contents = {};
|
|
544
|
-
contents =
|
|
491
|
+
contents = (0, smithy_client_1._json)(data);
|
|
545
492
|
const response = {
|
|
546
493
|
$metadata: deserializeMetadata(output),
|
|
547
494
|
...contents,
|
|
548
495
|
};
|
|
549
|
-
return
|
|
496
|
+
return response;
|
|
550
497
|
};
|
|
551
498
|
exports.de_InitializeClusterCommand = de_InitializeClusterCommand;
|
|
552
499
|
const de_InitializeClusterCommandError = async (output, context) => {
|
|
@@ -573,10 +520,9 @@ const de_InitializeClusterCommandError = async (output, context) => {
|
|
|
573
520
|
throw await de_CloudHsmServiceExceptionRes(parsedOutput, context);
|
|
574
521
|
default:
|
|
575
522
|
const parsedBody = parsedOutput.body;
|
|
576
|
-
|
|
523
|
+
return throwDefaultError({
|
|
577
524
|
output,
|
|
578
525
|
parsedBody,
|
|
579
|
-
exceptionCtor: CloudHSMV2ServiceException_1.CloudHSMV2ServiceException,
|
|
580
526
|
errorCode,
|
|
581
527
|
});
|
|
582
528
|
}
|
|
@@ -587,12 +533,12 @@ const de_ListTagsCommand = async (output, context) => {
|
|
|
587
533
|
}
|
|
588
534
|
const data = await parseBody(output.body, context);
|
|
589
535
|
let contents = {};
|
|
590
|
-
contents =
|
|
536
|
+
contents = (0, smithy_client_1._json)(data);
|
|
591
537
|
const response = {
|
|
592
538
|
$metadata: deserializeMetadata(output),
|
|
593
539
|
...contents,
|
|
594
540
|
};
|
|
595
|
-
return
|
|
541
|
+
return response;
|
|
596
542
|
};
|
|
597
543
|
exports.de_ListTagsCommand = de_ListTagsCommand;
|
|
598
544
|
const de_ListTagsCommandError = async (output, context) => {
|
|
@@ -622,10 +568,9 @@ const de_ListTagsCommandError = async (output, context) => {
|
|
|
622
568
|
throw await de_CloudHsmTagExceptionRes(parsedOutput, context);
|
|
623
569
|
default:
|
|
624
570
|
const parsedBody = parsedOutput.body;
|
|
625
|
-
|
|
571
|
+
return throwDefaultError({
|
|
626
572
|
output,
|
|
627
573
|
parsedBody,
|
|
628
|
-
exceptionCtor: CloudHSMV2ServiceException_1.CloudHSMV2ServiceException,
|
|
629
574
|
errorCode,
|
|
630
575
|
});
|
|
631
576
|
}
|
|
@@ -641,7 +586,7 @@ const de_ModifyBackupAttributesCommand = async (output, context) => {
|
|
|
641
586
|
$metadata: deserializeMetadata(output),
|
|
642
587
|
...contents,
|
|
643
588
|
};
|
|
644
|
-
return
|
|
589
|
+
return response;
|
|
645
590
|
};
|
|
646
591
|
exports.de_ModifyBackupAttributesCommand = de_ModifyBackupAttributesCommand;
|
|
647
592
|
const de_ModifyBackupAttributesCommandError = async (output, context) => {
|
|
@@ -668,10 +613,9 @@ const de_ModifyBackupAttributesCommandError = async (output, context) => {
|
|
|
668
613
|
throw await de_CloudHsmServiceExceptionRes(parsedOutput, context);
|
|
669
614
|
default:
|
|
670
615
|
const parsedBody = parsedOutput.body;
|
|
671
|
-
|
|
616
|
+
return throwDefaultError({
|
|
672
617
|
output,
|
|
673
618
|
parsedBody,
|
|
674
|
-
exceptionCtor: CloudHSMV2ServiceException_1.CloudHSMV2ServiceException,
|
|
675
619
|
errorCode,
|
|
676
620
|
});
|
|
677
621
|
}
|
|
@@ -687,7 +631,7 @@ const de_ModifyClusterCommand = async (output, context) => {
|
|
|
687
631
|
$metadata: deserializeMetadata(output),
|
|
688
632
|
...contents,
|
|
689
633
|
};
|
|
690
|
-
return
|
|
634
|
+
return response;
|
|
691
635
|
};
|
|
692
636
|
exports.de_ModifyClusterCommand = de_ModifyClusterCommand;
|
|
693
637
|
const de_ModifyClusterCommandError = async (output, context) => {
|
|
@@ -714,10 +658,9 @@ const de_ModifyClusterCommandError = async (output, context) => {
|
|
|
714
658
|
throw await de_CloudHsmServiceExceptionRes(parsedOutput, context);
|
|
715
659
|
default:
|
|
716
660
|
const parsedBody = parsedOutput.body;
|
|
717
|
-
|
|
661
|
+
return throwDefaultError({
|
|
718
662
|
output,
|
|
719
663
|
parsedBody,
|
|
720
|
-
exceptionCtor: CloudHSMV2ServiceException_1.CloudHSMV2ServiceException,
|
|
721
664
|
errorCode,
|
|
722
665
|
});
|
|
723
666
|
}
|
|
@@ -733,7 +676,7 @@ const de_RestoreBackupCommand = async (output, context) => {
|
|
|
733
676
|
$metadata: deserializeMetadata(output),
|
|
734
677
|
...contents,
|
|
735
678
|
};
|
|
736
|
-
return
|
|
679
|
+
return response;
|
|
737
680
|
};
|
|
738
681
|
exports.de_RestoreBackupCommand = de_RestoreBackupCommand;
|
|
739
682
|
const de_RestoreBackupCommandError = async (output, context) => {
|
|
@@ -760,10 +703,9 @@ const de_RestoreBackupCommandError = async (output, context) => {
|
|
|
760
703
|
throw await de_CloudHsmServiceExceptionRes(parsedOutput, context);
|
|
761
704
|
default:
|
|
762
705
|
const parsedBody = parsedOutput.body;
|
|
763
|
-
|
|
706
|
+
return throwDefaultError({
|
|
764
707
|
output,
|
|
765
708
|
parsedBody,
|
|
766
|
-
exceptionCtor: CloudHSMV2ServiceException_1.CloudHSMV2ServiceException,
|
|
767
709
|
errorCode,
|
|
768
710
|
});
|
|
769
711
|
}
|
|
@@ -774,12 +716,12 @@ const de_TagResourceCommand = async (output, context) => {
|
|
|
774
716
|
}
|
|
775
717
|
const data = await parseBody(output.body, context);
|
|
776
718
|
let contents = {};
|
|
777
|
-
contents =
|
|
719
|
+
contents = (0, smithy_client_1._json)(data);
|
|
778
720
|
const response = {
|
|
779
721
|
$metadata: deserializeMetadata(output),
|
|
780
722
|
...contents,
|
|
781
723
|
};
|
|
782
|
-
return
|
|
724
|
+
return response;
|
|
783
725
|
};
|
|
784
726
|
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
785
727
|
const de_TagResourceCommandError = async (output, context) => {
|
|
@@ -809,10 +751,9 @@ const de_TagResourceCommandError = async (output, context) => {
|
|
|
809
751
|
throw await de_CloudHsmTagExceptionRes(parsedOutput, context);
|
|
810
752
|
default:
|
|
811
753
|
const parsedBody = parsedOutput.body;
|
|
812
|
-
|
|
754
|
+
return throwDefaultError({
|
|
813
755
|
output,
|
|
814
756
|
parsedBody,
|
|
815
|
-
exceptionCtor: CloudHSMV2ServiceException_1.CloudHSMV2ServiceException,
|
|
816
757
|
errorCode,
|
|
817
758
|
});
|
|
818
759
|
}
|
|
@@ -823,12 +764,12 @@ const de_UntagResourceCommand = async (output, context) => {
|
|
|
823
764
|
}
|
|
824
765
|
const data = await parseBody(output.body, context);
|
|
825
766
|
let contents = {};
|
|
826
|
-
contents =
|
|
767
|
+
contents = (0, smithy_client_1._json)(data);
|
|
827
768
|
const response = {
|
|
828
769
|
$metadata: deserializeMetadata(output),
|
|
829
770
|
...contents,
|
|
830
771
|
};
|
|
831
|
-
return
|
|
772
|
+
return response;
|
|
832
773
|
};
|
|
833
774
|
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
834
775
|
const de_UntagResourceCommandError = async (output, context) => {
|
|
@@ -858,17 +799,16 @@ const de_UntagResourceCommandError = async (output, context) => {
|
|
|
858
799
|
throw await de_CloudHsmTagExceptionRes(parsedOutput, context);
|
|
859
800
|
default:
|
|
860
801
|
const parsedBody = parsedOutput.body;
|
|
861
|
-
|
|
802
|
+
return throwDefaultError({
|
|
862
803
|
output,
|
|
863
804
|
parsedBody,
|
|
864
|
-
exceptionCtor: CloudHSMV2ServiceException_1.CloudHSMV2ServiceException,
|
|
865
805
|
errorCode,
|
|
866
806
|
});
|
|
867
807
|
}
|
|
868
808
|
};
|
|
869
809
|
const de_CloudHsmAccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
870
810
|
const body = parsedOutput.body;
|
|
871
|
-
const deserialized =
|
|
811
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
872
812
|
const exception = new models_0_1.CloudHsmAccessDeniedException({
|
|
873
813
|
$metadata: deserializeMetadata(parsedOutput),
|
|
874
814
|
...deserialized,
|
|
@@ -877,7 +817,7 @@ const de_CloudHsmAccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
|
877
817
|
};
|
|
878
818
|
const de_CloudHsmInternalFailureExceptionRes = async (parsedOutput, context) => {
|
|
879
819
|
const body = parsedOutput.body;
|
|
880
|
-
const deserialized =
|
|
820
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
881
821
|
const exception = new models_0_1.CloudHsmInternalFailureException({
|
|
882
822
|
$metadata: deserializeMetadata(parsedOutput),
|
|
883
823
|
...deserialized,
|
|
@@ -886,7 +826,7 @@ const de_CloudHsmInternalFailureExceptionRes = async (parsedOutput, context) =>
|
|
|
886
826
|
};
|
|
887
827
|
const de_CloudHsmInvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
888
828
|
const body = parsedOutput.body;
|
|
889
|
-
const deserialized =
|
|
829
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
890
830
|
const exception = new models_0_1.CloudHsmInvalidRequestException({
|
|
891
831
|
$metadata: deserializeMetadata(parsedOutput),
|
|
892
832
|
...deserialized,
|
|
@@ -895,7 +835,7 @@ const de_CloudHsmInvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
|
895
835
|
};
|
|
896
836
|
const de_CloudHsmResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
897
837
|
const body = parsedOutput.body;
|
|
898
|
-
const deserialized =
|
|
838
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
899
839
|
const exception = new models_0_1.CloudHsmResourceNotFoundException({
|
|
900
840
|
$metadata: deserializeMetadata(parsedOutput),
|
|
901
841
|
...deserialized,
|
|
@@ -904,7 +844,7 @@ const de_CloudHsmResourceNotFoundExceptionRes = async (parsedOutput, context) =>
|
|
|
904
844
|
};
|
|
905
845
|
const de_CloudHsmServiceExceptionRes = async (parsedOutput, context) => {
|
|
906
846
|
const body = parsedOutput.body;
|
|
907
|
-
const deserialized =
|
|
847
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
908
848
|
const exception = new models_0_1.CloudHsmServiceException({
|
|
909
849
|
$metadata: deserializeMetadata(parsedOutput),
|
|
910
850
|
...deserialized,
|
|
@@ -913,409 +853,117 @@ const de_CloudHsmServiceExceptionRes = async (parsedOutput, context) => {
|
|
|
913
853
|
};
|
|
914
854
|
const de_CloudHsmTagExceptionRes = async (parsedOutput, context) => {
|
|
915
855
|
const body = parsedOutput.body;
|
|
916
|
-
const deserialized =
|
|
856
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
917
857
|
const exception = new models_0_1.CloudHsmTagException({
|
|
918
858
|
$metadata: deserializeMetadata(parsedOutput),
|
|
919
859
|
...deserialized,
|
|
920
860
|
});
|
|
921
861
|
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
922
862
|
};
|
|
923
|
-
const se_BackupRetentionPolicy = (input, context) => {
|
|
924
|
-
return {
|
|
925
|
-
...(input.Type != null && { Type: input.Type }),
|
|
926
|
-
...(input.Value != null && { Value: input.Value }),
|
|
927
|
-
};
|
|
928
|
-
};
|
|
929
|
-
const se_CopyBackupToRegionRequest = (input, context) => {
|
|
930
|
-
return {
|
|
931
|
-
...(input.BackupId != null && { BackupId: input.BackupId }),
|
|
932
|
-
...(input.DestinationRegion != null && { DestinationRegion: input.DestinationRegion }),
|
|
933
|
-
...(input.TagList != null && { TagList: se_TagList(input.TagList, context) }),
|
|
934
|
-
};
|
|
935
|
-
};
|
|
936
|
-
const se_CreateClusterRequest = (input, context) => {
|
|
937
|
-
return {
|
|
938
|
-
...(input.BackupRetentionPolicy != null && {
|
|
939
|
-
BackupRetentionPolicy: se_BackupRetentionPolicy(input.BackupRetentionPolicy, context),
|
|
940
|
-
}),
|
|
941
|
-
...(input.HsmType != null && { HsmType: input.HsmType }),
|
|
942
|
-
...(input.SourceBackupId != null && { SourceBackupId: input.SourceBackupId }),
|
|
943
|
-
...(input.SubnetIds != null && { SubnetIds: se_SubnetIds(input.SubnetIds, context) }),
|
|
944
|
-
...(input.TagList != null && { TagList: se_TagList(input.TagList, context) }),
|
|
945
|
-
};
|
|
946
|
-
};
|
|
947
|
-
const se_CreateHsmRequest = (input, context) => {
|
|
948
|
-
return {
|
|
949
|
-
...(input.AvailabilityZone != null && { AvailabilityZone: input.AvailabilityZone }),
|
|
950
|
-
...(input.ClusterId != null && { ClusterId: input.ClusterId }),
|
|
951
|
-
...(input.IpAddress != null && { IpAddress: input.IpAddress }),
|
|
952
|
-
};
|
|
953
|
-
};
|
|
954
|
-
const se_DeleteBackupRequest = (input, context) => {
|
|
955
|
-
return {
|
|
956
|
-
...(input.BackupId != null && { BackupId: input.BackupId }),
|
|
957
|
-
};
|
|
958
|
-
};
|
|
959
|
-
const se_DeleteClusterRequest = (input, context) => {
|
|
960
|
-
return {
|
|
961
|
-
...(input.ClusterId != null && { ClusterId: input.ClusterId }),
|
|
962
|
-
};
|
|
963
|
-
};
|
|
964
|
-
const se_DeleteHsmRequest = (input, context) => {
|
|
965
|
-
return {
|
|
966
|
-
...(input.ClusterId != null && { ClusterId: input.ClusterId }),
|
|
967
|
-
...(input.EniId != null && { EniId: input.EniId }),
|
|
968
|
-
...(input.EniIp != null && { EniIp: input.EniIp }),
|
|
969
|
-
...(input.HsmId != null && { HsmId: input.HsmId }),
|
|
970
|
-
};
|
|
971
|
-
};
|
|
972
|
-
const se_DescribeBackupsRequest = (input, context) => {
|
|
973
|
-
return {
|
|
974
|
-
...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }),
|
|
975
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
976
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
977
|
-
...(input.SortAscending != null && { SortAscending: input.SortAscending }),
|
|
978
|
-
};
|
|
979
|
-
};
|
|
980
|
-
const se_DescribeClustersRequest = (input, context) => {
|
|
981
|
-
return {
|
|
982
|
-
...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }),
|
|
983
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
984
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
985
|
-
};
|
|
986
|
-
};
|
|
987
|
-
const se_Filters = (input, context) => {
|
|
988
|
-
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
989
|
-
if (value === null) {
|
|
990
|
-
return acc;
|
|
991
|
-
}
|
|
992
|
-
acc[key] = se_Strings(value, context);
|
|
993
|
-
return acc;
|
|
994
|
-
}, {});
|
|
995
|
-
};
|
|
996
|
-
const se_InitializeClusterRequest = (input, context) => {
|
|
997
|
-
return {
|
|
998
|
-
...(input.ClusterId != null && { ClusterId: input.ClusterId }),
|
|
999
|
-
...(input.SignedCert != null && { SignedCert: input.SignedCert }),
|
|
1000
|
-
...(input.TrustAnchor != null && { TrustAnchor: input.TrustAnchor }),
|
|
1001
|
-
};
|
|
1002
|
-
};
|
|
1003
|
-
const se_ListTagsRequest = (input, context) => {
|
|
1004
|
-
return {
|
|
1005
|
-
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
1006
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
1007
|
-
...(input.ResourceId != null && { ResourceId: input.ResourceId }),
|
|
1008
|
-
};
|
|
1009
|
-
};
|
|
1010
|
-
const se_ModifyBackupAttributesRequest = (input, context) => {
|
|
1011
|
-
return {
|
|
1012
|
-
...(input.BackupId != null && { BackupId: input.BackupId }),
|
|
1013
|
-
...(input.NeverExpires != null && { NeverExpires: input.NeverExpires }),
|
|
1014
|
-
};
|
|
1015
|
-
};
|
|
1016
|
-
const se_ModifyClusterRequest = (input, context) => {
|
|
1017
|
-
return {
|
|
1018
|
-
...(input.BackupRetentionPolicy != null && {
|
|
1019
|
-
BackupRetentionPolicy: se_BackupRetentionPolicy(input.BackupRetentionPolicy, context),
|
|
1020
|
-
}),
|
|
1021
|
-
...(input.ClusterId != null && { ClusterId: input.ClusterId }),
|
|
1022
|
-
};
|
|
1023
|
-
};
|
|
1024
|
-
const se_RestoreBackupRequest = (input, context) => {
|
|
1025
|
-
return {
|
|
1026
|
-
...(input.BackupId != null && { BackupId: input.BackupId }),
|
|
1027
|
-
};
|
|
1028
|
-
};
|
|
1029
|
-
const se_Strings = (input, context) => {
|
|
1030
|
-
return input
|
|
1031
|
-
.filter((e) => e != null)
|
|
1032
|
-
.map((entry) => {
|
|
1033
|
-
return entry;
|
|
1034
|
-
});
|
|
1035
|
-
};
|
|
1036
|
-
const se_SubnetIds = (input, context) => {
|
|
1037
|
-
return input
|
|
1038
|
-
.filter((e) => e != null)
|
|
1039
|
-
.map((entry) => {
|
|
1040
|
-
return entry;
|
|
1041
|
-
});
|
|
1042
|
-
};
|
|
1043
|
-
const se_Tag = (input, context) => {
|
|
1044
|
-
return {
|
|
1045
|
-
...(input.Key != null && { Key: input.Key }),
|
|
1046
|
-
...(input.Value != null && { Value: input.Value }),
|
|
1047
|
-
};
|
|
1048
|
-
};
|
|
1049
|
-
const se_TagKeyList = (input, context) => {
|
|
1050
|
-
return input
|
|
1051
|
-
.filter((e) => e != null)
|
|
1052
|
-
.map((entry) => {
|
|
1053
|
-
return entry;
|
|
1054
|
-
});
|
|
1055
|
-
};
|
|
1056
|
-
const se_TagList = (input, context) => {
|
|
1057
|
-
return input
|
|
1058
|
-
.filter((e) => e != null)
|
|
1059
|
-
.map((entry) => {
|
|
1060
|
-
return se_Tag(entry, context);
|
|
1061
|
-
});
|
|
1062
|
-
};
|
|
1063
|
-
const se_TagResourceRequest = (input, context) => {
|
|
1064
|
-
return {
|
|
1065
|
-
...(input.ResourceId != null && { ResourceId: input.ResourceId }),
|
|
1066
|
-
...(input.TagList != null && { TagList: se_TagList(input.TagList, context) }),
|
|
1067
|
-
};
|
|
1068
|
-
};
|
|
1069
|
-
const se_UntagResourceRequest = (input, context) => {
|
|
1070
|
-
return {
|
|
1071
|
-
...(input.ResourceId != null && { ResourceId: input.ResourceId }),
|
|
1072
|
-
...(input.TagKeyList != null && { TagKeyList: se_TagKeyList(input.TagKeyList, context) }),
|
|
1073
|
-
};
|
|
1074
|
-
};
|
|
1075
863
|
const de_Backup = (output, context) => {
|
|
1076
|
-
return {
|
|
1077
|
-
BackupId:
|
|
1078
|
-
BackupState:
|
|
1079
|
-
ClusterId:
|
|
1080
|
-
CopyTimestamp:
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
NeverExpires: (0, smithy_client_1.expectBoolean)(output.NeverExpires),
|
|
1090
|
-
SourceBackup: (0, smithy_client_1.expectString)(output.SourceBackup),
|
|
1091
|
-
SourceCluster: (0, smithy_client_1.expectString)(output.SourceCluster),
|
|
1092
|
-
SourceRegion: (0, smithy_client_1.expectString)(output.SourceRegion),
|
|
1093
|
-
TagList: output.TagList != null ? de_TagList(output.TagList, context) : undefined,
|
|
1094
|
-
};
|
|
1095
|
-
};
|
|
1096
|
-
const de_BackupRetentionPolicy = (output, context) => {
|
|
1097
|
-
return {
|
|
1098
|
-
Type: (0, smithy_client_1.expectString)(output.Type),
|
|
1099
|
-
Value: (0, smithy_client_1.expectString)(output.Value),
|
|
1100
|
-
};
|
|
864
|
+
return (0, smithy_client_1.take)(output, {
|
|
865
|
+
BackupId: smithy_client_1.expectString,
|
|
866
|
+
BackupState: smithy_client_1.expectString,
|
|
867
|
+
ClusterId: smithy_client_1.expectString,
|
|
868
|
+
CopyTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
869
|
+
CreateTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
870
|
+
DeleteTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
871
|
+
NeverExpires: smithy_client_1.expectBoolean,
|
|
872
|
+
SourceBackup: smithy_client_1.expectString,
|
|
873
|
+
SourceCluster: smithy_client_1.expectString,
|
|
874
|
+
SourceRegion: smithy_client_1.expectString,
|
|
875
|
+
TagList: smithy_client_1._json,
|
|
876
|
+
});
|
|
1101
877
|
};
|
|
1102
878
|
const de_Backups = (output, context) => {
|
|
1103
879
|
const retVal = (output || [])
|
|
1104
880
|
.filter((e) => e != null)
|
|
1105
881
|
.map((entry) => {
|
|
1106
|
-
if (entry === null) {
|
|
1107
|
-
return null;
|
|
1108
|
-
}
|
|
1109
882
|
return de_Backup(entry, context);
|
|
1110
883
|
});
|
|
1111
884
|
return retVal;
|
|
1112
885
|
};
|
|
1113
|
-
const de_Certificates = (output, context) => {
|
|
1114
|
-
return {
|
|
1115
|
-
AwsHardwareCertificate: (0, smithy_client_1.expectString)(output.AwsHardwareCertificate),
|
|
1116
|
-
ClusterCertificate: (0, smithy_client_1.expectString)(output.ClusterCertificate),
|
|
1117
|
-
ClusterCsr: (0, smithy_client_1.expectString)(output.ClusterCsr),
|
|
1118
|
-
HsmCertificate: (0, smithy_client_1.expectString)(output.HsmCertificate),
|
|
1119
|
-
ManufacturerHardwareCertificate: (0, smithy_client_1.expectString)(output.ManufacturerHardwareCertificate),
|
|
1120
|
-
};
|
|
1121
|
-
};
|
|
1122
|
-
const de_CloudHsmAccessDeniedException = (output, context) => {
|
|
1123
|
-
return {
|
|
1124
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1125
|
-
};
|
|
1126
|
-
};
|
|
1127
|
-
const de_CloudHsmInternalFailureException = (output, context) => {
|
|
1128
|
-
return {
|
|
1129
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1130
|
-
};
|
|
1131
|
-
};
|
|
1132
|
-
const de_CloudHsmInvalidRequestException = (output, context) => {
|
|
1133
|
-
return {
|
|
1134
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1135
|
-
};
|
|
1136
|
-
};
|
|
1137
|
-
const de_CloudHsmResourceNotFoundException = (output, context) => {
|
|
1138
|
-
return {
|
|
1139
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1140
|
-
};
|
|
1141
|
-
};
|
|
1142
|
-
const de_CloudHsmServiceException = (output, context) => {
|
|
1143
|
-
return {
|
|
1144
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1145
|
-
};
|
|
1146
|
-
};
|
|
1147
|
-
const de_CloudHsmTagException = (output, context) => {
|
|
1148
|
-
return {
|
|
1149
|
-
Message: (0, smithy_client_1.expectString)(output.Message),
|
|
1150
|
-
};
|
|
1151
|
-
};
|
|
1152
886
|
const de_Cluster = (output, context) => {
|
|
1153
|
-
return {
|
|
1154
|
-
BackupPolicy:
|
|
1155
|
-
BackupRetentionPolicy:
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
SubnetMapping: output.SubnetMapping != null ? de_ExternalSubnetMapping(output.SubnetMapping, context) : undefined,
|
|
1171
|
-
TagList: output.TagList != null ? de_TagList(output.TagList, context) : undefined,
|
|
1172
|
-
VpcId: (0, smithy_client_1.expectString)(output.VpcId),
|
|
1173
|
-
};
|
|
887
|
+
return (0, smithy_client_1.take)(output, {
|
|
888
|
+
BackupPolicy: smithy_client_1.expectString,
|
|
889
|
+
BackupRetentionPolicy: smithy_client_1._json,
|
|
890
|
+
Certificates: smithy_client_1._json,
|
|
891
|
+
ClusterId: smithy_client_1.expectString,
|
|
892
|
+
CreateTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
893
|
+
HsmType: smithy_client_1.expectString,
|
|
894
|
+
Hsms: smithy_client_1._json,
|
|
895
|
+
PreCoPassword: smithy_client_1.expectString,
|
|
896
|
+
SecurityGroup: smithy_client_1.expectString,
|
|
897
|
+
SourceBackupId: smithy_client_1.expectString,
|
|
898
|
+
State: smithy_client_1.expectString,
|
|
899
|
+
StateMessage: smithy_client_1.expectString,
|
|
900
|
+
SubnetMapping: smithy_client_1._json,
|
|
901
|
+
TagList: smithy_client_1._json,
|
|
902
|
+
VpcId: smithy_client_1.expectString,
|
|
903
|
+
});
|
|
1174
904
|
};
|
|
1175
905
|
const de_Clusters = (output, context) => {
|
|
1176
906
|
const retVal = (output || [])
|
|
1177
907
|
.filter((e) => e != null)
|
|
1178
908
|
.map((entry) => {
|
|
1179
|
-
if (entry === null) {
|
|
1180
|
-
return null;
|
|
1181
|
-
}
|
|
1182
909
|
return de_Cluster(entry, context);
|
|
1183
910
|
});
|
|
1184
911
|
return retVal;
|
|
1185
912
|
};
|
|
1186
913
|
const de_CopyBackupToRegionResponse = (output, context) => {
|
|
1187
|
-
return {
|
|
1188
|
-
DestinationBackup:
|
|
1189
|
-
};
|
|
914
|
+
return (0, smithy_client_1.take)(output, {
|
|
915
|
+
DestinationBackup: (_) => de_DestinationBackup(_, context),
|
|
916
|
+
});
|
|
1190
917
|
};
|
|
1191
918
|
const de_CreateClusterResponse = (output, context) => {
|
|
1192
|
-
return {
|
|
1193
|
-
Cluster:
|
|
1194
|
-
};
|
|
1195
|
-
};
|
|
1196
|
-
const de_CreateHsmResponse = (output, context) => {
|
|
1197
|
-
return {
|
|
1198
|
-
Hsm: output.Hsm != null ? de_Hsm(output.Hsm, context) : undefined,
|
|
1199
|
-
};
|
|
919
|
+
return (0, smithy_client_1.take)(output, {
|
|
920
|
+
Cluster: (_) => de_Cluster(_, context),
|
|
921
|
+
});
|
|
1200
922
|
};
|
|
1201
923
|
const de_DeleteBackupResponse = (output, context) => {
|
|
1202
|
-
return {
|
|
1203
|
-
Backup:
|
|
1204
|
-
};
|
|
924
|
+
return (0, smithy_client_1.take)(output, {
|
|
925
|
+
Backup: (_) => de_Backup(_, context),
|
|
926
|
+
});
|
|
1205
927
|
};
|
|
1206
928
|
const de_DeleteClusterResponse = (output, context) => {
|
|
1207
|
-
return {
|
|
1208
|
-
Cluster:
|
|
1209
|
-
};
|
|
1210
|
-
};
|
|
1211
|
-
const de_DeleteHsmResponse = (output, context) => {
|
|
1212
|
-
return {
|
|
1213
|
-
HsmId: (0, smithy_client_1.expectString)(output.HsmId),
|
|
1214
|
-
};
|
|
929
|
+
return (0, smithy_client_1.take)(output, {
|
|
930
|
+
Cluster: (_) => de_Cluster(_, context),
|
|
931
|
+
});
|
|
1215
932
|
};
|
|
1216
933
|
const de_DescribeBackupsResponse = (output, context) => {
|
|
1217
|
-
return {
|
|
1218
|
-
Backups:
|
|
1219
|
-
NextToken:
|
|
1220
|
-
};
|
|
934
|
+
return (0, smithy_client_1.take)(output, {
|
|
935
|
+
Backups: (_) => de_Backups(_, context),
|
|
936
|
+
NextToken: smithy_client_1.expectString,
|
|
937
|
+
});
|
|
1221
938
|
};
|
|
1222
939
|
const de_DescribeClustersResponse = (output, context) => {
|
|
1223
|
-
return {
|
|
1224
|
-
Clusters:
|
|
1225
|
-
NextToken:
|
|
1226
|
-
};
|
|
940
|
+
return (0, smithy_client_1.take)(output, {
|
|
941
|
+
Clusters: (_) => de_Clusters(_, context),
|
|
942
|
+
NextToken: smithy_client_1.expectString,
|
|
943
|
+
});
|
|
1227
944
|
};
|
|
1228
945
|
const de_DestinationBackup = (output, context) => {
|
|
1229
|
-
return {
|
|
1230
|
-
CreateTimestamp:
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
SourceCluster: (0, smithy_client_1.expectString)(output.SourceCluster),
|
|
1235
|
-
SourceRegion: (0, smithy_client_1.expectString)(output.SourceRegion),
|
|
1236
|
-
};
|
|
1237
|
-
};
|
|
1238
|
-
const de_ExternalSubnetMapping = (output, context) => {
|
|
1239
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1240
|
-
if (value === null) {
|
|
1241
|
-
return acc;
|
|
1242
|
-
}
|
|
1243
|
-
acc[key] = (0, smithy_client_1.expectString)(value);
|
|
1244
|
-
return acc;
|
|
1245
|
-
}, {});
|
|
1246
|
-
};
|
|
1247
|
-
const de_Hsm = (output, context) => {
|
|
1248
|
-
return {
|
|
1249
|
-
AvailabilityZone: (0, smithy_client_1.expectString)(output.AvailabilityZone),
|
|
1250
|
-
ClusterId: (0, smithy_client_1.expectString)(output.ClusterId),
|
|
1251
|
-
EniId: (0, smithy_client_1.expectString)(output.EniId),
|
|
1252
|
-
EniIp: (0, smithy_client_1.expectString)(output.EniIp),
|
|
1253
|
-
HsmId: (0, smithy_client_1.expectString)(output.HsmId),
|
|
1254
|
-
State: (0, smithy_client_1.expectString)(output.State),
|
|
1255
|
-
StateMessage: (0, smithy_client_1.expectString)(output.StateMessage),
|
|
1256
|
-
SubnetId: (0, smithy_client_1.expectString)(output.SubnetId),
|
|
1257
|
-
};
|
|
1258
|
-
};
|
|
1259
|
-
const de_Hsms = (output, context) => {
|
|
1260
|
-
const retVal = (output || [])
|
|
1261
|
-
.filter((e) => e != null)
|
|
1262
|
-
.map((entry) => {
|
|
1263
|
-
if (entry === null) {
|
|
1264
|
-
return null;
|
|
1265
|
-
}
|
|
1266
|
-
return de_Hsm(entry, context);
|
|
946
|
+
return (0, smithy_client_1.take)(output, {
|
|
947
|
+
CreateTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
948
|
+
SourceBackup: smithy_client_1.expectString,
|
|
949
|
+
SourceCluster: smithy_client_1.expectString,
|
|
950
|
+
SourceRegion: smithy_client_1.expectString,
|
|
1267
951
|
});
|
|
1268
|
-
return retVal;
|
|
1269
|
-
};
|
|
1270
|
-
const de_InitializeClusterResponse = (output, context) => {
|
|
1271
|
-
return {
|
|
1272
|
-
State: (0, smithy_client_1.expectString)(output.State),
|
|
1273
|
-
StateMessage: (0, smithy_client_1.expectString)(output.StateMessage),
|
|
1274
|
-
};
|
|
1275
|
-
};
|
|
1276
|
-
const de_ListTagsResponse = (output, context) => {
|
|
1277
|
-
return {
|
|
1278
|
-
NextToken: (0, smithy_client_1.expectString)(output.NextToken),
|
|
1279
|
-
TagList: output.TagList != null ? de_TagList(output.TagList, context) : undefined,
|
|
1280
|
-
};
|
|
1281
952
|
};
|
|
1282
953
|
const de_ModifyBackupAttributesResponse = (output, context) => {
|
|
1283
|
-
return {
|
|
1284
|
-
Backup:
|
|
1285
|
-
};
|
|
954
|
+
return (0, smithy_client_1.take)(output, {
|
|
955
|
+
Backup: (_) => de_Backup(_, context),
|
|
956
|
+
});
|
|
1286
957
|
};
|
|
1287
958
|
const de_ModifyClusterResponse = (output, context) => {
|
|
1288
|
-
return {
|
|
1289
|
-
Cluster:
|
|
1290
|
-
};
|
|
959
|
+
return (0, smithy_client_1.take)(output, {
|
|
960
|
+
Cluster: (_) => de_Cluster(_, context),
|
|
961
|
+
});
|
|
1291
962
|
};
|
|
1292
963
|
const de_RestoreBackupResponse = (output, context) => {
|
|
1293
|
-
return {
|
|
1294
|
-
Backup:
|
|
1295
|
-
};
|
|
1296
|
-
};
|
|
1297
|
-
const de_Tag = (output, context) => {
|
|
1298
|
-
return {
|
|
1299
|
-
Key: (0, smithy_client_1.expectString)(output.Key),
|
|
1300
|
-
Value: (0, smithy_client_1.expectString)(output.Value),
|
|
1301
|
-
};
|
|
1302
|
-
};
|
|
1303
|
-
const de_TagList = (output, context) => {
|
|
1304
|
-
const retVal = (output || [])
|
|
1305
|
-
.filter((e) => e != null)
|
|
1306
|
-
.map((entry) => {
|
|
1307
|
-
if (entry === null) {
|
|
1308
|
-
return null;
|
|
1309
|
-
}
|
|
1310
|
-
return de_Tag(entry, context);
|
|
964
|
+
return (0, smithy_client_1.take)(output, {
|
|
965
|
+
Backup: (_) => de_Backup(_, context),
|
|
1311
966
|
});
|
|
1312
|
-
return retVal;
|
|
1313
|
-
};
|
|
1314
|
-
const de_TagResourceResponse = (output, context) => {
|
|
1315
|
-
return {};
|
|
1316
|
-
};
|
|
1317
|
-
const de_UntagResourceResponse = (output, context) => {
|
|
1318
|
-
return {};
|
|
1319
967
|
};
|
|
1320
968
|
const deserializeMetadata = (output) => ({
|
|
1321
969
|
httpStatusCode: output.statusCode,
|
|
@@ -1330,6 +978,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
|
1330
978
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1331
979
|
};
|
|
1332
980
|
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
981
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(CloudHSMV2ServiceException_1.CloudHSMV2ServiceException);
|
|
1333
982
|
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
1334
983
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1335
984
|
const contents = {
|
|
@@ -1348,6 +997,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
|
|
|
1348
997
|
}
|
|
1349
998
|
return new protocol_http_1.HttpRequest(contents);
|
|
1350
999
|
};
|
|
1000
|
+
function sharedHeaders(operation) {
|
|
1001
|
+
return {
|
|
1002
|
+
"content-type": "application/x-amz-json-1.1",
|
|
1003
|
+
"x-amz-target": `BaldrApiService.${operation}`,
|
|
1004
|
+
};
|
|
1005
|
+
}
|
|
1351
1006
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1352
1007
|
if (encoded.length) {
|
|
1353
1008
|
return JSON.parse(encoded);
|