@aws-sdk/client-dlm 3.182.0 → 3.183.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/CHANGELOG.md +8 -0
- package/dist-es/DLM.js +34 -41
- package/dist-es/DLMClient.js +22 -28
- package/dist-es/commands/CreateLifecyclePolicyCommand.js +21 -28
- package/dist-es/commands/DeleteLifecyclePolicyCommand.js +21 -28
- package/dist-es/commands/GetLifecyclePoliciesCommand.js +21 -28
- package/dist-es/commands/GetLifecyclePolicyCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/commands/UpdateLifecyclePolicyCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/DLMServiceException.js +5 -10
- package/dist-es/models/models_0.js +171 -96
- package/dist-es/protocols/Aws_restJson1.js +879 -1035
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,994 +1,855 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { DLMServiceException as __BaseException } from "../models/DLMServiceException";
|
|
5
4
|
import { InternalServerException, InvalidRequestException, LimitExceededException, ResourceNotFoundException, } from "../models/models_0";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
export
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
});
|
|
180
|
-
}); };
|
|
181
|
-
export var serializeAws_restJson1UpdateLifecyclePolicyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
182
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
183
|
-
return __generator(this, function (_c) {
|
|
184
|
-
switch (_c.label) {
|
|
185
|
-
case 0: return [4, context.endpoint()];
|
|
186
|
-
case 1:
|
|
187
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
188
|
-
headers = {
|
|
189
|
-
"content-type": "application/json",
|
|
190
|
-
};
|
|
191
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/policies/{PolicyId}";
|
|
192
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "PolicyId", function () { return input.PolicyId; }, "{PolicyId}", false);
|
|
193
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.Description != null && { Description: input.Description })), (input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn })), (input.PolicyDetails != null && {
|
|
194
|
-
PolicyDetails: serializeAws_restJson1PolicyDetails(input.PolicyDetails, context),
|
|
195
|
-
})), (input.State != null && { State: input.State })));
|
|
196
|
-
return [2, new __HttpRequest({
|
|
197
|
-
protocol: protocol,
|
|
198
|
-
hostname: hostname,
|
|
199
|
-
port: port,
|
|
200
|
-
method: "PATCH",
|
|
201
|
-
headers: headers,
|
|
202
|
-
path: resolvedPath,
|
|
203
|
-
body: body,
|
|
204
|
-
})];
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
}); };
|
|
208
|
-
export var deserializeAws_restJson1CreateLifecyclePolicyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
209
|
-
var contents, data, _a, _b;
|
|
210
|
-
return __generator(this, function (_c) {
|
|
211
|
-
switch (_c.label) {
|
|
212
|
-
case 0:
|
|
213
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
214
|
-
return [2, deserializeAws_restJson1CreateLifecyclePolicyCommandError(output, context)];
|
|
215
|
-
}
|
|
216
|
-
contents = map({
|
|
217
|
-
$metadata: deserializeMetadata(output),
|
|
218
|
-
});
|
|
219
|
-
_a = __expectNonNull;
|
|
220
|
-
_b = __expectObject;
|
|
221
|
-
return [4, parseBody(output.body, context)];
|
|
222
|
-
case 1:
|
|
223
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
224
|
-
if (data.PolicyId != null) {
|
|
225
|
-
contents.PolicyId = __expectString(data.PolicyId);
|
|
226
|
-
}
|
|
227
|
-
return [2, contents];
|
|
228
|
-
}
|
|
229
|
-
});
|
|
230
|
-
}); };
|
|
231
|
-
var deserializeAws_restJson1CreateLifecyclePolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
232
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
233
|
-
var _c;
|
|
234
|
-
return __generator(this, function (_d) {
|
|
235
|
-
switch (_d.label) {
|
|
236
|
-
case 0:
|
|
237
|
-
_a = [__assign({}, output)];
|
|
238
|
-
_c = {};
|
|
239
|
-
return [4, parseErrorBody(output.body, context)];
|
|
240
|
-
case 1:
|
|
241
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
242
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
243
|
-
_b = errorCode;
|
|
244
|
-
switch (_b) {
|
|
245
|
-
case "InternalServerException": return [3, 2];
|
|
246
|
-
case "com.amazonaws.dlm#InternalServerException": return [3, 2];
|
|
247
|
-
case "InvalidRequestException": return [3, 4];
|
|
248
|
-
case "com.amazonaws.dlm#InvalidRequestException": return [3, 4];
|
|
249
|
-
case "LimitExceededException": return [3, 6];
|
|
250
|
-
case "com.amazonaws.dlm#LimitExceededException": return [3, 6];
|
|
251
|
-
}
|
|
252
|
-
return [3, 8];
|
|
253
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
254
|
-
case 3: throw _d.sent();
|
|
255
|
-
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
256
|
-
case 5: throw _d.sent();
|
|
257
|
-
case 6: return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
258
|
-
case 7: throw _d.sent();
|
|
259
|
-
case 8:
|
|
260
|
-
parsedBody = parsedOutput.body;
|
|
261
|
-
throwDefaultError({
|
|
262
|
-
output: output,
|
|
263
|
-
parsedBody: parsedBody,
|
|
264
|
-
exceptionCtor: __BaseException,
|
|
265
|
-
errorCode: errorCode,
|
|
266
|
-
});
|
|
267
|
-
_d.label = 9;
|
|
268
|
-
case 9: return [2];
|
|
269
|
-
}
|
|
270
|
-
});
|
|
271
|
-
}); };
|
|
272
|
-
export var deserializeAws_restJson1DeleteLifecyclePolicyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
273
|
-
var contents;
|
|
274
|
-
return __generator(this, function (_a) {
|
|
275
|
-
switch (_a.label) {
|
|
276
|
-
case 0:
|
|
277
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
278
|
-
return [2, deserializeAws_restJson1DeleteLifecyclePolicyCommandError(output, context)];
|
|
279
|
-
}
|
|
280
|
-
contents = map({
|
|
281
|
-
$metadata: deserializeMetadata(output),
|
|
282
|
-
});
|
|
283
|
-
return [4, collectBody(output.body, context)];
|
|
284
|
-
case 1:
|
|
285
|
-
_a.sent();
|
|
286
|
-
return [2, contents];
|
|
287
|
-
}
|
|
288
|
-
});
|
|
289
|
-
}); };
|
|
290
|
-
var deserializeAws_restJson1DeleteLifecyclePolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
291
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
292
|
-
var _c;
|
|
293
|
-
return __generator(this, function (_d) {
|
|
294
|
-
switch (_d.label) {
|
|
295
|
-
case 0:
|
|
296
|
-
_a = [__assign({}, output)];
|
|
297
|
-
_c = {};
|
|
298
|
-
return [4, parseErrorBody(output.body, context)];
|
|
299
|
-
case 1:
|
|
300
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
301
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
302
|
-
_b = errorCode;
|
|
303
|
-
switch (_b) {
|
|
304
|
-
case "InternalServerException": return [3, 2];
|
|
305
|
-
case "com.amazonaws.dlm#InternalServerException": return [3, 2];
|
|
306
|
-
case "LimitExceededException": return [3, 4];
|
|
307
|
-
case "com.amazonaws.dlm#LimitExceededException": return [3, 4];
|
|
308
|
-
case "ResourceNotFoundException": return [3, 6];
|
|
309
|
-
case "com.amazonaws.dlm#ResourceNotFoundException": return [3, 6];
|
|
310
|
-
}
|
|
311
|
-
return [3, 8];
|
|
312
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
313
|
-
case 3: throw _d.sent();
|
|
314
|
-
case 4: return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
315
|
-
case 5: throw _d.sent();
|
|
316
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
317
|
-
case 7: throw _d.sent();
|
|
318
|
-
case 8:
|
|
319
|
-
parsedBody = parsedOutput.body;
|
|
320
|
-
throwDefaultError({
|
|
321
|
-
output: output,
|
|
322
|
-
parsedBody: parsedBody,
|
|
323
|
-
exceptionCtor: __BaseException,
|
|
324
|
-
errorCode: errorCode,
|
|
325
|
-
});
|
|
326
|
-
_d.label = 9;
|
|
327
|
-
case 9: return [2];
|
|
328
|
-
}
|
|
329
|
-
});
|
|
330
|
-
}); };
|
|
331
|
-
export var deserializeAws_restJson1GetLifecyclePoliciesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
332
|
-
var contents, data, _a, _b;
|
|
333
|
-
return __generator(this, function (_c) {
|
|
334
|
-
switch (_c.label) {
|
|
335
|
-
case 0:
|
|
336
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
337
|
-
return [2, deserializeAws_restJson1GetLifecyclePoliciesCommandError(output, context)];
|
|
338
|
-
}
|
|
339
|
-
contents = map({
|
|
340
|
-
$metadata: deserializeMetadata(output),
|
|
341
|
-
});
|
|
342
|
-
_a = __expectNonNull;
|
|
343
|
-
_b = __expectObject;
|
|
344
|
-
return [4, parseBody(output.body, context)];
|
|
345
|
-
case 1:
|
|
346
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
347
|
-
if (data.Policies != null) {
|
|
348
|
-
contents.Policies = deserializeAws_restJson1LifecyclePolicySummaryList(data.Policies, context);
|
|
349
|
-
}
|
|
350
|
-
return [2, contents];
|
|
351
|
-
}
|
|
352
|
-
});
|
|
353
|
-
}); };
|
|
354
|
-
var deserializeAws_restJson1GetLifecyclePoliciesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
355
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
356
|
-
var _c;
|
|
357
|
-
return __generator(this, function (_d) {
|
|
358
|
-
switch (_d.label) {
|
|
359
|
-
case 0:
|
|
360
|
-
_a = [__assign({}, output)];
|
|
361
|
-
_c = {};
|
|
362
|
-
return [4, parseErrorBody(output.body, context)];
|
|
363
|
-
case 1:
|
|
364
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
365
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
366
|
-
_b = errorCode;
|
|
367
|
-
switch (_b) {
|
|
368
|
-
case "InternalServerException": return [3, 2];
|
|
369
|
-
case "com.amazonaws.dlm#InternalServerException": return [3, 2];
|
|
370
|
-
case "InvalidRequestException": return [3, 4];
|
|
371
|
-
case "com.amazonaws.dlm#InvalidRequestException": return [3, 4];
|
|
372
|
-
case "LimitExceededException": return [3, 6];
|
|
373
|
-
case "com.amazonaws.dlm#LimitExceededException": return [3, 6];
|
|
374
|
-
case "ResourceNotFoundException": return [3, 8];
|
|
375
|
-
case "com.amazonaws.dlm#ResourceNotFoundException": return [3, 8];
|
|
376
|
-
}
|
|
377
|
-
return [3, 10];
|
|
378
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
379
|
-
case 3: throw _d.sent();
|
|
380
|
-
case 4: return [4, deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
381
|
-
case 5: throw _d.sent();
|
|
382
|
-
case 6: return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
383
|
-
case 7: throw _d.sent();
|
|
384
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
385
|
-
case 9: throw _d.sent();
|
|
386
|
-
case 10:
|
|
387
|
-
parsedBody = parsedOutput.body;
|
|
388
|
-
throwDefaultError({
|
|
389
|
-
output: output,
|
|
390
|
-
parsedBody: parsedBody,
|
|
391
|
-
exceptionCtor: __BaseException,
|
|
392
|
-
errorCode: errorCode,
|
|
393
|
-
});
|
|
394
|
-
_d.label = 11;
|
|
395
|
-
case 11: return [2];
|
|
396
|
-
}
|
|
397
|
-
});
|
|
398
|
-
}); };
|
|
399
|
-
export var deserializeAws_restJson1GetLifecyclePolicyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
400
|
-
var contents, data, _a, _b;
|
|
401
|
-
return __generator(this, function (_c) {
|
|
402
|
-
switch (_c.label) {
|
|
403
|
-
case 0:
|
|
404
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
405
|
-
return [2, deserializeAws_restJson1GetLifecyclePolicyCommandError(output, context)];
|
|
406
|
-
}
|
|
407
|
-
contents = map({
|
|
408
|
-
$metadata: deserializeMetadata(output),
|
|
409
|
-
});
|
|
410
|
-
_a = __expectNonNull;
|
|
411
|
-
_b = __expectObject;
|
|
412
|
-
return [4, parseBody(output.body, context)];
|
|
413
|
-
case 1:
|
|
414
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
415
|
-
if (data.Policy != null) {
|
|
416
|
-
contents.Policy = deserializeAws_restJson1LifecyclePolicy(data.Policy, context);
|
|
417
|
-
}
|
|
418
|
-
return [2, contents];
|
|
419
|
-
}
|
|
420
|
-
});
|
|
421
|
-
}); };
|
|
422
|
-
var deserializeAws_restJson1GetLifecyclePolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
423
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
424
|
-
var _c;
|
|
425
|
-
return __generator(this, function (_d) {
|
|
426
|
-
switch (_d.label) {
|
|
427
|
-
case 0:
|
|
428
|
-
_a = [__assign({}, output)];
|
|
429
|
-
_c = {};
|
|
430
|
-
return [4, parseErrorBody(output.body, context)];
|
|
431
|
-
case 1:
|
|
432
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
433
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
434
|
-
_b = errorCode;
|
|
435
|
-
switch (_b) {
|
|
436
|
-
case "InternalServerException": return [3, 2];
|
|
437
|
-
case "com.amazonaws.dlm#InternalServerException": return [3, 2];
|
|
438
|
-
case "LimitExceededException": return [3, 4];
|
|
439
|
-
case "com.amazonaws.dlm#LimitExceededException": return [3, 4];
|
|
440
|
-
case "ResourceNotFoundException": return [3, 6];
|
|
441
|
-
case "com.amazonaws.dlm#ResourceNotFoundException": return [3, 6];
|
|
442
|
-
}
|
|
443
|
-
return [3, 8];
|
|
444
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
445
|
-
case 3: throw _d.sent();
|
|
446
|
-
case 4: return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
447
|
-
case 5: throw _d.sent();
|
|
448
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
449
|
-
case 7: throw _d.sent();
|
|
450
|
-
case 8:
|
|
451
|
-
parsedBody = parsedOutput.body;
|
|
452
|
-
throwDefaultError({
|
|
453
|
-
output: output,
|
|
454
|
-
parsedBody: parsedBody,
|
|
455
|
-
exceptionCtor: __BaseException,
|
|
456
|
-
errorCode: errorCode,
|
|
457
|
-
});
|
|
458
|
-
_d.label = 9;
|
|
459
|
-
case 9: return [2];
|
|
460
|
-
}
|
|
461
|
-
});
|
|
462
|
-
}); };
|
|
463
|
-
export var deserializeAws_restJson1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
464
|
-
var contents, data, _a, _b;
|
|
465
|
-
return __generator(this, function (_c) {
|
|
466
|
-
switch (_c.label) {
|
|
467
|
-
case 0:
|
|
468
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
469
|
-
return [2, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
|
|
470
|
-
}
|
|
471
|
-
contents = map({
|
|
472
|
-
$metadata: deserializeMetadata(output),
|
|
473
|
-
});
|
|
474
|
-
_a = __expectNonNull;
|
|
475
|
-
_b = __expectObject;
|
|
476
|
-
return [4, parseBody(output.body, context)];
|
|
477
|
-
case 1:
|
|
478
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
479
|
-
if (data.Tags != null) {
|
|
480
|
-
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
481
|
-
}
|
|
482
|
-
return [2, contents];
|
|
483
|
-
}
|
|
5
|
+
export const serializeAws_restJson1CreateLifecyclePolicyCommand = async (input, context) => {
|
|
6
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
|
+
const headers = {
|
|
8
|
+
"content-type": "application/json",
|
|
9
|
+
};
|
|
10
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policies";
|
|
11
|
+
let body;
|
|
12
|
+
body = JSON.stringify({
|
|
13
|
+
...(input.Description != null && { Description: input.Description }),
|
|
14
|
+
...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }),
|
|
15
|
+
...(input.PolicyDetails != null && {
|
|
16
|
+
PolicyDetails: serializeAws_restJson1PolicyDetails(input.PolicyDetails, context),
|
|
17
|
+
}),
|
|
18
|
+
...(input.State != null && { State: input.State }),
|
|
19
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
20
|
+
});
|
|
21
|
+
return new __HttpRequest({
|
|
22
|
+
protocol,
|
|
23
|
+
hostname,
|
|
24
|
+
port,
|
|
25
|
+
method: "POST",
|
|
26
|
+
headers,
|
|
27
|
+
path: resolvedPath,
|
|
28
|
+
body,
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
export const serializeAws_restJson1DeleteLifecyclePolicyCommand = async (input, context) => {
|
|
32
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
33
|
+
const headers = {};
|
|
34
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policies/{PolicyId}";
|
|
35
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "PolicyId", () => input.PolicyId, "{PolicyId}", false);
|
|
36
|
+
let body;
|
|
37
|
+
return new __HttpRequest({
|
|
38
|
+
protocol,
|
|
39
|
+
hostname,
|
|
40
|
+
port,
|
|
41
|
+
method: "DELETE",
|
|
42
|
+
headers,
|
|
43
|
+
path: resolvedPath,
|
|
44
|
+
body,
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
export const serializeAws_restJson1GetLifecyclePoliciesCommand = async (input, context) => {
|
|
48
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
49
|
+
const headers = {};
|
|
50
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policies";
|
|
51
|
+
const query = map({
|
|
52
|
+
policyIds: [() => input.PolicyIds !== void 0, () => (input.PolicyIds || []).map((_entry) => _entry)],
|
|
53
|
+
state: [, input.State],
|
|
54
|
+
resourceTypes: [
|
|
55
|
+
() => input.ResourceTypes !== void 0,
|
|
56
|
+
() => (input.ResourceTypes || []).map((_entry) => _entry),
|
|
57
|
+
],
|
|
58
|
+
targetTags: [() => input.TargetTags !== void 0, () => (input.TargetTags || []).map((_entry) => _entry)],
|
|
59
|
+
tagsToAdd: [() => input.TagsToAdd !== void 0, () => (input.TagsToAdd || []).map((_entry) => _entry)],
|
|
60
|
+
});
|
|
61
|
+
let body;
|
|
62
|
+
return new __HttpRequest({
|
|
63
|
+
protocol,
|
|
64
|
+
hostname,
|
|
65
|
+
port,
|
|
66
|
+
method: "GET",
|
|
67
|
+
headers,
|
|
68
|
+
path: resolvedPath,
|
|
69
|
+
query,
|
|
70
|
+
body,
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
export const serializeAws_restJson1GetLifecyclePolicyCommand = async (input, context) => {
|
|
74
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
75
|
+
const headers = {};
|
|
76
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policies/{PolicyId}";
|
|
77
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "PolicyId", () => input.PolicyId, "{PolicyId}", false);
|
|
78
|
+
let body;
|
|
79
|
+
return new __HttpRequest({
|
|
80
|
+
protocol,
|
|
81
|
+
hostname,
|
|
82
|
+
port,
|
|
83
|
+
method: "GET",
|
|
84
|
+
headers,
|
|
85
|
+
path: resolvedPath,
|
|
86
|
+
body,
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
|
|
90
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
91
|
+
const headers = {};
|
|
92
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
93
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
94
|
+
let body;
|
|
95
|
+
return new __HttpRequest({
|
|
96
|
+
protocol,
|
|
97
|
+
hostname,
|
|
98
|
+
port,
|
|
99
|
+
method: "GET",
|
|
100
|
+
headers,
|
|
101
|
+
path: resolvedPath,
|
|
102
|
+
body,
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
export const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
106
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
107
|
+
const headers = {
|
|
108
|
+
"content-type": "application/json",
|
|
109
|
+
};
|
|
110
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
111
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
112
|
+
let body;
|
|
113
|
+
body = JSON.stringify({
|
|
114
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
115
|
+
});
|
|
116
|
+
return new __HttpRequest({
|
|
117
|
+
protocol,
|
|
118
|
+
hostname,
|
|
119
|
+
port,
|
|
120
|
+
method: "POST",
|
|
121
|
+
headers,
|
|
122
|
+
path: resolvedPath,
|
|
123
|
+
body,
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
export const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
127
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
128
|
+
const headers = {};
|
|
129
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
130
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
131
|
+
const query = map({
|
|
132
|
+
tagKeys: [() => input.TagKeys !== void 0, () => (input.TagKeys || []).map((_entry) => _entry)],
|
|
133
|
+
});
|
|
134
|
+
let body;
|
|
135
|
+
return new __HttpRequest({
|
|
136
|
+
protocol,
|
|
137
|
+
hostname,
|
|
138
|
+
port,
|
|
139
|
+
method: "DELETE",
|
|
140
|
+
headers,
|
|
141
|
+
path: resolvedPath,
|
|
142
|
+
query,
|
|
143
|
+
body,
|
|
144
|
+
});
|
|
145
|
+
};
|
|
146
|
+
export const serializeAws_restJson1UpdateLifecyclePolicyCommand = async (input, context) => {
|
|
147
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
148
|
+
const headers = {
|
|
149
|
+
"content-type": "application/json",
|
|
150
|
+
};
|
|
151
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policies/{PolicyId}";
|
|
152
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "PolicyId", () => input.PolicyId, "{PolicyId}", false);
|
|
153
|
+
let body;
|
|
154
|
+
body = JSON.stringify({
|
|
155
|
+
...(input.Description != null && { Description: input.Description }),
|
|
156
|
+
...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }),
|
|
157
|
+
...(input.PolicyDetails != null && {
|
|
158
|
+
PolicyDetails: serializeAws_restJson1PolicyDetails(input.PolicyDetails, context),
|
|
159
|
+
}),
|
|
160
|
+
...(input.State != null && { State: input.State }),
|
|
161
|
+
});
|
|
162
|
+
return new __HttpRequest({
|
|
163
|
+
protocol,
|
|
164
|
+
hostname,
|
|
165
|
+
port,
|
|
166
|
+
method: "PATCH",
|
|
167
|
+
headers,
|
|
168
|
+
path: resolvedPath,
|
|
169
|
+
body,
|
|
170
|
+
});
|
|
171
|
+
};
|
|
172
|
+
export const deserializeAws_restJson1CreateLifecyclePolicyCommand = async (output, context) => {
|
|
173
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
174
|
+
return deserializeAws_restJson1CreateLifecyclePolicyCommandError(output, context);
|
|
175
|
+
}
|
|
176
|
+
const contents = map({
|
|
177
|
+
$metadata: deserializeMetadata(output),
|
|
484
178
|
});
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
return
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
case 9: return [2];
|
|
524
|
-
}
|
|
179
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
180
|
+
if (data.PolicyId != null) {
|
|
181
|
+
contents.PolicyId = __expectString(data.PolicyId);
|
|
182
|
+
}
|
|
183
|
+
return contents;
|
|
184
|
+
};
|
|
185
|
+
const deserializeAws_restJson1CreateLifecyclePolicyCommandError = async (output, context) => {
|
|
186
|
+
const parsedOutput = {
|
|
187
|
+
...output,
|
|
188
|
+
body: await parseErrorBody(output.body, context),
|
|
189
|
+
};
|
|
190
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
191
|
+
switch (errorCode) {
|
|
192
|
+
case "InternalServerException":
|
|
193
|
+
case "com.amazonaws.dlm#InternalServerException":
|
|
194
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
195
|
+
case "InvalidRequestException":
|
|
196
|
+
case "com.amazonaws.dlm#InvalidRequestException":
|
|
197
|
+
throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
198
|
+
case "LimitExceededException":
|
|
199
|
+
case "com.amazonaws.dlm#LimitExceededException":
|
|
200
|
+
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
201
|
+
default:
|
|
202
|
+
const parsedBody = parsedOutput.body;
|
|
203
|
+
throwDefaultError({
|
|
204
|
+
output,
|
|
205
|
+
parsedBody,
|
|
206
|
+
exceptionCtor: __BaseException,
|
|
207
|
+
errorCode,
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
export const deserializeAws_restJson1DeleteLifecyclePolicyCommand = async (output, context) => {
|
|
212
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
213
|
+
return deserializeAws_restJson1DeleteLifecyclePolicyCommandError(output, context);
|
|
214
|
+
}
|
|
215
|
+
const contents = map({
|
|
216
|
+
$metadata: deserializeMetadata(output),
|
|
525
217
|
});
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
218
|
+
await collectBody(output.body, context);
|
|
219
|
+
return contents;
|
|
220
|
+
};
|
|
221
|
+
const deserializeAws_restJson1DeleteLifecyclePolicyCommandError = async (output, context) => {
|
|
222
|
+
const parsedOutput = {
|
|
223
|
+
...output,
|
|
224
|
+
body: await parseErrorBody(output.body, context),
|
|
225
|
+
};
|
|
226
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
227
|
+
switch (errorCode) {
|
|
228
|
+
case "InternalServerException":
|
|
229
|
+
case "com.amazonaws.dlm#InternalServerException":
|
|
230
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
231
|
+
case "LimitExceededException":
|
|
232
|
+
case "com.amazonaws.dlm#LimitExceededException":
|
|
233
|
+
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
234
|
+
case "ResourceNotFoundException":
|
|
235
|
+
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
236
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
237
|
+
default:
|
|
238
|
+
const parsedBody = parsedOutput.body;
|
|
239
|
+
throwDefaultError({
|
|
240
|
+
output,
|
|
241
|
+
parsedBody,
|
|
242
|
+
exceptionCtor: __BaseException,
|
|
243
|
+
errorCode,
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
export const deserializeAws_restJson1GetLifecyclePoliciesCommand = async (output, context) => {
|
|
248
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
249
|
+
return deserializeAws_restJson1GetLifecyclePoliciesCommandError(output, context);
|
|
250
|
+
}
|
|
251
|
+
const contents = map({
|
|
252
|
+
$metadata: deserializeMetadata(output),
|
|
543
253
|
});
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
return
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
254
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
255
|
+
if (data.Policies != null) {
|
|
256
|
+
contents.Policies = deserializeAws_restJson1LifecyclePolicySummaryList(data.Policies, context);
|
|
257
|
+
}
|
|
258
|
+
return contents;
|
|
259
|
+
};
|
|
260
|
+
const deserializeAws_restJson1GetLifecyclePoliciesCommandError = async (output, context) => {
|
|
261
|
+
const parsedOutput = {
|
|
262
|
+
...output,
|
|
263
|
+
body: await parseErrorBody(output.body, context),
|
|
264
|
+
};
|
|
265
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
266
|
+
switch (errorCode) {
|
|
267
|
+
case "InternalServerException":
|
|
268
|
+
case "com.amazonaws.dlm#InternalServerException":
|
|
269
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
270
|
+
case "InvalidRequestException":
|
|
271
|
+
case "com.amazonaws.dlm#InvalidRequestException":
|
|
272
|
+
throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
273
|
+
case "LimitExceededException":
|
|
274
|
+
case "com.amazonaws.dlm#LimitExceededException":
|
|
275
|
+
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
276
|
+
case "ResourceNotFoundException":
|
|
277
|
+
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
278
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
279
|
+
default:
|
|
280
|
+
const parsedBody = parsedOutput.body;
|
|
281
|
+
throwDefaultError({
|
|
282
|
+
output,
|
|
283
|
+
parsedBody,
|
|
284
|
+
exceptionCtor: __BaseException,
|
|
285
|
+
errorCode,
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
export const deserializeAws_restJson1GetLifecyclePolicyCommand = async (output, context) => {
|
|
290
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
291
|
+
return deserializeAws_restJson1GetLifecyclePolicyCommandError(output, context);
|
|
292
|
+
}
|
|
293
|
+
const contents = map({
|
|
294
|
+
$metadata: deserializeMetadata(output),
|
|
584
295
|
});
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
296
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
297
|
+
if (data.Policy != null) {
|
|
298
|
+
contents.Policy = deserializeAws_restJson1LifecyclePolicy(data.Policy, context);
|
|
299
|
+
}
|
|
300
|
+
return contents;
|
|
301
|
+
};
|
|
302
|
+
const deserializeAws_restJson1GetLifecyclePolicyCommandError = async (output, context) => {
|
|
303
|
+
const parsedOutput = {
|
|
304
|
+
...output,
|
|
305
|
+
body: await parseErrorBody(output.body, context),
|
|
306
|
+
};
|
|
307
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
308
|
+
switch (errorCode) {
|
|
309
|
+
case "InternalServerException":
|
|
310
|
+
case "com.amazonaws.dlm#InternalServerException":
|
|
311
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
312
|
+
case "LimitExceededException":
|
|
313
|
+
case "com.amazonaws.dlm#LimitExceededException":
|
|
314
|
+
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
315
|
+
case "ResourceNotFoundException":
|
|
316
|
+
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
317
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
318
|
+
default:
|
|
319
|
+
const parsedBody = parsedOutput.body;
|
|
320
|
+
throwDefaultError({
|
|
321
|
+
output,
|
|
322
|
+
parsedBody,
|
|
323
|
+
exceptionCtor: __BaseException,
|
|
324
|
+
errorCode,
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
329
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
330
|
+
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
331
|
+
}
|
|
332
|
+
const contents = map({
|
|
333
|
+
$metadata: deserializeMetadata(output),
|
|
602
334
|
});
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
return
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
case 9: return [2];
|
|
642
|
-
}
|
|
335
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
336
|
+
if (data.Tags != null) {
|
|
337
|
+
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
338
|
+
}
|
|
339
|
+
return contents;
|
|
340
|
+
};
|
|
341
|
+
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
342
|
+
const parsedOutput = {
|
|
343
|
+
...output,
|
|
344
|
+
body: await parseErrorBody(output.body, context),
|
|
345
|
+
};
|
|
346
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
347
|
+
switch (errorCode) {
|
|
348
|
+
case "InternalServerException":
|
|
349
|
+
case "com.amazonaws.dlm#InternalServerException":
|
|
350
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
351
|
+
case "InvalidRequestException":
|
|
352
|
+
case "com.amazonaws.dlm#InvalidRequestException":
|
|
353
|
+
throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
354
|
+
case "ResourceNotFoundException":
|
|
355
|
+
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
356
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
357
|
+
default:
|
|
358
|
+
const parsedBody = parsedOutput.body;
|
|
359
|
+
throwDefaultError({
|
|
360
|
+
output,
|
|
361
|
+
parsedBody,
|
|
362
|
+
exceptionCtor: __BaseException,
|
|
363
|
+
errorCode,
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
};
|
|
367
|
+
export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
368
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
369
|
+
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
370
|
+
}
|
|
371
|
+
const contents = map({
|
|
372
|
+
$metadata: deserializeMetadata(output),
|
|
643
373
|
});
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
374
|
+
await collectBody(output.body, context);
|
|
375
|
+
return contents;
|
|
376
|
+
};
|
|
377
|
+
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
378
|
+
const parsedOutput = {
|
|
379
|
+
...output,
|
|
380
|
+
body: await parseErrorBody(output.body, context),
|
|
381
|
+
};
|
|
382
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
383
|
+
switch (errorCode) {
|
|
384
|
+
case "InternalServerException":
|
|
385
|
+
case "com.amazonaws.dlm#InternalServerException":
|
|
386
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
387
|
+
case "InvalidRequestException":
|
|
388
|
+
case "com.amazonaws.dlm#InvalidRequestException":
|
|
389
|
+
throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
390
|
+
case "ResourceNotFoundException":
|
|
391
|
+
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
392
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
393
|
+
default:
|
|
394
|
+
const parsedBody = parsedOutput.body;
|
|
395
|
+
throwDefaultError({
|
|
396
|
+
output,
|
|
397
|
+
parsedBody,
|
|
398
|
+
exceptionCtor: __BaseException,
|
|
399
|
+
errorCode,
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
};
|
|
403
|
+
export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
404
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
405
|
+
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
406
|
+
}
|
|
407
|
+
const contents = map({
|
|
408
|
+
$metadata: deserializeMetadata(output),
|
|
661
409
|
});
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
throwDefaultError({
|
|
698
|
-
output: output,
|
|
699
|
-
parsedBody: parsedBody,
|
|
700
|
-
exceptionCtor: __BaseException,
|
|
701
|
-
errorCode: errorCode,
|
|
702
|
-
});
|
|
703
|
-
_d.label = 11;
|
|
704
|
-
case 11: return [2];
|
|
705
|
-
}
|
|
410
|
+
await collectBody(output.body, context);
|
|
411
|
+
return contents;
|
|
412
|
+
};
|
|
413
|
+
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
414
|
+
const parsedOutput = {
|
|
415
|
+
...output,
|
|
416
|
+
body: await parseErrorBody(output.body, context),
|
|
417
|
+
};
|
|
418
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
419
|
+
switch (errorCode) {
|
|
420
|
+
case "InternalServerException":
|
|
421
|
+
case "com.amazonaws.dlm#InternalServerException":
|
|
422
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
423
|
+
case "InvalidRequestException":
|
|
424
|
+
case "com.amazonaws.dlm#InvalidRequestException":
|
|
425
|
+
throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
426
|
+
case "ResourceNotFoundException":
|
|
427
|
+
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
428
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
429
|
+
default:
|
|
430
|
+
const parsedBody = parsedOutput.body;
|
|
431
|
+
throwDefaultError({
|
|
432
|
+
output,
|
|
433
|
+
parsedBody,
|
|
434
|
+
exceptionCtor: __BaseException,
|
|
435
|
+
errorCode,
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
export const deserializeAws_restJson1UpdateLifecyclePolicyCommand = async (output, context) => {
|
|
440
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
441
|
+
return deserializeAws_restJson1UpdateLifecyclePolicyCommandError(output, context);
|
|
442
|
+
}
|
|
443
|
+
const contents = map({
|
|
444
|
+
$metadata: deserializeMetadata(output),
|
|
706
445
|
});
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
446
|
+
await collectBody(output.body, context);
|
|
447
|
+
return contents;
|
|
448
|
+
};
|
|
449
|
+
const deserializeAws_restJson1UpdateLifecyclePolicyCommandError = async (output, context) => {
|
|
450
|
+
const parsedOutput = {
|
|
451
|
+
...output,
|
|
452
|
+
body: await parseErrorBody(output.body, context),
|
|
453
|
+
};
|
|
454
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
455
|
+
switch (errorCode) {
|
|
456
|
+
case "InternalServerException":
|
|
457
|
+
case "com.amazonaws.dlm#InternalServerException":
|
|
458
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
459
|
+
case "InvalidRequestException":
|
|
460
|
+
case "com.amazonaws.dlm#InvalidRequestException":
|
|
461
|
+
throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
462
|
+
case "LimitExceededException":
|
|
463
|
+
case "com.amazonaws.dlm#LimitExceededException":
|
|
464
|
+
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
465
|
+
case "ResourceNotFoundException":
|
|
466
|
+
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
467
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
468
|
+
default:
|
|
469
|
+
const parsedBody = parsedOutput.body;
|
|
470
|
+
throwDefaultError({
|
|
471
|
+
output,
|
|
472
|
+
parsedBody,
|
|
473
|
+
exceptionCtor: __BaseException,
|
|
474
|
+
errorCode,
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
};
|
|
478
|
+
const map = __map;
|
|
479
|
+
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
480
|
+
const contents = map({});
|
|
481
|
+
const data = parsedOutput.body;
|
|
482
|
+
if (data.Code != null) {
|
|
483
|
+
contents.Code = __expectString(data.Code);
|
|
484
|
+
}
|
|
485
|
+
if (data.Message != null) {
|
|
486
|
+
contents.Message = __expectString(data.Message);
|
|
487
|
+
}
|
|
488
|
+
const exception = new InternalServerException({
|
|
489
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
490
|
+
...contents,
|
|
722
491
|
});
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
492
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
493
|
+
};
|
|
494
|
+
const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOutput, context) => {
|
|
495
|
+
const contents = map({});
|
|
496
|
+
const data = parsedOutput.body;
|
|
497
|
+
if (data.Code != null) {
|
|
498
|
+
contents.Code = __expectString(data.Code);
|
|
499
|
+
}
|
|
500
|
+
if (data.Message != null) {
|
|
501
|
+
contents.Message = __expectString(data.Message);
|
|
502
|
+
}
|
|
503
|
+
if (data.MutuallyExclusiveParameters != null) {
|
|
504
|
+
contents.MutuallyExclusiveParameters = deserializeAws_restJson1ParameterList(data.MutuallyExclusiveParameters, context);
|
|
505
|
+
}
|
|
506
|
+
if (data.RequiredParameters != null) {
|
|
507
|
+
contents.RequiredParameters = deserializeAws_restJson1ParameterList(data.RequiredParameters, context);
|
|
508
|
+
}
|
|
509
|
+
const exception = new InvalidRequestException({
|
|
510
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
511
|
+
...contents,
|
|
743
512
|
});
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
513
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
514
|
+
};
|
|
515
|
+
const deserializeAws_restJson1LimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
516
|
+
const contents = map({});
|
|
517
|
+
const data = parsedOutput.body;
|
|
518
|
+
if (data.Code != null) {
|
|
519
|
+
contents.Code = __expectString(data.Code);
|
|
520
|
+
}
|
|
521
|
+
if (data.Message != null) {
|
|
522
|
+
contents.Message = __expectString(data.Message);
|
|
523
|
+
}
|
|
524
|
+
if (data.ResourceType != null) {
|
|
525
|
+
contents.ResourceType = __expectString(data.ResourceType);
|
|
526
|
+
}
|
|
527
|
+
const exception = new LimitExceededException({
|
|
528
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
529
|
+
...contents,
|
|
761
530
|
});
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
531
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
532
|
+
};
|
|
533
|
+
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
534
|
+
const contents = map({});
|
|
535
|
+
const data = parsedOutput.body;
|
|
536
|
+
if (data.Code != null) {
|
|
537
|
+
contents.Code = __expectString(data.Code);
|
|
538
|
+
}
|
|
539
|
+
if (data.Message != null) {
|
|
540
|
+
contents.Message = __expectString(data.Message);
|
|
541
|
+
}
|
|
542
|
+
if (data.ResourceIds != null) {
|
|
543
|
+
contents.ResourceIds = deserializeAws_restJson1PolicyIdList(data.ResourceIds, context);
|
|
544
|
+
}
|
|
545
|
+
if (data.ResourceType != null) {
|
|
546
|
+
contents.ResourceType = __expectString(data.ResourceType);
|
|
547
|
+
}
|
|
548
|
+
const exception = new ResourceNotFoundException({
|
|
549
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
550
|
+
...contents,
|
|
782
551
|
});
|
|
783
|
-
|
|
784
|
-
var serializeAws_restJson1Action = function (input, context) {
|
|
785
|
-
return __assign(__assign({}, (input.CrossRegionCopy != null && {
|
|
786
|
-
CrossRegionCopy: serializeAws_restJson1CrossRegionCopyActionList(input.CrossRegionCopy, context),
|
|
787
|
-
})), (input.Name != null && { Name: input.Name }));
|
|
552
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
788
553
|
};
|
|
789
|
-
|
|
554
|
+
const serializeAws_restJson1Action = (input, context) => {
|
|
555
|
+
return {
|
|
556
|
+
...(input.CrossRegionCopy != null && {
|
|
557
|
+
CrossRegionCopy: serializeAws_restJson1CrossRegionCopyActionList(input.CrossRegionCopy, context),
|
|
558
|
+
}),
|
|
559
|
+
...(input.Name != null && { Name: input.Name }),
|
|
560
|
+
};
|
|
561
|
+
};
|
|
562
|
+
const serializeAws_restJson1ActionList = (input, context) => {
|
|
790
563
|
return input
|
|
791
|
-
.filter(
|
|
792
|
-
.map(
|
|
564
|
+
.filter((e) => e != null)
|
|
565
|
+
.map((entry) => {
|
|
793
566
|
return serializeAws_restJson1Action(entry, context);
|
|
794
567
|
});
|
|
795
568
|
};
|
|
796
|
-
|
|
797
|
-
return
|
|
798
|
-
|
|
799
|
-
|
|
569
|
+
const serializeAws_restJson1ArchiveRetainRule = (input, context) => {
|
|
570
|
+
return {
|
|
571
|
+
...(input.RetentionArchiveTier != null && {
|
|
572
|
+
RetentionArchiveTier: serializeAws_restJson1RetentionArchiveTier(input.RetentionArchiveTier, context),
|
|
573
|
+
}),
|
|
574
|
+
};
|
|
800
575
|
};
|
|
801
|
-
|
|
802
|
-
return
|
|
576
|
+
const serializeAws_restJson1ArchiveRule = (input, context) => {
|
|
577
|
+
return {
|
|
578
|
+
...(input.RetainRule != null && { RetainRule: serializeAws_restJson1ArchiveRetainRule(input.RetainRule, context) }),
|
|
579
|
+
};
|
|
803
580
|
};
|
|
804
|
-
|
|
581
|
+
const serializeAws_restJson1AvailabilityZoneList = (input, context) => {
|
|
805
582
|
return input
|
|
806
|
-
.filter(
|
|
807
|
-
.map(
|
|
583
|
+
.filter((e) => e != null)
|
|
584
|
+
.map((entry) => {
|
|
808
585
|
return entry;
|
|
809
586
|
});
|
|
810
587
|
};
|
|
811
|
-
|
|
812
|
-
return
|
|
588
|
+
const serializeAws_restJson1CreateRule = (input, context) => {
|
|
589
|
+
return {
|
|
590
|
+
...(input.CronExpression != null && { CronExpression: input.CronExpression }),
|
|
591
|
+
...(input.Interval != null && { Interval: input.Interval }),
|
|
592
|
+
...(input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }),
|
|
593
|
+
...(input.Location != null && { Location: input.Location }),
|
|
594
|
+
...(input.Times != null && { Times: serializeAws_restJson1TimesList(input.Times, context) }),
|
|
595
|
+
};
|
|
813
596
|
};
|
|
814
|
-
|
|
815
|
-
return
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
597
|
+
const serializeAws_restJson1CrossRegionCopyAction = (input, context) => {
|
|
598
|
+
return {
|
|
599
|
+
...(input.EncryptionConfiguration != null && {
|
|
600
|
+
EncryptionConfiguration: serializeAws_restJson1EncryptionConfiguration(input.EncryptionConfiguration, context),
|
|
601
|
+
}),
|
|
602
|
+
...(input.RetainRule != null && {
|
|
603
|
+
RetainRule: serializeAws_restJson1CrossRegionCopyRetainRule(input.RetainRule, context),
|
|
604
|
+
}),
|
|
605
|
+
...(input.Target != null && { Target: input.Target }),
|
|
606
|
+
};
|
|
820
607
|
};
|
|
821
|
-
|
|
608
|
+
const serializeAws_restJson1CrossRegionCopyActionList = (input, context) => {
|
|
822
609
|
return input
|
|
823
|
-
.filter(
|
|
824
|
-
.map(
|
|
610
|
+
.filter((e) => e != null)
|
|
611
|
+
.map((entry) => {
|
|
825
612
|
return serializeAws_restJson1CrossRegionCopyAction(entry, context);
|
|
826
613
|
});
|
|
827
614
|
};
|
|
828
|
-
|
|
829
|
-
return
|
|
615
|
+
const serializeAws_restJson1CrossRegionCopyDeprecateRule = (input, context) => {
|
|
616
|
+
return {
|
|
617
|
+
...(input.Interval != null && { Interval: input.Interval }),
|
|
618
|
+
...(input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }),
|
|
619
|
+
};
|
|
830
620
|
};
|
|
831
|
-
|
|
832
|
-
return
|
|
621
|
+
const serializeAws_restJson1CrossRegionCopyRetainRule = (input, context) => {
|
|
622
|
+
return {
|
|
623
|
+
...(input.Interval != null && { Interval: input.Interval }),
|
|
624
|
+
...(input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }),
|
|
625
|
+
};
|
|
833
626
|
};
|
|
834
|
-
|
|
835
|
-
return
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
627
|
+
const serializeAws_restJson1CrossRegionCopyRule = (input, context) => {
|
|
628
|
+
return {
|
|
629
|
+
...(input.CmkArn != null && { CmkArn: input.CmkArn }),
|
|
630
|
+
...(input.CopyTags != null && { CopyTags: input.CopyTags }),
|
|
631
|
+
...(input.DeprecateRule != null && {
|
|
632
|
+
DeprecateRule: serializeAws_restJson1CrossRegionCopyDeprecateRule(input.DeprecateRule, context),
|
|
633
|
+
}),
|
|
634
|
+
...(input.Encrypted != null && { Encrypted: input.Encrypted }),
|
|
635
|
+
...(input.RetainRule != null && {
|
|
636
|
+
RetainRule: serializeAws_restJson1CrossRegionCopyRetainRule(input.RetainRule, context),
|
|
637
|
+
}),
|
|
638
|
+
...(input.Target != null && { Target: input.Target }),
|
|
639
|
+
...(input.TargetRegion != null && { TargetRegion: input.TargetRegion }),
|
|
640
|
+
};
|
|
840
641
|
};
|
|
841
|
-
|
|
642
|
+
const serializeAws_restJson1CrossRegionCopyRules = (input, context) => {
|
|
842
643
|
return input
|
|
843
|
-
.filter(
|
|
844
|
-
.map(
|
|
644
|
+
.filter((e) => e != null)
|
|
645
|
+
.map((entry) => {
|
|
845
646
|
return serializeAws_restJson1CrossRegionCopyRule(entry, context);
|
|
846
647
|
});
|
|
847
648
|
};
|
|
848
|
-
|
|
849
|
-
return
|
|
649
|
+
const serializeAws_restJson1DeprecateRule = (input, context) => {
|
|
650
|
+
return {
|
|
651
|
+
...(input.Count != null && { Count: input.Count }),
|
|
652
|
+
...(input.Interval != null && { Interval: input.Interval }),
|
|
653
|
+
...(input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }),
|
|
654
|
+
};
|
|
850
655
|
};
|
|
851
|
-
|
|
852
|
-
return
|
|
656
|
+
const serializeAws_restJson1EncryptionConfiguration = (input, context) => {
|
|
657
|
+
return {
|
|
658
|
+
...(input.CmkArn != null && { CmkArn: input.CmkArn }),
|
|
659
|
+
...(input.Encrypted != null && { Encrypted: input.Encrypted }),
|
|
660
|
+
};
|
|
853
661
|
};
|
|
854
|
-
|
|
855
|
-
return
|
|
856
|
-
|
|
857
|
-
|
|
662
|
+
const serializeAws_restJson1EventParameters = (input, context) => {
|
|
663
|
+
return {
|
|
664
|
+
...(input.DescriptionRegex != null && { DescriptionRegex: input.DescriptionRegex }),
|
|
665
|
+
...(input.EventType != null && { EventType: input.EventType }),
|
|
666
|
+
...(input.SnapshotOwner != null && {
|
|
667
|
+
SnapshotOwner: serializeAws_restJson1SnapshotOwnerList(input.SnapshotOwner, context),
|
|
668
|
+
}),
|
|
669
|
+
};
|
|
858
670
|
};
|
|
859
|
-
|
|
860
|
-
return
|
|
671
|
+
const serializeAws_restJson1EventSource = (input, context) => {
|
|
672
|
+
return {
|
|
673
|
+
...(input.Parameters != null && { Parameters: serializeAws_restJson1EventParameters(input.Parameters, context) }),
|
|
674
|
+
...(input.Type != null && { Type: input.Type }),
|
|
675
|
+
};
|
|
861
676
|
};
|
|
862
|
-
|
|
677
|
+
const serializeAws_restJson1ExcludeDataVolumeTagList = (input, context) => {
|
|
863
678
|
return input
|
|
864
|
-
.filter(
|
|
865
|
-
.map(
|
|
679
|
+
.filter((e) => e != null)
|
|
680
|
+
.map((entry) => {
|
|
866
681
|
return serializeAws_restJson1Tag(entry, context);
|
|
867
682
|
});
|
|
868
683
|
};
|
|
869
|
-
|
|
870
|
-
return
|
|
871
|
-
|
|
872
|
-
|
|
684
|
+
const serializeAws_restJson1FastRestoreRule = (input, context) => {
|
|
685
|
+
return {
|
|
686
|
+
...(input.AvailabilityZones != null && {
|
|
687
|
+
AvailabilityZones: serializeAws_restJson1AvailabilityZoneList(input.AvailabilityZones, context),
|
|
688
|
+
}),
|
|
689
|
+
...(input.Count != null && { Count: input.Count }),
|
|
690
|
+
...(input.Interval != null && { Interval: input.Interval }),
|
|
691
|
+
...(input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }),
|
|
692
|
+
};
|
|
873
693
|
};
|
|
874
|
-
|
|
875
|
-
return
|
|
876
|
-
|
|
877
|
-
|
|
694
|
+
const serializeAws_restJson1_Parameters = (input, context) => {
|
|
695
|
+
return {
|
|
696
|
+
...(input.ExcludeBootVolume != null && { ExcludeBootVolume: input.ExcludeBootVolume }),
|
|
697
|
+
...(input.ExcludeDataVolumeTags != null && {
|
|
698
|
+
ExcludeDataVolumeTags: serializeAws_restJson1ExcludeDataVolumeTagList(input.ExcludeDataVolumeTags, context),
|
|
699
|
+
}),
|
|
700
|
+
...(input.NoReboot != null && { NoReboot: input.NoReboot }),
|
|
701
|
+
};
|
|
878
702
|
};
|
|
879
|
-
|
|
880
|
-
return
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
703
|
+
const serializeAws_restJson1PolicyDetails = (input, context) => {
|
|
704
|
+
return {
|
|
705
|
+
...(input.Actions != null && { Actions: serializeAws_restJson1ActionList(input.Actions, context) }),
|
|
706
|
+
...(input.EventSource != null && { EventSource: serializeAws_restJson1EventSource(input.EventSource, context) }),
|
|
707
|
+
...(input.Parameters != null && { Parameters: serializeAws_restJson1_Parameters(input.Parameters, context) }),
|
|
708
|
+
...(input.PolicyType != null && { PolicyType: input.PolicyType }),
|
|
709
|
+
...(input.ResourceLocations != null && {
|
|
710
|
+
ResourceLocations: serializeAws_restJson1ResourceLocationList(input.ResourceLocations, context),
|
|
711
|
+
}),
|
|
712
|
+
...(input.ResourceTypes != null && {
|
|
713
|
+
ResourceTypes: serializeAws_restJson1ResourceTypeValuesList(input.ResourceTypes, context),
|
|
714
|
+
}),
|
|
715
|
+
...(input.Schedules != null && { Schedules: serializeAws_restJson1ScheduleList(input.Schedules, context) }),
|
|
716
|
+
...(input.TargetTags != null && { TargetTags: serializeAws_restJson1TargetTagList(input.TargetTags, context) }),
|
|
717
|
+
};
|
|
885
718
|
};
|
|
886
|
-
|
|
719
|
+
const serializeAws_restJson1ResourceLocationList = (input, context) => {
|
|
887
720
|
return input
|
|
888
|
-
.filter(
|
|
889
|
-
.map(
|
|
721
|
+
.filter((e) => e != null)
|
|
722
|
+
.map((entry) => {
|
|
890
723
|
return entry;
|
|
891
724
|
});
|
|
892
725
|
};
|
|
893
|
-
|
|
726
|
+
const serializeAws_restJson1ResourceTypeValuesList = (input, context) => {
|
|
894
727
|
return input
|
|
895
|
-
.filter(
|
|
896
|
-
.map(
|
|
728
|
+
.filter((e) => e != null)
|
|
729
|
+
.map((entry) => {
|
|
897
730
|
return entry;
|
|
898
731
|
});
|
|
899
732
|
};
|
|
900
|
-
|
|
901
|
-
return
|
|
733
|
+
const serializeAws_restJson1RetainRule = (input, context) => {
|
|
734
|
+
return {
|
|
735
|
+
...(input.Count != null && { Count: input.Count }),
|
|
736
|
+
...(input.Interval != null && { Interval: input.Interval }),
|
|
737
|
+
...(input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }),
|
|
738
|
+
};
|
|
902
739
|
};
|
|
903
|
-
|
|
904
|
-
return
|
|
740
|
+
const serializeAws_restJson1RetentionArchiveTier = (input, context) => {
|
|
741
|
+
return {
|
|
742
|
+
...(input.Count != null && { Count: input.Count }),
|
|
743
|
+
...(input.Interval != null && { Interval: input.Interval }),
|
|
744
|
+
...(input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }),
|
|
745
|
+
};
|
|
905
746
|
};
|
|
906
|
-
|
|
907
|
-
return
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
747
|
+
const serializeAws_restJson1Schedule = (input, context) => {
|
|
748
|
+
return {
|
|
749
|
+
...(input.ArchiveRule != null && { ArchiveRule: serializeAws_restJson1ArchiveRule(input.ArchiveRule, context) }),
|
|
750
|
+
...(input.CopyTags != null && { CopyTags: input.CopyTags }),
|
|
751
|
+
...(input.CreateRule != null && { CreateRule: serializeAws_restJson1CreateRule(input.CreateRule, context) }),
|
|
752
|
+
...(input.CrossRegionCopyRules != null && {
|
|
753
|
+
CrossRegionCopyRules: serializeAws_restJson1CrossRegionCopyRules(input.CrossRegionCopyRules, context),
|
|
754
|
+
}),
|
|
755
|
+
...(input.DeprecateRule != null && {
|
|
756
|
+
DeprecateRule: serializeAws_restJson1DeprecateRule(input.DeprecateRule, context),
|
|
757
|
+
}),
|
|
758
|
+
...(input.FastRestoreRule != null && {
|
|
759
|
+
FastRestoreRule: serializeAws_restJson1FastRestoreRule(input.FastRestoreRule, context),
|
|
760
|
+
}),
|
|
761
|
+
...(input.Name != null && { Name: input.Name }),
|
|
762
|
+
...(input.RetainRule != null && { RetainRule: serializeAws_restJson1RetainRule(input.RetainRule, context) }),
|
|
763
|
+
...(input.ShareRules != null && { ShareRules: serializeAws_restJson1ShareRules(input.ShareRules, context) }),
|
|
764
|
+
...(input.TagsToAdd != null && { TagsToAdd: serializeAws_restJson1TagsToAddList(input.TagsToAdd, context) }),
|
|
765
|
+
...(input.VariableTags != null && {
|
|
766
|
+
VariableTags: serializeAws_restJson1VariableTagsList(input.VariableTags, context),
|
|
767
|
+
}),
|
|
768
|
+
};
|
|
916
769
|
};
|
|
917
|
-
|
|
770
|
+
const serializeAws_restJson1ScheduleList = (input, context) => {
|
|
918
771
|
return input
|
|
919
|
-
.filter(
|
|
920
|
-
.map(
|
|
772
|
+
.filter((e) => e != null)
|
|
773
|
+
.map((entry) => {
|
|
921
774
|
return serializeAws_restJson1Schedule(entry, context);
|
|
922
775
|
});
|
|
923
776
|
};
|
|
924
|
-
|
|
925
|
-
return
|
|
926
|
-
|
|
927
|
-
|
|
777
|
+
const serializeAws_restJson1ShareRule = (input, context) => {
|
|
778
|
+
return {
|
|
779
|
+
...(input.TargetAccounts != null && {
|
|
780
|
+
TargetAccounts: serializeAws_restJson1ShareTargetAccountList(input.TargetAccounts, context),
|
|
781
|
+
}),
|
|
782
|
+
...(input.UnshareInterval != null && { UnshareInterval: input.UnshareInterval }),
|
|
783
|
+
...(input.UnshareIntervalUnit != null && { UnshareIntervalUnit: input.UnshareIntervalUnit }),
|
|
784
|
+
};
|
|
928
785
|
};
|
|
929
|
-
|
|
786
|
+
const serializeAws_restJson1ShareRules = (input, context) => {
|
|
930
787
|
return input
|
|
931
|
-
.filter(
|
|
932
|
-
.map(
|
|
788
|
+
.filter((e) => e != null)
|
|
789
|
+
.map((entry) => {
|
|
933
790
|
return serializeAws_restJson1ShareRule(entry, context);
|
|
934
791
|
});
|
|
935
792
|
};
|
|
936
|
-
|
|
793
|
+
const serializeAws_restJson1ShareTargetAccountList = (input, context) => {
|
|
937
794
|
return input
|
|
938
|
-
.filter(
|
|
939
|
-
.map(
|
|
795
|
+
.filter((e) => e != null)
|
|
796
|
+
.map((entry) => {
|
|
940
797
|
return entry;
|
|
941
798
|
});
|
|
942
799
|
};
|
|
943
|
-
|
|
800
|
+
const serializeAws_restJson1SnapshotOwnerList = (input, context) => {
|
|
944
801
|
return input
|
|
945
|
-
.filter(
|
|
946
|
-
.map(
|
|
802
|
+
.filter((e) => e != null)
|
|
803
|
+
.map((entry) => {
|
|
947
804
|
return entry;
|
|
948
805
|
});
|
|
949
806
|
};
|
|
950
|
-
|
|
951
|
-
return
|
|
807
|
+
const serializeAws_restJson1Tag = (input, context) => {
|
|
808
|
+
return {
|
|
809
|
+
...(input.Key != null && { Key: input.Key }),
|
|
810
|
+
...(input.Value != null && { Value: input.Value }),
|
|
811
|
+
};
|
|
952
812
|
};
|
|
953
|
-
|
|
954
|
-
return Object.entries(input).reduce(
|
|
955
|
-
var _b;
|
|
956
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
813
|
+
const serializeAws_restJson1TagMap = (input, context) => {
|
|
814
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
957
815
|
if (value === null) {
|
|
958
816
|
return acc;
|
|
959
817
|
}
|
|
960
|
-
return
|
|
818
|
+
return {
|
|
819
|
+
...acc,
|
|
820
|
+
[key]: value,
|
|
821
|
+
};
|
|
961
822
|
}, {});
|
|
962
823
|
};
|
|
963
|
-
|
|
824
|
+
const serializeAws_restJson1TagsToAddList = (input, context) => {
|
|
964
825
|
return input
|
|
965
|
-
.filter(
|
|
966
|
-
.map(
|
|
826
|
+
.filter((e) => e != null)
|
|
827
|
+
.map((entry) => {
|
|
967
828
|
return serializeAws_restJson1Tag(entry, context);
|
|
968
829
|
});
|
|
969
830
|
};
|
|
970
|
-
|
|
831
|
+
const serializeAws_restJson1TargetTagList = (input, context) => {
|
|
971
832
|
return input
|
|
972
|
-
.filter(
|
|
973
|
-
.map(
|
|
833
|
+
.filter((e) => e != null)
|
|
834
|
+
.map((entry) => {
|
|
974
835
|
return serializeAws_restJson1Tag(entry, context);
|
|
975
836
|
});
|
|
976
837
|
};
|
|
977
|
-
|
|
838
|
+
const serializeAws_restJson1TimesList = (input, context) => {
|
|
978
839
|
return input
|
|
979
|
-
.filter(
|
|
980
|
-
.map(
|
|
840
|
+
.filter((e) => e != null)
|
|
841
|
+
.map((entry) => {
|
|
981
842
|
return entry;
|
|
982
843
|
});
|
|
983
844
|
};
|
|
984
|
-
|
|
845
|
+
const serializeAws_restJson1VariableTagsList = (input, context) => {
|
|
985
846
|
return input
|
|
986
|
-
.filter(
|
|
987
|
-
.map(
|
|
847
|
+
.filter((e) => e != null)
|
|
848
|
+
.map((entry) => {
|
|
988
849
|
return serializeAws_restJson1Tag(entry, context);
|
|
989
850
|
});
|
|
990
851
|
};
|
|
991
|
-
|
|
852
|
+
const deserializeAws_restJson1Action = (output, context) => {
|
|
992
853
|
return {
|
|
993
854
|
CrossRegionCopy: output.CrossRegionCopy != null
|
|
994
855
|
? deserializeAws_restJson1CrossRegionCopyActionList(output.CrossRegionCopy, context)
|
|
@@ -996,10 +857,10 @@ var deserializeAws_restJson1Action = function (output, context) {
|
|
|
996
857
|
Name: __expectString(output.Name),
|
|
997
858
|
};
|
|
998
859
|
};
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
.filter(
|
|
1002
|
-
.map(
|
|
860
|
+
const deserializeAws_restJson1ActionList = (output, context) => {
|
|
861
|
+
const retVal = (output || [])
|
|
862
|
+
.filter((e) => e != null)
|
|
863
|
+
.map((entry) => {
|
|
1003
864
|
if (entry === null) {
|
|
1004
865
|
return null;
|
|
1005
866
|
}
|
|
@@ -1007,22 +868,22 @@ var deserializeAws_restJson1ActionList = function (output, context) {
|
|
|
1007
868
|
});
|
|
1008
869
|
return retVal;
|
|
1009
870
|
};
|
|
1010
|
-
|
|
871
|
+
const deserializeAws_restJson1ArchiveRetainRule = (output, context) => {
|
|
1011
872
|
return {
|
|
1012
873
|
RetentionArchiveTier: output.RetentionArchiveTier != null
|
|
1013
874
|
? deserializeAws_restJson1RetentionArchiveTier(output.RetentionArchiveTier, context)
|
|
1014
875
|
: undefined,
|
|
1015
876
|
};
|
|
1016
877
|
};
|
|
1017
|
-
|
|
878
|
+
const deserializeAws_restJson1ArchiveRule = (output, context) => {
|
|
1018
879
|
return {
|
|
1019
880
|
RetainRule: output.RetainRule != null ? deserializeAws_restJson1ArchiveRetainRule(output.RetainRule, context) : undefined,
|
|
1020
881
|
};
|
|
1021
882
|
};
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
.filter(
|
|
1025
|
-
.map(
|
|
883
|
+
const deserializeAws_restJson1AvailabilityZoneList = (output, context) => {
|
|
884
|
+
const retVal = (output || [])
|
|
885
|
+
.filter((e) => e != null)
|
|
886
|
+
.map((entry) => {
|
|
1026
887
|
if (entry === null) {
|
|
1027
888
|
return null;
|
|
1028
889
|
}
|
|
@@ -1030,7 +891,7 @@ var deserializeAws_restJson1AvailabilityZoneList = function (output, context) {
|
|
|
1030
891
|
});
|
|
1031
892
|
return retVal;
|
|
1032
893
|
};
|
|
1033
|
-
|
|
894
|
+
const deserializeAws_restJson1CreateRule = (output, context) => {
|
|
1034
895
|
return {
|
|
1035
896
|
CronExpression: __expectString(output.CronExpression),
|
|
1036
897
|
Interval: __expectInt32(output.Interval),
|
|
@@ -1039,7 +900,7 @@ var deserializeAws_restJson1CreateRule = function (output, context) {
|
|
|
1039
900
|
Times: output.Times != null ? deserializeAws_restJson1TimesList(output.Times, context) : undefined,
|
|
1040
901
|
};
|
|
1041
902
|
};
|
|
1042
|
-
|
|
903
|
+
const deserializeAws_restJson1CrossRegionCopyAction = (output, context) => {
|
|
1043
904
|
return {
|
|
1044
905
|
EncryptionConfiguration: output.EncryptionConfiguration != null
|
|
1045
906
|
? deserializeAws_restJson1EncryptionConfiguration(output.EncryptionConfiguration, context)
|
|
@@ -1050,10 +911,10 @@ var deserializeAws_restJson1CrossRegionCopyAction = function (output, context) {
|
|
|
1050
911
|
Target: __expectString(output.Target),
|
|
1051
912
|
};
|
|
1052
913
|
};
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
.filter(
|
|
1056
|
-
.map(
|
|
914
|
+
const deserializeAws_restJson1CrossRegionCopyActionList = (output, context) => {
|
|
915
|
+
const retVal = (output || [])
|
|
916
|
+
.filter((e) => e != null)
|
|
917
|
+
.map((entry) => {
|
|
1057
918
|
if (entry === null) {
|
|
1058
919
|
return null;
|
|
1059
920
|
}
|
|
@@ -1061,19 +922,19 @@ var deserializeAws_restJson1CrossRegionCopyActionList = function (output, contex
|
|
|
1061
922
|
});
|
|
1062
923
|
return retVal;
|
|
1063
924
|
};
|
|
1064
|
-
|
|
925
|
+
const deserializeAws_restJson1CrossRegionCopyDeprecateRule = (output, context) => {
|
|
1065
926
|
return {
|
|
1066
927
|
Interval: __expectInt32(output.Interval),
|
|
1067
928
|
IntervalUnit: __expectString(output.IntervalUnit),
|
|
1068
929
|
};
|
|
1069
930
|
};
|
|
1070
|
-
|
|
931
|
+
const deserializeAws_restJson1CrossRegionCopyRetainRule = (output, context) => {
|
|
1071
932
|
return {
|
|
1072
933
|
Interval: __expectInt32(output.Interval),
|
|
1073
934
|
IntervalUnit: __expectString(output.IntervalUnit),
|
|
1074
935
|
};
|
|
1075
936
|
};
|
|
1076
|
-
|
|
937
|
+
const deserializeAws_restJson1CrossRegionCopyRule = (output, context) => {
|
|
1077
938
|
return {
|
|
1078
939
|
CmkArn: __expectString(output.CmkArn),
|
|
1079
940
|
CopyTags: __expectBoolean(output.CopyTags),
|
|
@@ -1088,10 +949,10 @@ var deserializeAws_restJson1CrossRegionCopyRule = function (output, context) {
|
|
|
1088
949
|
TargetRegion: __expectString(output.TargetRegion),
|
|
1089
950
|
};
|
|
1090
951
|
};
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
.filter(
|
|
1094
|
-
.map(
|
|
952
|
+
const deserializeAws_restJson1CrossRegionCopyRules = (output, context) => {
|
|
953
|
+
const retVal = (output || [])
|
|
954
|
+
.filter((e) => e != null)
|
|
955
|
+
.map((entry) => {
|
|
1095
956
|
if (entry === null) {
|
|
1096
957
|
return null;
|
|
1097
958
|
}
|
|
@@ -1099,20 +960,20 @@ var deserializeAws_restJson1CrossRegionCopyRules = function (output, context) {
|
|
|
1099
960
|
});
|
|
1100
961
|
return retVal;
|
|
1101
962
|
};
|
|
1102
|
-
|
|
963
|
+
const deserializeAws_restJson1DeprecateRule = (output, context) => {
|
|
1103
964
|
return {
|
|
1104
965
|
Count: __expectInt32(output.Count),
|
|
1105
966
|
Interval: __expectInt32(output.Interval),
|
|
1106
967
|
IntervalUnit: __expectString(output.IntervalUnit),
|
|
1107
968
|
};
|
|
1108
969
|
};
|
|
1109
|
-
|
|
970
|
+
const deserializeAws_restJson1EncryptionConfiguration = (output, context) => {
|
|
1110
971
|
return {
|
|
1111
972
|
CmkArn: __expectString(output.CmkArn),
|
|
1112
973
|
Encrypted: __expectBoolean(output.Encrypted),
|
|
1113
974
|
};
|
|
1114
975
|
};
|
|
1115
|
-
|
|
976
|
+
const deserializeAws_restJson1EventParameters = (output, context) => {
|
|
1116
977
|
return {
|
|
1117
978
|
DescriptionRegex: __expectString(output.DescriptionRegex),
|
|
1118
979
|
EventType: __expectString(output.EventType),
|
|
@@ -1121,16 +982,16 @@ var deserializeAws_restJson1EventParameters = function (output, context) {
|
|
|
1121
982
|
: undefined,
|
|
1122
983
|
};
|
|
1123
984
|
};
|
|
1124
|
-
|
|
985
|
+
const deserializeAws_restJson1EventSource = (output, context) => {
|
|
1125
986
|
return {
|
|
1126
987
|
Parameters: output.Parameters != null ? deserializeAws_restJson1EventParameters(output.Parameters, context) : undefined,
|
|
1127
988
|
Type: __expectString(output.Type),
|
|
1128
989
|
};
|
|
1129
990
|
};
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
.filter(
|
|
1133
|
-
.map(
|
|
991
|
+
const deserializeAws_restJson1ExcludeDataVolumeTagList = (output, context) => {
|
|
992
|
+
const retVal = (output || [])
|
|
993
|
+
.filter((e) => e != null)
|
|
994
|
+
.map((entry) => {
|
|
1134
995
|
if (entry === null) {
|
|
1135
996
|
return null;
|
|
1136
997
|
}
|
|
@@ -1138,7 +999,7 @@ var deserializeAws_restJson1ExcludeDataVolumeTagList = function (output, context
|
|
|
1138
999
|
});
|
|
1139
1000
|
return retVal;
|
|
1140
1001
|
};
|
|
1141
|
-
|
|
1002
|
+
const deserializeAws_restJson1FastRestoreRule = (output, context) => {
|
|
1142
1003
|
return {
|
|
1143
1004
|
AvailabilityZones: output.AvailabilityZones != null
|
|
1144
1005
|
? deserializeAws_restJson1AvailabilityZoneList(output.AvailabilityZones, context)
|
|
@@ -1148,7 +1009,7 @@ var deserializeAws_restJson1FastRestoreRule = function (output, context) {
|
|
|
1148
1009
|
IntervalUnit: __expectString(output.IntervalUnit),
|
|
1149
1010
|
};
|
|
1150
1011
|
};
|
|
1151
|
-
|
|
1012
|
+
const deserializeAws_restJson1LifecyclePolicy = (output, context) => {
|
|
1152
1013
|
return {
|
|
1153
1014
|
DateCreated: output.DateCreated != null
|
|
1154
1015
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateCreated)))
|
|
@@ -1166,7 +1027,7 @@ var deserializeAws_restJson1LifecyclePolicy = function (output, context) {
|
|
|
1166
1027
|
Tags: output.Tags != null ? deserializeAws_restJson1TagMap(output.Tags, context) : undefined,
|
|
1167
1028
|
};
|
|
1168
1029
|
};
|
|
1169
|
-
|
|
1030
|
+
const deserializeAws_restJson1LifecyclePolicySummary = (output, context) => {
|
|
1170
1031
|
return {
|
|
1171
1032
|
Description: __expectString(output.Description),
|
|
1172
1033
|
PolicyId: __expectString(output.PolicyId),
|
|
@@ -1175,10 +1036,10 @@ var deserializeAws_restJson1LifecyclePolicySummary = function (output, context)
|
|
|
1175
1036
|
Tags: output.Tags != null ? deserializeAws_restJson1TagMap(output.Tags, context) : undefined,
|
|
1176
1037
|
};
|
|
1177
1038
|
};
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
.filter(
|
|
1181
|
-
.map(
|
|
1039
|
+
const deserializeAws_restJson1LifecyclePolicySummaryList = (output, context) => {
|
|
1040
|
+
const retVal = (output || [])
|
|
1041
|
+
.filter((e) => e != null)
|
|
1042
|
+
.map((entry) => {
|
|
1182
1043
|
if (entry === null) {
|
|
1183
1044
|
return null;
|
|
1184
1045
|
}
|
|
@@ -1186,10 +1047,10 @@ var deserializeAws_restJson1LifecyclePolicySummaryList = function (output, conte
|
|
|
1186
1047
|
});
|
|
1187
1048
|
return retVal;
|
|
1188
1049
|
};
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
.filter(
|
|
1192
|
-
.map(
|
|
1050
|
+
const deserializeAws_restJson1ParameterList = (output, context) => {
|
|
1051
|
+
const retVal = (output || [])
|
|
1052
|
+
.filter((e) => e != null)
|
|
1053
|
+
.map((entry) => {
|
|
1193
1054
|
if (entry === null) {
|
|
1194
1055
|
return null;
|
|
1195
1056
|
}
|
|
@@ -1197,7 +1058,7 @@ var deserializeAws_restJson1ParameterList = function (output, context) {
|
|
|
1197
1058
|
});
|
|
1198
1059
|
return retVal;
|
|
1199
1060
|
};
|
|
1200
|
-
|
|
1061
|
+
const deserializeAws_restJson1_Parameters = (output, context) => {
|
|
1201
1062
|
return {
|
|
1202
1063
|
ExcludeBootVolume: __expectBoolean(output.ExcludeBootVolume),
|
|
1203
1064
|
ExcludeDataVolumeTags: output.ExcludeDataVolumeTags != null
|
|
@@ -1206,7 +1067,7 @@ var deserializeAws_restJson1_Parameters = function (output, context) {
|
|
|
1206
1067
|
NoReboot: __expectBoolean(output.NoReboot),
|
|
1207
1068
|
};
|
|
1208
1069
|
};
|
|
1209
|
-
|
|
1070
|
+
const deserializeAws_restJson1PolicyDetails = (output, context) => {
|
|
1210
1071
|
return {
|
|
1211
1072
|
Actions: output.Actions != null ? deserializeAws_restJson1ActionList(output.Actions, context) : undefined,
|
|
1212
1073
|
EventSource: output.EventSource != null ? deserializeAws_restJson1EventSource(output.EventSource, context) : undefined,
|
|
@@ -1222,10 +1083,10 @@ var deserializeAws_restJson1PolicyDetails = function (output, context) {
|
|
|
1222
1083
|
TargetTags: output.TargetTags != null ? deserializeAws_restJson1TargetTagList(output.TargetTags, context) : undefined,
|
|
1223
1084
|
};
|
|
1224
1085
|
};
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
.filter(
|
|
1228
|
-
.map(
|
|
1086
|
+
const deserializeAws_restJson1PolicyIdList = (output, context) => {
|
|
1087
|
+
const retVal = (output || [])
|
|
1088
|
+
.filter((e) => e != null)
|
|
1089
|
+
.map((entry) => {
|
|
1229
1090
|
if (entry === null) {
|
|
1230
1091
|
return null;
|
|
1231
1092
|
}
|
|
@@ -1233,10 +1094,10 @@ var deserializeAws_restJson1PolicyIdList = function (output, context) {
|
|
|
1233
1094
|
});
|
|
1234
1095
|
return retVal;
|
|
1235
1096
|
};
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
.filter(
|
|
1239
|
-
.map(
|
|
1097
|
+
const deserializeAws_restJson1ResourceLocationList = (output, context) => {
|
|
1098
|
+
const retVal = (output || [])
|
|
1099
|
+
.filter((e) => e != null)
|
|
1100
|
+
.map((entry) => {
|
|
1240
1101
|
if (entry === null) {
|
|
1241
1102
|
return null;
|
|
1242
1103
|
}
|
|
@@ -1244,10 +1105,10 @@ var deserializeAws_restJson1ResourceLocationList = function (output, context) {
|
|
|
1244
1105
|
});
|
|
1245
1106
|
return retVal;
|
|
1246
1107
|
};
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
.filter(
|
|
1250
|
-
.map(
|
|
1108
|
+
const deserializeAws_restJson1ResourceTypeValuesList = (output, context) => {
|
|
1109
|
+
const retVal = (output || [])
|
|
1110
|
+
.filter((e) => e != null)
|
|
1111
|
+
.map((entry) => {
|
|
1251
1112
|
if (entry === null) {
|
|
1252
1113
|
return null;
|
|
1253
1114
|
}
|
|
@@ -1255,21 +1116,21 @@ var deserializeAws_restJson1ResourceTypeValuesList = function (output, context)
|
|
|
1255
1116
|
});
|
|
1256
1117
|
return retVal;
|
|
1257
1118
|
};
|
|
1258
|
-
|
|
1119
|
+
const deserializeAws_restJson1RetainRule = (output, context) => {
|
|
1259
1120
|
return {
|
|
1260
1121
|
Count: __expectInt32(output.Count),
|
|
1261
1122
|
Interval: __expectInt32(output.Interval),
|
|
1262
1123
|
IntervalUnit: __expectString(output.IntervalUnit),
|
|
1263
1124
|
};
|
|
1264
1125
|
};
|
|
1265
|
-
|
|
1126
|
+
const deserializeAws_restJson1RetentionArchiveTier = (output, context) => {
|
|
1266
1127
|
return {
|
|
1267
1128
|
Count: __expectInt32(output.Count),
|
|
1268
1129
|
Interval: __expectInt32(output.Interval),
|
|
1269
1130
|
IntervalUnit: __expectString(output.IntervalUnit),
|
|
1270
1131
|
};
|
|
1271
1132
|
};
|
|
1272
|
-
|
|
1133
|
+
const deserializeAws_restJson1Schedule = (output, context) => {
|
|
1273
1134
|
return {
|
|
1274
1135
|
ArchiveRule: output.ArchiveRule != null ? deserializeAws_restJson1ArchiveRule(output.ArchiveRule, context) : undefined,
|
|
1275
1136
|
CopyTags: __expectBoolean(output.CopyTags),
|
|
@@ -1288,10 +1149,10 @@ var deserializeAws_restJson1Schedule = function (output, context) {
|
|
|
1288
1149
|
VariableTags: output.VariableTags != null ? deserializeAws_restJson1VariableTagsList(output.VariableTags, context) : undefined,
|
|
1289
1150
|
};
|
|
1290
1151
|
};
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
.filter(
|
|
1294
|
-
.map(
|
|
1152
|
+
const deserializeAws_restJson1ScheduleList = (output, context) => {
|
|
1153
|
+
const retVal = (output || [])
|
|
1154
|
+
.filter((e) => e != null)
|
|
1155
|
+
.map((entry) => {
|
|
1295
1156
|
if (entry === null) {
|
|
1296
1157
|
return null;
|
|
1297
1158
|
}
|
|
@@ -1299,7 +1160,7 @@ var deserializeAws_restJson1ScheduleList = function (output, context) {
|
|
|
1299
1160
|
});
|
|
1300
1161
|
return retVal;
|
|
1301
1162
|
};
|
|
1302
|
-
|
|
1163
|
+
const deserializeAws_restJson1ShareRule = (output, context) => {
|
|
1303
1164
|
return {
|
|
1304
1165
|
TargetAccounts: output.TargetAccounts != null
|
|
1305
1166
|
? deserializeAws_restJson1ShareTargetAccountList(output.TargetAccounts, context)
|
|
@@ -1308,10 +1169,10 @@ var deserializeAws_restJson1ShareRule = function (output, context) {
|
|
|
1308
1169
|
UnshareIntervalUnit: __expectString(output.UnshareIntervalUnit),
|
|
1309
1170
|
};
|
|
1310
1171
|
};
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
.filter(
|
|
1314
|
-
.map(
|
|
1172
|
+
const deserializeAws_restJson1ShareRules = (output, context) => {
|
|
1173
|
+
const retVal = (output || [])
|
|
1174
|
+
.filter((e) => e != null)
|
|
1175
|
+
.map((entry) => {
|
|
1315
1176
|
if (entry === null) {
|
|
1316
1177
|
return null;
|
|
1317
1178
|
}
|
|
@@ -1319,10 +1180,10 @@ var deserializeAws_restJson1ShareRules = function (output, context) {
|
|
|
1319
1180
|
});
|
|
1320
1181
|
return retVal;
|
|
1321
1182
|
};
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
.filter(
|
|
1325
|
-
.map(
|
|
1183
|
+
const deserializeAws_restJson1ShareTargetAccountList = (output, context) => {
|
|
1184
|
+
const retVal = (output || [])
|
|
1185
|
+
.filter((e) => e != null)
|
|
1186
|
+
.map((entry) => {
|
|
1326
1187
|
if (entry === null) {
|
|
1327
1188
|
return null;
|
|
1328
1189
|
}
|
|
@@ -1330,10 +1191,10 @@ var deserializeAws_restJson1ShareTargetAccountList = function (output, context)
|
|
|
1330
1191
|
});
|
|
1331
1192
|
return retVal;
|
|
1332
1193
|
};
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
.filter(
|
|
1336
|
-
.map(
|
|
1194
|
+
const deserializeAws_restJson1SnapshotOwnerList = (output, context) => {
|
|
1195
|
+
const retVal = (output || [])
|
|
1196
|
+
.filter((e) => e != null)
|
|
1197
|
+
.map((entry) => {
|
|
1337
1198
|
if (entry === null) {
|
|
1338
1199
|
return null;
|
|
1339
1200
|
}
|
|
@@ -1341,26 +1202,27 @@ var deserializeAws_restJson1SnapshotOwnerList = function (output, context) {
|
|
|
1341
1202
|
});
|
|
1342
1203
|
return retVal;
|
|
1343
1204
|
};
|
|
1344
|
-
|
|
1205
|
+
const deserializeAws_restJson1Tag = (output, context) => {
|
|
1345
1206
|
return {
|
|
1346
1207
|
Key: __expectString(output.Key),
|
|
1347
1208
|
Value: __expectString(output.Value),
|
|
1348
1209
|
};
|
|
1349
1210
|
};
|
|
1350
|
-
|
|
1351
|
-
return Object.entries(output).reduce(
|
|
1352
|
-
var _b;
|
|
1353
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1211
|
+
const deserializeAws_restJson1TagMap = (output, context) => {
|
|
1212
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1354
1213
|
if (value === null) {
|
|
1355
1214
|
return acc;
|
|
1356
1215
|
}
|
|
1357
|
-
return
|
|
1216
|
+
return {
|
|
1217
|
+
...acc,
|
|
1218
|
+
[key]: __expectString(value),
|
|
1219
|
+
};
|
|
1358
1220
|
}, {});
|
|
1359
1221
|
};
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
.filter(
|
|
1363
|
-
.map(
|
|
1222
|
+
const deserializeAws_restJson1TagsToAddList = (output, context) => {
|
|
1223
|
+
const retVal = (output || [])
|
|
1224
|
+
.filter((e) => e != null)
|
|
1225
|
+
.map((entry) => {
|
|
1364
1226
|
if (entry === null) {
|
|
1365
1227
|
return null;
|
|
1366
1228
|
}
|
|
@@ -1368,10 +1230,10 @@ var deserializeAws_restJson1TagsToAddList = function (output, context) {
|
|
|
1368
1230
|
});
|
|
1369
1231
|
return retVal;
|
|
1370
1232
|
};
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
.filter(
|
|
1374
|
-
.map(
|
|
1233
|
+
const deserializeAws_restJson1TargetTagList = (output, context) => {
|
|
1234
|
+
const retVal = (output || [])
|
|
1235
|
+
.filter((e) => e != null)
|
|
1236
|
+
.map((entry) => {
|
|
1375
1237
|
if (entry === null) {
|
|
1376
1238
|
return null;
|
|
1377
1239
|
}
|
|
@@ -1379,10 +1241,10 @@ var deserializeAws_restJson1TargetTagList = function (output, context) {
|
|
|
1379
1241
|
});
|
|
1380
1242
|
return retVal;
|
|
1381
1243
|
};
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
.filter(
|
|
1385
|
-
.map(
|
|
1244
|
+
const deserializeAws_restJson1TimesList = (output, context) => {
|
|
1245
|
+
const retVal = (output || [])
|
|
1246
|
+
.filter((e) => e != null)
|
|
1247
|
+
.map((entry) => {
|
|
1386
1248
|
if (entry === null) {
|
|
1387
1249
|
return null;
|
|
1388
1250
|
}
|
|
@@ -1390,10 +1252,10 @@ var deserializeAws_restJson1TimesList = function (output, context) {
|
|
|
1390
1252
|
});
|
|
1391
1253
|
return retVal;
|
|
1392
1254
|
};
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
.filter(
|
|
1396
|
-
.map(
|
|
1255
|
+
const deserializeAws_restJson1VariableTagsList = (output, context) => {
|
|
1256
|
+
const retVal = (output || [])
|
|
1257
|
+
.filter((e) => e != null)
|
|
1258
|
+
.map((entry) => {
|
|
1397
1259
|
if (entry === null) {
|
|
1398
1260
|
return null;
|
|
1399
1261
|
}
|
|
@@ -1401,57 +1263,39 @@ var deserializeAws_restJson1VariableTagsList = function (output, context) {
|
|
|
1401
1263
|
});
|
|
1402
1264
|
return retVal;
|
|
1403
1265
|
};
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
});
|
|
1412
|
-
};
|
|
1413
|
-
var collectBody = function (streamBody, context) {
|
|
1414
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1266
|
+
const deserializeMetadata = (output) => ({
|
|
1267
|
+
httpStatusCode: output.statusCode,
|
|
1268
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
1269
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1270
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1271
|
+
});
|
|
1272
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
1415
1273
|
if (streamBody instanceof Uint8Array) {
|
|
1416
1274
|
return Promise.resolve(streamBody);
|
|
1417
1275
|
}
|
|
1418
1276
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1419
1277
|
};
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
}
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
return __generator(this, function (_b) {
|
|
1442
|
-
switch (_b.label) {
|
|
1443
|
-
case 0: return [4, parseBody(errorBody, context)];
|
|
1444
|
-
case 1:
|
|
1445
|
-
value = _b.sent();
|
|
1446
|
-
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1447
|
-
return [2, value];
|
|
1448
|
-
}
|
|
1449
|
-
});
|
|
1450
|
-
}); };
|
|
1451
|
-
var loadRestJsonErrorCode = function (output, data) {
|
|
1452
|
-
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1453
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
1454
|
-
var cleanValue = rawValue;
|
|
1278
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1279
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1280
|
+
value !== null &&
|
|
1281
|
+
value !== "" &&
|
|
1282
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1283
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1284
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1285
|
+
if (encoded.length) {
|
|
1286
|
+
return JSON.parse(encoded);
|
|
1287
|
+
}
|
|
1288
|
+
return {};
|
|
1289
|
+
});
|
|
1290
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1291
|
+
const value = await parseBody(errorBody, context);
|
|
1292
|
+
value.message = value.message ?? value.Message;
|
|
1293
|
+
return value;
|
|
1294
|
+
};
|
|
1295
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1296
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1297
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1298
|
+
let cleanValue = rawValue;
|
|
1455
1299
|
if (typeof cleanValue === "number") {
|
|
1456
1300
|
cleanValue = cleanValue.toString();
|
|
1457
1301
|
}
|
|
@@ -1466,7 +1310,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
1466
1310
|
}
|
|
1467
1311
|
return cleanValue;
|
|
1468
1312
|
};
|
|
1469
|
-
|
|
1313
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1470
1314
|
if (headerKey !== undefined) {
|
|
1471
1315
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1472
1316
|
}
|