@aws-sdk/client-dlm 3.181.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 +19 -0
- package/README.md +3 -3
- package/dist-cjs/models/models_0.js +14 -1
- package/dist-cjs/protocols/Aws_restJson1.js +40 -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 -93
- package/dist-es/protocols/Aws_restJson1.js +901 -1026
- 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/dist-types/DLM.d.ts +7 -3
- package/dist-types/DLMClient.d.ts +3 -3
- package/dist-types/commands/DeleteLifecyclePolicyCommand.d.ts +2 -0
- package/dist-types/commands/UpdateLifecyclePolicyCommand.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +140 -16
- package/dist-types/ts3.4/models/models_0.d.ts +19 -0
- package/package.json +33 -33
|
@@ -1,983 +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
|
-
|
|
569
|
+
const serializeAws_restJson1ArchiveRetainRule = (input, context) => {
|
|
570
|
+
return {
|
|
571
|
+
...(input.RetentionArchiveTier != null && {
|
|
572
|
+
RetentionArchiveTier: serializeAws_restJson1RetentionArchiveTier(input.RetentionArchiveTier, context),
|
|
573
|
+
}),
|
|
574
|
+
};
|
|
575
|
+
};
|
|
576
|
+
const serializeAws_restJson1ArchiveRule = (input, context) => {
|
|
577
|
+
return {
|
|
578
|
+
...(input.RetainRule != null && { RetainRule: serializeAws_restJson1ArchiveRetainRule(input.RetainRule, context) }),
|
|
579
|
+
};
|
|
580
|
+
};
|
|
581
|
+
const serializeAws_restJson1AvailabilityZoneList = (input, context) => {
|
|
797
582
|
return input
|
|
798
|
-
.filter(
|
|
799
|
-
.map(
|
|
583
|
+
.filter((e) => e != null)
|
|
584
|
+
.map((entry) => {
|
|
800
585
|
return entry;
|
|
801
586
|
});
|
|
802
587
|
};
|
|
803
|
-
|
|
804
|
-
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
|
+
};
|
|
805
596
|
};
|
|
806
|
-
|
|
807
|
-
return
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
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
|
+
};
|
|
812
607
|
};
|
|
813
|
-
|
|
608
|
+
const serializeAws_restJson1CrossRegionCopyActionList = (input, context) => {
|
|
814
609
|
return input
|
|
815
|
-
.filter(
|
|
816
|
-
.map(
|
|
610
|
+
.filter((e) => e != null)
|
|
611
|
+
.map((entry) => {
|
|
817
612
|
return serializeAws_restJson1CrossRegionCopyAction(entry, context);
|
|
818
613
|
});
|
|
819
614
|
};
|
|
820
|
-
|
|
821
|
-
return
|
|
615
|
+
const serializeAws_restJson1CrossRegionCopyDeprecateRule = (input, context) => {
|
|
616
|
+
return {
|
|
617
|
+
...(input.Interval != null && { Interval: input.Interval }),
|
|
618
|
+
...(input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }),
|
|
619
|
+
};
|
|
822
620
|
};
|
|
823
|
-
|
|
824
|
-
return
|
|
621
|
+
const serializeAws_restJson1CrossRegionCopyRetainRule = (input, context) => {
|
|
622
|
+
return {
|
|
623
|
+
...(input.Interval != null && { Interval: input.Interval }),
|
|
624
|
+
...(input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }),
|
|
625
|
+
};
|
|
825
626
|
};
|
|
826
|
-
|
|
827
|
-
return
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
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
|
+
};
|
|
832
641
|
};
|
|
833
|
-
|
|
642
|
+
const serializeAws_restJson1CrossRegionCopyRules = (input, context) => {
|
|
834
643
|
return input
|
|
835
|
-
.filter(
|
|
836
|
-
.map(
|
|
644
|
+
.filter((e) => e != null)
|
|
645
|
+
.map((entry) => {
|
|
837
646
|
return serializeAws_restJson1CrossRegionCopyRule(entry, context);
|
|
838
647
|
});
|
|
839
648
|
};
|
|
840
|
-
|
|
841
|
-
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
|
+
};
|
|
842
655
|
};
|
|
843
|
-
|
|
844
|
-
return
|
|
656
|
+
const serializeAws_restJson1EncryptionConfiguration = (input, context) => {
|
|
657
|
+
return {
|
|
658
|
+
...(input.CmkArn != null && { CmkArn: input.CmkArn }),
|
|
659
|
+
...(input.Encrypted != null && { Encrypted: input.Encrypted }),
|
|
660
|
+
};
|
|
845
661
|
};
|
|
846
|
-
|
|
847
|
-
return
|
|
848
|
-
|
|
849
|
-
|
|
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
|
+
};
|
|
850
670
|
};
|
|
851
|
-
|
|
852
|
-
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
|
+
};
|
|
853
676
|
};
|
|
854
|
-
|
|
677
|
+
const serializeAws_restJson1ExcludeDataVolumeTagList = (input, context) => {
|
|
855
678
|
return input
|
|
856
|
-
.filter(
|
|
857
|
-
.map(
|
|
679
|
+
.filter((e) => e != null)
|
|
680
|
+
.map((entry) => {
|
|
858
681
|
return serializeAws_restJson1Tag(entry, context);
|
|
859
682
|
});
|
|
860
683
|
};
|
|
861
|
-
|
|
862
|
-
return
|
|
863
|
-
|
|
864
|
-
|
|
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
|
+
};
|
|
865
693
|
};
|
|
866
|
-
|
|
867
|
-
return
|
|
868
|
-
|
|
869
|
-
|
|
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
|
+
};
|
|
870
702
|
};
|
|
871
|
-
|
|
872
|
-
return
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
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
|
+
};
|
|
877
718
|
};
|
|
878
|
-
|
|
719
|
+
const serializeAws_restJson1ResourceLocationList = (input, context) => {
|
|
879
720
|
return input
|
|
880
|
-
.filter(
|
|
881
|
-
.map(
|
|
721
|
+
.filter((e) => e != null)
|
|
722
|
+
.map((entry) => {
|
|
882
723
|
return entry;
|
|
883
724
|
});
|
|
884
725
|
};
|
|
885
|
-
|
|
726
|
+
const serializeAws_restJson1ResourceTypeValuesList = (input, context) => {
|
|
886
727
|
return input
|
|
887
|
-
.filter(
|
|
888
|
-
.map(
|
|
728
|
+
.filter((e) => e != null)
|
|
729
|
+
.map((entry) => {
|
|
889
730
|
return entry;
|
|
890
731
|
});
|
|
891
732
|
};
|
|
892
|
-
|
|
893
|
-
return
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
}
|
|
905
|
-
};
|
|
906
|
-
|
|
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
|
+
};
|
|
739
|
+
};
|
|
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
|
+
};
|
|
746
|
+
};
|
|
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
|
+
};
|
|
769
|
+
};
|
|
770
|
+
const serializeAws_restJson1ScheduleList = (input, context) => {
|
|
907
771
|
return input
|
|
908
|
-
.filter(
|
|
909
|
-
.map(
|
|
772
|
+
.filter((e) => e != null)
|
|
773
|
+
.map((entry) => {
|
|
910
774
|
return serializeAws_restJson1Schedule(entry, context);
|
|
911
775
|
});
|
|
912
776
|
};
|
|
913
|
-
|
|
914
|
-
return
|
|
915
|
-
|
|
916
|
-
|
|
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
|
+
};
|
|
917
785
|
};
|
|
918
|
-
|
|
786
|
+
const serializeAws_restJson1ShareRules = (input, context) => {
|
|
919
787
|
return input
|
|
920
|
-
.filter(
|
|
921
|
-
.map(
|
|
788
|
+
.filter((e) => e != null)
|
|
789
|
+
.map((entry) => {
|
|
922
790
|
return serializeAws_restJson1ShareRule(entry, context);
|
|
923
791
|
});
|
|
924
792
|
};
|
|
925
|
-
|
|
793
|
+
const serializeAws_restJson1ShareTargetAccountList = (input, context) => {
|
|
926
794
|
return input
|
|
927
|
-
.filter(
|
|
928
|
-
.map(
|
|
795
|
+
.filter((e) => e != null)
|
|
796
|
+
.map((entry) => {
|
|
929
797
|
return entry;
|
|
930
798
|
});
|
|
931
799
|
};
|
|
932
|
-
|
|
800
|
+
const serializeAws_restJson1SnapshotOwnerList = (input, context) => {
|
|
933
801
|
return input
|
|
934
|
-
.filter(
|
|
935
|
-
.map(
|
|
802
|
+
.filter((e) => e != null)
|
|
803
|
+
.map((entry) => {
|
|
936
804
|
return entry;
|
|
937
805
|
});
|
|
938
806
|
};
|
|
939
|
-
|
|
940
|
-
return
|
|
807
|
+
const serializeAws_restJson1Tag = (input, context) => {
|
|
808
|
+
return {
|
|
809
|
+
...(input.Key != null && { Key: input.Key }),
|
|
810
|
+
...(input.Value != null && { Value: input.Value }),
|
|
811
|
+
};
|
|
941
812
|
};
|
|
942
|
-
|
|
943
|
-
return Object.entries(input).reduce(
|
|
944
|
-
var _b;
|
|
945
|
-
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]) => {
|
|
946
815
|
if (value === null) {
|
|
947
816
|
return acc;
|
|
948
817
|
}
|
|
949
|
-
return
|
|
818
|
+
return {
|
|
819
|
+
...acc,
|
|
820
|
+
[key]: value,
|
|
821
|
+
};
|
|
950
822
|
}, {});
|
|
951
823
|
};
|
|
952
|
-
|
|
824
|
+
const serializeAws_restJson1TagsToAddList = (input, context) => {
|
|
953
825
|
return input
|
|
954
|
-
.filter(
|
|
955
|
-
.map(
|
|
826
|
+
.filter((e) => e != null)
|
|
827
|
+
.map((entry) => {
|
|
956
828
|
return serializeAws_restJson1Tag(entry, context);
|
|
957
829
|
});
|
|
958
830
|
};
|
|
959
|
-
|
|
831
|
+
const serializeAws_restJson1TargetTagList = (input, context) => {
|
|
960
832
|
return input
|
|
961
|
-
.filter(
|
|
962
|
-
.map(
|
|
833
|
+
.filter((e) => e != null)
|
|
834
|
+
.map((entry) => {
|
|
963
835
|
return serializeAws_restJson1Tag(entry, context);
|
|
964
836
|
});
|
|
965
837
|
};
|
|
966
|
-
|
|
838
|
+
const serializeAws_restJson1TimesList = (input, context) => {
|
|
967
839
|
return input
|
|
968
|
-
.filter(
|
|
969
|
-
.map(
|
|
840
|
+
.filter((e) => e != null)
|
|
841
|
+
.map((entry) => {
|
|
970
842
|
return entry;
|
|
971
843
|
});
|
|
972
844
|
};
|
|
973
|
-
|
|
845
|
+
const serializeAws_restJson1VariableTagsList = (input, context) => {
|
|
974
846
|
return input
|
|
975
|
-
.filter(
|
|
976
|
-
.map(
|
|
847
|
+
.filter((e) => e != null)
|
|
848
|
+
.map((entry) => {
|
|
977
849
|
return serializeAws_restJson1Tag(entry, context);
|
|
978
850
|
});
|
|
979
851
|
};
|
|
980
|
-
|
|
852
|
+
const deserializeAws_restJson1Action = (output, context) => {
|
|
981
853
|
return {
|
|
982
854
|
CrossRegionCopy: output.CrossRegionCopy != null
|
|
983
855
|
? deserializeAws_restJson1CrossRegionCopyActionList(output.CrossRegionCopy, context)
|
|
@@ -985,10 +857,10 @@ var deserializeAws_restJson1Action = function (output, context) {
|
|
|
985
857
|
Name: __expectString(output.Name),
|
|
986
858
|
};
|
|
987
859
|
};
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
.filter(
|
|
991
|
-
.map(
|
|
860
|
+
const deserializeAws_restJson1ActionList = (output, context) => {
|
|
861
|
+
const retVal = (output || [])
|
|
862
|
+
.filter((e) => e != null)
|
|
863
|
+
.map((entry) => {
|
|
992
864
|
if (entry === null) {
|
|
993
865
|
return null;
|
|
994
866
|
}
|
|
@@ -996,10 +868,22 @@ var deserializeAws_restJson1ActionList = function (output, context) {
|
|
|
996
868
|
});
|
|
997
869
|
return retVal;
|
|
998
870
|
};
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
.
|
|
1002
|
-
|
|
871
|
+
const deserializeAws_restJson1ArchiveRetainRule = (output, context) => {
|
|
872
|
+
return {
|
|
873
|
+
RetentionArchiveTier: output.RetentionArchiveTier != null
|
|
874
|
+
? deserializeAws_restJson1RetentionArchiveTier(output.RetentionArchiveTier, context)
|
|
875
|
+
: undefined,
|
|
876
|
+
};
|
|
877
|
+
};
|
|
878
|
+
const deserializeAws_restJson1ArchiveRule = (output, context) => {
|
|
879
|
+
return {
|
|
880
|
+
RetainRule: output.RetainRule != null ? deserializeAws_restJson1ArchiveRetainRule(output.RetainRule, context) : undefined,
|
|
881
|
+
};
|
|
882
|
+
};
|
|
883
|
+
const deserializeAws_restJson1AvailabilityZoneList = (output, context) => {
|
|
884
|
+
const retVal = (output || [])
|
|
885
|
+
.filter((e) => e != null)
|
|
886
|
+
.map((entry) => {
|
|
1003
887
|
if (entry === null) {
|
|
1004
888
|
return null;
|
|
1005
889
|
}
|
|
@@ -1007,7 +891,7 @@ var deserializeAws_restJson1AvailabilityZoneList = function (output, context) {
|
|
|
1007
891
|
});
|
|
1008
892
|
return retVal;
|
|
1009
893
|
};
|
|
1010
|
-
|
|
894
|
+
const deserializeAws_restJson1CreateRule = (output, context) => {
|
|
1011
895
|
return {
|
|
1012
896
|
CronExpression: __expectString(output.CronExpression),
|
|
1013
897
|
Interval: __expectInt32(output.Interval),
|
|
@@ -1016,7 +900,7 @@ var deserializeAws_restJson1CreateRule = function (output, context) {
|
|
|
1016
900
|
Times: output.Times != null ? deserializeAws_restJson1TimesList(output.Times, context) : undefined,
|
|
1017
901
|
};
|
|
1018
902
|
};
|
|
1019
|
-
|
|
903
|
+
const deserializeAws_restJson1CrossRegionCopyAction = (output, context) => {
|
|
1020
904
|
return {
|
|
1021
905
|
EncryptionConfiguration: output.EncryptionConfiguration != null
|
|
1022
906
|
? deserializeAws_restJson1EncryptionConfiguration(output.EncryptionConfiguration, context)
|
|
@@ -1027,10 +911,10 @@ var deserializeAws_restJson1CrossRegionCopyAction = function (output, context) {
|
|
|
1027
911
|
Target: __expectString(output.Target),
|
|
1028
912
|
};
|
|
1029
913
|
};
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
.filter(
|
|
1033
|
-
.map(
|
|
914
|
+
const deserializeAws_restJson1CrossRegionCopyActionList = (output, context) => {
|
|
915
|
+
const retVal = (output || [])
|
|
916
|
+
.filter((e) => e != null)
|
|
917
|
+
.map((entry) => {
|
|
1034
918
|
if (entry === null) {
|
|
1035
919
|
return null;
|
|
1036
920
|
}
|
|
@@ -1038,19 +922,19 @@ var deserializeAws_restJson1CrossRegionCopyActionList = function (output, contex
|
|
|
1038
922
|
});
|
|
1039
923
|
return retVal;
|
|
1040
924
|
};
|
|
1041
|
-
|
|
925
|
+
const deserializeAws_restJson1CrossRegionCopyDeprecateRule = (output, context) => {
|
|
1042
926
|
return {
|
|
1043
927
|
Interval: __expectInt32(output.Interval),
|
|
1044
928
|
IntervalUnit: __expectString(output.IntervalUnit),
|
|
1045
929
|
};
|
|
1046
930
|
};
|
|
1047
|
-
|
|
931
|
+
const deserializeAws_restJson1CrossRegionCopyRetainRule = (output, context) => {
|
|
1048
932
|
return {
|
|
1049
933
|
Interval: __expectInt32(output.Interval),
|
|
1050
934
|
IntervalUnit: __expectString(output.IntervalUnit),
|
|
1051
935
|
};
|
|
1052
936
|
};
|
|
1053
|
-
|
|
937
|
+
const deserializeAws_restJson1CrossRegionCopyRule = (output, context) => {
|
|
1054
938
|
return {
|
|
1055
939
|
CmkArn: __expectString(output.CmkArn),
|
|
1056
940
|
CopyTags: __expectBoolean(output.CopyTags),
|
|
@@ -1065,10 +949,10 @@ var deserializeAws_restJson1CrossRegionCopyRule = function (output, context) {
|
|
|
1065
949
|
TargetRegion: __expectString(output.TargetRegion),
|
|
1066
950
|
};
|
|
1067
951
|
};
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
.filter(
|
|
1071
|
-
.map(
|
|
952
|
+
const deserializeAws_restJson1CrossRegionCopyRules = (output, context) => {
|
|
953
|
+
const retVal = (output || [])
|
|
954
|
+
.filter((e) => e != null)
|
|
955
|
+
.map((entry) => {
|
|
1072
956
|
if (entry === null) {
|
|
1073
957
|
return null;
|
|
1074
958
|
}
|
|
@@ -1076,20 +960,20 @@ var deserializeAws_restJson1CrossRegionCopyRules = function (output, context) {
|
|
|
1076
960
|
});
|
|
1077
961
|
return retVal;
|
|
1078
962
|
};
|
|
1079
|
-
|
|
963
|
+
const deserializeAws_restJson1DeprecateRule = (output, context) => {
|
|
1080
964
|
return {
|
|
1081
965
|
Count: __expectInt32(output.Count),
|
|
1082
966
|
Interval: __expectInt32(output.Interval),
|
|
1083
967
|
IntervalUnit: __expectString(output.IntervalUnit),
|
|
1084
968
|
};
|
|
1085
969
|
};
|
|
1086
|
-
|
|
970
|
+
const deserializeAws_restJson1EncryptionConfiguration = (output, context) => {
|
|
1087
971
|
return {
|
|
1088
972
|
CmkArn: __expectString(output.CmkArn),
|
|
1089
973
|
Encrypted: __expectBoolean(output.Encrypted),
|
|
1090
974
|
};
|
|
1091
975
|
};
|
|
1092
|
-
|
|
976
|
+
const deserializeAws_restJson1EventParameters = (output, context) => {
|
|
1093
977
|
return {
|
|
1094
978
|
DescriptionRegex: __expectString(output.DescriptionRegex),
|
|
1095
979
|
EventType: __expectString(output.EventType),
|
|
@@ -1098,16 +982,16 @@ var deserializeAws_restJson1EventParameters = function (output, context) {
|
|
|
1098
982
|
: undefined,
|
|
1099
983
|
};
|
|
1100
984
|
};
|
|
1101
|
-
|
|
985
|
+
const deserializeAws_restJson1EventSource = (output, context) => {
|
|
1102
986
|
return {
|
|
1103
987
|
Parameters: output.Parameters != null ? deserializeAws_restJson1EventParameters(output.Parameters, context) : undefined,
|
|
1104
988
|
Type: __expectString(output.Type),
|
|
1105
989
|
};
|
|
1106
990
|
};
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
.filter(
|
|
1110
|
-
.map(
|
|
991
|
+
const deserializeAws_restJson1ExcludeDataVolumeTagList = (output, context) => {
|
|
992
|
+
const retVal = (output || [])
|
|
993
|
+
.filter((e) => e != null)
|
|
994
|
+
.map((entry) => {
|
|
1111
995
|
if (entry === null) {
|
|
1112
996
|
return null;
|
|
1113
997
|
}
|
|
@@ -1115,7 +999,7 @@ var deserializeAws_restJson1ExcludeDataVolumeTagList = function (output, context
|
|
|
1115
999
|
});
|
|
1116
1000
|
return retVal;
|
|
1117
1001
|
};
|
|
1118
|
-
|
|
1002
|
+
const deserializeAws_restJson1FastRestoreRule = (output, context) => {
|
|
1119
1003
|
return {
|
|
1120
1004
|
AvailabilityZones: output.AvailabilityZones != null
|
|
1121
1005
|
? deserializeAws_restJson1AvailabilityZoneList(output.AvailabilityZones, context)
|
|
@@ -1125,7 +1009,7 @@ var deserializeAws_restJson1FastRestoreRule = function (output, context) {
|
|
|
1125
1009
|
IntervalUnit: __expectString(output.IntervalUnit),
|
|
1126
1010
|
};
|
|
1127
1011
|
};
|
|
1128
|
-
|
|
1012
|
+
const deserializeAws_restJson1LifecyclePolicy = (output, context) => {
|
|
1129
1013
|
return {
|
|
1130
1014
|
DateCreated: output.DateCreated != null
|
|
1131
1015
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateCreated)))
|
|
@@ -1143,7 +1027,7 @@ var deserializeAws_restJson1LifecyclePolicy = function (output, context) {
|
|
|
1143
1027
|
Tags: output.Tags != null ? deserializeAws_restJson1TagMap(output.Tags, context) : undefined,
|
|
1144
1028
|
};
|
|
1145
1029
|
};
|
|
1146
|
-
|
|
1030
|
+
const deserializeAws_restJson1LifecyclePolicySummary = (output, context) => {
|
|
1147
1031
|
return {
|
|
1148
1032
|
Description: __expectString(output.Description),
|
|
1149
1033
|
PolicyId: __expectString(output.PolicyId),
|
|
@@ -1152,10 +1036,10 @@ var deserializeAws_restJson1LifecyclePolicySummary = function (output, context)
|
|
|
1152
1036
|
Tags: output.Tags != null ? deserializeAws_restJson1TagMap(output.Tags, context) : undefined,
|
|
1153
1037
|
};
|
|
1154
1038
|
};
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
.filter(
|
|
1158
|
-
.map(
|
|
1039
|
+
const deserializeAws_restJson1LifecyclePolicySummaryList = (output, context) => {
|
|
1040
|
+
const retVal = (output || [])
|
|
1041
|
+
.filter((e) => e != null)
|
|
1042
|
+
.map((entry) => {
|
|
1159
1043
|
if (entry === null) {
|
|
1160
1044
|
return null;
|
|
1161
1045
|
}
|
|
@@ -1163,10 +1047,10 @@ var deserializeAws_restJson1LifecyclePolicySummaryList = function (output, conte
|
|
|
1163
1047
|
});
|
|
1164
1048
|
return retVal;
|
|
1165
1049
|
};
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
.filter(
|
|
1169
|
-
.map(
|
|
1050
|
+
const deserializeAws_restJson1ParameterList = (output, context) => {
|
|
1051
|
+
const retVal = (output || [])
|
|
1052
|
+
.filter((e) => e != null)
|
|
1053
|
+
.map((entry) => {
|
|
1170
1054
|
if (entry === null) {
|
|
1171
1055
|
return null;
|
|
1172
1056
|
}
|
|
@@ -1174,7 +1058,7 @@ var deserializeAws_restJson1ParameterList = function (output, context) {
|
|
|
1174
1058
|
});
|
|
1175
1059
|
return retVal;
|
|
1176
1060
|
};
|
|
1177
|
-
|
|
1061
|
+
const deserializeAws_restJson1_Parameters = (output, context) => {
|
|
1178
1062
|
return {
|
|
1179
1063
|
ExcludeBootVolume: __expectBoolean(output.ExcludeBootVolume),
|
|
1180
1064
|
ExcludeDataVolumeTags: output.ExcludeDataVolumeTags != null
|
|
@@ -1183,7 +1067,7 @@ var deserializeAws_restJson1_Parameters = function (output, context) {
|
|
|
1183
1067
|
NoReboot: __expectBoolean(output.NoReboot),
|
|
1184
1068
|
};
|
|
1185
1069
|
};
|
|
1186
|
-
|
|
1070
|
+
const deserializeAws_restJson1PolicyDetails = (output, context) => {
|
|
1187
1071
|
return {
|
|
1188
1072
|
Actions: output.Actions != null ? deserializeAws_restJson1ActionList(output.Actions, context) : undefined,
|
|
1189
1073
|
EventSource: output.EventSource != null ? deserializeAws_restJson1EventSource(output.EventSource, context) : undefined,
|
|
@@ -1199,10 +1083,10 @@ var deserializeAws_restJson1PolicyDetails = function (output, context) {
|
|
|
1199
1083
|
TargetTags: output.TargetTags != null ? deserializeAws_restJson1TargetTagList(output.TargetTags, context) : undefined,
|
|
1200
1084
|
};
|
|
1201
1085
|
};
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
.filter(
|
|
1205
|
-
.map(
|
|
1086
|
+
const deserializeAws_restJson1PolicyIdList = (output, context) => {
|
|
1087
|
+
const retVal = (output || [])
|
|
1088
|
+
.filter((e) => e != null)
|
|
1089
|
+
.map((entry) => {
|
|
1206
1090
|
if (entry === null) {
|
|
1207
1091
|
return null;
|
|
1208
1092
|
}
|
|
@@ -1210,10 +1094,10 @@ var deserializeAws_restJson1PolicyIdList = function (output, context) {
|
|
|
1210
1094
|
});
|
|
1211
1095
|
return retVal;
|
|
1212
1096
|
};
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
.filter(
|
|
1216
|
-
.map(
|
|
1097
|
+
const deserializeAws_restJson1ResourceLocationList = (output, context) => {
|
|
1098
|
+
const retVal = (output || [])
|
|
1099
|
+
.filter((e) => e != null)
|
|
1100
|
+
.map((entry) => {
|
|
1217
1101
|
if (entry === null) {
|
|
1218
1102
|
return null;
|
|
1219
1103
|
}
|
|
@@ -1221,10 +1105,10 @@ var deserializeAws_restJson1ResourceLocationList = function (output, context) {
|
|
|
1221
1105
|
});
|
|
1222
1106
|
return retVal;
|
|
1223
1107
|
};
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
.filter(
|
|
1227
|
-
.map(
|
|
1108
|
+
const deserializeAws_restJson1ResourceTypeValuesList = (output, context) => {
|
|
1109
|
+
const retVal = (output || [])
|
|
1110
|
+
.filter((e) => e != null)
|
|
1111
|
+
.map((entry) => {
|
|
1228
1112
|
if (entry === null) {
|
|
1229
1113
|
return null;
|
|
1230
1114
|
}
|
|
@@ -1232,15 +1116,23 @@ var deserializeAws_restJson1ResourceTypeValuesList = function (output, context)
|
|
|
1232
1116
|
});
|
|
1233
1117
|
return retVal;
|
|
1234
1118
|
};
|
|
1235
|
-
|
|
1119
|
+
const deserializeAws_restJson1RetainRule = (output, context) => {
|
|
1236
1120
|
return {
|
|
1237
1121
|
Count: __expectInt32(output.Count),
|
|
1238
1122
|
Interval: __expectInt32(output.Interval),
|
|
1239
1123
|
IntervalUnit: __expectString(output.IntervalUnit),
|
|
1240
1124
|
};
|
|
1241
1125
|
};
|
|
1242
|
-
|
|
1126
|
+
const deserializeAws_restJson1RetentionArchiveTier = (output, context) => {
|
|
1243
1127
|
return {
|
|
1128
|
+
Count: __expectInt32(output.Count),
|
|
1129
|
+
Interval: __expectInt32(output.Interval),
|
|
1130
|
+
IntervalUnit: __expectString(output.IntervalUnit),
|
|
1131
|
+
};
|
|
1132
|
+
};
|
|
1133
|
+
const deserializeAws_restJson1Schedule = (output, context) => {
|
|
1134
|
+
return {
|
|
1135
|
+
ArchiveRule: output.ArchiveRule != null ? deserializeAws_restJson1ArchiveRule(output.ArchiveRule, context) : undefined,
|
|
1244
1136
|
CopyTags: __expectBoolean(output.CopyTags),
|
|
1245
1137
|
CreateRule: output.CreateRule != null ? deserializeAws_restJson1CreateRule(output.CreateRule, context) : undefined,
|
|
1246
1138
|
CrossRegionCopyRules: output.CrossRegionCopyRules != null
|
|
@@ -1257,10 +1149,10 @@ var deserializeAws_restJson1Schedule = function (output, context) {
|
|
|
1257
1149
|
VariableTags: output.VariableTags != null ? deserializeAws_restJson1VariableTagsList(output.VariableTags, context) : undefined,
|
|
1258
1150
|
};
|
|
1259
1151
|
};
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
.filter(
|
|
1263
|
-
.map(
|
|
1152
|
+
const deserializeAws_restJson1ScheduleList = (output, context) => {
|
|
1153
|
+
const retVal = (output || [])
|
|
1154
|
+
.filter((e) => e != null)
|
|
1155
|
+
.map((entry) => {
|
|
1264
1156
|
if (entry === null) {
|
|
1265
1157
|
return null;
|
|
1266
1158
|
}
|
|
@@ -1268,7 +1160,7 @@ var deserializeAws_restJson1ScheduleList = function (output, context) {
|
|
|
1268
1160
|
});
|
|
1269
1161
|
return retVal;
|
|
1270
1162
|
};
|
|
1271
|
-
|
|
1163
|
+
const deserializeAws_restJson1ShareRule = (output, context) => {
|
|
1272
1164
|
return {
|
|
1273
1165
|
TargetAccounts: output.TargetAccounts != null
|
|
1274
1166
|
? deserializeAws_restJson1ShareTargetAccountList(output.TargetAccounts, context)
|
|
@@ -1277,10 +1169,10 @@ var deserializeAws_restJson1ShareRule = function (output, context) {
|
|
|
1277
1169
|
UnshareIntervalUnit: __expectString(output.UnshareIntervalUnit),
|
|
1278
1170
|
};
|
|
1279
1171
|
};
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
.filter(
|
|
1283
|
-
.map(
|
|
1172
|
+
const deserializeAws_restJson1ShareRules = (output, context) => {
|
|
1173
|
+
const retVal = (output || [])
|
|
1174
|
+
.filter((e) => e != null)
|
|
1175
|
+
.map((entry) => {
|
|
1284
1176
|
if (entry === null) {
|
|
1285
1177
|
return null;
|
|
1286
1178
|
}
|
|
@@ -1288,10 +1180,10 @@ var deserializeAws_restJson1ShareRules = function (output, context) {
|
|
|
1288
1180
|
});
|
|
1289
1181
|
return retVal;
|
|
1290
1182
|
};
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
.filter(
|
|
1294
|
-
.map(
|
|
1183
|
+
const deserializeAws_restJson1ShareTargetAccountList = (output, context) => {
|
|
1184
|
+
const retVal = (output || [])
|
|
1185
|
+
.filter((e) => e != null)
|
|
1186
|
+
.map((entry) => {
|
|
1295
1187
|
if (entry === null) {
|
|
1296
1188
|
return null;
|
|
1297
1189
|
}
|
|
@@ -1299,10 +1191,10 @@ var deserializeAws_restJson1ShareTargetAccountList = function (output, context)
|
|
|
1299
1191
|
});
|
|
1300
1192
|
return retVal;
|
|
1301
1193
|
};
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
.filter(
|
|
1305
|
-
.map(
|
|
1194
|
+
const deserializeAws_restJson1SnapshotOwnerList = (output, context) => {
|
|
1195
|
+
const retVal = (output || [])
|
|
1196
|
+
.filter((e) => e != null)
|
|
1197
|
+
.map((entry) => {
|
|
1306
1198
|
if (entry === null) {
|
|
1307
1199
|
return null;
|
|
1308
1200
|
}
|
|
@@ -1310,26 +1202,27 @@ var deserializeAws_restJson1SnapshotOwnerList = function (output, context) {
|
|
|
1310
1202
|
});
|
|
1311
1203
|
return retVal;
|
|
1312
1204
|
};
|
|
1313
|
-
|
|
1205
|
+
const deserializeAws_restJson1Tag = (output, context) => {
|
|
1314
1206
|
return {
|
|
1315
1207
|
Key: __expectString(output.Key),
|
|
1316
1208
|
Value: __expectString(output.Value),
|
|
1317
1209
|
};
|
|
1318
1210
|
};
|
|
1319
|
-
|
|
1320
|
-
return Object.entries(output).reduce(
|
|
1321
|
-
var _b;
|
|
1322
|
-
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]) => {
|
|
1323
1213
|
if (value === null) {
|
|
1324
1214
|
return acc;
|
|
1325
1215
|
}
|
|
1326
|
-
return
|
|
1216
|
+
return {
|
|
1217
|
+
...acc,
|
|
1218
|
+
[key]: __expectString(value),
|
|
1219
|
+
};
|
|
1327
1220
|
}, {});
|
|
1328
1221
|
};
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
.filter(
|
|
1332
|
-
.map(
|
|
1222
|
+
const deserializeAws_restJson1TagsToAddList = (output, context) => {
|
|
1223
|
+
const retVal = (output || [])
|
|
1224
|
+
.filter((e) => e != null)
|
|
1225
|
+
.map((entry) => {
|
|
1333
1226
|
if (entry === null) {
|
|
1334
1227
|
return null;
|
|
1335
1228
|
}
|
|
@@ -1337,10 +1230,10 @@ var deserializeAws_restJson1TagsToAddList = function (output, context) {
|
|
|
1337
1230
|
});
|
|
1338
1231
|
return retVal;
|
|
1339
1232
|
};
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
.filter(
|
|
1343
|
-
.map(
|
|
1233
|
+
const deserializeAws_restJson1TargetTagList = (output, context) => {
|
|
1234
|
+
const retVal = (output || [])
|
|
1235
|
+
.filter((e) => e != null)
|
|
1236
|
+
.map((entry) => {
|
|
1344
1237
|
if (entry === null) {
|
|
1345
1238
|
return null;
|
|
1346
1239
|
}
|
|
@@ -1348,10 +1241,10 @@ var deserializeAws_restJson1TargetTagList = function (output, context) {
|
|
|
1348
1241
|
});
|
|
1349
1242
|
return retVal;
|
|
1350
1243
|
};
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
.filter(
|
|
1354
|
-
.map(
|
|
1244
|
+
const deserializeAws_restJson1TimesList = (output, context) => {
|
|
1245
|
+
const retVal = (output || [])
|
|
1246
|
+
.filter((e) => e != null)
|
|
1247
|
+
.map((entry) => {
|
|
1355
1248
|
if (entry === null) {
|
|
1356
1249
|
return null;
|
|
1357
1250
|
}
|
|
@@ -1359,10 +1252,10 @@ var deserializeAws_restJson1TimesList = function (output, context) {
|
|
|
1359
1252
|
});
|
|
1360
1253
|
return retVal;
|
|
1361
1254
|
};
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
.filter(
|
|
1365
|
-
.map(
|
|
1255
|
+
const deserializeAws_restJson1VariableTagsList = (output, context) => {
|
|
1256
|
+
const retVal = (output || [])
|
|
1257
|
+
.filter((e) => e != null)
|
|
1258
|
+
.map((entry) => {
|
|
1366
1259
|
if (entry === null) {
|
|
1367
1260
|
return null;
|
|
1368
1261
|
}
|
|
@@ -1370,57 +1263,39 @@ var deserializeAws_restJson1VariableTagsList = function (output, context) {
|
|
|
1370
1263
|
});
|
|
1371
1264
|
return retVal;
|
|
1372
1265
|
};
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
});
|
|
1381
|
-
};
|
|
1382
|
-
var collectBody = function (streamBody, context) {
|
|
1383
|
-
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) => {
|
|
1384
1273
|
if (streamBody instanceof Uint8Array) {
|
|
1385
1274
|
return Promise.resolve(streamBody);
|
|
1386
1275
|
}
|
|
1387
1276
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1388
1277
|
};
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
}
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
return __generator(this, function (_b) {
|
|
1411
|
-
switch (_b.label) {
|
|
1412
|
-
case 0: return [4, parseBody(errorBody, context)];
|
|
1413
|
-
case 1:
|
|
1414
|
-
value = _b.sent();
|
|
1415
|
-
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1416
|
-
return [2, value];
|
|
1417
|
-
}
|
|
1418
|
-
});
|
|
1419
|
-
}); };
|
|
1420
|
-
var loadRestJsonErrorCode = function (output, data) {
|
|
1421
|
-
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1422
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
1423
|
-
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;
|
|
1424
1299
|
if (typeof cleanValue === "number") {
|
|
1425
1300
|
cleanValue = cleanValue.toString();
|
|
1426
1301
|
}
|
|
@@ -1435,7 +1310,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
1435
1310
|
}
|
|
1436
1311
|
return cleanValue;
|
|
1437
1312
|
};
|
|
1438
|
-
|
|
1313
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1439
1314
|
if (headerKey !== undefined) {
|
|
1440
1315
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1441
1316
|
}
|