@aws-sdk/client-dlm 3.141.0 → 3.147.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 +30 -0
- package/dist-cjs/models/models_0.js +5 -5
- package/dist-cjs/protocols/Aws_restJson1.js +129 -227
- package/dist-es/models/models_0.js +1 -1
- package/dist-es/protocols/Aws_restJson1.js +160 -227
- package/dist-types/models/models_0.d.ts +176 -94
- package/dist-types/ts3.4/models/models_0.d.ts +11 -9
- package/package.json +11 -6
|
@@ -36,16 +36,7 @@ const serializeAws_restJson1DeleteLifecyclePolicyCommand = async (input, context
|
|
|
36
36
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
37
37
|
const headers = {};
|
|
38
38
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/policies/{PolicyId}";
|
|
39
|
-
|
|
40
|
-
const labelValue = input.PolicyId;
|
|
41
|
-
if (labelValue.length <= 0) {
|
|
42
|
-
throw new Error("Empty value provided for input HTTP label: PolicyId.");
|
|
43
|
-
}
|
|
44
|
-
resolvedPath = resolvedPath.replace("{PolicyId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
throw new Error("No value provided for input HTTP label: PolicyId.");
|
|
48
|
-
}
|
|
39
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PolicyId", () => input.PolicyId, "{PolicyId}", false);
|
|
49
40
|
let body;
|
|
50
41
|
return new protocol_http_1.HttpRequest({
|
|
51
42
|
protocol,
|
|
@@ -62,15 +53,16 @@ const serializeAws_restJson1GetLifecyclePoliciesCommand = async (input, context)
|
|
|
62
53
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
63
54
|
const headers = {};
|
|
64
55
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/policies";
|
|
65
|
-
const query = {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
56
|
+
const query = map({
|
|
57
|
+
policyIds: [() => input.PolicyIds !== void 0, () => (input.PolicyIds || []).map((_entry) => _entry)],
|
|
58
|
+
state: [, input.State],
|
|
59
|
+
resourceTypes: [
|
|
60
|
+
() => input.ResourceTypes !== void 0,
|
|
61
|
+
() => (input.ResourceTypes || []).map((_entry) => _entry),
|
|
62
|
+
],
|
|
63
|
+
targetTags: [() => input.TargetTags !== void 0, () => (input.TargetTags || []).map((_entry) => _entry)],
|
|
64
|
+
tagsToAdd: [() => input.TagsToAdd !== void 0, () => (input.TagsToAdd || []).map((_entry) => _entry)],
|
|
65
|
+
});
|
|
74
66
|
let body;
|
|
75
67
|
return new protocol_http_1.HttpRequest({
|
|
76
68
|
protocol,
|
|
@@ -88,16 +80,7 @@ const serializeAws_restJson1GetLifecyclePolicyCommand = async (input, context) =
|
|
|
88
80
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
89
81
|
const headers = {};
|
|
90
82
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/policies/{PolicyId}";
|
|
91
|
-
|
|
92
|
-
const labelValue = input.PolicyId;
|
|
93
|
-
if (labelValue.length <= 0) {
|
|
94
|
-
throw new Error("Empty value provided for input HTTP label: PolicyId.");
|
|
95
|
-
}
|
|
96
|
-
resolvedPath = resolvedPath.replace("{PolicyId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
throw new Error("No value provided for input HTTP label: PolicyId.");
|
|
100
|
-
}
|
|
83
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PolicyId", () => input.PolicyId, "{PolicyId}", false);
|
|
101
84
|
let body;
|
|
102
85
|
return new protocol_http_1.HttpRequest({
|
|
103
86
|
protocol,
|
|
@@ -114,16 +97,7 @@ const serializeAws_restJson1ListTagsForResourceCommand = async (input, context)
|
|
|
114
97
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
115
98
|
const headers = {};
|
|
116
99
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
117
|
-
|
|
118
|
-
const labelValue = input.ResourceArn;
|
|
119
|
-
if (labelValue.length <= 0) {
|
|
120
|
-
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
121
|
-
}
|
|
122
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
126
|
-
}
|
|
100
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
127
101
|
let body;
|
|
128
102
|
return new protocol_http_1.HttpRequest({
|
|
129
103
|
protocol,
|
|
@@ -142,16 +116,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
|
142
116
|
"content-type": "application/json",
|
|
143
117
|
};
|
|
144
118
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
145
|
-
|
|
146
|
-
const labelValue = input.ResourceArn;
|
|
147
|
-
if (labelValue.length <= 0) {
|
|
148
|
-
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
149
|
-
}
|
|
150
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
151
|
-
}
|
|
152
|
-
else {
|
|
153
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
154
|
-
}
|
|
119
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
155
120
|
let body;
|
|
156
121
|
body = JSON.stringify({
|
|
157
122
|
...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
@@ -171,19 +136,10 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
|
171
136
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
172
137
|
const headers = {};
|
|
173
138
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
180
|
-
}
|
|
181
|
-
else {
|
|
182
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
183
|
-
}
|
|
184
|
-
const query = {
|
|
185
|
-
...(input.TagKeys !== undefined && { tagKeys: (input.TagKeys || []).map((_entry) => _entry) }),
|
|
186
|
-
};
|
|
139
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
140
|
+
const query = map({
|
|
141
|
+
tagKeys: [() => input.TagKeys !== void 0, () => (input.TagKeys || []).map((_entry) => _entry)],
|
|
142
|
+
});
|
|
187
143
|
let body;
|
|
188
144
|
return new protocol_http_1.HttpRequest({
|
|
189
145
|
protocol,
|
|
@@ -203,16 +159,7 @@ const serializeAws_restJson1UpdateLifecyclePolicyCommand = async (input, context
|
|
|
203
159
|
"content-type": "application/json",
|
|
204
160
|
};
|
|
205
161
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/policies/{PolicyId}";
|
|
206
|
-
|
|
207
|
-
const labelValue = input.PolicyId;
|
|
208
|
-
if (labelValue.length <= 0) {
|
|
209
|
-
throw new Error("Empty value provided for input HTTP label: PolicyId.");
|
|
210
|
-
}
|
|
211
|
-
resolvedPath = resolvedPath.replace("{PolicyId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
212
|
-
}
|
|
213
|
-
else {
|
|
214
|
-
throw new Error("No value provided for input HTTP label: PolicyId.");
|
|
215
|
-
}
|
|
162
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PolicyId", () => input.PolicyId, "{PolicyId}", false);
|
|
216
163
|
let body;
|
|
217
164
|
body = JSON.stringify({
|
|
218
165
|
...(input.Description != null && { Description: input.Description }),
|
|
@@ -237,15 +184,14 @@ const deserializeAws_restJson1CreateLifecyclePolicyCommand = async (output, cont
|
|
|
237
184
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
238
185
|
return deserializeAws_restJson1CreateLifecyclePolicyCommandError(output, context);
|
|
239
186
|
}
|
|
240
|
-
const contents = {
|
|
187
|
+
const contents = map({
|
|
241
188
|
$metadata: deserializeMetadata(output),
|
|
242
|
-
|
|
243
|
-
};
|
|
189
|
+
});
|
|
244
190
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
245
|
-
if (data.PolicyId
|
|
191
|
+
if (data.PolicyId != null) {
|
|
246
192
|
contents.PolicyId = (0, smithy_client_1.expectString)(data.PolicyId);
|
|
247
193
|
}
|
|
248
|
-
return
|
|
194
|
+
return contents;
|
|
249
195
|
};
|
|
250
196
|
exports.deserializeAws_restJson1CreateLifecyclePolicyCommand = deserializeAws_restJson1CreateLifecyclePolicyCommand;
|
|
251
197
|
const deserializeAws_restJson1CreateLifecyclePolicyCommandError = async (output, context) => {
|
|
@@ -253,7 +199,6 @@ const deserializeAws_restJson1CreateLifecyclePolicyCommandError = async (output,
|
|
|
253
199
|
...output,
|
|
254
200
|
body: await parseBody(output.body, context),
|
|
255
201
|
};
|
|
256
|
-
let response;
|
|
257
202
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
258
203
|
switch (errorCode) {
|
|
259
204
|
case "InternalServerException":
|
|
@@ -267,25 +212,23 @@ const deserializeAws_restJson1CreateLifecyclePolicyCommandError = async (output,
|
|
|
267
212
|
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
268
213
|
default:
|
|
269
214
|
const parsedBody = parsedOutput.body;
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
$metadata,
|
|
215
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
216
|
+
output,
|
|
217
|
+
parsedBody,
|
|
218
|
+
exceptionCtor: DLMServiceException_1.DLMServiceException,
|
|
219
|
+
errorCode,
|
|
276
220
|
});
|
|
277
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
278
221
|
}
|
|
279
222
|
};
|
|
280
223
|
const deserializeAws_restJson1DeleteLifecyclePolicyCommand = async (output, context) => {
|
|
281
224
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
282
225
|
return deserializeAws_restJson1DeleteLifecyclePolicyCommandError(output, context);
|
|
283
226
|
}
|
|
284
|
-
const contents = {
|
|
227
|
+
const contents = map({
|
|
285
228
|
$metadata: deserializeMetadata(output),
|
|
286
|
-
};
|
|
229
|
+
});
|
|
287
230
|
await collectBody(output.body, context);
|
|
288
|
-
return
|
|
231
|
+
return contents;
|
|
289
232
|
};
|
|
290
233
|
exports.deserializeAws_restJson1DeleteLifecyclePolicyCommand = deserializeAws_restJson1DeleteLifecyclePolicyCommand;
|
|
291
234
|
const deserializeAws_restJson1DeleteLifecyclePolicyCommandError = async (output, context) => {
|
|
@@ -293,7 +236,6 @@ const deserializeAws_restJson1DeleteLifecyclePolicyCommandError = async (output,
|
|
|
293
236
|
...output,
|
|
294
237
|
body: await parseBody(output.body, context),
|
|
295
238
|
};
|
|
296
|
-
let response;
|
|
297
239
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
298
240
|
switch (errorCode) {
|
|
299
241
|
case "InternalServerException":
|
|
@@ -307,29 +249,26 @@ const deserializeAws_restJson1DeleteLifecyclePolicyCommandError = async (output,
|
|
|
307
249
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
308
250
|
default:
|
|
309
251
|
const parsedBody = parsedOutput.body;
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
$metadata,
|
|
252
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
253
|
+
output,
|
|
254
|
+
parsedBody,
|
|
255
|
+
exceptionCtor: DLMServiceException_1.DLMServiceException,
|
|
256
|
+
errorCode,
|
|
316
257
|
});
|
|
317
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
318
258
|
}
|
|
319
259
|
};
|
|
320
260
|
const deserializeAws_restJson1GetLifecyclePoliciesCommand = async (output, context) => {
|
|
321
261
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
322
262
|
return deserializeAws_restJson1GetLifecyclePoliciesCommandError(output, context);
|
|
323
263
|
}
|
|
324
|
-
const contents = {
|
|
264
|
+
const contents = map({
|
|
325
265
|
$metadata: deserializeMetadata(output),
|
|
326
|
-
|
|
327
|
-
};
|
|
266
|
+
});
|
|
328
267
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
329
|
-
if (data.Policies
|
|
268
|
+
if (data.Policies != null) {
|
|
330
269
|
contents.Policies = deserializeAws_restJson1LifecyclePolicySummaryList(data.Policies, context);
|
|
331
270
|
}
|
|
332
|
-
return
|
|
271
|
+
return contents;
|
|
333
272
|
};
|
|
334
273
|
exports.deserializeAws_restJson1GetLifecyclePoliciesCommand = deserializeAws_restJson1GetLifecyclePoliciesCommand;
|
|
335
274
|
const deserializeAws_restJson1GetLifecyclePoliciesCommandError = async (output, context) => {
|
|
@@ -337,7 +276,6 @@ const deserializeAws_restJson1GetLifecyclePoliciesCommandError = async (output,
|
|
|
337
276
|
...output,
|
|
338
277
|
body: await parseBody(output.body, context),
|
|
339
278
|
};
|
|
340
|
-
let response;
|
|
341
279
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
342
280
|
switch (errorCode) {
|
|
343
281
|
case "InternalServerException":
|
|
@@ -354,29 +292,26 @@ const deserializeAws_restJson1GetLifecyclePoliciesCommandError = async (output,
|
|
|
354
292
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
355
293
|
default:
|
|
356
294
|
const parsedBody = parsedOutput.body;
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
$metadata,
|
|
295
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
296
|
+
output,
|
|
297
|
+
parsedBody,
|
|
298
|
+
exceptionCtor: DLMServiceException_1.DLMServiceException,
|
|
299
|
+
errorCode,
|
|
363
300
|
});
|
|
364
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
365
301
|
}
|
|
366
302
|
};
|
|
367
303
|
const deserializeAws_restJson1GetLifecyclePolicyCommand = async (output, context) => {
|
|
368
304
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
369
305
|
return deserializeAws_restJson1GetLifecyclePolicyCommandError(output, context);
|
|
370
306
|
}
|
|
371
|
-
const contents = {
|
|
307
|
+
const contents = map({
|
|
372
308
|
$metadata: deserializeMetadata(output),
|
|
373
|
-
|
|
374
|
-
};
|
|
309
|
+
});
|
|
375
310
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
376
|
-
if (data.Policy
|
|
311
|
+
if (data.Policy != null) {
|
|
377
312
|
contents.Policy = deserializeAws_restJson1LifecyclePolicy(data.Policy, context);
|
|
378
313
|
}
|
|
379
|
-
return
|
|
314
|
+
return contents;
|
|
380
315
|
};
|
|
381
316
|
exports.deserializeAws_restJson1GetLifecyclePolicyCommand = deserializeAws_restJson1GetLifecyclePolicyCommand;
|
|
382
317
|
const deserializeAws_restJson1GetLifecyclePolicyCommandError = async (output, context) => {
|
|
@@ -384,7 +319,6 @@ const deserializeAws_restJson1GetLifecyclePolicyCommandError = async (output, co
|
|
|
384
319
|
...output,
|
|
385
320
|
body: await parseBody(output.body, context),
|
|
386
321
|
};
|
|
387
|
-
let response;
|
|
388
322
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
389
323
|
switch (errorCode) {
|
|
390
324
|
case "InternalServerException":
|
|
@@ -398,29 +332,26 @@ const deserializeAws_restJson1GetLifecyclePolicyCommandError = async (output, co
|
|
|
398
332
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
399
333
|
default:
|
|
400
334
|
const parsedBody = parsedOutput.body;
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
$metadata,
|
|
335
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
336
|
+
output,
|
|
337
|
+
parsedBody,
|
|
338
|
+
exceptionCtor: DLMServiceException_1.DLMServiceException,
|
|
339
|
+
errorCode,
|
|
407
340
|
});
|
|
408
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
409
341
|
}
|
|
410
342
|
};
|
|
411
343
|
const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
412
344
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
413
345
|
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
414
346
|
}
|
|
415
|
-
const contents = {
|
|
347
|
+
const contents = map({
|
|
416
348
|
$metadata: deserializeMetadata(output),
|
|
417
|
-
|
|
418
|
-
};
|
|
349
|
+
});
|
|
419
350
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
420
|
-
if (data.Tags
|
|
351
|
+
if (data.Tags != null) {
|
|
421
352
|
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
422
353
|
}
|
|
423
|
-
return
|
|
354
|
+
return contents;
|
|
424
355
|
};
|
|
425
356
|
exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_restJson1ListTagsForResourceCommand;
|
|
426
357
|
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
@@ -428,7 +359,6 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
428
359
|
...output,
|
|
429
360
|
body: await parseBody(output.body, context),
|
|
430
361
|
};
|
|
431
|
-
let response;
|
|
432
362
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
433
363
|
switch (errorCode) {
|
|
434
364
|
case "InternalServerException":
|
|
@@ -442,25 +372,23 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
442
372
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
443
373
|
default:
|
|
444
374
|
const parsedBody = parsedOutput.body;
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
$metadata,
|
|
375
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
376
|
+
output,
|
|
377
|
+
parsedBody,
|
|
378
|
+
exceptionCtor: DLMServiceException_1.DLMServiceException,
|
|
379
|
+
errorCode,
|
|
451
380
|
});
|
|
452
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
453
381
|
}
|
|
454
382
|
};
|
|
455
383
|
const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
456
384
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
457
385
|
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
458
386
|
}
|
|
459
|
-
const contents = {
|
|
387
|
+
const contents = map({
|
|
460
388
|
$metadata: deserializeMetadata(output),
|
|
461
|
-
};
|
|
389
|
+
});
|
|
462
390
|
await collectBody(output.body, context);
|
|
463
|
-
return
|
|
391
|
+
return contents;
|
|
464
392
|
};
|
|
465
393
|
exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1TagResourceCommand;
|
|
466
394
|
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
@@ -468,7 +396,6 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
468
396
|
...output,
|
|
469
397
|
body: await parseBody(output.body, context),
|
|
470
398
|
};
|
|
471
|
-
let response;
|
|
472
399
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
473
400
|
switch (errorCode) {
|
|
474
401
|
case "InternalServerException":
|
|
@@ -482,25 +409,23 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
482
409
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
483
410
|
default:
|
|
484
411
|
const parsedBody = parsedOutput.body;
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
$metadata,
|
|
412
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
413
|
+
output,
|
|
414
|
+
parsedBody,
|
|
415
|
+
exceptionCtor: DLMServiceException_1.DLMServiceException,
|
|
416
|
+
errorCode,
|
|
491
417
|
});
|
|
492
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
493
418
|
}
|
|
494
419
|
};
|
|
495
420
|
const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
496
421
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
497
422
|
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
498
423
|
}
|
|
499
|
-
const contents = {
|
|
424
|
+
const contents = map({
|
|
500
425
|
$metadata: deserializeMetadata(output),
|
|
501
|
-
};
|
|
426
|
+
});
|
|
502
427
|
await collectBody(output.body, context);
|
|
503
|
-
return
|
|
428
|
+
return contents;
|
|
504
429
|
};
|
|
505
430
|
exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1UntagResourceCommand;
|
|
506
431
|
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
@@ -508,7 +433,6 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
508
433
|
...output,
|
|
509
434
|
body: await parseBody(output.body, context),
|
|
510
435
|
};
|
|
511
|
-
let response;
|
|
512
436
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
513
437
|
switch (errorCode) {
|
|
514
438
|
case "InternalServerException":
|
|
@@ -522,25 +446,23 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
522
446
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
523
447
|
default:
|
|
524
448
|
const parsedBody = parsedOutput.body;
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
$metadata,
|
|
449
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
450
|
+
output,
|
|
451
|
+
parsedBody,
|
|
452
|
+
exceptionCtor: DLMServiceException_1.DLMServiceException,
|
|
453
|
+
errorCode,
|
|
531
454
|
});
|
|
532
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
533
455
|
}
|
|
534
456
|
};
|
|
535
457
|
const deserializeAws_restJson1UpdateLifecyclePolicyCommand = async (output, context) => {
|
|
536
458
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
537
459
|
return deserializeAws_restJson1UpdateLifecyclePolicyCommandError(output, context);
|
|
538
460
|
}
|
|
539
|
-
const contents = {
|
|
461
|
+
const contents = map({
|
|
540
462
|
$metadata: deserializeMetadata(output),
|
|
541
|
-
};
|
|
463
|
+
});
|
|
542
464
|
await collectBody(output.body, context);
|
|
543
|
-
return
|
|
465
|
+
return contents;
|
|
544
466
|
};
|
|
545
467
|
exports.deserializeAws_restJson1UpdateLifecyclePolicyCommand = deserializeAws_restJson1UpdateLifecyclePolicyCommand;
|
|
546
468
|
const deserializeAws_restJson1UpdateLifecyclePolicyCommandError = async (output, context) => {
|
|
@@ -548,7 +470,6 @@ const deserializeAws_restJson1UpdateLifecyclePolicyCommandError = async (output,
|
|
|
548
470
|
...output,
|
|
549
471
|
body: await parseBody(output.body, context),
|
|
550
472
|
};
|
|
551
|
-
let response;
|
|
552
473
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
553
474
|
switch (errorCode) {
|
|
554
475
|
case "InternalServerException":
|
|
@@ -565,23 +486,22 @@ const deserializeAws_restJson1UpdateLifecyclePolicyCommandError = async (output,
|
|
|
565
486
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
566
487
|
default:
|
|
567
488
|
const parsedBody = parsedOutput.body;
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
$metadata,
|
|
489
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
490
|
+
output,
|
|
491
|
+
parsedBody,
|
|
492
|
+
exceptionCtor: DLMServiceException_1.DLMServiceException,
|
|
493
|
+
errorCode,
|
|
574
494
|
});
|
|
575
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
576
495
|
}
|
|
577
496
|
};
|
|
497
|
+
const map = smithy_client_1.map;
|
|
578
498
|
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
579
|
-
const contents = {};
|
|
499
|
+
const contents = map({});
|
|
580
500
|
const data = parsedOutput.body;
|
|
581
|
-
if (data.Code
|
|
501
|
+
if (data.Code != null) {
|
|
582
502
|
contents.Code = (0, smithy_client_1.expectString)(data.Code);
|
|
583
503
|
}
|
|
584
|
-
if (data.Message
|
|
504
|
+
if (data.Message != null) {
|
|
585
505
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
586
506
|
}
|
|
587
507
|
const exception = new models_0_1.InternalServerException({
|
|
@@ -591,18 +511,18 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
|
|
|
591
511
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
592
512
|
};
|
|
593
513
|
const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOutput, context) => {
|
|
594
|
-
const contents = {};
|
|
514
|
+
const contents = map({});
|
|
595
515
|
const data = parsedOutput.body;
|
|
596
|
-
if (data.Code
|
|
516
|
+
if (data.Code != null) {
|
|
597
517
|
contents.Code = (0, smithy_client_1.expectString)(data.Code);
|
|
598
518
|
}
|
|
599
|
-
if (data.Message
|
|
519
|
+
if (data.Message != null) {
|
|
600
520
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
601
521
|
}
|
|
602
|
-
if (data.MutuallyExclusiveParameters
|
|
522
|
+
if (data.MutuallyExclusiveParameters != null) {
|
|
603
523
|
contents.MutuallyExclusiveParameters = deserializeAws_restJson1ParameterList(data.MutuallyExclusiveParameters, context);
|
|
604
524
|
}
|
|
605
|
-
if (data.RequiredParameters
|
|
525
|
+
if (data.RequiredParameters != null) {
|
|
606
526
|
contents.RequiredParameters = deserializeAws_restJson1ParameterList(data.RequiredParameters, context);
|
|
607
527
|
}
|
|
608
528
|
const exception = new models_0_1.InvalidRequestException({
|
|
@@ -612,15 +532,15 @@ const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOut
|
|
|
612
532
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
613
533
|
};
|
|
614
534
|
const deserializeAws_restJson1LimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
615
|
-
const contents = {};
|
|
535
|
+
const contents = map({});
|
|
616
536
|
const data = parsedOutput.body;
|
|
617
|
-
if (data.Code
|
|
537
|
+
if (data.Code != null) {
|
|
618
538
|
contents.Code = (0, smithy_client_1.expectString)(data.Code);
|
|
619
539
|
}
|
|
620
|
-
if (data.Message
|
|
540
|
+
if (data.Message != null) {
|
|
621
541
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
622
542
|
}
|
|
623
|
-
if (data.ResourceType
|
|
543
|
+
if (data.ResourceType != null) {
|
|
624
544
|
contents.ResourceType = (0, smithy_client_1.expectString)(data.ResourceType);
|
|
625
545
|
}
|
|
626
546
|
const exception = new models_0_1.LimitExceededException({
|
|
@@ -630,18 +550,18 @@ const deserializeAws_restJson1LimitExceededExceptionResponse = async (parsedOutp
|
|
|
630
550
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
631
551
|
};
|
|
632
552
|
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
633
|
-
const contents = {};
|
|
553
|
+
const contents = map({});
|
|
634
554
|
const data = parsedOutput.body;
|
|
635
|
-
if (data.Code
|
|
555
|
+
if (data.Code != null) {
|
|
636
556
|
contents.Code = (0, smithy_client_1.expectString)(data.Code);
|
|
637
557
|
}
|
|
638
|
-
if (data.Message
|
|
558
|
+
if (data.Message != null) {
|
|
639
559
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
640
560
|
}
|
|
641
|
-
if (data.ResourceIds
|
|
561
|
+
if (data.ResourceIds != null) {
|
|
642
562
|
contents.ResourceIds = deserializeAws_restJson1PolicyIdList(data.ResourceIds, context);
|
|
643
563
|
}
|
|
644
|
-
if (data.ResourceType
|
|
564
|
+
if (data.ResourceType != null) {
|
|
645
565
|
contents.ResourceType = (0, smithy_client_1.expectString)(data.ResourceType);
|
|
646
566
|
}
|
|
647
567
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
@@ -662,9 +582,6 @@ const serializeAws_restJson1ActionList = (input, context) => {
|
|
|
662
582
|
return input
|
|
663
583
|
.filter((e) => e != null)
|
|
664
584
|
.map((entry) => {
|
|
665
|
-
if (entry === null) {
|
|
666
|
-
return null;
|
|
667
|
-
}
|
|
668
585
|
return serializeAws_restJson1Action(entry, context);
|
|
669
586
|
});
|
|
670
587
|
};
|
|
@@ -672,9 +589,6 @@ const serializeAws_restJson1AvailabilityZoneList = (input, context) => {
|
|
|
672
589
|
return input
|
|
673
590
|
.filter((e) => e != null)
|
|
674
591
|
.map((entry) => {
|
|
675
|
-
if (entry === null) {
|
|
676
|
-
return null;
|
|
677
|
-
}
|
|
678
592
|
return entry;
|
|
679
593
|
});
|
|
680
594
|
};
|
|
@@ -702,9 +616,6 @@ const serializeAws_restJson1CrossRegionCopyActionList = (input, context) => {
|
|
|
702
616
|
return input
|
|
703
617
|
.filter((e) => e != null)
|
|
704
618
|
.map((entry) => {
|
|
705
|
-
if (entry === null) {
|
|
706
|
-
return null;
|
|
707
|
-
}
|
|
708
619
|
return serializeAws_restJson1CrossRegionCopyAction(entry, context);
|
|
709
620
|
});
|
|
710
621
|
};
|
|
@@ -739,9 +650,6 @@ const serializeAws_restJson1CrossRegionCopyRules = (input, context) => {
|
|
|
739
650
|
return input
|
|
740
651
|
.filter((e) => e != null)
|
|
741
652
|
.map((entry) => {
|
|
742
|
-
if (entry === null) {
|
|
743
|
-
return null;
|
|
744
|
-
}
|
|
745
653
|
return serializeAws_restJson1CrossRegionCopyRule(entry, context);
|
|
746
654
|
});
|
|
747
655
|
};
|
|
@@ -773,6 +681,13 @@ const serializeAws_restJson1EventSource = (input, context) => {
|
|
|
773
681
|
...(input.Type != null && { Type: input.Type }),
|
|
774
682
|
};
|
|
775
683
|
};
|
|
684
|
+
const serializeAws_restJson1ExcludeDataVolumeTagList = (input, context) => {
|
|
685
|
+
return input
|
|
686
|
+
.filter((e) => e != null)
|
|
687
|
+
.map((entry) => {
|
|
688
|
+
return serializeAws_restJson1Tag(entry, context);
|
|
689
|
+
});
|
|
690
|
+
};
|
|
776
691
|
const serializeAws_restJson1FastRestoreRule = (input, context) => {
|
|
777
692
|
return {
|
|
778
693
|
...(input.AvailabilityZones != null && {
|
|
@@ -786,6 +701,9 @@ const serializeAws_restJson1FastRestoreRule = (input, context) => {
|
|
|
786
701
|
const serializeAws_restJson1_Parameters = (input, context) => {
|
|
787
702
|
return {
|
|
788
703
|
...(input.ExcludeBootVolume != null && { ExcludeBootVolume: input.ExcludeBootVolume }),
|
|
704
|
+
...(input.ExcludeDataVolumeTags != null && {
|
|
705
|
+
ExcludeDataVolumeTags: serializeAws_restJson1ExcludeDataVolumeTagList(input.ExcludeDataVolumeTags, context),
|
|
706
|
+
}),
|
|
789
707
|
...(input.NoReboot != null && { NoReboot: input.NoReboot }),
|
|
790
708
|
};
|
|
791
709
|
};
|
|
@@ -809,9 +727,6 @@ const serializeAws_restJson1ResourceLocationList = (input, context) => {
|
|
|
809
727
|
return input
|
|
810
728
|
.filter((e) => e != null)
|
|
811
729
|
.map((entry) => {
|
|
812
|
-
if (entry === null) {
|
|
813
|
-
return null;
|
|
814
|
-
}
|
|
815
730
|
return entry;
|
|
816
731
|
});
|
|
817
732
|
};
|
|
@@ -819,9 +734,6 @@ const serializeAws_restJson1ResourceTypeValuesList = (input, context) => {
|
|
|
819
734
|
return input
|
|
820
735
|
.filter((e) => e != null)
|
|
821
736
|
.map((entry) => {
|
|
822
|
-
if (entry === null) {
|
|
823
|
-
return null;
|
|
824
|
-
}
|
|
825
737
|
return entry;
|
|
826
738
|
});
|
|
827
739
|
};
|
|
@@ -858,9 +770,6 @@ const serializeAws_restJson1ScheduleList = (input, context) => {
|
|
|
858
770
|
return input
|
|
859
771
|
.filter((e) => e != null)
|
|
860
772
|
.map((entry) => {
|
|
861
|
-
if (entry === null) {
|
|
862
|
-
return null;
|
|
863
|
-
}
|
|
864
773
|
return serializeAws_restJson1Schedule(entry, context);
|
|
865
774
|
});
|
|
866
775
|
};
|
|
@@ -877,9 +786,6 @@ const serializeAws_restJson1ShareRules = (input, context) => {
|
|
|
877
786
|
return input
|
|
878
787
|
.filter((e) => e != null)
|
|
879
788
|
.map((entry) => {
|
|
880
|
-
if (entry === null) {
|
|
881
|
-
return null;
|
|
882
|
-
}
|
|
883
789
|
return serializeAws_restJson1ShareRule(entry, context);
|
|
884
790
|
});
|
|
885
791
|
};
|
|
@@ -887,9 +793,6 @@ const serializeAws_restJson1ShareTargetAccountList = (input, context) => {
|
|
|
887
793
|
return input
|
|
888
794
|
.filter((e) => e != null)
|
|
889
795
|
.map((entry) => {
|
|
890
|
-
if (entry === null) {
|
|
891
|
-
return null;
|
|
892
|
-
}
|
|
893
796
|
return entry;
|
|
894
797
|
});
|
|
895
798
|
};
|
|
@@ -897,9 +800,6 @@ const serializeAws_restJson1SnapshotOwnerList = (input, context) => {
|
|
|
897
800
|
return input
|
|
898
801
|
.filter((e) => e != null)
|
|
899
802
|
.map((entry) => {
|
|
900
|
-
if (entry === null) {
|
|
901
|
-
return null;
|
|
902
|
-
}
|
|
903
803
|
return entry;
|
|
904
804
|
});
|
|
905
805
|
};
|
|
@@ -924,9 +824,6 @@ const serializeAws_restJson1TagsToAddList = (input, context) => {
|
|
|
924
824
|
return input
|
|
925
825
|
.filter((e) => e != null)
|
|
926
826
|
.map((entry) => {
|
|
927
|
-
if (entry === null) {
|
|
928
|
-
return null;
|
|
929
|
-
}
|
|
930
827
|
return serializeAws_restJson1Tag(entry, context);
|
|
931
828
|
});
|
|
932
829
|
};
|
|
@@ -934,9 +831,6 @@ const serializeAws_restJson1TargetTagList = (input, context) => {
|
|
|
934
831
|
return input
|
|
935
832
|
.filter((e) => e != null)
|
|
936
833
|
.map((entry) => {
|
|
937
|
-
if (entry === null) {
|
|
938
|
-
return null;
|
|
939
|
-
}
|
|
940
834
|
return serializeAws_restJson1Tag(entry, context);
|
|
941
835
|
});
|
|
942
836
|
};
|
|
@@ -944,9 +838,6 @@ const serializeAws_restJson1TimesList = (input, context) => {
|
|
|
944
838
|
return input
|
|
945
839
|
.filter((e) => e != null)
|
|
946
840
|
.map((entry) => {
|
|
947
|
-
if (entry === null) {
|
|
948
|
-
return null;
|
|
949
|
-
}
|
|
950
841
|
return entry;
|
|
951
842
|
});
|
|
952
843
|
};
|
|
@@ -954,9 +845,6 @@ const serializeAws_restJson1VariableTagsList = (input, context) => {
|
|
|
954
845
|
return input
|
|
955
846
|
.filter((e) => e != null)
|
|
956
847
|
.map((entry) => {
|
|
957
|
-
if (entry === null) {
|
|
958
|
-
return null;
|
|
959
|
-
}
|
|
960
848
|
return serializeAws_restJson1Tag(entry, context);
|
|
961
849
|
});
|
|
962
850
|
};
|
|
@@ -1087,6 +975,17 @@ const deserializeAws_restJson1EventSource = (output, context) => {
|
|
|
1087
975
|
Type: (0, smithy_client_1.expectString)(output.Type),
|
|
1088
976
|
};
|
|
1089
977
|
};
|
|
978
|
+
const deserializeAws_restJson1ExcludeDataVolumeTagList = (output, context) => {
|
|
979
|
+
const retVal = (output || [])
|
|
980
|
+
.filter((e) => e != null)
|
|
981
|
+
.map((entry) => {
|
|
982
|
+
if (entry === null) {
|
|
983
|
+
return null;
|
|
984
|
+
}
|
|
985
|
+
return deserializeAws_restJson1Tag(entry, context);
|
|
986
|
+
});
|
|
987
|
+
return retVal;
|
|
988
|
+
};
|
|
1090
989
|
const deserializeAws_restJson1FastRestoreRule = (output, context) => {
|
|
1091
990
|
return {
|
|
1092
991
|
AvailabilityZones: output.AvailabilityZones != null
|
|
@@ -1149,6 +1048,9 @@ const deserializeAws_restJson1ParameterList = (output, context) => {
|
|
|
1149
1048
|
const deserializeAws_restJson1_Parameters = (output, context) => {
|
|
1150
1049
|
return {
|
|
1151
1050
|
ExcludeBootVolume: (0, smithy_client_1.expectBoolean)(output.ExcludeBootVolume),
|
|
1051
|
+
ExcludeDataVolumeTags: output.ExcludeDataVolumeTags != null
|
|
1052
|
+
? deserializeAws_restJson1ExcludeDataVolumeTagList(output.ExcludeDataVolumeTags, context)
|
|
1053
|
+
: undefined,
|
|
1152
1054
|
NoReboot: (0, smithy_client_1.expectBoolean)(output.NoReboot),
|
|
1153
1055
|
};
|
|
1154
1056
|
};
|