@aws-sdk/client-docdb-elastic 3.306.0 → 3.309.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/commands/CreateClusterCommand.js +2 -2
- package/dist-cjs/commands/CreateClusterSnapshotCommand.js +2 -2
- package/dist-cjs/commands/DeleteClusterCommand.js +2 -2
- package/dist-cjs/commands/DeleteClusterSnapshotCommand.js +2 -2
- package/dist-cjs/commands/GetClusterCommand.js +2 -2
- package/dist-cjs/commands/GetClusterSnapshotCommand.js +2 -2
- package/dist-cjs/commands/ListClusterSnapshotsCommand.js +2 -2
- package/dist-cjs/commands/ListClustersCommand.js +2 -2
- package/dist-cjs/commands/ListTagsForResourceCommand.js +2 -2
- package/dist-cjs/commands/RestoreClusterFromSnapshotCommand.js +2 -2
- package/dist-cjs/commands/TagResourceCommand.js +2 -2
- package/dist-cjs/commands/UntagResourceCommand.js +2 -2
- package/dist-cjs/commands/UpdateClusterCommand.js +2 -2
- package/dist-cjs/protocols/Aws_restJson1.js +195 -199
- package/dist-es/commands/CreateClusterCommand.js +3 -3
- package/dist-es/commands/CreateClusterSnapshotCommand.js +3 -3
- package/dist-es/commands/DeleteClusterCommand.js +3 -3
- package/dist-es/commands/DeleteClusterSnapshotCommand.js +3 -3
- package/dist-es/commands/GetClusterCommand.js +3 -3
- package/dist-es/commands/GetClusterSnapshotCommand.js +3 -3
- package/dist-es/commands/ListClusterSnapshotsCommand.js +3 -3
- package/dist-es/commands/ListClustersCommand.js +3 -3
- package/dist-es/commands/ListTagsForResourceCommand.js +3 -3
- package/dist-es/commands/RestoreClusterFromSnapshotCommand.js +3 -3
- package/dist-es/commands/TagResourceCommand.js +3 -3
- package/dist-es/commands/UntagResourceCommand.js +3 -3
- package/dist-es/commands/UpdateClusterCommand.js +3 -3
- package/dist-es/protocols/Aws_restJson1.js +168 -172
- package/dist-types/protocols/Aws_restJson1.d.ts +104 -26
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +26 -26
- package/package.json +6 -6
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.de_UpdateClusterCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_RestoreClusterFromSnapshotCommand = exports.de_ListTagsForResourceCommand = exports.de_ListClusterSnapshotsCommand = exports.de_ListClustersCommand = exports.de_GetClusterSnapshotCommand = exports.de_GetClusterCommand = exports.de_DeleteClusterSnapshotCommand = exports.de_DeleteClusterCommand = exports.de_CreateClusterSnapshotCommand = exports.de_CreateClusterCommand = exports.se_UpdateClusterCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_RestoreClusterFromSnapshotCommand = exports.se_ListTagsForResourceCommand = exports.se_ListClusterSnapshotsCommand = exports.se_ListClustersCommand = exports.se_GetClusterSnapshotCommand = exports.se_GetClusterCommand = exports.se_DeleteClusterSnapshotCommand = exports.se_DeleteClusterCommand = exports.se_CreateClusterSnapshotCommand = exports.se_CreateClusterCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const uuid_1 = require("uuid");
|
|
7
7
|
const DocDBElasticServiceException_1 = require("../models/DocDBElasticServiceException");
|
|
8
8
|
const models_0_1 = require("../models/models_0");
|
|
9
|
-
const
|
|
9
|
+
const se_CreateClusterCommand = async (input, context) => {
|
|
10
10
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
11
11
|
const headers = {
|
|
12
12
|
"content-type": "application/json",
|
|
@@ -23,10 +23,10 @@ const serializeAws_restJson1CreateClusterCommand = async (input, context) => {
|
|
|
23
23
|
...(input.preferredMaintenanceWindow != null && { preferredMaintenanceWindow: input.preferredMaintenanceWindow }),
|
|
24
24
|
...(input.shardCapacity != null && { shardCapacity: input.shardCapacity }),
|
|
25
25
|
...(input.shardCount != null && { shardCount: input.shardCount }),
|
|
26
|
-
...(input.subnetIds != null && { subnetIds:
|
|
27
|
-
...(input.tags != null && { tags:
|
|
26
|
+
...(input.subnetIds != null && { subnetIds: se_StringList(input.subnetIds, context) }),
|
|
27
|
+
...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
|
|
28
28
|
...(input.vpcSecurityGroupIds != null && {
|
|
29
|
-
vpcSecurityGroupIds:
|
|
29
|
+
vpcSecurityGroupIds: se_StringList(input.vpcSecurityGroupIds, context),
|
|
30
30
|
}),
|
|
31
31
|
});
|
|
32
32
|
return new protocol_http_1.HttpRequest({
|
|
@@ -39,8 +39,8 @@ const serializeAws_restJson1CreateClusterCommand = async (input, context) => {
|
|
|
39
39
|
body,
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
|
-
exports.
|
|
43
|
-
const
|
|
42
|
+
exports.se_CreateClusterCommand = se_CreateClusterCommand;
|
|
43
|
+
const se_CreateClusterSnapshotCommand = async (input, context) => {
|
|
44
44
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
45
45
|
const headers = {
|
|
46
46
|
"content-type": "application/json",
|
|
@@ -50,7 +50,7 @@ const serializeAws_restJson1CreateClusterSnapshotCommand = async (input, context
|
|
|
50
50
|
body = JSON.stringify({
|
|
51
51
|
...(input.clusterArn != null && { clusterArn: input.clusterArn }),
|
|
52
52
|
...(input.snapshotName != null && { snapshotName: input.snapshotName }),
|
|
53
|
-
...(input.tags != null && { tags:
|
|
53
|
+
...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
|
|
54
54
|
});
|
|
55
55
|
return new protocol_http_1.HttpRequest({
|
|
56
56
|
protocol,
|
|
@@ -62,8 +62,8 @@ const serializeAws_restJson1CreateClusterSnapshotCommand = async (input, context
|
|
|
62
62
|
body,
|
|
63
63
|
});
|
|
64
64
|
};
|
|
65
|
-
exports.
|
|
66
|
-
const
|
|
65
|
+
exports.se_CreateClusterSnapshotCommand = se_CreateClusterSnapshotCommand;
|
|
66
|
+
const se_DeleteClusterCommand = async (input, context) => {
|
|
67
67
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
68
68
|
const headers = {};
|
|
69
69
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster/{clusterArn}";
|
|
@@ -79,8 +79,8 @@ const serializeAws_restJson1DeleteClusterCommand = async (input, context) => {
|
|
|
79
79
|
body,
|
|
80
80
|
});
|
|
81
81
|
};
|
|
82
|
-
exports.
|
|
83
|
-
const
|
|
82
|
+
exports.se_DeleteClusterCommand = se_DeleteClusterCommand;
|
|
83
|
+
const se_DeleteClusterSnapshotCommand = async (input, context) => {
|
|
84
84
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
85
85
|
const headers = {};
|
|
86
86
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster-snapshot/{snapshotArn}";
|
|
@@ -96,8 +96,8 @@ const serializeAws_restJson1DeleteClusterSnapshotCommand = async (input, context
|
|
|
96
96
|
body,
|
|
97
97
|
});
|
|
98
98
|
};
|
|
99
|
-
exports.
|
|
100
|
-
const
|
|
99
|
+
exports.se_DeleteClusterSnapshotCommand = se_DeleteClusterSnapshotCommand;
|
|
100
|
+
const se_GetClusterCommand = async (input, context) => {
|
|
101
101
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
102
102
|
const headers = {};
|
|
103
103
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster/{clusterArn}";
|
|
@@ -113,8 +113,8 @@ const serializeAws_restJson1GetClusterCommand = async (input, context) => {
|
|
|
113
113
|
body,
|
|
114
114
|
});
|
|
115
115
|
};
|
|
116
|
-
exports.
|
|
117
|
-
const
|
|
116
|
+
exports.se_GetClusterCommand = se_GetClusterCommand;
|
|
117
|
+
const se_GetClusterSnapshotCommand = async (input, context) => {
|
|
118
118
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
119
119
|
const headers = {};
|
|
120
120
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster-snapshot/{snapshotArn}";
|
|
@@ -130,8 +130,8 @@ const serializeAws_restJson1GetClusterSnapshotCommand = async (input, context) =
|
|
|
130
130
|
body,
|
|
131
131
|
});
|
|
132
132
|
};
|
|
133
|
-
exports.
|
|
134
|
-
const
|
|
133
|
+
exports.se_GetClusterSnapshotCommand = se_GetClusterSnapshotCommand;
|
|
134
|
+
const se_ListClustersCommand = async (input, context) => {
|
|
135
135
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
136
136
|
const headers = {};
|
|
137
137
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters";
|
|
@@ -151,8 +151,8 @@ const serializeAws_restJson1ListClustersCommand = async (input, context) => {
|
|
|
151
151
|
body,
|
|
152
152
|
});
|
|
153
153
|
};
|
|
154
|
-
exports.
|
|
155
|
-
const
|
|
154
|
+
exports.se_ListClustersCommand = se_ListClustersCommand;
|
|
155
|
+
const se_ListClusterSnapshotsCommand = async (input, context) => {
|
|
156
156
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
157
157
|
const headers = {};
|
|
158
158
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster-snapshots";
|
|
@@ -173,8 +173,8 @@ const serializeAws_restJson1ListClusterSnapshotsCommand = async (input, context)
|
|
|
173
173
|
body,
|
|
174
174
|
});
|
|
175
175
|
};
|
|
176
|
-
exports.
|
|
177
|
-
const
|
|
176
|
+
exports.se_ListClusterSnapshotsCommand = se_ListClusterSnapshotsCommand;
|
|
177
|
+
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
178
178
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
179
179
|
const headers = {};
|
|
180
180
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
@@ -190,8 +190,8 @@ const serializeAws_restJson1ListTagsForResourceCommand = async (input, context)
|
|
|
190
190
|
body,
|
|
191
191
|
});
|
|
192
192
|
};
|
|
193
|
-
exports.
|
|
194
|
-
const
|
|
193
|
+
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
194
|
+
const se_RestoreClusterFromSnapshotCommand = async (input, context) => {
|
|
195
195
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
196
196
|
const headers = {
|
|
197
197
|
"content-type": "application/json",
|
|
@@ -202,10 +202,10 @@ const serializeAws_restJson1RestoreClusterFromSnapshotCommand = async (input, co
|
|
|
202
202
|
body = JSON.stringify({
|
|
203
203
|
...(input.clusterName != null && { clusterName: input.clusterName }),
|
|
204
204
|
...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
|
|
205
|
-
...(input.subnetIds != null && { subnetIds:
|
|
206
|
-
...(input.tags != null && { tags:
|
|
205
|
+
...(input.subnetIds != null && { subnetIds: se_StringList(input.subnetIds, context) }),
|
|
206
|
+
...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
|
|
207
207
|
...(input.vpcSecurityGroupIds != null && {
|
|
208
|
-
vpcSecurityGroupIds:
|
|
208
|
+
vpcSecurityGroupIds: se_StringList(input.vpcSecurityGroupIds, context),
|
|
209
209
|
}),
|
|
210
210
|
});
|
|
211
211
|
return new protocol_http_1.HttpRequest({
|
|
@@ -218,8 +218,8 @@ const serializeAws_restJson1RestoreClusterFromSnapshotCommand = async (input, co
|
|
|
218
218
|
body,
|
|
219
219
|
});
|
|
220
220
|
};
|
|
221
|
-
exports.
|
|
222
|
-
const
|
|
221
|
+
exports.se_RestoreClusterFromSnapshotCommand = se_RestoreClusterFromSnapshotCommand;
|
|
222
|
+
const se_TagResourceCommand = async (input, context) => {
|
|
223
223
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
224
224
|
const headers = {
|
|
225
225
|
"content-type": "application/json",
|
|
@@ -228,7 +228,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
|
228
228
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
229
229
|
let body;
|
|
230
230
|
body = JSON.stringify({
|
|
231
|
-
...(input.tags != null && { tags:
|
|
231
|
+
...(input.tags != null && { tags: se_TagMap(input.tags, context) }),
|
|
232
232
|
});
|
|
233
233
|
return new protocol_http_1.HttpRequest({
|
|
234
234
|
protocol,
|
|
@@ -240,8 +240,8 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
|
240
240
|
body,
|
|
241
241
|
});
|
|
242
242
|
};
|
|
243
|
-
exports.
|
|
244
|
-
const
|
|
243
|
+
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
244
|
+
const se_UntagResourceCommand = async (input, context) => {
|
|
245
245
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
246
246
|
const headers = {};
|
|
247
247
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
@@ -264,8 +264,8 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
|
264
264
|
body,
|
|
265
265
|
});
|
|
266
266
|
};
|
|
267
|
-
exports.
|
|
268
|
-
const
|
|
267
|
+
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
268
|
+
const se_UpdateClusterCommand = async (input, context) => {
|
|
269
269
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
270
270
|
const headers = {
|
|
271
271
|
"content-type": "application/json",
|
|
@@ -280,9 +280,9 @@ const serializeAws_restJson1UpdateClusterCommand = async (input, context) => {
|
|
|
280
280
|
...(input.preferredMaintenanceWindow != null && { preferredMaintenanceWindow: input.preferredMaintenanceWindow }),
|
|
281
281
|
...(input.shardCapacity != null && { shardCapacity: input.shardCapacity }),
|
|
282
282
|
...(input.shardCount != null && { shardCount: input.shardCount }),
|
|
283
|
-
...(input.subnetIds != null && { subnetIds:
|
|
283
|
+
...(input.subnetIds != null && { subnetIds: se_StringList(input.subnetIds, context) }),
|
|
284
284
|
...(input.vpcSecurityGroupIds != null && {
|
|
285
|
-
vpcSecurityGroupIds:
|
|
285
|
+
vpcSecurityGroupIds: se_StringList(input.vpcSecurityGroupIds, context),
|
|
286
286
|
}),
|
|
287
287
|
});
|
|
288
288
|
return new protocol_http_1.HttpRequest({
|
|
@@ -295,22 +295,22 @@ const serializeAws_restJson1UpdateClusterCommand = async (input, context) => {
|
|
|
295
295
|
body,
|
|
296
296
|
});
|
|
297
297
|
};
|
|
298
|
-
exports.
|
|
299
|
-
const
|
|
298
|
+
exports.se_UpdateClusterCommand = se_UpdateClusterCommand;
|
|
299
|
+
const de_CreateClusterCommand = async (output, context) => {
|
|
300
300
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
301
|
-
return
|
|
301
|
+
return de_CreateClusterCommandError(output, context);
|
|
302
302
|
}
|
|
303
303
|
const contents = map({
|
|
304
304
|
$metadata: deserializeMetadata(output),
|
|
305
305
|
});
|
|
306
306
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
307
307
|
if (data.cluster != null) {
|
|
308
|
-
contents.cluster =
|
|
308
|
+
contents.cluster = de_Cluster(data.cluster, context);
|
|
309
309
|
}
|
|
310
310
|
return contents;
|
|
311
311
|
};
|
|
312
|
-
exports.
|
|
313
|
-
const
|
|
312
|
+
exports.de_CreateClusterCommand = de_CreateClusterCommand;
|
|
313
|
+
const de_CreateClusterCommandError = async (output, context) => {
|
|
314
314
|
const parsedOutput = {
|
|
315
315
|
...output,
|
|
316
316
|
body: await parseErrorBody(output.body, context),
|
|
@@ -319,22 +319,22 @@ const deserializeAws_restJson1CreateClusterCommandError = async (output, context
|
|
|
319
319
|
switch (errorCode) {
|
|
320
320
|
case "AccessDeniedException":
|
|
321
321
|
case "com.amazonaws.docdbelastic#AccessDeniedException":
|
|
322
|
-
throw await
|
|
322
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
323
323
|
case "ConflictException":
|
|
324
324
|
case "com.amazonaws.docdbelastic#ConflictException":
|
|
325
|
-
throw await
|
|
325
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
326
326
|
case "InternalServerException":
|
|
327
327
|
case "com.amazonaws.docdbelastic#InternalServerException":
|
|
328
|
-
throw await
|
|
328
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
329
329
|
case "ServiceQuotaExceededException":
|
|
330
330
|
case "com.amazonaws.docdbelastic#ServiceQuotaExceededException":
|
|
331
|
-
throw await
|
|
331
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
332
332
|
case "ThrottlingException":
|
|
333
333
|
case "com.amazonaws.docdbelastic#ThrottlingException":
|
|
334
|
-
throw await
|
|
334
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
335
335
|
case "ValidationException":
|
|
336
336
|
case "com.amazonaws.docdbelastic#ValidationException":
|
|
337
|
-
throw await
|
|
337
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
338
338
|
default:
|
|
339
339
|
const parsedBody = parsedOutput.body;
|
|
340
340
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -345,21 +345,21 @@ const deserializeAws_restJson1CreateClusterCommandError = async (output, context
|
|
|
345
345
|
});
|
|
346
346
|
}
|
|
347
347
|
};
|
|
348
|
-
const
|
|
348
|
+
const de_CreateClusterSnapshotCommand = async (output, context) => {
|
|
349
349
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
350
|
-
return
|
|
350
|
+
return de_CreateClusterSnapshotCommandError(output, context);
|
|
351
351
|
}
|
|
352
352
|
const contents = map({
|
|
353
353
|
$metadata: deserializeMetadata(output),
|
|
354
354
|
});
|
|
355
355
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
356
356
|
if (data.snapshot != null) {
|
|
357
|
-
contents.snapshot =
|
|
357
|
+
contents.snapshot = de_ClusterSnapshot(data.snapshot, context);
|
|
358
358
|
}
|
|
359
359
|
return contents;
|
|
360
360
|
};
|
|
361
|
-
exports.
|
|
362
|
-
const
|
|
361
|
+
exports.de_CreateClusterSnapshotCommand = de_CreateClusterSnapshotCommand;
|
|
362
|
+
const de_CreateClusterSnapshotCommandError = async (output, context) => {
|
|
363
363
|
const parsedOutput = {
|
|
364
364
|
...output,
|
|
365
365
|
body: await parseErrorBody(output.body, context),
|
|
@@ -368,25 +368,25 @@ const deserializeAws_restJson1CreateClusterSnapshotCommandError = async (output,
|
|
|
368
368
|
switch (errorCode) {
|
|
369
369
|
case "AccessDeniedException":
|
|
370
370
|
case "com.amazonaws.docdbelastic#AccessDeniedException":
|
|
371
|
-
throw await
|
|
371
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
372
372
|
case "ConflictException":
|
|
373
373
|
case "com.amazonaws.docdbelastic#ConflictException":
|
|
374
|
-
throw await
|
|
374
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
375
375
|
case "InternalServerException":
|
|
376
376
|
case "com.amazonaws.docdbelastic#InternalServerException":
|
|
377
|
-
throw await
|
|
377
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
378
378
|
case "ResourceNotFoundException":
|
|
379
379
|
case "com.amazonaws.docdbelastic#ResourceNotFoundException":
|
|
380
|
-
throw await
|
|
380
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
381
381
|
case "ServiceQuotaExceededException":
|
|
382
382
|
case "com.amazonaws.docdbelastic#ServiceQuotaExceededException":
|
|
383
|
-
throw await
|
|
383
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
384
384
|
case "ThrottlingException":
|
|
385
385
|
case "com.amazonaws.docdbelastic#ThrottlingException":
|
|
386
|
-
throw await
|
|
386
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
387
387
|
case "ValidationException":
|
|
388
388
|
case "com.amazonaws.docdbelastic#ValidationException":
|
|
389
|
-
throw await
|
|
389
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
390
390
|
default:
|
|
391
391
|
const parsedBody = parsedOutput.body;
|
|
392
392
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -397,21 +397,21 @@ const deserializeAws_restJson1CreateClusterSnapshotCommandError = async (output,
|
|
|
397
397
|
});
|
|
398
398
|
}
|
|
399
399
|
};
|
|
400
|
-
const
|
|
400
|
+
const de_DeleteClusterCommand = async (output, context) => {
|
|
401
401
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
402
|
-
return
|
|
402
|
+
return de_DeleteClusterCommandError(output, context);
|
|
403
403
|
}
|
|
404
404
|
const contents = map({
|
|
405
405
|
$metadata: deserializeMetadata(output),
|
|
406
406
|
});
|
|
407
407
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
408
408
|
if (data.cluster != null) {
|
|
409
|
-
contents.cluster =
|
|
409
|
+
contents.cluster = de_Cluster(data.cluster, context);
|
|
410
410
|
}
|
|
411
411
|
return contents;
|
|
412
412
|
};
|
|
413
|
-
exports.
|
|
414
|
-
const
|
|
413
|
+
exports.de_DeleteClusterCommand = de_DeleteClusterCommand;
|
|
414
|
+
const de_DeleteClusterCommandError = async (output, context) => {
|
|
415
415
|
const parsedOutput = {
|
|
416
416
|
...output,
|
|
417
417
|
body: await parseErrorBody(output.body, context),
|
|
@@ -420,22 +420,22 @@ const deserializeAws_restJson1DeleteClusterCommandError = async (output, context
|
|
|
420
420
|
switch (errorCode) {
|
|
421
421
|
case "AccessDeniedException":
|
|
422
422
|
case "com.amazonaws.docdbelastic#AccessDeniedException":
|
|
423
|
-
throw await
|
|
423
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
424
424
|
case "ConflictException":
|
|
425
425
|
case "com.amazonaws.docdbelastic#ConflictException":
|
|
426
|
-
throw await
|
|
426
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
427
427
|
case "InternalServerException":
|
|
428
428
|
case "com.amazonaws.docdbelastic#InternalServerException":
|
|
429
|
-
throw await
|
|
429
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
430
430
|
case "ResourceNotFoundException":
|
|
431
431
|
case "com.amazonaws.docdbelastic#ResourceNotFoundException":
|
|
432
|
-
throw await
|
|
432
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
433
433
|
case "ThrottlingException":
|
|
434
434
|
case "com.amazonaws.docdbelastic#ThrottlingException":
|
|
435
|
-
throw await
|
|
435
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
436
436
|
case "ValidationException":
|
|
437
437
|
case "com.amazonaws.docdbelastic#ValidationException":
|
|
438
|
-
throw await
|
|
438
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
439
439
|
default:
|
|
440
440
|
const parsedBody = parsedOutput.body;
|
|
441
441
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -446,21 +446,21 @@ const deserializeAws_restJson1DeleteClusterCommandError = async (output, context
|
|
|
446
446
|
});
|
|
447
447
|
}
|
|
448
448
|
};
|
|
449
|
-
const
|
|
449
|
+
const de_DeleteClusterSnapshotCommand = async (output, context) => {
|
|
450
450
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
451
|
-
return
|
|
451
|
+
return de_DeleteClusterSnapshotCommandError(output, context);
|
|
452
452
|
}
|
|
453
453
|
const contents = map({
|
|
454
454
|
$metadata: deserializeMetadata(output),
|
|
455
455
|
});
|
|
456
456
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
457
457
|
if (data.snapshot != null) {
|
|
458
|
-
contents.snapshot =
|
|
458
|
+
contents.snapshot = de_ClusterSnapshot(data.snapshot, context);
|
|
459
459
|
}
|
|
460
460
|
return contents;
|
|
461
461
|
};
|
|
462
|
-
exports.
|
|
463
|
-
const
|
|
462
|
+
exports.de_DeleteClusterSnapshotCommand = de_DeleteClusterSnapshotCommand;
|
|
463
|
+
const de_DeleteClusterSnapshotCommandError = async (output, context) => {
|
|
464
464
|
const parsedOutput = {
|
|
465
465
|
...output,
|
|
466
466
|
body: await parseErrorBody(output.body, context),
|
|
@@ -469,22 +469,22 @@ const deserializeAws_restJson1DeleteClusterSnapshotCommandError = async (output,
|
|
|
469
469
|
switch (errorCode) {
|
|
470
470
|
case "AccessDeniedException":
|
|
471
471
|
case "com.amazonaws.docdbelastic#AccessDeniedException":
|
|
472
|
-
throw await
|
|
472
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
473
473
|
case "ConflictException":
|
|
474
474
|
case "com.amazonaws.docdbelastic#ConflictException":
|
|
475
|
-
throw await
|
|
475
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
476
476
|
case "InternalServerException":
|
|
477
477
|
case "com.amazonaws.docdbelastic#InternalServerException":
|
|
478
|
-
throw await
|
|
478
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
479
479
|
case "ResourceNotFoundException":
|
|
480
480
|
case "com.amazonaws.docdbelastic#ResourceNotFoundException":
|
|
481
|
-
throw await
|
|
481
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
482
482
|
case "ThrottlingException":
|
|
483
483
|
case "com.amazonaws.docdbelastic#ThrottlingException":
|
|
484
|
-
throw await
|
|
484
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
485
485
|
case "ValidationException":
|
|
486
486
|
case "com.amazonaws.docdbelastic#ValidationException":
|
|
487
|
-
throw await
|
|
487
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
488
488
|
default:
|
|
489
489
|
const parsedBody = parsedOutput.body;
|
|
490
490
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -495,21 +495,21 @@ const deserializeAws_restJson1DeleteClusterSnapshotCommandError = async (output,
|
|
|
495
495
|
});
|
|
496
496
|
}
|
|
497
497
|
};
|
|
498
|
-
const
|
|
498
|
+
const de_GetClusterCommand = async (output, context) => {
|
|
499
499
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
500
|
-
return
|
|
500
|
+
return de_GetClusterCommandError(output, context);
|
|
501
501
|
}
|
|
502
502
|
const contents = map({
|
|
503
503
|
$metadata: deserializeMetadata(output),
|
|
504
504
|
});
|
|
505
505
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
506
506
|
if (data.cluster != null) {
|
|
507
|
-
contents.cluster =
|
|
507
|
+
contents.cluster = de_Cluster(data.cluster, context);
|
|
508
508
|
}
|
|
509
509
|
return contents;
|
|
510
510
|
};
|
|
511
|
-
exports.
|
|
512
|
-
const
|
|
511
|
+
exports.de_GetClusterCommand = de_GetClusterCommand;
|
|
512
|
+
const de_GetClusterCommandError = async (output, context) => {
|
|
513
513
|
const parsedOutput = {
|
|
514
514
|
...output,
|
|
515
515
|
body: await parseErrorBody(output.body, context),
|
|
@@ -518,19 +518,19 @@ const deserializeAws_restJson1GetClusterCommandError = async (output, context) =
|
|
|
518
518
|
switch (errorCode) {
|
|
519
519
|
case "AccessDeniedException":
|
|
520
520
|
case "com.amazonaws.docdbelastic#AccessDeniedException":
|
|
521
|
-
throw await
|
|
521
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
522
522
|
case "InternalServerException":
|
|
523
523
|
case "com.amazonaws.docdbelastic#InternalServerException":
|
|
524
|
-
throw await
|
|
524
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
525
525
|
case "ResourceNotFoundException":
|
|
526
526
|
case "com.amazonaws.docdbelastic#ResourceNotFoundException":
|
|
527
|
-
throw await
|
|
527
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
528
528
|
case "ThrottlingException":
|
|
529
529
|
case "com.amazonaws.docdbelastic#ThrottlingException":
|
|
530
|
-
throw await
|
|
530
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
531
531
|
case "ValidationException":
|
|
532
532
|
case "com.amazonaws.docdbelastic#ValidationException":
|
|
533
|
-
throw await
|
|
533
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
534
534
|
default:
|
|
535
535
|
const parsedBody = parsedOutput.body;
|
|
536
536
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -541,21 +541,21 @@ const deserializeAws_restJson1GetClusterCommandError = async (output, context) =
|
|
|
541
541
|
});
|
|
542
542
|
}
|
|
543
543
|
};
|
|
544
|
-
const
|
|
544
|
+
const de_GetClusterSnapshotCommand = async (output, context) => {
|
|
545
545
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
546
|
-
return
|
|
546
|
+
return de_GetClusterSnapshotCommandError(output, context);
|
|
547
547
|
}
|
|
548
548
|
const contents = map({
|
|
549
549
|
$metadata: deserializeMetadata(output),
|
|
550
550
|
});
|
|
551
551
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
552
552
|
if (data.snapshot != null) {
|
|
553
|
-
contents.snapshot =
|
|
553
|
+
contents.snapshot = de_ClusterSnapshot(data.snapshot, context);
|
|
554
554
|
}
|
|
555
555
|
return contents;
|
|
556
556
|
};
|
|
557
|
-
exports.
|
|
558
|
-
const
|
|
557
|
+
exports.de_GetClusterSnapshotCommand = de_GetClusterSnapshotCommand;
|
|
558
|
+
const de_GetClusterSnapshotCommandError = async (output, context) => {
|
|
559
559
|
const parsedOutput = {
|
|
560
560
|
...output,
|
|
561
561
|
body: await parseErrorBody(output.body, context),
|
|
@@ -564,19 +564,19 @@ const deserializeAws_restJson1GetClusterSnapshotCommandError = async (output, co
|
|
|
564
564
|
switch (errorCode) {
|
|
565
565
|
case "AccessDeniedException":
|
|
566
566
|
case "com.amazonaws.docdbelastic#AccessDeniedException":
|
|
567
|
-
throw await
|
|
567
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
568
568
|
case "InternalServerException":
|
|
569
569
|
case "com.amazonaws.docdbelastic#InternalServerException":
|
|
570
|
-
throw await
|
|
570
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
571
571
|
case "ResourceNotFoundException":
|
|
572
572
|
case "com.amazonaws.docdbelastic#ResourceNotFoundException":
|
|
573
|
-
throw await
|
|
573
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
574
574
|
case "ThrottlingException":
|
|
575
575
|
case "com.amazonaws.docdbelastic#ThrottlingException":
|
|
576
|
-
throw await
|
|
576
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
577
577
|
case "ValidationException":
|
|
578
578
|
case "com.amazonaws.docdbelastic#ValidationException":
|
|
579
|
-
throw await
|
|
579
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
580
580
|
default:
|
|
581
581
|
const parsedBody = parsedOutput.body;
|
|
582
582
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -587,24 +587,24 @@ const deserializeAws_restJson1GetClusterSnapshotCommandError = async (output, co
|
|
|
587
587
|
});
|
|
588
588
|
}
|
|
589
589
|
};
|
|
590
|
-
const
|
|
590
|
+
const de_ListClustersCommand = async (output, context) => {
|
|
591
591
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
592
|
-
return
|
|
592
|
+
return de_ListClustersCommandError(output, context);
|
|
593
593
|
}
|
|
594
594
|
const contents = map({
|
|
595
595
|
$metadata: deserializeMetadata(output),
|
|
596
596
|
});
|
|
597
597
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
598
598
|
if (data.clusters != null) {
|
|
599
|
-
contents.clusters =
|
|
599
|
+
contents.clusters = de_ClusterList(data.clusters, context);
|
|
600
600
|
}
|
|
601
601
|
if (data.nextToken != null) {
|
|
602
602
|
contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
603
603
|
}
|
|
604
604
|
return contents;
|
|
605
605
|
};
|
|
606
|
-
exports.
|
|
607
|
-
const
|
|
606
|
+
exports.de_ListClustersCommand = de_ListClustersCommand;
|
|
607
|
+
const de_ListClustersCommandError = async (output, context) => {
|
|
608
608
|
const parsedOutput = {
|
|
609
609
|
...output,
|
|
610
610
|
body: await parseErrorBody(output.body, context),
|
|
@@ -613,16 +613,16 @@ const deserializeAws_restJson1ListClustersCommandError = async (output, context)
|
|
|
613
613
|
switch (errorCode) {
|
|
614
614
|
case "AccessDeniedException":
|
|
615
615
|
case "com.amazonaws.docdbelastic#AccessDeniedException":
|
|
616
|
-
throw await
|
|
616
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
617
617
|
case "InternalServerException":
|
|
618
618
|
case "com.amazonaws.docdbelastic#InternalServerException":
|
|
619
|
-
throw await
|
|
619
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
620
620
|
case "ThrottlingException":
|
|
621
621
|
case "com.amazonaws.docdbelastic#ThrottlingException":
|
|
622
|
-
throw await
|
|
622
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
623
623
|
case "ValidationException":
|
|
624
624
|
case "com.amazonaws.docdbelastic#ValidationException":
|
|
625
|
-
throw await
|
|
625
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
626
626
|
default:
|
|
627
627
|
const parsedBody = parsedOutput.body;
|
|
628
628
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -633,9 +633,9 @@ const deserializeAws_restJson1ListClustersCommandError = async (output, context)
|
|
|
633
633
|
});
|
|
634
634
|
}
|
|
635
635
|
};
|
|
636
|
-
const
|
|
636
|
+
const de_ListClusterSnapshotsCommand = async (output, context) => {
|
|
637
637
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
638
|
-
return
|
|
638
|
+
return de_ListClusterSnapshotsCommandError(output, context);
|
|
639
639
|
}
|
|
640
640
|
const contents = map({
|
|
641
641
|
$metadata: deserializeMetadata(output),
|
|
@@ -645,12 +645,12 @@ const deserializeAws_restJson1ListClusterSnapshotsCommand = async (output, conte
|
|
|
645
645
|
contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
646
646
|
}
|
|
647
647
|
if (data.snapshots != null) {
|
|
648
|
-
contents.snapshots =
|
|
648
|
+
contents.snapshots = de_ClusterSnapshotList(data.snapshots, context);
|
|
649
649
|
}
|
|
650
650
|
return contents;
|
|
651
651
|
};
|
|
652
|
-
exports.
|
|
653
|
-
const
|
|
652
|
+
exports.de_ListClusterSnapshotsCommand = de_ListClusterSnapshotsCommand;
|
|
653
|
+
const de_ListClusterSnapshotsCommandError = async (output, context) => {
|
|
654
654
|
const parsedOutput = {
|
|
655
655
|
...output,
|
|
656
656
|
body: await parseErrorBody(output.body, context),
|
|
@@ -659,16 +659,16 @@ const deserializeAws_restJson1ListClusterSnapshotsCommandError = async (output,
|
|
|
659
659
|
switch (errorCode) {
|
|
660
660
|
case "AccessDeniedException":
|
|
661
661
|
case "com.amazonaws.docdbelastic#AccessDeniedException":
|
|
662
|
-
throw await
|
|
662
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
663
663
|
case "InternalServerException":
|
|
664
664
|
case "com.amazonaws.docdbelastic#InternalServerException":
|
|
665
|
-
throw await
|
|
665
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
666
666
|
case "ThrottlingException":
|
|
667
667
|
case "com.amazonaws.docdbelastic#ThrottlingException":
|
|
668
|
-
throw await
|
|
668
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
669
669
|
case "ValidationException":
|
|
670
670
|
case "com.amazonaws.docdbelastic#ValidationException":
|
|
671
|
-
throw await
|
|
671
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
672
672
|
default:
|
|
673
673
|
const parsedBody = parsedOutput.body;
|
|
674
674
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -679,21 +679,21 @@ const deserializeAws_restJson1ListClusterSnapshotsCommandError = async (output,
|
|
|
679
679
|
});
|
|
680
680
|
}
|
|
681
681
|
};
|
|
682
|
-
const
|
|
682
|
+
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
683
683
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
684
|
-
return
|
|
684
|
+
return de_ListTagsForResourceCommandError(output, context);
|
|
685
685
|
}
|
|
686
686
|
const contents = map({
|
|
687
687
|
$metadata: deserializeMetadata(output),
|
|
688
688
|
});
|
|
689
689
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
690
690
|
if (data.tags != null) {
|
|
691
|
-
contents.tags =
|
|
691
|
+
contents.tags = de_TagMap(data.tags, context);
|
|
692
692
|
}
|
|
693
693
|
return contents;
|
|
694
694
|
};
|
|
695
|
-
exports.
|
|
696
|
-
const
|
|
695
|
+
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
696
|
+
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
697
697
|
const parsedOutput = {
|
|
698
698
|
...output,
|
|
699
699
|
body: await parseErrorBody(output.body, context),
|
|
@@ -702,16 +702,16 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
702
702
|
switch (errorCode) {
|
|
703
703
|
case "InternalServerException":
|
|
704
704
|
case "com.amazonaws.docdbelastic#InternalServerException":
|
|
705
|
-
throw await
|
|
705
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
706
706
|
case "ResourceNotFoundException":
|
|
707
707
|
case "com.amazonaws.docdbelastic#ResourceNotFoundException":
|
|
708
|
-
throw await
|
|
708
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
709
709
|
case "ThrottlingException":
|
|
710
710
|
case "com.amazonaws.docdbelastic#ThrottlingException":
|
|
711
|
-
throw await
|
|
711
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
712
712
|
case "ValidationException":
|
|
713
713
|
case "com.amazonaws.docdbelastic#ValidationException":
|
|
714
|
-
throw await
|
|
714
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
715
715
|
default:
|
|
716
716
|
const parsedBody = parsedOutput.body;
|
|
717
717
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -722,21 +722,21 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
722
722
|
});
|
|
723
723
|
}
|
|
724
724
|
};
|
|
725
|
-
const
|
|
725
|
+
const de_RestoreClusterFromSnapshotCommand = async (output, context) => {
|
|
726
726
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
727
|
-
return
|
|
727
|
+
return de_RestoreClusterFromSnapshotCommandError(output, context);
|
|
728
728
|
}
|
|
729
729
|
const contents = map({
|
|
730
730
|
$metadata: deserializeMetadata(output),
|
|
731
731
|
});
|
|
732
732
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
733
733
|
if (data.cluster != null) {
|
|
734
|
-
contents.cluster =
|
|
734
|
+
contents.cluster = de_Cluster(data.cluster, context);
|
|
735
735
|
}
|
|
736
736
|
return contents;
|
|
737
737
|
};
|
|
738
|
-
exports.
|
|
739
|
-
const
|
|
738
|
+
exports.de_RestoreClusterFromSnapshotCommand = de_RestoreClusterFromSnapshotCommand;
|
|
739
|
+
const de_RestoreClusterFromSnapshotCommandError = async (output, context) => {
|
|
740
740
|
const parsedOutput = {
|
|
741
741
|
...output,
|
|
742
742
|
body: await parseErrorBody(output.body, context),
|
|
@@ -745,25 +745,25 @@ const deserializeAws_restJson1RestoreClusterFromSnapshotCommandError = async (ou
|
|
|
745
745
|
switch (errorCode) {
|
|
746
746
|
case "AccessDeniedException":
|
|
747
747
|
case "com.amazonaws.docdbelastic#AccessDeniedException":
|
|
748
|
-
throw await
|
|
748
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
749
749
|
case "ConflictException":
|
|
750
750
|
case "com.amazonaws.docdbelastic#ConflictException":
|
|
751
|
-
throw await
|
|
751
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
752
752
|
case "InternalServerException":
|
|
753
753
|
case "com.amazonaws.docdbelastic#InternalServerException":
|
|
754
|
-
throw await
|
|
754
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
755
755
|
case "ResourceNotFoundException":
|
|
756
756
|
case "com.amazonaws.docdbelastic#ResourceNotFoundException":
|
|
757
|
-
throw await
|
|
757
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
758
758
|
case "ServiceQuotaExceededException":
|
|
759
759
|
case "com.amazonaws.docdbelastic#ServiceQuotaExceededException":
|
|
760
|
-
throw await
|
|
760
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
761
761
|
case "ThrottlingException":
|
|
762
762
|
case "com.amazonaws.docdbelastic#ThrottlingException":
|
|
763
|
-
throw await
|
|
763
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
764
764
|
case "ValidationException":
|
|
765
765
|
case "com.amazonaws.docdbelastic#ValidationException":
|
|
766
|
-
throw await
|
|
766
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
767
767
|
default:
|
|
768
768
|
const parsedBody = parsedOutput.body;
|
|
769
769
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -774,9 +774,9 @@ const deserializeAws_restJson1RestoreClusterFromSnapshotCommandError = async (ou
|
|
|
774
774
|
});
|
|
775
775
|
}
|
|
776
776
|
};
|
|
777
|
-
const
|
|
777
|
+
const de_TagResourceCommand = async (output, context) => {
|
|
778
778
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
779
|
-
return
|
|
779
|
+
return de_TagResourceCommandError(output, context);
|
|
780
780
|
}
|
|
781
781
|
const contents = map({
|
|
782
782
|
$metadata: deserializeMetadata(output),
|
|
@@ -784,8 +784,8 @@ const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
|
784
784
|
await collectBody(output.body, context);
|
|
785
785
|
return contents;
|
|
786
786
|
};
|
|
787
|
-
exports.
|
|
788
|
-
const
|
|
787
|
+
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
788
|
+
const de_TagResourceCommandError = async (output, context) => {
|
|
789
789
|
const parsedOutput = {
|
|
790
790
|
...output,
|
|
791
791
|
body: await parseErrorBody(output.body, context),
|
|
@@ -794,16 +794,16 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
794
794
|
switch (errorCode) {
|
|
795
795
|
case "InternalServerException":
|
|
796
796
|
case "com.amazonaws.docdbelastic#InternalServerException":
|
|
797
|
-
throw await
|
|
797
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
798
798
|
case "ResourceNotFoundException":
|
|
799
799
|
case "com.amazonaws.docdbelastic#ResourceNotFoundException":
|
|
800
|
-
throw await
|
|
800
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
801
801
|
case "ThrottlingException":
|
|
802
802
|
case "com.amazonaws.docdbelastic#ThrottlingException":
|
|
803
|
-
throw await
|
|
803
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
804
804
|
case "ValidationException":
|
|
805
805
|
case "com.amazonaws.docdbelastic#ValidationException":
|
|
806
|
-
throw await
|
|
806
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
807
807
|
default:
|
|
808
808
|
const parsedBody = parsedOutput.body;
|
|
809
809
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -814,9 +814,9 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
814
814
|
});
|
|
815
815
|
}
|
|
816
816
|
};
|
|
817
|
-
const
|
|
817
|
+
const de_UntagResourceCommand = async (output, context) => {
|
|
818
818
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
819
|
-
return
|
|
819
|
+
return de_UntagResourceCommandError(output, context);
|
|
820
820
|
}
|
|
821
821
|
const contents = map({
|
|
822
822
|
$metadata: deserializeMetadata(output),
|
|
@@ -824,8 +824,8 @@ const deserializeAws_restJson1UntagResourceCommand = async (output, context) =>
|
|
|
824
824
|
await collectBody(output.body, context);
|
|
825
825
|
return contents;
|
|
826
826
|
};
|
|
827
|
-
exports.
|
|
828
|
-
const
|
|
827
|
+
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
828
|
+
const de_UntagResourceCommandError = async (output, context) => {
|
|
829
829
|
const parsedOutput = {
|
|
830
830
|
...output,
|
|
831
831
|
body: await parseErrorBody(output.body, context),
|
|
@@ -834,16 +834,16 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
834
834
|
switch (errorCode) {
|
|
835
835
|
case "InternalServerException":
|
|
836
836
|
case "com.amazonaws.docdbelastic#InternalServerException":
|
|
837
|
-
throw await
|
|
837
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
838
838
|
case "ResourceNotFoundException":
|
|
839
839
|
case "com.amazonaws.docdbelastic#ResourceNotFoundException":
|
|
840
|
-
throw await
|
|
840
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
841
841
|
case "ThrottlingException":
|
|
842
842
|
case "com.amazonaws.docdbelastic#ThrottlingException":
|
|
843
|
-
throw await
|
|
843
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
844
844
|
case "ValidationException":
|
|
845
845
|
case "com.amazonaws.docdbelastic#ValidationException":
|
|
846
|
-
throw await
|
|
846
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
847
847
|
default:
|
|
848
848
|
const parsedBody = parsedOutput.body;
|
|
849
849
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -854,21 +854,21 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
854
854
|
});
|
|
855
855
|
}
|
|
856
856
|
};
|
|
857
|
-
const
|
|
857
|
+
const de_UpdateClusterCommand = async (output, context) => {
|
|
858
858
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
859
|
-
return
|
|
859
|
+
return de_UpdateClusterCommandError(output, context);
|
|
860
860
|
}
|
|
861
861
|
const contents = map({
|
|
862
862
|
$metadata: deserializeMetadata(output),
|
|
863
863
|
});
|
|
864
864
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
865
865
|
if (data.cluster != null) {
|
|
866
|
-
contents.cluster =
|
|
866
|
+
contents.cluster = de_Cluster(data.cluster, context);
|
|
867
867
|
}
|
|
868
868
|
return contents;
|
|
869
869
|
};
|
|
870
|
-
exports.
|
|
871
|
-
const
|
|
870
|
+
exports.de_UpdateClusterCommand = de_UpdateClusterCommand;
|
|
871
|
+
const de_UpdateClusterCommandError = async (output, context) => {
|
|
872
872
|
const parsedOutput = {
|
|
873
873
|
...output,
|
|
874
874
|
body: await parseErrorBody(output.body, context),
|
|
@@ -877,22 +877,22 @@ const deserializeAws_restJson1UpdateClusterCommandError = async (output, context
|
|
|
877
877
|
switch (errorCode) {
|
|
878
878
|
case "AccessDeniedException":
|
|
879
879
|
case "com.amazonaws.docdbelastic#AccessDeniedException":
|
|
880
|
-
throw await
|
|
880
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
881
881
|
case "ConflictException":
|
|
882
882
|
case "com.amazonaws.docdbelastic#ConflictException":
|
|
883
|
-
throw await
|
|
883
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
884
884
|
case "InternalServerException":
|
|
885
885
|
case "com.amazonaws.docdbelastic#InternalServerException":
|
|
886
|
-
throw await
|
|
886
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
887
887
|
case "ResourceNotFoundException":
|
|
888
888
|
case "com.amazonaws.docdbelastic#ResourceNotFoundException":
|
|
889
|
-
throw await
|
|
889
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
890
890
|
case "ThrottlingException":
|
|
891
891
|
case "com.amazonaws.docdbelastic#ThrottlingException":
|
|
892
|
-
throw await
|
|
892
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
893
893
|
case "ValidationException":
|
|
894
894
|
case "com.amazonaws.docdbelastic#ValidationException":
|
|
895
|
-
throw await
|
|
895
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
896
896
|
default:
|
|
897
897
|
const parsedBody = parsedOutput.body;
|
|
898
898
|
(0, smithy_client_1.throwDefaultError)({
|
|
@@ -904,7 +904,7 @@ const deserializeAws_restJson1UpdateClusterCommandError = async (output, context
|
|
|
904
904
|
}
|
|
905
905
|
};
|
|
906
906
|
const map = smithy_client_1.map;
|
|
907
|
-
const
|
|
907
|
+
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
908
908
|
const contents = map({});
|
|
909
909
|
const data = parsedOutput.body;
|
|
910
910
|
if (data.message != null) {
|
|
@@ -916,7 +916,7 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
|
|
|
916
916
|
});
|
|
917
917
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
918
918
|
};
|
|
919
|
-
const
|
|
919
|
+
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
920
920
|
const contents = map({});
|
|
921
921
|
const data = parsedOutput.body;
|
|
922
922
|
if (data.message != null) {
|
|
@@ -934,7 +934,7 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
|
|
|
934
934
|
});
|
|
935
935
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
936
936
|
};
|
|
937
|
-
const
|
|
937
|
+
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
938
938
|
const contents = map({});
|
|
939
939
|
const data = parsedOutput.body;
|
|
940
940
|
if (data.message != null) {
|
|
@@ -946,7 +946,7 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
|
|
|
946
946
|
});
|
|
947
947
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
948
948
|
};
|
|
949
|
-
const
|
|
949
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
950
950
|
const contents = map({});
|
|
951
951
|
const data = parsedOutput.body;
|
|
952
952
|
if (data.message != null) {
|
|
@@ -964,7 +964,7 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
|
|
|
964
964
|
});
|
|
965
965
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
966
966
|
};
|
|
967
|
-
const
|
|
967
|
+
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
968
968
|
const contents = map({});
|
|
969
969
|
const data = parsedOutput.body;
|
|
970
970
|
if (data.message != null) {
|
|
@@ -976,7 +976,7 @@ const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (par
|
|
|
976
976
|
});
|
|
977
977
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
978
978
|
};
|
|
979
|
-
const
|
|
979
|
+
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
980
980
|
const contents = map({
|
|
981
981
|
retryAfterSeconds: [
|
|
982
982
|
() => void 0 !== parsedOutput.headers["retry-after"],
|
|
@@ -993,11 +993,11 @@ const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput,
|
|
|
993
993
|
});
|
|
994
994
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
995
995
|
};
|
|
996
|
-
const
|
|
996
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
997
997
|
const contents = map({});
|
|
998
998
|
const data = parsedOutput.body;
|
|
999
999
|
if (data.fieldList != null) {
|
|
1000
|
-
contents.fieldList =
|
|
1000
|
+
contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context);
|
|
1001
1001
|
}
|
|
1002
1002
|
if (data.message != null) {
|
|
1003
1003
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
@@ -1011,14 +1011,14 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
|
|
|
1011
1011
|
});
|
|
1012
1012
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1013
1013
|
};
|
|
1014
|
-
const
|
|
1014
|
+
const se_StringList = (input, context) => {
|
|
1015
1015
|
return input
|
|
1016
1016
|
.filter((e) => e != null)
|
|
1017
1017
|
.map((entry) => {
|
|
1018
1018
|
return entry;
|
|
1019
1019
|
});
|
|
1020
1020
|
};
|
|
1021
|
-
const
|
|
1021
|
+
const se_TagMap = (input, context) => {
|
|
1022
1022
|
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1023
1023
|
if (value === null) {
|
|
1024
1024
|
return acc;
|
|
@@ -1027,7 +1027,7 @@ const serializeAws_restJson1TagMap = (input, context) => {
|
|
|
1027
1027
|
return acc;
|
|
1028
1028
|
}, {});
|
|
1029
1029
|
};
|
|
1030
|
-
const
|
|
1030
|
+
const de_Cluster = (output, context) => {
|
|
1031
1031
|
return {
|
|
1032
1032
|
adminUserName: (0, smithy_client_1.expectString)(output.adminUserName),
|
|
1033
1033
|
authType: (0, smithy_client_1.expectString)(output.authType),
|
|
@@ -1040,31 +1040,29 @@ const deserializeAws_restJson1Cluster = (output, context) => {
|
|
|
1040
1040
|
shardCapacity: (0, smithy_client_1.expectInt32)(output.shardCapacity),
|
|
1041
1041
|
shardCount: (0, smithy_client_1.expectInt32)(output.shardCount),
|
|
1042
1042
|
status: (0, smithy_client_1.expectString)(output.status),
|
|
1043
|
-
subnetIds: output.subnetIds != null ?
|
|
1044
|
-
vpcSecurityGroupIds: output.vpcSecurityGroupIds != null
|
|
1045
|
-
? deserializeAws_restJson1StringList(output.vpcSecurityGroupIds, context)
|
|
1046
|
-
: undefined,
|
|
1043
|
+
subnetIds: output.subnetIds != null ? de_StringList(output.subnetIds, context) : undefined,
|
|
1044
|
+
vpcSecurityGroupIds: output.vpcSecurityGroupIds != null ? de_StringList(output.vpcSecurityGroupIds, context) : undefined,
|
|
1047
1045
|
};
|
|
1048
1046
|
};
|
|
1049
|
-
const
|
|
1047
|
+
const de_ClusterInList = (output, context) => {
|
|
1050
1048
|
return {
|
|
1051
1049
|
clusterArn: (0, smithy_client_1.expectString)(output.clusterArn),
|
|
1052
1050
|
clusterName: (0, smithy_client_1.expectString)(output.clusterName),
|
|
1053
1051
|
status: (0, smithy_client_1.expectString)(output.status),
|
|
1054
1052
|
};
|
|
1055
1053
|
};
|
|
1056
|
-
const
|
|
1054
|
+
const de_ClusterList = (output, context) => {
|
|
1057
1055
|
const retVal = (output || [])
|
|
1058
1056
|
.filter((e) => e != null)
|
|
1059
1057
|
.map((entry) => {
|
|
1060
1058
|
if (entry === null) {
|
|
1061
1059
|
return null;
|
|
1062
1060
|
}
|
|
1063
|
-
return
|
|
1061
|
+
return de_ClusterInList(entry, context);
|
|
1064
1062
|
});
|
|
1065
1063
|
return retVal;
|
|
1066
1064
|
};
|
|
1067
|
-
const
|
|
1065
|
+
const de_ClusterSnapshot = (output, context) => {
|
|
1068
1066
|
return {
|
|
1069
1067
|
adminUserName: (0, smithy_client_1.expectString)(output.adminUserName),
|
|
1070
1068
|
clusterArn: (0, smithy_client_1.expectString)(output.clusterArn),
|
|
@@ -1074,13 +1072,11 @@ const deserializeAws_restJson1ClusterSnapshot = (output, context) => {
|
|
|
1074
1072
|
snapshotCreationTime: (0, smithy_client_1.expectString)(output.snapshotCreationTime),
|
|
1075
1073
|
snapshotName: (0, smithy_client_1.expectString)(output.snapshotName),
|
|
1076
1074
|
status: (0, smithy_client_1.expectString)(output.status),
|
|
1077
|
-
subnetIds: output.subnetIds != null ?
|
|
1078
|
-
vpcSecurityGroupIds: output.vpcSecurityGroupIds != null
|
|
1079
|
-
? deserializeAws_restJson1StringList(output.vpcSecurityGroupIds, context)
|
|
1080
|
-
: undefined,
|
|
1075
|
+
subnetIds: output.subnetIds != null ? de_StringList(output.subnetIds, context) : undefined,
|
|
1076
|
+
vpcSecurityGroupIds: output.vpcSecurityGroupIds != null ? de_StringList(output.vpcSecurityGroupIds, context) : undefined,
|
|
1081
1077
|
};
|
|
1082
1078
|
};
|
|
1083
|
-
const
|
|
1079
|
+
const de_ClusterSnapshotInList = (output, context) => {
|
|
1084
1080
|
return {
|
|
1085
1081
|
clusterArn: (0, smithy_client_1.expectString)(output.clusterArn),
|
|
1086
1082
|
snapshotArn: (0, smithy_client_1.expectString)(output.snapshotArn),
|
|
@@ -1089,18 +1085,18 @@ const deserializeAws_restJson1ClusterSnapshotInList = (output, context) => {
|
|
|
1089
1085
|
status: (0, smithy_client_1.expectString)(output.status),
|
|
1090
1086
|
};
|
|
1091
1087
|
};
|
|
1092
|
-
const
|
|
1088
|
+
const de_ClusterSnapshotList = (output, context) => {
|
|
1093
1089
|
const retVal = (output || [])
|
|
1094
1090
|
.filter((e) => e != null)
|
|
1095
1091
|
.map((entry) => {
|
|
1096
1092
|
if (entry === null) {
|
|
1097
1093
|
return null;
|
|
1098
1094
|
}
|
|
1099
|
-
return
|
|
1095
|
+
return de_ClusterSnapshotInList(entry, context);
|
|
1100
1096
|
});
|
|
1101
1097
|
return retVal;
|
|
1102
1098
|
};
|
|
1103
|
-
const
|
|
1099
|
+
const de_StringList = (output, context) => {
|
|
1104
1100
|
const retVal = (output || [])
|
|
1105
1101
|
.filter((e) => e != null)
|
|
1106
1102
|
.map((entry) => {
|
|
@@ -1111,7 +1107,7 @@ const deserializeAws_restJson1StringList = (output, context) => {
|
|
|
1111
1107
|
});
|
|
1112
1108
|
return retVal;
|
|
1113
1109
|
};
|
|
1114
|
-
const
|
|
1110
|
+
const de_TagMap = (output, context) => {
|
|
1115
1111
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1116
1112
|
if (value === null) {
|
|
1117
1113
|
return acc;
|
|
@@ -1120,20 +1116,20 @@ const deserializeAws_restJson1TagMap = (output, context) => {
|
|
|
1120
1116
|
return acc;
|
|
1121
1117
|
}, {});
|
|
1122
1118
|
};
|
|
1123
|
-
const
|
|
1119
|
+
const de_ValidationExceptionField = (output, context) => {
|
|
1124
1120
|
return {
|
|
1125
1121
|
message: (0, smithy_client_1.expectString)(output.message),
|
|
1126
1122
|
name: (0, smithy_client_1.expectString)(output.name),
|
|
1127
1123
|
};
|
|
1128
1124
|
};
|
|
1129
|
-
const
|
|
1125
|
+
const de_ValidationExceptionFieldList = (output, context) => {
|
|
1130
1126
|
const retVal = (output || [])
|
|
1131
1127
|
.filter((e) => e != null)
|
|
1132
1128
|
.map((entry) => {
|
|
1133
1129
|
if (entry === null) {
|
|
1134
1130
|
return null;
|
|
1135
1131
|
}
|
|
1136
|
-
return
|
|
1132
|
+
return de_ValidationExceptionField(entry, context);
|
|
1137
1133
|
});
|
|
1138
1134
|
return retVal;
|
|
1139
1135
|
};
|