@aws-sdk/client-cloudhsm-v2 3.927.0 → 3.929.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/index.js +508 -733
- package/dist-cjs/runtimeConfig.shared.js +7 -0
- package/dist-es/CloudHSMV2Client.js +2 -0
- package/dist-es/commands/CopyBackupToRegionCommand.js +3 -9
- package/dist-es/commands/CreateClusterCommand.js +3 -9
- package/dist-es/commands/CreateHsmCommand.js +3 -9
- package/dist-es/commands/DeleteBackupCommand.js +3 -9
- package/dist-es/commands/DeleteClusterCommand.js +3 -9
- package/dist-es/commands/DeleteHsmCommand.js +3 -9
- package/dist-es/commands/DeleteResourcePolicyCommand.js +3 -9
- package/dist-es/commands/DescribeBackupsCommand.js +3 -9
- package/dist-es/commands/DescribeClustersCommand.js +3 -9
- package/dist-es/commands/GetResourcePolicyCommand.js +3 -9
- package/dist-es/commands/InitializeClusterCommand.js +3 -9
- package/dist-es/commands/ListTagsCommand.js +3 -9
- package/dist-es/commands/ModifyBackupAttributesCommand.js +3 -9
- package/dist-es/commands/ModifyClusterCommand.js +3 -9
- package/dist-es/commands/PutResourcePolicyCommand.js +3 -9
- package/dist-es/commands/RestoreBackupCommand.js +3 -9
- package/dist-es/commands/TagResourceCommand.js +3 -9
- package/dist-es/commands/UntagResourceCommand.js +3 -9
- package/dist-es/runtimeConfig.shared.js +7 -0
- package/dist-es/schemas/schemas_0.js +455 -0
- package/dist-types/CloudHSMV2Client.d.ts +10 -1
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +80 -0
- package/dist-types/ts3.4/CloudHSMV2Client.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +86 -0
- package/package.json +5 -5
- package/dist-es/protocols/Aws_json1_1.js +0 -590
- package/dist-types/protocols/Aws_json1_1.d.ts +0 -164
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +0 -221
|
@@ -1,590 +0,0 @@
|
|
|
1
|
-
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
2
|
-
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
3
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
-
import { CloudHSMV2ServiceException as __BaseException } from "../models/CloudHSMV2ServiceException";
|
|
5
|
-
import { CloudHsmAccessDeniedException, CloudHsmInternalFailureException, CloudHsmInvalidRequestException, CloudHsmResourceLimitExceededException, CloudHsmResourceNotFoundException, CloudHsmServiceException, CloudHsmTagException, } from "../models/models_0";
|
|
6
|
-
export const se_CopyBackupToRegionCommand = async (input, context) => {
|
|
7
|
-
const headers = sharedHeaders("CopyBackupToRegion");
|
|
8
|
-
let body;
|
|
9
|
-
body = JSON.stringify(_json(input));
|
|
10
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
11
|
-
};
|
|
12
|
-
export const se_CreateClusterCommand = async (input, context) => {
|
|
13
|
-
const headers = sharedHeaders("CreateCluster");
|
|
14
|
-
let body;
|
|
15
|
-
body = JSON.stringify(_json(input));
|
|
16
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
17
|
-
};
|
|
18
|
-
export const se_CreateHsmCommand = async (input, context) => {
|
|
19
|
-
const headers = sharedHeaders("CreateHsm");
|
|
20
|
-
let body;
|
|
21
|
-
body = JSON.stringify(_json(input));
|
|
22
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
23
|
-
};
|
|
24
|
-
export const se_DeleteBackupCommand = async (input, context) => {
|
|
25
|
-
const headers = sharedHeaders("DeleteBackup");
|
|
26
|
-
let body;
|
|
27
|
-
body = JSON.stringify(_json(input));
|
|
28
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
29
|
-
};
|
|
30
|
-
export const se_DeleteClusterCommand = async (input, context) => {
|
|
31
|
-
const headers = sharedHeaders("DeleteCluster");
|
|
32
|
-
let body;
|
|
33
|
-
body = JSON.stringify(_json(input));
|
|
34
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
35
|
-
};
|
|
36
|
-
export const se_DeleteHsmCommand = async (input, context) => {
|
|
37
|
-
const headers = sharedHeaders("DeleteHsm");
|
|
38
|
-
let body;
|
|
39
|
-
body = JSON.stringify(_json(input));
|
|
40
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
41
|
-
};
|
|
42
|
-
export const se_DeleteResourcePolicyCommand = async (input, context) => {
|
|
43
|
-
const headers = sharedHeaders("DeleteResourcePolicy");
|
|
44
|
-
let body;
|
|
45
|
-
body = JSON.stringify(_json(input));
|
|
46
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
47
|
-
};
|
|
48
|
-
export const se_DescribeBackupsCommand = async (input, context) => {
|
|
49
|
-
const headers = sharedHeaders("DescribeBackups");
|
|
50
|
-
let body;
|
|
51
|
-
body = JSON.stringify(_json(input));
|
|
52
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
53
|
-
};
|
|
54
|
-
export const se_DescribeClustersCommand = async (input, context) => {
|
|
55
|
-
const headers = sharedHeaders("DescribeClusters");
|
|
56
|
-
let body;
|
|
57
|
-
body = JSON.stringify(_json(input));
|
|
58
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
59
|
-
};
|
|
60
|
-
export const se_GetResourcePolicyCommand = async (input, context) => {
|
|
61
|
-
const headers = sharedHeaders("GetResourcePolicy");
|
|
62
|
-
let body;
|
|
63
|
-
body = JSON.stringify(_json(input));
|
|
64
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
65
|
-
};
|
|
66
|
-
export const se_InitializeClusterCommand = async (input, context) => {
|
|
67
|
-
const headers = sharedHeaders("InitializeCluster");
|
|
68
|
-
let body;
|
|
69
|
-
body = JSON.stringify(_json(input));
|
|
70
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
71
|
-
};
|
|
72
|
-
export const se_ListTagsCommand = async (input, context) => {
|
|
73
|
-
const headers = sharedHeaders("ListTags");
|
|
74
|
-
let body;
|
|
75
|
-
body = JSON.stringify(_json(input));
|
|
76
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
77
|
-
};
|
|
78
|
-
export const se_ModifyBackupAttributesCommand = async (input, context) => {
|
|
79
|
-
const headers = sharedHeaders("ModifyBackupAttributes");
|
|
80
|
-
let body;
|
|
81
|
-
body = JSON.stringify(_json(input));
|
|
82
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
83
|
-
};
|
|
84
|
-
export const se_ModifyClusterCommand = async (input, context) => {
|
|
85
|
-
const headers = sharedHeaders("ModifyCluster");
|
|
86
|
-
let body;
|
|
87
|
-
body = JSON.stringify(_json(input));
|
|
88
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
89
|
-
};
|
|
90
|
-
export const se_PutResourcePolicyCommand = async (input, context) => {
|
|
91
|
-
const headers = sharedHeaders("PutResourcePolicy");
|
|
92
|
-
let body;
|
|
93
|
-
body = JSON.stringify(_json(input));
|
|
94
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
95
|
-
};
|
|
96
|
-
export const se_RestoreBackupCommand = async (input, context) => {
|
|
97
|
-
const headers = sharedHeaders("RestoreBackup");
|
|
98
|
-
let body;
|
|
99
|
-
body = JSON.stringify(_json(input));
|
|
100
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
101
|
-
};
|
|
102
|
-
export const se_TagResourceCommand = async (input, context) => {
|
|
103
|
-
const headers = sharedHeaders("TagResource");
|
|
104
|
-
let body;
|
|
105
|
-
body = JSON.stringify(_json(input));
|
|
106
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
107
|
-
};
|
|
108
|
-
export const se_UntagResourceCommand = async (input, context) => {
|
|
109
|
-
const headers = sharedHeaders("UntagResource");
|
|
110
|
-
let body;
|
|
111
|
-
body = JSON.stringify(_json(input));
|
|
112
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
113
|
-
};
|
|
114
|
-
export const de_CopyBackupToRegionCommand = async (output, context) => {
|
|
115
|
-
if (output.statusCode >= 300) {
|
|
116
|
-
return de_CommandError(output, context);
|
|
117
|
-
}
|
|
118
|
-
const data = await parseBody(output.body, context);
|
|
119
|
-
let contents = {};
|
|
120
|
-
contents = de_CopyBackupToRegionResponse(data, context);
|
|
121
|
-
const response = {
|
|
122
|
-
$metadata: deserializeMetadata(output),
|
|
123
|
-
...contents,
|
|
124
|
-
};
|
|
125
|
-
return response;
|
|
126
|
-
};
|
|
127
|
-
export const de_CreateClusterCommand = async (output, context) => {
|
|
128
|
-
if (output.statusCode >= 300) {
|
|
129
|
-
return de_CommandError(output, context);
|
|
130
|
-
}
|
|
131
|
-
const data = await parseBody(output.body, context);
|
|
132
|
-
let contents = {};
|
|
133
|
-
contents = de_CreateClusterResponse(data, context);
|
|
134
|
-
const response = {
|
|
135
|
-
$metadata: deserializeMetadata(output),
|
|
136
|
-
...contents,
|
|
137
|
-
};
|
|
138
|
-
return response;
|
|
139
|
-
};
|
|
140
|
-
export const de_CreateHsmCommand = async (output, context) => {
|
|
141
|
-
if (output.statusCode >= 300) {
|
|
142
|
-
return de_CommandError(output, context);
|
|
143
|
-
}
|
|
144
|
-
const data = await parseBody(output.body, context);
|
|
145
|
-
let contents = {};
|
|
146
|
-
contents = _json(data);
|
|
147
|
-
const response = {
|
|
148
|
-
$metadata: deserializeMetadata(output),
|
|
149
|
-
...contents,
|
|
150
|
-
};
|
|
151
|
-
return response;
|
|
152
|
-
};
|
|
153
|
-
export const de_DeleteBackupCommand = async (output, context) => {
|
|
154
|
-
if (output.statusCode >= 300) {
|
|
155
|
-
return de_CommandError(output, context);
|
|
156
|
-
}
|
|
157
|
-
const data = await parseBody(output.body, context);
|
|
158
|
-
let contents = {};
|
|
159
|
-
contents = de_DeleteBackupResponse(data, context);
|
|
160
|
-
const response = {
|
|
161
|
-
$metadata: deserializeMetadata(output),
|
|
162
|
-
...contents,
|
|
163
|
-
};
|
|
164
|
-
return response;
|
|
165
|
-
};
|
|
166
|
-
export const de_DeleteClusterCommand = async (output, context) => {
|
|
167
|
-
if (output.statusCode >= 300) {
|
|
168
|
-
return de_CommandError(output, context);
|
|
169
|
-
}
|
|
170
|
-
const data = await parseBody(output.body, context);
|
|
171
|
-
let contents = {};
|
|
172
|
-
contents = de_DeleteClusterResponse(data, context);
|
|
173
|
-
const response = {
|
|
174
|
-
$metadata: deserializeMetadata(output),
|
|
175
|
-
...contents,
|
|
176
|
-
};
|
|
177
|
-
return response;
|
|
178
|
-
};
|
|
179
|
-
export const de_DeleteHsmCommand = async (output, context) => {
|
|
180
|
-
if (output.statusCode >= 300) {
|
|
181
|
-
return de_CommandError(output, context);
|
|
182
|
-
}
|
|
183
|
-
const data = await parseBody(output.body, context);
|
|
184
|
-
let contents = {};
|
|
185
|
-
contents = _json(data);
|
|
186
|
-
const response = {
|
|
187
|
-
$metadata: deserializeMetadata(output),
|
|
188
|
-
...contents,
|
|
189
|
-
};
|
|
190
|
-
return response;
|
|
191
|
-
};
|
|
192
|
-
export const de_DeleteResourcePolicyCommand = async (output, context) => {
|
|
193
|
-
if (output.statusCode >= 300) {
|
|
194
|
-
return de_CommandError(output, context);
|
|
195
|
-
}
|
|
196
|
-
const data = await parseBody(output.body, context);
|
|
197
|
-
let contents = {};
|
|
198
|
-
contents = _json(data);
|
|
199
|
-
const response = {
|
|
200
|
-
$metadata: deserializeMetadata(output),
|
|
201
|
-
...contents,
|
|
202
|
-
};
|
|
203
|
-
return response;
|
|
204
|
-
};
|
|
205
|
-
export const de_DescribeBackupsCommand = async (output, context) => {
|
|
206
|
-
if (output.statusCode >= 300) {
|
|
207
|
-
return de_CommandError(output, context);
|
|
208
|
-
}
|
|
209
|
-
const data = await parseBody(output.body, context);
|
|
210
|
-
let contents = {};
|
|
211
|
-
contents = de_DescribeBackupsResponse(data, context);
|
|
212
|
-
const response = {
|
|
213
|
-
$metadata: deserializeMetadata(output),
|
|
214
|
-
...contents,
|
|
215
|
-
};
|
|
216
|
-
return response;
|
|
217
|
-
};
|
|
218
|
-
export const de_DescribeClustersCommand = async (output, context) => {
|
|
219
|
-
if (output.statusCode >= 300) {
|
|
220
|
-
return de_CommandError(output, context);
|
|
221
|
-
}
|
|
222
|
-
const data = await parseBody(output.body, context);
|
|
223
|
-
let contents = {};
|
|
224
|
-
contents = de_DescribeClustersResponse(data, context);
|
|
225
|
-
const response = {
|
|
226
|
-
$metadata: deserializeMetadata(output),
|
|
227
|
-
...contents,
|
|
228
|
-
};
|
|
229
|
-
return response;
|
|
230
|
-
};
|
|
231
|
-
export const de_GetResourcePolicyCommand = async (output, context) => {
|
|
232
|
-
if (output.statusCode >= 300) {
|
|
233
|
-
return de_CommandError(output, context);
|
|
234
|
-
}
|
|
235
|
-
const data = await parseBody(output.body, context);
|
|
236
|
-
let contents = {};
|
|
237
|
-
contents = _json(data);
|
|
238
|
-
const response = {
|
|
239
|
-
$metadata: deserializeMetadata(output),
|
|
240
|
-
...contents,
|
|
241
|
-
};
|
|
242
|
-
return response;
|
|
243
|
-
};
|
|
244
|
-
export const de_InitializeClusterCommand = async (output, context) => {
|
|
245
|
-
if (output.statusCode >= 300) {
|
|
246
|
-
return de_CommandError(output, context);
|
|
247
|
-
}
|
|
248
|
-
const data = await parseBody(output.body, context);
|
|
249
|
-
let contents = {};
|
|
250
|
-
contents = _json(data);
|
|
251
|
-
const response = {
|
|
252
|
-
$metadata: deserializeMetadata(output),
|
|
253
|
-
...contents,
|
|
254
|
-
};
|
|
255
|
-
return response;
|
|
256
|
-
};
|
|
257
|
-
export const de_ListTagsCommand = async (output, context) => {
|
|
258
|
-
if (output.statusCode >= 300) {
|
|
259
|
-
return de_CommandError(output, context);
|
|
260
|
-
}
|
|
261
|
-
const data = await parseBody(output.body, context);
|
|
262
|
-
let contents = {};
|
|
263
|
-
contents = _json(data);
|
|
264
|
-
const response = {
|
|
265
|
-
$metadata: deserializeMetadata(output),
|
|
266
|
-
...contents,
|
|
267
|
-
};
|
|
268
|
-
return response;
|
|
269
|
-
};
|
|
270
|
-
export const de_ModifyBackupAttributesCommand = async (output, context) => {
|
|
271
|
-
if (output.statusCode >= 300) {
|
|
272
|
-
return de_CommandError(output, context);
|
|
273
|
-
}
|
|
274
|
-
const data = await parseBody(output.body, context);
|
|
275
|
-
let contents = {};
|
|
276
|
-
contents = de_ModifyBackupAttributesResponse(data, context);
|
|
277
|
-
const response = {
|
|
278
|
-
$metadata: deserializeMetadata(output),
|
|
279
|
-
...contents,
|
|
280
|
-
};
|
|
281
|
-
return response;
|
|
282
|
-
};
|
|
283
|
-
export const de_ModifyClusterCommand = async (output, context) => {
|
|
284
|
-
if (output.statusCode >= 300) {
|
|
285
|
-
return de_CommandError(output, context);
|
|
286
|
-
}
|
|
287
|
-
const data = await parseBody(output.body, context);
|
|
288
|
-
let contents = {};
|
|
289
|
-
contents = de_ModifyClusterResponse(data, context);
|
|
290
|
-
const response = {
|
|
291
|
-
$metadata: deserializeMetadata(output),
|
|
292
|
-
...contents,
|
|
293
|
-
};
|
|
294
|
-
return response;
|
|
295
|
-
};
|
|
296
|
-
export const de_PutResourcePolicyCommand = async (output, context) => {
|
|
297
|
-
if (output.statusCode >= 300) {
|
|
298
|
-
return de_CommandError(output, context);
|
|
299
|
-
}
|
|
300
|
-
const data = await parseBody(output.body, context);
|
|
301
|
-
let contents = {};
|
|
302
|
-
contents = _json(data);
|
|
303
|
-
const response = {
|
|
304
|
-
$metadata: deserializeMetadata(output),
|
|
305
|
-
...contents,
|
|
306
|
-
};
|
|
307
|
-
return response;
|
|
308
|
-
};
|
|
309
|
-
export const de_RestoreBackupCommand = async (output, context) => {
|
|
310
|
-
if (output.statusCode >= 300) {
|
|
311
|
-
return de_CommandError(output, context);
|
|
312
|
-
}
|
|
313
|
-
const data = await parseBody(output.body, context);
|
|
314
|
-
let contents = {};
|
|
315
|
-
contents = de_RestoreBackupResponse(data, context);
|
|
316
|
-
const response = {
|
|
317
|
-
$metadata: deserializeMetadata(output),
|
|
318
|
-
...contents,
|
|
319
|
-
};
|
|
320
|
-
return response;
|
|
321
|
-
};
|
|
322
|
-
export const de_TagResourceCommand = async (output, context) => {
|
|
323
|
-
if (output.statusCode >= 300) {
|
|
324
|
-
return de_CommandError(output, context);
|
|
325
|
-
}
|
|
326
|
-
const data = await parseBody(output.body, context);
|
|
327
|
-
let contents = {};
|
|
328
|
-
contents = _json(data);
|
|
329
|
-
const response = {
|
|
330
|
-
$metadata: deserializeMetadata(output),
|
|
331
|
-
...contents,
|
|
332
|
-
};
|
|
333
|
-
return response;
|
|
334
|
-
};
|
|
335
|
-
export const de_UntagResourceCommand = async (output, context) => {
|
|
336
|
-
if (output.statusCode >= 300) {
|
|
337
|
-
return de_CommandError(output, context);
|
|
338
|
-
}
|
|
339
|
-
const data = await parseBody(output.body, context);
|
|
340
|
-
let contents = {};
|
|
341
|
-
contents = _json(data);
|
|
342
|
-
const response = {
|
|
343
|
-
$metadata: deserializeMetadata(output),
|
|
344
|
-
...contents,
|
|
345
|
-
};
|
|
346
|
-
return response;
|
|
347
|
-
};
|
|
348
|
-
const de_CommandError = async (output, context) => {
|
|
349
|
-
const parsedOutput = {
|
|
350
|
-
...output,
|
|
351
|
-
body: await parseErrorBody(output.body, context),
|
|
352
|
-
};
|
|
353
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
354
|
-
switch (errorCode) {
|
|
355
|
-
case "CloudHsmAccessDeniedException":
|
|
356
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmAccessDeniedException":
|
|
357
|
-
throw await de_CloudHsmAccessDeniedExceptionRes(parsedOutput, context);
|
|
358
|
-
case "CloudHsmInternalFailureException":
|
|
359
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmInternalFailureException":
|
|
360
|
-
throw await de_CloudHsmInternalFailureExceptionRes(parsedOutput, context);
|
|
361
|
-
case "CloudHsmInvalidRequestException":
|
|
362
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmInvalidRequestException":
|
|
363
|
-
throw await de_CloudHsmInvalidRequestExceptionRes(parsedOutput, context);
|
|
364
|
-
case "CloudHsmResourceNotFoundException":
|
|
365
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmResourceNotFoundException":
|
|
366
|
-
throw await de_CloudHsmResourceNotFoundExceptionRes(parsedOutput, context);
|
|
367
|
-
case "CloudHsmServiceException":
|
|
368
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmServiceException":
|
|
369
|
-
throw await de_CloudHsmServiceExceptionRes(parsedOutput, context);
|
|
370
|
-
case "CloudHsmTagException":
|
|
371
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmTagException":
|
|
372
|
-
throw await de_CloudHsmTagExceptionRes(parsedOutput, context);
|
|
373
|
-
case "CloudHsmResourceLimitExceededException":
|
|
374
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmResourceLimitExceededException":
|
|
375
|
-
throw await de_CloudHsmResourceLimitExceededExceptionRes(parsedOutput, context);
|
|
376
|
-
default:
|
|
377
|
-
const parsedBody = parsedOutput.body;
|
|
378
|
-
return throwDefaultError({
|
|
379
|
-
output,
|
|
380
|
-
parsedBody,
|
|
381
|
-
errorCode,
|
|
382
|
-
});
|
|
383
|
-
}
|
|
384
|
-
};
|
|
385
|
-
const de_CloudHsmAccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
386
|
-
const body = parsedOutput.body;
|
|
387
|
-
const deserialized = _json(body);
|
|
388
|
-
const exception = new CloudHsmAccessDeniedException({
|
|
389
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
390
|
-
...deserialized,
|
|
391
|
-
});
|
|
392
|
-
return __decorateServiceException(exception, body);
|
|
393
|
-
};
|
|
394
|
-
const de_CloudHsmInternalFailureExceptionRes = async (parsedOutput, context) => {
|
|
395
|
-
const body = parsedOutput.body;
|
|
396
|
-
const deserialized = _json(body);
|
|
397
|
-
const exception = new CloudHsmInternalFailureException({
|
|
398
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
399
|
-
...deserialized,
|
|
400
|
-
});
|
|
401
|
-
return __decorateServiceException(exception, body);
|
|
402
|
-
};
|
|
403
|
-
const de_CloudHsmInvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
404
|
-
const body = parsedOutput.body;
|
|
405
|
-
const deserialized = _json(body);
|
|
406
|
-
const exception = new CloudHsmInvalidRequestException({
|
|
407
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
408
|
-
...deserialized,
|
|
409
|
-
});
|
|
410
|
-
return __decorateServiceException(exception, body);
|
|
411
|
-
};
|
|
412
|
-
const de_CloudHsmResourceLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
413
|
-
const body = parsedOutput.body;
|
|
414
|
-
const deserialized = _json(body);
|
|
415
|
-
const exception = new CloudHsmResourceLimitExceededException({
|
|
416
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
417
|
-
...deserialized,
|
|
418
|
-
});
|
|
419
|
-
return __decorateServiceException(exception, body);
|
|
420
|
-
};
|
|
421
|
-
const de_CloudHsmResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
422
|
-
const body = parsedOutput.body;
|
|
423
|
-
const deserialized = _json(body);
|
|
424
|
-
const exception = new CloudHsmResourceNotFoundException({
|
|
425
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
426
|
-
...deserialized,
|
|
427
|
-
});
|
|
428
|
-
return __decorateServiceException(exception, body);
|
|
429
|
-
};
|
|
430
|
-
const de_CloudHsmServiceExceptionRes = async (parsedOutput, context) => {
|
|
431
|
-
const body = parsedOutput.body;
|
|
432
|
-
const deserialized = _json(body);
|
|
433
|
-
const exception = new CloudHsmServiceException({
|
|
434
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
435
|
-
...deserialized,
|
|
436
|
-
});
|
|
437
|
-
return __decorateServiceException(exception, body);
|
|
438
|
-
};
|
|
439
|
-
const de_CloudHsmTagExceptionRes = async (parsedOutput, context) => {
|
|
440
|
-
const body = parsedOutput.body;
|
|
441
|
-
const deserialized = _json(body);
|
|
442
|
-
const exception = new CloudHsmTagException({
|
|
443
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
444
|
-
...deserialized,
|
|
445
|
-
});
|
|
446
|
-
return __decorateServiceException(exception, body);
|
|
447
|
-
};
|
|
448
|
-
const de_Backup = (output, context) => {
|
|
449
|
-
return take(output, {
|
|
450
|
-
BackupArn: __expectString,
|
|
451
|
-
BackupId: __expectString,
|
|
452
|
-
BackupState: __expectString,
|
|
453
|
-
ClusterId: __expectString,
|
|
454
|
-
CopyTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
455
|
-
CreateTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
456
|
-
DeleteTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
457
|
-
HsmType: __expectString,
|
|
458
|
-
Mode: __expectString,
|
|
459
|
-
NeverExpires: __expectBoolean,
|
|
460
|
-
SourceBackup: __expectString,
|
|
461
|
-
SourceCluster: __expectString,
|
|
462
|
-
SourceRegion: __expectString,
|
|
463
|
-
TagList: _json,
|
|
464
|
-
});
|
|
465
|
-
};
|
|
466
|
-
const de_Backups = (output, context) => {
|
|
467
|
-
const retVal = (output || [])
|
|
468
|
-
.filter((e) => e != null)
|
|
469
|
-
.map((entry) => {
|
|
470
|
-
return de_Backup(entry, context);
|
|
471
|
-
});
|
|
472
|
-
return retVal;
|
|
473
|
-
};
|
|
474
|
-
const de_Cluster = (output, context) => {
|
|
475
|
-
return take(output, {
|
|
476
|
-
BackupPolicy: __expectString,
|
|
477
|
-
BackupRetentionPolicy: _json,
|
|
478
|
-
Certificates: _json,
|
|
479
|
-
ClusterId: __expectString,
|
|
480
|
-
CreateTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
481
|
-
HsmType: __expectString,
|
|
482
|
-
HsmTypeRollbackExpiration: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
483
|
-
Hsms: _json,
|
|
484
|
-
Mode: __expectString,
|
|
485
|
-
NetworkType: __expectString,
|
|
486
|
-
PreCoPassword: __expectString,
|
|
487
|
-
SecurityGroup: __expectString,
|
|
488
|
-
SourceBackupId: __expectString,
|
|
489
|
-
State: __expectString,
|
|
490
|
-
StateMessage: __expectString,
|
|
491
|
-
SubnetMapping: _json,
|
|
492
|
-
TagList: _json,
|
|
493
|
-
VpcId: __expectString,
|
|
494
|
-
});
|
|
495
|
-
};
|
|
496
|
-
const de_Clusters = (output, context) => {
|
|
497
|
-
const retVal = (output || [])
|
|
498
|
-
.filter((e) => e != null)
|
|
499
|
-
.map((entry) => {
|
|
500
|
-
return de_Cluster(entry, context);
|
|
501
|
-
});
|
|
502
|
-
return retVal;
|
|
503
|
-
};
|
|
504
|
-
const de_CopyBackupToRegionResponse = (output, context) => {
|
|
505
|
-
return take(output, {
|
|
506
|
-
DestinationBackup: (_) => de_DestinationBackup(_, context),
|
|
507
|
-
});
|
|
508
|
-
};
|
|
509
|
-
const de_CreateClusterResponse = (output, context) => {
|
|
510
|
-
return take(output, {
|
|
511
|
-
Cluster: (_) => de_Cluster(_, context),
|
|
512
|
-
});
|
|
513
|
-
};
|
|
514
|
-
const de_DeleteBackupResponse = (output, context) => {
|
|
515
|
-
return take(output, {
|
|
516
|
-
Backup: (_) => de_Backup(_, context),
|
|
517
|
-
});
|
|
518
|
-
};
|
|
519
|
-
const de_DeleteClusterResponse = (output, context) => {
|
|
520
|
-
return take(output, {
|
|
521
|
-
Cluster: (_) => de_Cluster(_, context),
|
|
522
|
-
});
|
|
523
|
-
};
|
|
524
|
-
const de_DescribeBackupsResponse = (output, context) => {
|
|
525
|
-
return take(output, {
|
|
526
|
-
Backups: (_) => de_Backups(_, context),
|
|
527
|
-
NextToken: __expectString,
|
|
528
|
-
});
|
|
529
|
-
};
|
|
530
|
-
const de_DescribeClustersResponse = (output, context) => {
|
|
531
|
-
return take(output, {
|
|
532
|
-
Clusters: (_) => de_Clusters(_, context),
|
|
533
|
-
NextToken: __expectString,
|
|
534
|
-
});
|
|
535
|
-
};
|
|
536
|
-
const de_DestinationBackup = (output, context) => {
|
|
537
|
-
return take(output, {
|
|
538
|
-
CreateTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
539
|
-
SourceBackup: __expectString,
|
|
540
|
-
SourceCluster: __expectString,
|
|
541
|
-
SourceRegion: __expectString,
|
|
542
|
-
});
|
|
543
|
-
};
|
|
544
|
-
const de_ModifyBackupAttributesResponse = (output, context) => {
|
|
545
|
-
return take(output, {
|
|
546
|
-
Backup: (_) => de_Backup(_, context),
|
|
547
|
-
});
|
|
548
|
-
};
|
|
549
|
-
const de_ModifyClusterResponse = (output, context) => {
|
|
550
|
-
return take(output, {
|
|
551
|
-
Cluster: (_) => de_Cluster(_, context),
|
|
552
|
-
});
|
|
553
|
-
};
|
|
554
|
-
const de_RestoreBackupResponse = (output, context) => {
|
|
555
|
-
return take(output, {
|
|
556
|
-
Backup: (_) => de_Backup(_, context),
|
|
557
|
-
});
|
|
558
|
-
};
|
|
559
|
-
const deserializeMetadata = (output) => ({
|
|
560
|
-
httpStatusCode: output.statusCode,
|
|
561
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
562
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
563
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
564
|
-
});
|
|
565
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
566
|
-
const throwDefaultError = withBaseException(__BaseException);
|
|
567
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
568
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
569
|
-
const contents = {
|
|
570
|
-
protocol,
|
|
571
|
-
hostname,
|
|
572
|
-
port,
|
|
573
|
-
method: "POST",
|
|
574
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
575
|
-
headers,
|
|
576
|
-
};
|
|
577
|
-
if (resolvedHostname !== undefined) {
|
|
578
|
-
contents.hostname = resolvedHostname;
|
|
579
|
-
}
|
|
580
|
-
if (body !== undefined) {
|
|
581
|
-
contents.body = body;
|
|
582
|
-
}
|
|
583
|
-
return new __HttpRequest(contents);
|
|
584
|
-
};
|
|
585
|
-
function sharedHeaders(operation) {
|
|
586
|
-
return {
|
|
587
|
-
"content-type": "application/x-amz-json-1.1",
|
|
588
|
-
"x-amz-target": `BaldrApiService.${operation}`,
|
|
589
|
-
};
|
|
590
|
-
}
|