@aws-sdk/client-efs 3.48.0 → 3.52.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 +35 -0
- package/README.md +1 -1
- package/dist-cjs/EFS.js +45 -0
- package/dist-cjs/commands/CreateReplicationConfigurationCommand.js +36 -0
- package/dist-cjs/commands/DeleteReplicationConfigurationCommand.js +36 -0
- package/dist-cjs/commands/DescribeReplicationConfigurationsCommand.js +36 -0
- package/dist-cjs/commands/index.js +3 -0
- package/dist-cjs/endpoints.js +9 -0
- package/dist-cjs/models/models_0.js +51 -2
- package/dist-cjs/protocols/Aws_restJson1.js +482 -2
- package/dist-es/EFS.js +45 -0
- package/dist-es/commands/CreateReplicationConfigurationCommand.js +39 -0
- package/dist-es/commands/DeleteReplicationConfigurationCommand.js +39 -0
- package/dist-es/commands/DescribeReplicationConfigurationsCommand.js +39 -0
- package/dist-es/commands/index.js +3 -0
- package/dist-es/endpoints.js +9 -0
- package/dist-es/models/models_0.js +35 -0
- package/dist-es/protocols/Aws_restJson1.js +606 -78
- package/dist-types/EFS.d.ts +106 -3
- package/dist-types/EFSClient.d.ts +6 -3
- package/dist-types/commands/CreateReplicationConfigurationCommand.d.ts +110 -0
- package/dist-types/commands/DeleteReplicationConfigurationCommand.d.ts +39 -0
- package/dist-types/commands/DescribeReplicationConfigurationsCommand.d.ts +36 -0
- package/dist-types/commands/PutAccountPreferencesCommand.d.ts +4 -2
- package/dist-types/commands/index.d.ts +3 -0
- package/dist-types/models/models_0.d.ts +538 -24
- package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
- package/dist-types/ts3.4/EFS.d.ts +15 -0
- package/dist-types/ts3.4/EFSClient.d.ts +5 -2
- package/dist-types/ts3.4/commands/CreateReplicationConfigurationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteReplicationConfigurationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeReplicationConfigurationsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +3 -0
- package/dist-types/ts3.4/models/models_0.d.ts +164 -7
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +9 -0
- package/package.json +40 -34
|
@@ -89,6 +89,44 @@ export var serializeAws_restJson1CreateMountTargetCommand = function (input, con
|
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
91
|
}); };
|
|
92
|
+
export var serializeAws_restJson1CreateReplicationConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
93
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
94
|
+
return __generator(this, function (_c) {
|
|
95
|
+
switch (_c.label) {
|
|
96
|
+
case 0: return [4, context.endpoint()];
|
|
97
|
+
case 1:
|
|
98
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
99
|
+
headers = {
|
|
100
|
+
"content-type": "application/json",
|
|
101
|
+
};
|
|
102
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
103
|
+
"/2015-02-01/file-systems/{SourceFileSystemId}/replication-configuration";
|
|
104
|
+
if (input.SourceFileSystemId !== undefined) {
|
|
105
|
+
labelValue = input.SourceFileSystemId;
|
|
106
|
+
if (labelValue.length <= 0) {
|
|
107
|
+
throw new Error("Empty value provided for input HTTP label: SourceFileSystemId.");
|
|
108
|
+
}
|
|
109
|
+
resolvedPath = resolvedPath.replace("{SourceFileSystemId}", __extendedEncodeURIComponent(labelValue));
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
throw new Error("No value provided for input HTTP label: SourceFileSystemId.");
|
|
113
|
+
}
|
|
114
|
+
body = JSON.stringify(__assign({}, (input.Destinations !== undefined &&
|
|
115
|
+
input.Destinations !== null && {
|
|
116
|
+
Destinations: serializeAws_restJson1DestinationsToCreate(input.Destinations, context),
|
|
117
|
+
})));
|
|
118
|
+
return [2, new __HttpRequest({
|
|
119
|
+
protocol: protocol,
|
|
120
|
+
hostname: hostname,
|
|
121
|
+
port: port,
|
|
122
|
+
method: "POST",
|
|
123
|
+
headers: headers,
|
|
124
|
+
path: resolvedPath,
|
|
125
|
+
body: body,
|
|
126
|
+
})];
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
}); };
|
|
92
130
|
export var serializeAws_restJson1CreateTagsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
93
131
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
94
132
|
return __generator(this, function (_c) {
|
|
@@ -248,6 +286,38 @@ export var serializeAws_restJson1DeleteMountTargetCommand = function (input, con
|
|
|
248
286
|
}
|
|
249
287
|
});
|
|
250
288
|
}); };
|
|
289
|
+
export var serializeAws_restJson1DeleteReplicationConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
290
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
291
|
+
return __generator(this, function (_c) {
|
|
292
|
+
switch (_c.label) {
|
|
293
|
+
case 0: return [4, context.endpoint()];
|
|
294
|
+
case 1:
|
|
295
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
296
|
+
headers = {};
|
|
297
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
298
|
+
"/2015-02-01/file-systems/{SourceFileSystemId}/replication-configuration";
|
|
299
|
+
if (input.SourceFileSystemId !== undefined) {
|
|
300
|
+
labelValue = input.SourceFileSystemId;
|
|
301
|
+
if (labelValue.length <= 0) {
|
|
302
|
+
throw new Error("Empty value provided for input HTTP label: SourceFileSystemId.");
|
|
303
|
+
}
|
|
304
|
+
resolvedPath = resolvedPath.replace("{SourceFileSystemId}", __extendedEncodeURIComponent(labelValue));
|
|
305
|
+
}
|
|
306
|
+
else {
|
|
307
|
+
throw new Error("No value provided for input HTTP label: SourceFileSystemId.");
|
|
308
|
+
}
|
|
309
|
+
return [2, new __HttpRequest({
|
|
310
|
+
protocol: protocol,
|
|
311
|
+
hostname: hostname,
|
|
312
|
+
port: port,
|
|
313
|
+
method: "DELETE",
|
|
314
|
+
headers: headers,
|
|
315
|
+
path: resolvedPath,
|
|
316
|
+
body: body,
|
|
317
|
+
})];
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
}); };
|
|
251
321
|
export var serializeAws_restJson1DeleteTagsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
252
322
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
253
323
|
return __generator(this, function (_c) {
|
|
@@ -504,6 +574,30 @@ export var serializeAws_restJson1DescribeMountTargetSecurityGroupsCommand = func
|
|
|
504
574
|
}
|
|
505
575
|
});
|
|
506
576
|
}); };
|
|
577
|
+
export var serializeAws_restJson1DescribeReplicationConfigurationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
578
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
579
|
+
return __generator(this, function (_c) {
|
|
580
|
+
switch (_c.label) {
|
|
581
|
+
case 0: return [4, context.endpoint()];
|
|
582
|
+
case 1:
|
|
583
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
584
|
+
headers = {};
|
|
585
|
+
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
586
|
+
"/2015-02-01/file-systems/replication-configurations";
|
|
587
|
+
query = __assign(__assign(__assign({}, (input.FileSystemId !== undefined && { FileSystemId: input.FileSystemId })), (input.NextToken !== undefined && { NextToken: input.NextToken })), (input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() }));
|
|
588
|
+
return [2, new __HttpRequest({
|
|
589
|
+
protocol: protocol,
|
|
590
|
+
hostname: hostname,
|
|
591
|
+
port: port,
|
|
592
|
+
method: "GET",
|
|
593
|
+
headers: headers,
|
|
594
|
+
path: resolvedPath,
|
|
595
|
+
query: query,
|
|
596
|
+
body: body,
|
|
597
|
+
})];
|
|
598
|
+
}
|
|
599
|
+
});
|
|
600
|
+
}); };
|
|
507
601
|
export var serializeAws_restJson1DescribeTagsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
508
602
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
|
|
509
603
|
return __generator(this, function (_c) {
|
|
@@ -1356,6 +1450,160 @@ var deserializeAws_restJson1CreateMountTargetCommandError = function (output, co
|
|
|
1356
1450
|
}
|
|
1357
1451
|
});
|
|
1358
1452
|
}); };
|
|
1453
|
+
export var deserializeAws_restJson1CreateReplicationConfigurationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1454
|
+
var contents, data, _a, _b;
|
|
1455
|
+
return __generator(this, function (_c) {
|
|
1456
|
+
switch (_c.label) {
|
|
1457
|
+
case 0:
|
|
1458
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1459
|
+
return [2, deserializeAws_restJson1CreateReplicationConfigurationCommandError(output, context)];
|
|
1460
|
+
}
|
|
1461
|
+
contents = {
|
|
1462
|
+
$metadata: deserializeMetadata(output),
|
|
1463
|
+
CreationTime: undefined,
|
|
1464
|
+
Destinations: undefined,
|
|
1465
|
+
OriginalSourceFileSystemArn: undefined,
|
|
1466
|
+
SourceFileSystemArn: undefined,
|
|
1467
|
+
SourceFileSystemId: undefined,
|
|
1468
|
+
SourceFileSystemRegion: undefined,
|
|
1469
|
+
};
|
|
1470
|
+
_a = __expectNonNull;
|
|
1471
|
+
_b = __expectObject;
|
|
1472
|
+
return [4, parseBody(output.body, context)];
|
|
1473
|
+
case 1:
|
|
1474
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1475
|
+
if (data.CreationTime !== undefined && data.CreationTime !== null) {
|
|
1476
|
+
contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime)));
|
|
1477
|
+
}
|
|
1478
|
+
if (data.Destinations !== undefined && data.Destinations !== null) {
|
|
1479
|
+
contents.Destinations = deserializeAws_restJson1Destinations(data.Destinations, context);
|
|
1480
|
+
}
|
|
1481
|
+
if (data.OriginalSourceFileSystemArn !== undefined && data.OriginalSourceFileSystemArn !== null) {
|
|
1482
|
+
contents.OriginalSourceFileSystemArn = __expectString(data.OriginalSourceFileSystemArn);
|
|
1483
|
+
}
|
|
1484
|
+
if (data.SourceFileSystemArn !== undefined && data.SourceFileSystemArn !== null) {
|
|
1485
|
+
contents.SourceFileSystemArn = __expectString(data.SourceFileSystemArn);
|
|
1486
|
+
}
|
|
1487
|
+
if (data.SourceFileSystemId !== undefined && data.SourceFileSystemId !== null) {
|
|
1488
|
+
contents.SourceFileSystemId = __expectString(data.SourceFileSystemId);
|
|
1489
|
+
}
|
|
1490
|
+
if (data.SourceFileSystemRegion !== undefined && data.SourceFileSystemRegion !== null) {
|
|
1491
|
+
contents.SourceFileSystemRegion = __expectString(data.SourceFileSystemRegion);
|
|
1492
|
+
}
|
|
1493
|
+
return [2, Promise.resolve(contents)];
|
|
1494
|
+
}
|
|
1495
|
+
});
|
|
1496
|
+
}); };
|
|
1497
|
+
var deserializeAws_restJson1CreateReplicationConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1498
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, parsedBody, message;
|
|
1499
|
+
var _o;
|
|
1500
|
+
return __generator(this, function (_p) {
|
|
1501
|
+
switch (_p.label) {
|
|
1502
|
+
case 0:
|
|
1503
|
+
_a = [__assign({}, output)];
|
|
1504
|
+
_o = {};
|
|
1505
|
+
return [4, parseBody(output.body, context)];
|
|
1506
|
+
case 1:
|
|
1507
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_o.body = _p.sent(), _o)]));
|
|
1508
|
+
errorCode = "UnknownError";
|
|
1509
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1510
|
+
_b = errorCode;
|
|
1511
|
+
switch (_b) {
|
|
1512
|
+
case "BadRequest": return [3, 2];
|
|
1513
|
+
case "com.amazonaws.efs#BadRequest": return [3, 2];
|
|
1514
|
+
case "FileSystemLimitExceeded": return [3, 4];
|
|
1515
|
+
case "com.amazonaws.efs#FileSystemLimitExceeded": return [3, 4];
|
|
1516
|
+
case "FileSystemNotFound": return [3, 6];
|
|
1517
|
+
case "com.amazonaws.efs#FileSystemNotFound": return [3, 6];
|
|
1518
|
+
case "IncorrectFileSystemLifeCycleState": return [3, 8];
|
|
1519
|
+
case "com.amazonaws.efs#IncorrectFileSystemLifeCycleState": return [3, 8];
|
|
1520
|
+
case "InsufficientThroughputCapacity": return [3, 10];
|
|
1521
|
+
case "com.amazonaws.efs#InsufficientThroughputCapacity": return [3, 10];
|
|
1522
|
+
case "InternalServerError": return [3, 12];
|
|
1523
|
+
case "com.amazonaws.efs#InternalServerError": return [3, 12];
|
|
1524
|
+
case "ReplicationNotFound": return [3, 14];
|
|
1525
|
+
case "com.amazonaws.efs#ReplicationNotFound": return [3, 14];
|
|
1526
|
+
case "ThroughputLimitExceeded": return [3, 16];
|
|
1527
|
+
case "com.amazonaws.efs#ThroughputLimitExceeded": return [3, 16];
|
|
1528
|
+
case "UnsupportedAvailabilityZone": return [3, 18];
|
|
1529
|
+
case "com.amazonaws.efs#UnsupportedAvailabilityZone": return [3, 18];
|
|
1530
|
+
case "ValidationException": return [3, 20];
|
|
1531
|
+
case "com.amazonaws.efs#ValidationException": return [3, 20];
|
|
1532
|
+
}
|
|
1533
|
+
return [3, 22];
|
|
1534
|
+
case 2:
|
|
1535
|
+
_c = [{}];
|
|
1536
|
+
return [4, deserializeAws_restJson1BadRequestResponse(parsedOutput, context)];
|
|
1537
|
+
case 3:
|
|
1538
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1539
|
+
return [3, 23];
|
|
1540
|
+
case 4:
|
|
1541
|
+
_d = [{}];
|
|
1542
|
+
return [4, deserializeAws_restJson1FileSystemLimitExceededResponse(parsedOutput, context)];
|
|
1543
|
+
case 5:
|
|
1544
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1545
|
+
return [3, 23];
|
|
1546
|
+
case 6:
|
|
1547
|
+
_e = [{}];
|
|
1548
|
+
return [4, deserializeAws_restJson1FileSystemNotFoundResponse(parsedOutput, context)];
|
|
1549
|
+
case 7:
|
|
1550
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1551
|
+
return [3, 23];
|
|
1552
|
+
case 8:
|
|
1553
|
+
_f = [{}];
|
|
1554
|
+
return [4, deserializeAws_restJson1IncorrectFileSystemLifeCycleStateResponse(parsedOutput, context)];
|
|
1555
|
+
case 9:
|
|
1556
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1557
|
+
return [3, 23];
|
|
1558
|
+
case 10:
|
|
1559
|
+
_g = [{}];
|
|
1560
|
+
return [4, deserializeAws_restJson1InsufficientThroughputCapacityResponse(parsedOutput, context)];
|
|
1561
|
+
case 11:
|
|
1562
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1563
|
+
return [3, 23];
|
|
1564
|
+
case 12:
|
|
1565
|
+
_h = [{}];
|
|
1566
|
+
return [4, deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context)];
|
|
1567
|
+
case 13:
|
|
1568
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1569
|
+
return [3, 23];
|
|
1570
|
+
case 14:
|
|
1571
|
+
_j = [{}];
|
|
1572
|
+
return [4, deserializeAws_restJson1ReplicationNotFoundResponse(parsedOutput, context)];
|
|
1573
|
+
case 15:
|
|
1574
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1575
|
+
return [3, 23];
|
|
1576
|
+
case 16:
|
|
1577
|
+
_k = [{}];
|
|
1578
|
+
return [4, deserializeAws_restJson1ThroughputLimitExceededResponse(parsedOutput, context)];
|
|
1579
|
+
case 17:
|
|
1580
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1581
|
+
return [3, 23];
|
|
1582
|
+
case 18:
|
|
1583
|
+
_l = [{}];
|
|
1584
|
+
return [4, deserializeAws_restJson1UnsupportedAvailabilityZoneResponse(parsedOutput, context)];
|
|
1585
|
+
case 19:
|
|
1586
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _l.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1587
|
+
return [3, 23];
|
|
1588
|
+
case 20:
|
|
1589
|
+
_m = [{}];
|
|
1590
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1591
|
+
case 21:
|
|
1592
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _m.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1593
|
+
return [3, 23];
|
|
1594
|
+
case 22:
|
|
1595
|
+
parsedBody = parsedOutput.body;
|
|
1596
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1597
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1598
|
+
_p.label = 23;
|
|
1599
|
+
case 23:
|
|
1600
|
+
message = response.message || response.Message || errorCode;
|
|
1601
|
+
response.message = message;
|
|
1602
|
+
delete response.Message;
|
|
1603
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1604
|
+
}
|
|
1605
|
+
});
|
|
1606
|
+
}); };
|
|
1359
1607
|
export var deserializeAws_restJson1CreateTagsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1360
1608
|
var contents;
|
|
1361
1609
|
return __generator(this, function (_a) {
|
|
@@ -1599,52 +1847,60 @@ export var deserializeAws_restJson1DeleteFileSystemPolicyCommand = function (out
|
|
|
1599
1847
|
});
|
|
1600
1848
|
}); };
|
|
1601
1849
|
var deserializeAws_restJson1DeleteFileSystemPolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1602
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
1603
|
-
var
|
|
1604
|
-
return __generator(this, function (
|
|
1605
|
-
switch (
|
|
1850
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
1851
|
+
var _g;
|
|
1852
|
+
return __generator(this, function (_h) {
|
|
1853
|
+
switch (_h.label) {
|
|
1606
1854
|
case 0:
|
|
1607
1855
|
_a = [__assign({}, output)];
|
|
1608
|
-
|
|
1856
|
+
_g = {};
|
|
1609
1857
|
return [4, parseBody(output.body, context)];
|
|
1610
1858
|
case 1:
|
|
1611
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
1859
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
1612
1860
|
errorCode = "UnknownError";
|
|
1613
1861
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1614
1862
|
_b = errorCode;
|
|
1615
1863
|
switch (_b) {
|
|
1616
|
-
case "
|
|
1617
|
-
case "com.amazonaws.efs#
|
|
1618
|
-
case "
|
|
1619
|
-
case "com.amazonaws.efs#
|
|
1620
|
-
case "
|
|
1621
|
-
case "com.amazonaws.efs#
|
|
1864
|
+
case "BadRequest": return [3, 2];
|
|
1865
|
+
case "com.amazonaws.efs#BadRequest": return [3, 2];
|
|
1866
|
+
case "FileSystemNotFound": return [3, 4];
|
|
1867
|
+
case "com.amazonaws.efs#FileSystemNotFound": return [3, 4];
|
|
1868
|
+
case "IncorrectFileSystemLifeCycleState": return [3, 6];
|
|
1869
|
+
case "com.amazonaws.efs#IncorrectFileSystemLifeCycleState": return [3, 6];
|
|
1870
|
+
case "InternalServerError": return [3, 8];
|
|
1871
|
+
case "com.amazonaws.efs#InternalServerError": return [3, 8];
|
|
1622
1872
|
}
|
|
1623
|
-
return [3,
|
|
1873
|
+
return [3, 10];
|
|
1624
1874
|
case 2:
|
|
1625
1875
|
_c = [{}];
|
|
1626
|
-
return [4,
|
|
1876
|
+
return [4, deserializeAws_restJson1BadRequestResponse(parsedOutput, context)];
|
|
1627
1877
|
case 3:
|
|
1628
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
1629
|
-
return [3,
|
|
1878
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1879
|
+
return [3, 11];
|
|
1630
1880
|
case 4:
|
|
1631
1881
|
_d = [{}];
|
|
1632
|
-
return [4,
|
|
1882
|
+
return [4, deserializeAws_restJson1FileSystemNotFoundResponse(parsedOutput, context)];
|
|
1633
1883
|
case 5:
|
|
1634
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
1635
|
-
return [3,
|
|
1884
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1885
|
+
return [3, 11];
|
|
1636
1886
|
case 6:
|
|
1637
1887
|
_e = [{}];
|
|
1638
|
-
return [4,
|
|
1888
|
+
return [4, deserializeAws_restJson1IncorrectFileSystemLifeCycleStateResponse(parsedOutput, context)];
|
|
1639
1889
|
case 7:
|
|
1640
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
1641
|
-
return [3,
|
|
1890
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1891
|
+
return [3, 11];
|
|
1642
1892
|
case 8:
|
|
1893
|
+
_f = [{}];
|
|
1894
|
+
return [4, deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context)];
|
|
1895
|
+
case 9:
|
|
1896
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1897
|
+
return [3, 11];
|
|
1898
|
+
case 10:
|
|
1643
1899
|
parsedBody = parsedOutput.body;
|
|
1644
1900
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1645
1901
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1646
|
-
|
|
1647
|
-
case
|
|
1902
|
+
_h.label = 11;
|
|
1903
|
+
case 11:
|
|
1648
1904
|
message = response.message || response.Message || errorCode;
|
|
1649
1905
|
response.message = message;
|
|
1650
1906
|
delete response.Message;
|
|
@@ -1715,7 +1971,87 @@ var deserializeAws_restJson1DeleteMountTargetCommandError = function (output, co
|
|
|
1715
1971
|
return [3, 11];
|
|
1716
1972
|
case 8:
|
|
1717
1973
|
_f = [{}];
|
|
1718
|
-
return [4, deserializeAws_restJson1MountTargetNotFoundResponse(parsedOutput, context)];
|
|
1974
|
+
return [4, deserializeAws_restJson1MountTargetNotFoundResponse(parsedOutput, context)];
|
|
1975
|
+
case 9:
|
|
1976
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1977
|
+
return [3, 11];
|
|
1978
|
+
case 10:
|
|
1979
|
+
parsedBody = parsedOutput.body;
|
|
1980
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1981
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1982
|
+
_h.label = 11;
|
|
1983
|
+
case 11:
|
|
1984
|
+
message = response.message || response.Message || errorCode;
|
|
1985
|
+
response.message = message;
|
|
1986
|
+
delete response.Message;
|
|
1987
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1988
|
+
}
|
|
1989
|
+
});
|
|
1990
|
+
}); };
|
|
1991
|
+
export var deserializeAws_restJson1DeleteReplicationConfigurationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1992
|
+
var contents;
|
|
1993
|
+
return __generator(this, function (_a) {
|
|
1994
|
+
switch (_a.label) {
|
|
1995
|
+
case 0:
|
|
1996
|
+
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1997
|
+
return [2, deserializeAws_restJson1DeleteReplicationConfigurationCommandError(output, context)];
|
|
1998
|
+
}
|
|
1999
|
+
contents = {
|
|
2000
|
+
$metadata: deserializeMetadata(output),
|
|
2001
|
+
};
|
|
2002
|
+
return [4, collectBody(output.body, context)];
|
|
2003
|
+
case 1:
|
|
2004
|
+
_a.sent();
|
|
2005
|
+
return [2, Promise.resolve(contents)];
|
|
2006
|
+
}
|
|
2007
|
+
});
|
|
2008
|
+
}); };
|
|
2009
|
+
var deserializeAws_restJson1DeleteReplicationConfigurationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2010
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
2011
|
+
var _g;
|
|
2012
|
+
return __generator(this, function (_h) {
|
|
2013
|
+
switch (_h.label) {
|
|
2014
|
+
case 0:
|
|
2015
|
+
_a = [__assign({}, output)];
|
|
2016
|
+
_g = {};
|
|
2017
|
+
return [4, parseBody(output.body, context)];
|
|
2018
|
+
case 1:
|
|
2019
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
2020
|
+
errorCode = "UnknownError";
|
|
2021
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2022
|
+
_b = errorCode;
|
|
2023
|
+
switch (_b) {
|
|
2024
|
+
case "BadRequest": return [3, 2];
|
|
2025
|
+
case "com.amazonaws.efs#BadRequest": return [3, 2];
|
|
2026
|
+
case "FileSystemNotFound": return [3, 4];
|
|
2027
|
+
case "com.amazonaws.efs#FileSystemNotFound": return [3, 4];
|
|
2028
|
+
case "InternalServerError": return [3, 6];
|
|
2029
|
+
case "com.amazonaws.efs#InternalServerError": return [3, 6];
|
|
2030
|
+
case "ReplicationNotFound": return [3, 8];
|
|
2031
|
+
case "com.amazonaws.efs#ReplicationNotFound": return [3, 8];
|
|
2032
|
+
}
|
|
2033
|
+
return [3, 10];
|
|
2034
|
+
case 2:
|
|
2035
|
+
_c = [{}];
|
|
2036
|
+
return [4, deserializeAws_restJson1BadRequestResponse(parsedOutput, context)];
|
|
2037
|
+
case 3:
|
|
2038
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2039
|
+
return [3, 11];
|
|
2040
|
+
case 4:
|
|
2041
|
+
_d = [{}];
|
|
2042
|
+
return [4, deserializeAws_restJson1FileSystemNotFoundResponse(parsedOutput, context)];
|
|
2043
|
+
case 5:
|
|
2044
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2045
|
+
return [3, 11];
|
|
2046
|
+
case 6:
|
|
2047
|
+
_e = [{}];
|
|
2048
|
+
return [4, deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context)];
|
|
2049
|
+
case 7:
|
|
2050
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2051
|
+
return [3, 11];
|
|
2052
|
+
case 8:
|
|
2053
|
+
_f = [{}];
|
|
2054
|
+
return [4, deserializeAws_restJson1ReplicationNotFoundResponse(parsedOutput, context)];
|
|
1719
2055
|
case 9:
|
|
1720
2056
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1721
2057
|
return [3, 11];
|
|
@@ -2083,52 +2419,60 @@ export var deserializeAws_restJson1DescribeFileSystemPolicyCommand = function (o
|
|
|
2083
2419
|
});
|
|
2084
2420
|
}); };
|
|
2085
2421
|
var deserializeAws_restJson1DescribeFileSystemPolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2086
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
|
|
2087
|
-
var
|
|
2088
|
-
return __generator(this, function (
|
|
2089
|
-
switch (
|
|
2422
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
2423
|
+
var _g;
|
|
2424
|
+
return __generator(this, function (_h) {
|
|
2425
|
+
switch (_h.label) {
|
|
2090
2426
|
case 0:
|
|
2091
2427
|
_a = [__assign({}, output)];
|
|
2092
|
-
|
|
2428
|
+
_g = {};
|
|
2093
2429
|
return [4, parseBody(output.body, context)];
|
|
2094
2430
|
case 1:
|
|
2095
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
2431
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
|
|
2096
2432
|
errorCode = "UnknownError";
|
|
2097
2433
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2098
2434
|
_b = errorCode;
|
|
2099
2435
|
switch (_b) {
|
|
2100
|
-
case "
|
|
2101
|
-
case "com.amazonaws.efs#
|
|
2102
|
-
case "
|
|
2103
|
-
case "com.amazonaws.efs#
|
|
2104
|
-
case "
|
|
2105
|
-
case "com.amazonaws.efs#
|
|
2436
|
+
case "BadRequest": return [3, 2];
|
|
2437
|
+
case "com.amazonaws.efs#BadRequest": return [3, 2];
|
|
2438
|
+
case "FileSystemNotFound": return [3, 4];
|
|
2439
|
+
case "com.amazonaws.efs#FileSystemNotFound": return [3, 4];
|
|
2440
|
+
case "InternalServerError": return [3, 6];
|
|
2441
|
+
case "com.amazonaws.efs#InternalServerError": return [3, 6];
|
|
2442
|
+
case "PolicyNotFound": return [3, 8];
|
|
2443
|
+
case "com.amazonaws.efs#PolicyNotFound": return [3, 8];
|
|
2106
2444
|
}
|
|
2107
|
-
return [3,
|
|
2445
|
+
return [3, 10];
|
|
2108
2446
|
case 2:
|
|
2109
2447
|
_c = [{}];
|
|
2110
|
-
return [4,
|
|
2448
|
+
return [4, deserializeAws_restJson1BadRequestResponse(parsedOutput, context)];
|
|
2111
2449
|
case 3:
|
|
2112
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
2113
|
-
return [3,
|
|
2450
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2451
|
+
return [3, 11];
|
|
2114
2452
|
case 4:
|
|
2115
2453
|
_d = [{}];
|
|
2116
|
-
return [4,
|
|
2454
|
+
return [4, deserializeAws_restJson1FileSystemNotFoundResponse(parsedOutput, context)];
|
|
2117
2455
|
case 5:
|
|
2118
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
2119
|
-
return [3,
|
|
2456
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2457
|
+
return [3, 11];
|
|
2120
2458
|
case 6:
|
|
2121
2459
|
_e = [{}];
|
|
2122
|
-
return [4,
|
|
2460
|
+
return [4, deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context)];
|
|
2123
2461
|
case 7:
|
|
2124
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
2125
|
-
return [3,
|
|
2462
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2463
|
+
return [3, 11];
|
|
2126
2464
|
case 8:
|
|
2465
|
+
_f = [{}];
|
|
2466
|
+
return [4, deserializeAws_restJson1PolicyNotFoundResponse(parsedOutput, context)];
|
|
2467
|
+
case 9:
|
|
2468
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2469
|
+
return [3, 11];
|
|
2470
|
+
case 10:
|
|
2127
2471
|
parsedBody = parsedOutput.body;
|
|
2128
2472
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2129
2473
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
2130
|
-
|
|
2131
|
-
case
|
|
2474
|
+
_h.label = 11;
|
|
2475
|
+
case 11:
|
|
2132
2476
|
message = response.message || response.Message || errorCode;
|
|
2133
2477
|
response.message = message;
|
|
2134
2478
|
delete response.Message;
|
|
@@ -2488,6 +2832,104 @@ var deserializeAws_restJson1DescribeMountTargetSecurityGroupsCommandError = func
|
|
|
2488
2832
|
}
|
|
2489
2833
|
});
|
|
2490
2834
|
}); };
|
|
2835
|
+
export var deserializeAws_restJson1DescribeReplicationConfigurationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2836
|
+
var contents, data, _a, _b;
|
|
2837
|
+
return __generator(this, function (_c) {
|
|
2838
|
+
switch (_c.label) {
|
|
2839
|
+
case 0:
|
|
2840
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2841
|
+
return [2, deserializeAws_restJson1DescribeReplicationConfigurationsCommandError(output, context)];
|
|
2842
|
+
}
|
|
2843
|
+
contents = {
|
|
2844
|
+
$metadata: deserializeMetadata(output),
|
|
2845
|
+
NextToken: undefined,
|
|
2846
|
+
Replications: undefined,
|
|
2847
|
+
};
|
|
2848
|
+
_a = __expectNonNull;
|
|
2849
|
+
_b = __expectObject;
|
|
2850
|
+
return [4, parseBody(output.body, context)];
|
|
2851
|
+
case 1:
|
|
2852
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2853
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
2854
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
2855
|
+
}
|
|
2856
|
+
if (data.Replications !== undefined && data.Replications !== null) {
|
|
2857
|
+
contents.Replications = deserializeAws_restJson1ReplicationConfigurationDescriptions(data.Replications, context);
|
|
2858
|
+
}
|
|
2859
|
+
return [2, Promise.resolve(contents)];
|
|
2860
|
+
}
|
|
2861
|
+
});
|
|
2862
|
+
}); };
|
|
2863
|
+
var deserializeAws_restJson1DescribeReplicationConfigurationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2864
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
2865
|
+
var _h;
|
|
2866
|
+
return __generator(this, function (_j) {
|
|
2867
|
+
switch (_j.label) {
|
|
2868
|
+
case 0:
|
|
2869
|
+
_a = [__assign({}, output)];
|
|
2870
|
+
_h = {};
|
|
2871
|
+
return [4, parseBody(output.body, context)];
|
|
2872
|
+
case 1:
|
|
2873
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
2874
|
+
errorCode = "UnknownError";
|
|
2875
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2876
|
+
_b = errorCode;
|
|
2877
|
+
switch (_b) {
|
|
2878
|
+
case "BadRequest": return [3, 2];
|
|
2879
|
+
case "com.amazonaws.efs#BadRequest": return [3, 2];
|
|
2880
|
+
case "FileSystemNotFound": return [3, 4];
|
|
2881
|
+
case "com.amazonaws.efs#FileSystemNotFound": return [3, 4];
|
|
2882
|
+
case "InternalServerError": return [3, 6];
|
|
2883
|
+
case "com.amazonaws.efs#InternalServerError": return [3, 6];
|
|
2884
|
+
case "ReplicationNotFound": return [3, 8];
|
|
2885
|
+
case "com.amazonaws.efs#ReplicationNotFound": return [3, 8];
|
|
2886
|
+
case "ValidationException": return [3, 10];
|
|
2887
|
+
case "com.amazonaws.efs#ValidationException": return [3, 10];
|
|
2888
|
+
}
|
|
2889
|
+
return [3, 12];
|
|
2890
|
+
case 2:
|
|
2891
|
+
_c = [{}];
|
|
2892
|
+
return [4, deserializeAws_restJson1BadRequestResponse(parsedOutput, context)];
|
|
2893
|
+
case 3:
|
|
2894
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2895
|
+
return [3, 13];
|
|
2896
|
+
case 4:
|
|
2897
|
+
_d = [{}];
|
|
2898
|
+
return [4, deserializeAws_restJson1FileSystemNotFoundResponse(parsedOutput, context)];
|
|
2899
|
+
case 5:
|
|
2900
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2901
|
+
return [3, 13];
|
|
2902
|
+
case 6:
|
|
2903
|
+
_e = [{}];
|
|
2904
|
+
return [4, deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context)];
|
|
2905
|
+
case 7:
|
|
2906
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2907
|
+
return [3, 13];
|
|
2908
|
+
case 8:
|
|
2909
|
+
_f = [{}];
|
|
2910
|
+
return [4, deserializeAws_restJson1ReplicationNotFoundResponse(parsedOutput, context)];
|
|
2911
|
+
case 9:
|
|
2912
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2913
|
+
return [3, 13];
|
|
2914
|
+
case 10:
|
|
2915
|
+
_g = [{}];
|
|
2916
|
+
return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2917
|
+
case 11:
|
|
2918
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
2919
|
+
return [3, 13];
|
|
2920
|
+
case 12:
|
|
2921
|
+
parsedBody = parsedOutput.body;
|
|
2922
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2923
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
2924
|
+
_j.label = 13;
|
|
2925
|
+
case 13:
|
|
2926
|
+
message = response.message || response.Message || errorCode;
|
|
2927
|
+
response.message = message;
|
|
2928
|
+
delete response.Message;
|
|
2929
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
2930
|
+
}
|
|
2931
|
+
});
|
|
2932
|
+
}); };
|
|
2491
2933
|
export var deserializeAws_restJson1DescribeTagsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2492
2934
|
var contents, data, _a, _b;
|
|
2493
2935
|
return __generator(this, function (_c) {
|
|
@@ -2953,60 +3395,68 @@ export var deserializeAws_restJson1PutFileSystemPolicyCommand = function (output
|
|
|
2953
3395
|
});
|
|
2954
3396
|
}); };
|
|
2955
3397
|
var deserializeAws_restJson1PutFileSystemPolicyCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2956
|
-
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
|
|
2957
|
-
var
|
|
2958
|
-
return __generator(this, function (
|
|
2959
|
-
switch (
|
|
3398
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, parsedBody, message;
|
|
3399
|
+
var _h;
|
|
3400
|
+
return __generator(this, function (_j) {
|
|
3401
|
+
switch (_j.label) {
|
|
2960
3402
|
case 0:
|
|
2961
3403
|
_a = [__assign({}, output)];
|
|
2962
|
-
|
|
3404
|
+
_h = {};
|
|
2963
3405
|
return [4, parseBody(output.body, context)];
|
|
2964
3406
|
case 1:
|
|
2965
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(
|
|
3407
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
2966
3408
|
errorCode = "UnknownError";
|
|
2967
3409
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2968
3410
|
_b = errorCode;
|
|
2969
3411
|
switch (_b) {
|
|
2970
|
-
case "
|
|
2971
|
-
case "com.amazonaws.efs#
|
|
2972
|
-
case "
|
|
2973
|
-
case "com.amazonaws.efs#
|
|
2974
|
-
case "
|
|
2975
|
-
case "com.amazonaws.efs#
|
|
2976
|
-
case "
|
|
2977
|
-
case "com.amazonaws.efs#
|
|
3412
|
+
case "BadRequest": return [3, 2];
|
|
3413
|
+
case "com.amazonaws.efs#BadRequest": return [3, 2];
|
|
3414
|
+
case "FileSystemNotFound": return [3, 4];
|
|
3415
|
+
case "com.amazonaws.efs#FileSystemNotFound": return [3, 4];
|
|
3416
|
+
case "IncorrectFileSystemLifeCycleState": return [3, 6];
|
|
3417
|
+
case "com.amazonaws.efs#IncorrectFileSystemLifeCycleState": return [3, 6];
|
|
3418
|
+
case "InternalServerError": return [3, 8];
|
|
3419
|
+
case "com.amazonaws.efs#InternalServerError": return [3, 8];
|
|
3420
|
+
case "InvalidPolicyException": return [3, 10];
|
|
3421
|
+
case "com.amazonaws.efs#InvalidPolicyException": return [3, 10];
|
|
2978
3422
|
}
|
|
2979
|
-
return [3,
|
|
3423
|
+
return [3, 12];
|
|
2980
3424
|
case 2:
|
|
2981
3425
|
_c = [{}];
|
|
2982
|
-
return [4,
|
|
3426
|
+
return [4, deserializeAws_restJson1BadRequestResponse(parsedOutput, context)];
|
|
2983
3427
|
case 3:
|
|
2984
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(
|
|
2985
|
-
return [3,
|
|
3428
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3429
|
+
return [3, 13];
|
|
2986
3430
|
case 4:
|
|
2987
3431
|
_d = [{}];
|
|
2988
|
-
return [4,
|
|
3432
|
+
return [4, deserializeAws_restJson1FileSystemNotFoundResponse(parsedOutput, context)];
|
|
2989
3433
|
case 5:
|
|
2990
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(
|
|
2991
|
-
return [3,
|
|
3434
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3435
|
+
return [3, 13];
|
|
2992
3436
|
case 6:
|
|
2993
3437
|
_e = [{}];
|
|
2994
|
-
return [4,
|
|
3438
|
+
return [4, deserializeAws_restJson1IncorrectFileSystemLifeCycleStateResponse(parsedOutput, context)];
|
|
2995
3439
|
case 7:
|
|
2996
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(
|
|
2997
|
-
return [3,
|
|
3440
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3441
|
+
return [3, 13];
|
|
2998
3442
|
case 8:
|
|
2999
3443
|
_f = [{}];
|
|
3000
|
-
return [4,
|
|
3444
|
+
return [4, deserializeAws_restJson1InternalServerErrorResponse(parsedOutput, context)];
|
|
3001
3445
|
case 9:
|
|
3002
|
-
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(
|
|
3003
|
-
return [3,
|
|
3446
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3447
|
+
return [3, 13];
|
|
3004
3448
|
case 10:
|
|
3449
|
+
_g = [{}];
|
|
3450
|
+
return [4, deserializeAws_restJson1InvalidPolicyExceptionResponse(parsedOutput, context)];
|
|
3451
|
+
case 11:
|
|
3452
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
3453
|
+
return [3, 13];
|
|
3454
|
+
case 12:
|
|
3005
3455
|
parsedBody = parsedOutput.body;
|
|
3006
3456
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3007
3457
|
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
3008
|
-
|
|
3009
|
-
case
|
|
3458
|
+
_j.label = 13;
|
|
3459
|
+
case 13:
|
|
3010
3460
|
message = response.message || response.Message || errorCode;
|
|
3011
3461
|
response.message = message;
|
|
3012
3462
|
delete response.Message;
|
|
@@ -3862,6 +4312,26 @@ var deserializeAws_restJson1PolicyNotFoundResponse = function (parsedOutput, con
|
|
|
3862
4312
|
return [2, contents];
|
|
3863
4313
|
});
|
|
3864
4314
|
}); };
|
|
4315
|
+
var deserializeAws_restJson1ReplicationNotFoundResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4316
|
+
var contents, data;
|
|
4317
|
+
return __generator(this, function (_a) {
|
|
4318
|
+
contents = {
|
|
4319
|
+
name: "ReplicationNotFound",
|
|
4320
|
+
$fault: "client",
|
|
4321
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
4322
|
+
ErrorCode: undefined,
|
|
4323
|
+
Message: undefined,
|
|
4324
|
+
};
|
|
4325
|
+
data = parsedOutput.body;
|
|
4326
|
+
if (data.ErrorCode !== undefined && data.ErrorCode !== null) {
|
|
4327
|
+
contents.ErrorCode = __expectString(data.ErrorCode);
|
|
4328
|
+
}
|
|
4329
|
+
if (data.Message !== undefined && data.Message !== null) {
|
|
4330
|
+
contents.Message = __expectString(data.Message);
|
|
4331
|
+
}
|
|
4332
|
+
return [2, contents];
|
|
4333
|
+
});
|
|
4334
|
+
}); };
|
|
3865
4335
|
var deserializeAws_restJson1SecurityGroupLimitExceededResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3866
4336
|
var contents, data;
|
|
3867
4337
|
return __generator(this, function (_a) {
|
|
@@ -4008,6 +4478,20 @@ var serializeAws_restJson1BackupPolicy = function (input, context) {
|
|
|
4008
4478
|
var serializeAws_restJson1CreationInfo = function (input, context) {
|
|
4009
4479
|
return __assign(__assign(__assign({}, (input.OwnerGid !== undefined && input.OwnerGid !== null && { OwnerGid: input.OwnerGid })), (input.OwnerUid !== undefined && input.OwnerUid !== null && { OwnerUid: input.OwnerUid })), (input.Permissions !== undefined && input.Permissions !== null && { Permissions: input.Permissions }));
|
|
4010
4480
|
};
|
|
4481
|
+
var serializeAws_restJson1DestinationsToCreate = function (input, context) {
|
|
4482
|
+
return input
|
|
4483
|
+
.filter(function (e) { return e != null; })
|
|
4484
|
+
.map(function (entry) {
|
|
4485
|
+
if (entry === null) {
|
|
4486
|
+
return null;
|
|
4487
|
+
}
|
|
4488
|
+
return serializeAws_restJson1DestinationToCreate(entry, context);
|
|
4489
|
+
});
|
|
4490
|
+
};
|
|
4491
|
+
var serializeAws_restJson1DestinationToCreate = function (input, context) {
|
|
4492
|
+
return __assign(__assign(__assign({}, (input.AvailabilityZoneName !== undefined &&
|
|
4493
|
+
input.AvailabilityZoneName !== null && { AvailabilityZoneName: input.AvailabilityZoneName })), (input.KmsKeyId !== undefined && input.KmsKeyId !== null && { KmsKeyId: input.KmsKeyId })), (input.Region !== undefined && input.Region !== null && { Region: input.Region }));
|
|
4494
|
+
};
|
|
4011
4495
|
var serializeAws_restJson1LifecyclePolicies = function (input, context) {
|
|
4012
4496
|
return input
|
|
4013
4497
|
.filter(function (e) { return e != null; })
|
|
@@ -4120,6 +4604,26 @@ var deserializeAws_restJson1CreationInfo = function (output, context) {
|
|
|
4120
4604
|
Permissions: __expectString(output.Permissions),
|
|
4121
4605
|
};
|
|
4122
4606
|
};
|
|
4607
|
+
var deserializeAws_restJson1Destination = function (output, context) {
|
|
4608
|
+
return {
|
|
4609
|
+
FileSystemId: __expectString(output.FileSystemId),
|
|
4610
|
+
LastReplicatedTimestamp: output.LastReplicatedTimestamp !== undefined && output.LastReplicatedTimestamp !== null
|
|
4611
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastReplicatedTimestamp)))
|
|
4612
|
+
: undefined,
|
|
4613
|
+
Region: __expectString(output.Region),
|
|
4614
|
+
Status: __expectString(output.Status),
|
|
4615
|
+
};
|
|
4616
|
+
};
|
|
4617
|
+
var deserializeAws_restJson1Destinations = function (output, context) {
|
|
4618
|
+
return (output || [])
|
|
4619
|
+
.filter(function (e) { return e != null; })
|
|
4620
|
+
.map(function (entry) {
|
|
4621
|
+
if (entry === null) {
|
|
4622
|
+
return null;
|
|
4623
|
+
}
|
|
4624
|
+
return deserializeAws_restJson1Destination(entry, context);
|
|
4625
|
+
});
|
|
4626
|
+
};
|
|
4123
4627
|
var deserializeAws_restJson1FileSystemDescription = function (output, context) {
|
|
4124
4628
|
return {
|
|
4125
4629
|
AvailabilityZoneId: __expectString(output.AvailabilityZoneId),
|
|
@@ -4216,6 +4720,30 @@ var deserializeAws_restJson1PosixUser = function (output, context) {
|
|
|
4216
4720
|
Uid: __expectLong(output.Uid),
|
|
4217
4721
|
};
|
|
4218
4722
|
};
|
|
4723
|
+
var deserializeAws_restJson1ReplicationConfigurationDescription = function (output, context) {
|
|
4724
|
+
return {
|
|
4725
|
+
CreationTime: output.CreationTime !== undefined && output.CreationTime !== null
|
|
4726
|
+
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime)))
|
|
4727
|
+
: undefined,
|
|
4728
|
+
Destinations: output.Destinations !== undefined && output.Destinations !== null
|
|
4729
|
+
? deserializeAws_restJson1Destinations(output.Destinations, context)
|
|
4730
|
+
: undefined,
|
|
4731
|
+
OriginalSourceFileSystemArn: __expectString(output.OriginalSourceFileSystemArn),
|
|
4732
|
+
SourceFileSystemArn: __expectString(output.SourceFileSystemArn),
|
|
4733
|
+
SourceFileSystemId: __expectString(output.SourceFileSystemId),
|
|
4734
|
+
SourceFileSystemRegion: __expectString(output.SourceFileSystemRegion),
|
|
4735
|
+
};
|
|
4736
|
+
};
|
|
4737
|
+
var deserializeAws_restJson1ReplicationConfigurationDescriptions = function (output, context) {
|
|
4738
|
+
return (output || [])
|
|
4739
|
+
.filter(function (e) { return e != null; })
|
|
4740
|
+
.map(function (entry) {
|
|
4741
|
+
if (entry === null) {
|
|
4742
|
+
return null;
|
|
4743
|
+
}
|
|
4744
|
+
return deserializeAws_restJson1ReplicationConfigurationDescription(entry, context);
|
|
4745
|
+
});
|
|
4746
|
+
};
|
|
4219
4747
|
var deserializeAws_restJson1ResourceIdPreference = function (output, context) {
|
|
4220
4748
|
return {
|
|
4221
4749
|
ResourceIdType: __expectString(output.ResourceIdType),
|