@aws-sdk/client-drs 3.100.0 → 3.102.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 +11 -0
- package/README.md +7 -7
- package/dist-cjs/Drs.js +45 -0
- package/dist-cjs/commands/CreateExtendedSourceServerCommand.js +36 -0
- package/dist-cjs/commands/ListExtensibleSourceServersCommand.js +36 -0
- package/dist-cjs/commands/ListStagingAccountsCommand.js +36 -0
- package/dist-cjs/commands/index.js +3 -0
- package/dist-cjs/models/models_0.js +273 -201
- package/dist-cjs/pagination/ListExtensibleSourceServersPaginator.js +36 -0
- package/dist-cjs/pagination/ListStagingAccountsPaginator.js +36 -0
- package/dist-cjs/pagination/index.js +2 -0
- package/dist-cjs/protocols/Aws_restJson1.js +353 -2
- package/dist-es/Drs.js +45 -0
- package/dist-es/commands/CreateExtendedSourceServerCommand.js +39 -0
- package/dist-es/commands/ListExtensibleSourceServersCommand.js +39 -0
- package/dist-es/commands/ListStagingAccountsCommand.js +39 -0
- package/dist-es/commands/index.js +3 -0
- package/dist-es/models/models_0.js +217 -169
- package/dist-es/pagination/ListExtensibleSourceServersPaginator.js +75 -0
- package/dist-es/pagination/ListStagingAccountsPaginator.js +75 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +439 -15
- package/dist-types/Drs.d.ts +24 -0
- package/dist-types/DrsClient.d.ts +5 -2
- package/dist-types/commands/CreateExtendedSourceServerCommand.d.ts +35 -0
- package/dist-types/commands/ListExtensibleSourceServersCommand.d.ts +38 -0
- package/dist-types/commands/ListStagingAccountsCommand.d.ts +35 -0
- package/dist-types/commands/index.d.ts +3 -0
- package/dist-types/models/models_0.d.ts +731 -507
- package/dist-types/pagination/ListExtensibleSourceServersPaginator.d.ts +4 -0
- package/dist-types/pagination/ListStagingAccountsPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
- package/dist-types/ts3.4/Drs.d.ts +15 -0
- package/dist-types/ts3.4/DrsClient.d.ts +5 -2
- package/dist-types/ts3.4/commands/CreateExtendedSourceServerCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListExtensibleSourceServersCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListStagingAccountsCommand.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 +442 -305
- package/dist-types/ts3.4/pagination/ListExtensibleSourceServersPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListStagingAccountsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +9 -0
- package/package.json +1 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
|
|
2
|
+
import { ListStagingAccountsCommand, } from "../commands/ListStagingAccountsCommand";
|
|
3
|
+
import { Drs } from "../Drs";
|
|
4
|
+
import { DrsClient } from "../DrsClient";
|
|
5
|
+
var makePagedClientRequest = function (client, input) {
|
|
6
|
+
var args = [];
|
|
7
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
8
|
+
args[_i - 2] = arguments[_i];
|
|
9
|
+
}
|
|
10
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
11
|
+
return __generator(this, function (_a) {
|
|
12
|
+
switch (_a.label) {
|
|
13
|
+
case 0: return [4, client.send.apply(client, __spreadArray([new ListStagingAccountsCommand(input)], __read(args), false))];
|
|
14
|
+
case 1: return [2, _a.sent()];
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
var makePagedRequest = function (client, input) {
|
|
20
|
+
var args = [];
|
|
21
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
22
|
+
args[_i - 2] = arguments[_i];
|
|
23
|
+
}
|
|
24
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
25
|
+
return __generator(this, function (_a) {
|
|
26
|
+
switch (_a.label) {
|
|
27
|
+
case 0: return [4, client.listStagingAccounts.apply(client, __spreadArray([input], __read(args), false))];
|
|
28
|
+
case 1: return [2, _a.sent()];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
export function paginateListStagingAccounts(config, input) {
|
|
34
|
+
var additionalArguments = [];
|
|
35
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
36
|
+
additionalArguments[_i - 2] = arguments[_i];
|
|
37
|
+
}
|
|
38
|
+
return __asyncGenerator(this, arguments, function paginateListStagingAccounts_1() {
|
|
39
|
+
var token, hasNext, page, prevToken;
|
|
40
|
+
return __generator(this, function (_a) {
|
|
41
|
+
switch (_a.label) {
|
|
42
|
+
case 0:
|
|
43
|
+
token = config.startingToken || undefined;
|
|
44
|
+
hasNext = true;
|
|
45
|
+
_a.label = 1;
|
|
46
|
+
case 1:
|
|
47
|
+
if (!hasNext) return [3, 9];
|
|
48
|
+
input.nextToken = token;
|
|
49
|
+
input["maxResults"] = config.pageSize;
|
|
50
|
+
if (!(config.client instanceof Drs)) return [3, 3];
|
|
51
|
+
return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
|
|
52
|
+
case 2:
|
|
53
|
+
page = _a.sent();
|
|
54
|
+
return [3, 6];
|
|
55
|
+
case 3:
|
|
56
|
+
if (!(config.client instanceof DrsClient)) return [3, 5];
|
|
57
|
+
return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
|
|
58
|
+
case 4:
|
|
59
|
+
page = _a.sent();
|
|
60
|
+
return [3, 6];
|
|
61
|
+
case 5: throw new Error("Invalid client, expected Drs | DrsClient");
|
|
62
|
+
case 6: return [4, __await(page)];
|
|
63
|
+
case 7: return [4, _a.sent()];
|
|
64
|
+
case 8:
|
|
65
|
+
_a.sent();
|
|
66
|
+
prevToken = token;
|
|
67
|
+
token = page.nextToken;
|
|
68
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
69
|
+
return [3, 1];
|
|
70
|
+
case 9: return [4, __await(undefined)];
|
|
71
|
+
case 10: return [2, _a.sent()];
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
}
|
|
@@ -5,3 +5,5 @@ export * from "./DescribeRecoverySnapshotsPaginator";
|
|
|
5
5
|
export * from "./DescribeReplicationConfigurationTemplatesPaginator";
|
|
6
6
|
export * from "./DescribeSourceServersPaginator";
|
|
7
7
|
export * from "./Interfaces";
|
|
8
|
+
export * from "./ListExtensibleSourceServersPaginator";
|
|
9
|
+
export * from "./ListStagingAccountsPaginator";
|
|
@@ -3,6 +3,32 @@ import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
|
3
3
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, strictParseLong as __strictParseLong, } from "@aws-sdk/smithy-client";
|
|
4
4
|
import { DrsServiceException as __BaseException } from "../models/DrsServiceException";
|
|
5
5
|
import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, UninitializedAccountException, ValidationException, } from "../models/models_0";
|
|
6
|
+
export var serializeAws_restJson1CreateExtendedSourceServerCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
8
|
+
return __generator(this, function (_c) {
|
|
9
|
+
switch (_c.label) {
|
|
10
|
+
case 0: return [4, context.endpoint()];
|
|
11
|
+
case 1:
|
|
12
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
13
|
+
headers = {
|
|
14
|
+
"content-type": "application/json",
|
|
15
|
+
};
|
|
16
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/CreateExtendedSourceServer";
|
|
17
|
+
body = JSON.stringify(__assign(__assign({}, (input.sourceServerArn !== undefined &&
|
|
18
|
+
input.sourceServerArn !== null && { sourceServerArn: input.sourceServerArn })), (input.tags !== undefined &&
|
|
19
|
+
input.tags !== null && { tags: serializeAws_restJson1TagsMap(input.tags, context) })));
|
|
20
|
+
return [2, new __HttpRequest({
|
|
21
|
+
protocol: protocol,
|
|
22
|
+
hostname: hostname,
|
|
23
|
+
port: port,
|
|
24
|
+
method: "POST",
|
|
25
|
+
headers: headers,
|
|
26
|
+
path: resolvedPath,
|
|
27
|
+
body: body,
|
|
28
|
+
})];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}); };
|
|
6
32
|
export var serializeAws_restJson1CreateReplicationConfigurationTemplateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7
33
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
8
34
|
return __generator(this, function (_c) {
|
|
@@ -459,6 +485,54 @@ export var serializeAws_restJson1InitializeServiceCommand = function (input, con
|
|
|
459
485
|
}
|
|
460
486
|
});
|
|
461
487
|
}); };
|
|
488
|
+
export var serializeAws_restJson1ListExtensibleSourceServersCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
489
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
490
|
+
return __generator(this, function (_c) {
|
|
491
|
+
switch (_c.label) {
|
|
492
|
+
case 0: return [4, context.endpoint()];
|
|
493
|
+
case 1:
|
|
494
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
495
|
+
headers = {
|
|
496
|
+
"content-type": "application/json",
|
|
497
|
+
};
|
|
498
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/ListExtensibleSourceServers";
|
|
499
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })), (input.stagingAccountID !== undefined &&
|
|
500
|
+
input.stagingAccountID !== null && { stagingAccountID: input.stagingAccountID })));
|
|
501
|
+
return [2, new __HttpRequest({
|
|
502
|
+
protocol: protocol,
|
|
503
|
+
hostname: hostname,
|
|
504
|
+
port: port,
|
|
505
|
+
method: "POST",
|
|
506
|
+
headers: headers,
|
|
507
|
+
path: resolvedPath,
|
|
508
|
+
body: body,
|
|
509
|
+
})];
|
|
510
|
+
}
|
|
511
|
+
});
|
|
512
|
+
}); };
|
|
513
|
+
export var serializeAws_restJson1ListStagingAccountsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
514
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
515
|
+
return __generator(this, function (_c) {
|
|
516
|
+
switch (_c.label) {
|
|
517
|
+
case 0: return [4, context.endpoint()];
|
|
518
|
+
case 1:
|
|
519
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
520
|
+
headers = {};
|
|
521
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/ListStagingAccounts";
|
|
522
|
+
query = __assign(__assign({}, (input.maxResults !== undefined && { maxResults: input.maxResults.toString() })), (input.nextToken !== undefined && { nextToken: input.nextToken }));
|
|
523
|
+
return [2, new __HttpRequest({
|
|
524
|
+
protocol: protocol,
|
|
525
|
+
hostname: hostname,
|
|
526
|
+
port: port,
|
|
527
|
+
method: "GET",
|
|
528
|
+
headers: headers,
|
|
529
|
+
path: resolvedPath,
|
|
530
|
+
query: query,
|
|
531
|
+
body: body,
|
|
532
|
+
})];
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
}); };
|
|
462
536
|
export var serializeAws_restJson1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
463
537
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
|
|
464
538
|
return __generator(this, function (_c) {
|
|
@@ -846,6 +920,86 @@ export var serializeAws_restJson1UpdateReplicationConfigurationTemplateCommand =
|
|
|
846
920
|
}
|
|
847
921
|
});
|
|
848
922
|
}); };
|
|
923
|
+
export var deserializeAws_restJson1CreateExtendedSourceServerCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
924
|
+
var contents, data, _a, _b;
|
|
925
|
+
return __generator(this, function (_c) {
|
|
926
|
+
switch (_c.label) {
|
|
927
|
+
case 0:
|
|
928
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
929
|
+
return [2, deserializeAws_restJson1CreateExtendedSourceServerCommandError(output, context)];
|
|
930
|
+
}
|
|
931
|
+
contents = {
|
|
932
|
+
$metadata: deserializeMetadata(output),
|
|
933
|
+
sourceServer: undefined,
|
|
934
|
+
};
|
|
935
|
+
_a = __expectNonNull;
|
|
936
|
+
_b = __expectObject;
|
|
937
|
+
return [4, parseBody(output.body, context)];
|
|
938
|
+
case 1:
|
|
939
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
940
|
+
if (data.sourceServer !== undefined && data.sourceServer !== null) {
|
|
941
|
+
contents.sourceServer = deserializeAws_restJson1SourceServer(data.sourceServer, context);
|
|
942
|
+
}
|
|
943
|
+
return [2, Promise.resolve(contents)];
|
|
944
|
+
}
|
|
945
|
+
});
|
|
946
|
+
}); };
|
|
947
|
+
var deserializeAws_restJson1CreateExtendedSourceServerCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
948
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
949
|
+
var _c;
|
|
950
|
+
return __generator(this, function (_d) {
|
|
951
|
+
switch (_d.label) {
|
|
952
|
+
case 0:
|
|
953
|
+
_a = [__assign({}, output)];
|
|
954
|
+
_c = {};
|
|
955
|
+
return [4, parseBody(output.body, context)];
|
|
956
|
+
case 1:
|
|
957
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
958
|
+
errorCode = "UnknownError";
|
|
959
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
960
|
+
_b = errorCode;
|
|
961
|
+
switch (_b) {
|
|
962
|
+
case "AccessDeniedException": return [3, 2];
|
|
963
|
+
case "com.amazonaws.drs#AccessDeniedException": return [3, 2];
|
|
964
|
+
case "InternalServerException": return [3, 4];
|
|
965
|
+
case "com.amazonaws.drs#InternalServerException": return [3, 4];
|
|
966
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
967
|
+
case "com.amazonaws.drs#ResourceNotFoundException": return [3, 6];
|
|
968
|
+
case "ServiceQuotaExceededException": return [3, 8];
|
|
969
|
+
case "com.amazonaws.drs#ServiceQuotaExceededException": return [3, 8];
|
|
970
|
+
case "ThrottlingException": return [3, 10];
|
|
971
|
+
case "com.amazonaws.drs#ThrottlingException": return [3, 10];
|
|
972
|
+
case "UninitializedAccountException": return [3, 12];
|
|
973
|
+
case "com.amazonaws.drs#UninitializedAccountException": return [3, 12];
|
|
974
|
+
case "ValidationException": return [3, 14];
|
|
975
|
+
case "com.amazonaws.drs#ValidationException": return [3, 14];
|
|
976
|
+
}
|
|
977
|
+
return [3, 16];
|
|
978
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
979
|
+
case 3: throw _d.sent();
|
|
980
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
981
|
+
case 5: throw _d.sent();
|
|
982
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
983
|
+
case 7: throw _d.sent();
|
|
984
|
+
case 8: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
985
|
+
case 9: throw _d.sent();
|
|
986
|
+
case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
987
|
+
case 11: throw _d.sent();
|
|
988
|
+
case 12: return [4, deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)];
|
|
989
|
+
case 13: throw _d.sent();
|
|
990
|
+
case 14: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
991
|
+
case 15: throw _d.sent();
|
|
992
|
+
case 16:
|
|
993
|
+
parsedBody = parsedOutput.body;
|
|
994
|
+
response = new __BaseException({
|
|
995
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
996
|
+
$fault: "client",
|
|
997
|
+
$metadata: deserializeMetadata(output),
|
|
998
|
+
});
|
|
999
|
+
throw __decorateServiceException(response, parsedBody);
|
|
1000
|
+
}
|
|
1001
|
+
});
|
|
1002
|
+
}); };
|
|
849
1003
|
export var deserializeAws_restJson1CreateReplicationConfigurationTemplateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
850
1004
|
var contents, data, _a, _b;
|
|
851
1005
|
return __generator(this, function (_c) {
|
|
@@ -1773,6 +1927,7 @@ export var deserializeAws_restJson1DisconnectSourceServerCommand = function (out
|
|
|
1773
1927
|
recoveryInstanceId: undefined,
|
|
1774
1928
|
sourceProperties: undefined,
|
|
1775
1929
|
sourceServerID: undefined,
|
|
1930
|
+
stagingArea: undefined,
|
|
1776
1931
|
tags: undefined,
|
|
1777
1932
|
};
|
|
1778
1933
|
_a = __expectNonNull;
|
|
@@ -1801,6 +1956,9 @@ export var deserializeAws_restJson1DisconnectSourceServerCommand = function (out
|
|
|
1801
1956
|
if (data.sourceServerID !== undefined && data.sourceServerID !== null) {
|
|
1802
1957
|
contents.sourceServerID = __expectString(data.sourceServerID);
|
|
1803
1958
|
}
|
|
1959
|
+
if (data.stagingArea !== undefined && data.stagingArea !== null) {
|
|
1960
|
+
contents.stagingArea = deserializeAws_restJson1StagingArea(data.stagingArea, context);
|
|
1961
|
+
}
|
|
1804
1962
|
if (data.tags !== undefined && data.tags !== null) {
|
|
1805
1963
|
contents.tags = deserializeAws_restJson1TagsMap(data.tags, context);
|
|
1806
1964
|
}
|
|
@@ -2131,25 +2289,29 @@ var deserializeAws_restJson1GetReplicationConfigurationCommandError = function (
|
|
|
2131
2289
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2132
2290
|
_b = errorCode;
|
|
2133
2291
|
switch (_b) {
|
|
2134
|
-
case "
|
|
2135
|
-
case "com.amazonaws.drs#
|
|
2136
|
-
case "
|
|
2137
|
-
case "com.amazonaws.drs#
|
|
2138
|
-
case "
|
|
2139
|
-
case "com.amazonaws.drs#
|
|
2140
|
-
case "
|
|
2141
|
-
case "com.amazonaws.drs#
|
|
2292
|
+
case "AccessDeniedException": return [3, 2];
|
|
2293
|
+
case "com.amazonaws.drs#AccessDeniedException": return [3, 2];
|
|
2294
|
+
case "InternalServerException": return [3, 4];
|
|
2295
|
+
case "com.amazonaws.drs#InternalServerException": return [3, 4];
|
|
2296
|
+
case "ResourceNotFoundException": return [3, 6];
|
|
2297
|
+
case "com.amazonaws.drs#ResourceNotFoundException": return [3, 6];
|
|
2298
|
+
case "ThrottlingException": return [3, 8];
|
|
2299
|
+
case "com.amazonaws.drs#ThrottlingException": return [3, 8];
|
|
2300
|
+
case "UninitializedAccountException": return [3, 10];
|
|
2301
|
+
case "com.amazonaws.drs#UninitializedAccountException": return [3, 10];
|
|
2142
2302
|
}
|
|
2143
|
-
return [3,
|
|
2144
|
-
case 2: return [4,
|
|
2303
|
+
return [3, 12];
|
|
2304
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2145
2305
|
case 3: throw _d.sent();
|
|
2146
|
-
case 4: return [4,
|
|
2306
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2147
2307
|
case 5: throw _d.sent();
|
|
2148
|
-
case 6: return [4,
|
|
2308
|
+
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2149
2309
|
case 7: throw _d.sent();
|
|
2150
|
-
case 8: return [4,
|
|
2310
|
+
case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2151
2311
|
case 9: throw _d.sent();
|
|
2152
|
-
case 10:
|
|
2312
|
+
case 10: return [4, deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)];
|
|
2313
|
+
case 11: throw _d.sent();
|
|
2314
|
+
case 12:
|
|
2153
2315
|
parsedBody = parsedOutput.body;
|
|
2154
2316
|
response = new __BaseException({
|
|
2155
2317
|
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
@@ -2222,6 +2384,158 @@ var deserializeAws_restJson1InitializeServiceCommandError = function (output, co
|
|
|
2222
2384
|
}
|
|
2223
2385
|
});
|
|
2224
2386
|
}); };
|
|
2387
|
+
export var deserializeAws_restJson1ListExtensibleSourceServersCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2388
|
+
var contents, data, _a, _b;
|
|
2389
|
+
return __generator(this, function (_c) {
|
|
2390
|
+
switch (_c.label) {
|
|
2391
|
+
case 0:
|
|
2392
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2393
|
+
return [2, deserializeAws_restJson1ListExtensibleSourceServersCommandError(output, context)];
|
|
2394
|
+
}
|
|
2395
|
+
contents = {
|
|
2396
|
+
$metadata: deserializeMetadata(output),
|
|
2397
|
+
items: undefined,
|
|
2398
|
+
nextToken: undefined,
|
|
2399
|
+
};
|
|
2400
|
+
_a = __expectNonNull;
|
|
2401
|
+
_b = __expectObject;
|
|
2402
|
+
return [4, parseBody(output.body, context)];
|
|
2403
|
+
case 1:
|
|
2404
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2405
|
+
if (data.items !== undefined && data.items !== null) {
|
|
2406
|
+
contents.items = deserializeAws_restJson1StagingSourceServersList(data.items, context);
|
|
2407
|
+
}
|
|
2408
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
2409
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
2410
|
+
}
|
|
2411
|
+
return [2, Promise.resolve(contents)];
|
|
2412
|
+
}
|
|
2413
|
+
});
|
|
2414
|
+
}); };
|
|
2415
|
+
var deserializeAws_restJson1ListExtensibleSourceServersCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2416
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
2417
|
+
var _c;
|
|
2418
|
+
return __generator(this, function (_d) {
|
|
2419
|
+
switch (_d.label) {
|
|
2420
|
+
case 0:
|
|
2421
|
+
_a = [__assign({}, output)];
|
|
2422
|
+
_c = {};
|
|
2423
|
+
return [4, parseBody(output.body, context)];
|
|
2424
|
+
case 1:
|
|
2425
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2426
|
+
errorCode = "UnknownError";
|
|
2427
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2428
|
+
_b = errorCode;
|
|
2429
|
+
switch (_b) {
|
|
2430
|
+
case "AccessDeniedException": return [3, 2];
|
|
2431
|
+
case "com.amazonaws.drs#AccessDeniedException": return [3, 2];
|
|
2432
|
+
case "InternalServerException": return [3, 4];
|
|
2433
|
+
case "com.amazonaws.drs#InternalServerException": return [3, 4];
|
|
2434
|
+
case "ThrottlingException": return [3, 6];
|
|
2435
|
+
case "com.amazonaws.drs#ThrottlingException": return [3, 6];
|
|
2436
|
+
case "UninitializedAccountException": return [3, 8];
|
|
2437
|
+
case "com.amazonaws.drs#UninitializedAccountException": return [3, 8];
|
|
2438
|
+
case "ValidationException": return [3, 10];
|
|
2439
|
+
case "com.amazonaws.drs#ValidationException": return [3, 10];
|
|
2440
|
+
}
|
|
2441
|
+
return [3, 12];
|
|
2442
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2443
|
+
case 3: throw _d.sent();
|
|
2444
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2445
|
+
case 5: throw _d.sent();
|
|
2446
|
+
case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2447
|
+
case 7: throw _d.sent();
|
|
2448
|
+
case 8: return [4, deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)];
|
|
2449
|
+
case 9: throw _d.sent();
|
|
2450
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2451
|
+
case 11: throw _d.sent();
|
|
2452
|
+
case 12:
|
|
2453
|
+
parsedBody = parsedOutput.body;
|
|
2454
|
+
response = new __BaseException({
|
|
2455
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2456
|
+
$fault: "client",
|
|
2457
|
+
$metadata: deserializeMetadata(output),
|
|
2458
|
+
});
|
|
2459
|
+
throw __decorateServiceException(response, parsedBody);
|
|
2460
|
+
}
|
|
2461
|
+
});
|
|
2462
|
+
}); };
|
|
2463
|
+
export var deserializeAws_restJson1ListStagingAccountsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2464
|
+
var contents, data, _a, _b;
|
|
2465
|
+
return __generator(this, function (_c) {
|
|
2466
|
+
switch (_c.label) {
|
|
2467
|
+
case 0:
|
|
2468
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2469
|
+
return [2, deserializeAws_restJson1ListStagingAccountsCommandError(output, context)];
|
|
2470
|
+
}
|
|
2471
|
+
contents = {
|
|
2472
|
+
$metadata: deserializeMetadata(output),
|
|
2473
|
+
accounts: undefined,
|
|
2474
|
+
nextToken: undefined,
|
|
2475
|
+
};
|
|
2476
|
+
_a = __expectNonNull;
|
|
2477
|
+
_b = __expectObject;
|
|
2478
|
+
return [4, parseBody(output.body, context)];
|
|
2479
|
+
case 1:
|
|
2480
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2481
|
+
if (data.accounts !== undefined && data.accounts !== null) {
|
|
2482
|
+
contents.accounts = deserializeAws_restJson1Accounts(data.accounts, context);
|
|
2483
|
+
}
|
|
2484
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
2485
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
2486
|
+
}
|
|
2487
|
+
return [2, Promise.resolve(contents)];
|
|
2488
|
+
}
|
|
2489
|
+
});
|
|
2490
|
+
}); };
|
|
2491
|
+
var deserializeAws_restJson1ListStagingAccountsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2492
|
+
var parsedOutput, _a, response, errorCode, _b, parsedBody;
|
|
2493
|
+
var _c;
|
|
2494
|
+
return __generator(this, function (_d) {
|
|
2495
|
+
switch (_d.label) {
|
|
2496
|
+
case 0:
|
|
2497
|
+
_a = [__assign({}, output)];
|
|
2498
|
+
_c = {};
|
|
2499
|
+
return [4, parseBody(output.body, context)];
|
|
2500
|
+
case 1:
|
|
2501
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2502
|
+
errorCode = "UnknownError";
|
|
2503
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2504
|
+
_b = errorCode;
|
|
2505
|
+
switch (_b) {
|
|
2506
|
+
case "AccessDeniedException": return [3, 2];
|
|
2507
|
+
case "com.amazonaws.drs#AccessDeniedException": return [3, 2];
|
|
2508
|
+
case "InternalServerException": return [3, 4];
|
|
2509
|
+
case "com.amazonaws.drs#InternalServerException": return [3, 4];
|
|
2510
|
+
case "ThrottlingException": return [3, 6];
|
|
2511
|
+
case "com.amazonaws.drs#ThrottlingException": return [3, 6];
|
|
2512
|
+
case "UninitializedAccountException": return [3, 8];
|
|
2513
|
+
case "com.amazonaws.drs#UninitializedAccountException": return [3, 8];
|
|
2514
|
+
case "ValidationException": return [3, 10];
|
|
2515
|
+
case "com.amazonaws.drs#ValidationException": return [3, 10];
|
|
2516
|
+
}
|
|
2517
|
+
return [3, 12];
|
|
2518
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2519
|
+
case 3: throw _d.sent();
|
|
2520
|
+
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
2521
|
+
case 5: throw _d.sent();
|
|
2522
|
+
case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
2523
|
+
case 7: throw _d.sent();
|
|
2524
|
+
case 8: return [4, deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context)];
|
|
2525
|
+
case 9: throw _d.sent();
|
|
2526
|
+
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2527
|
+
case 11: throw _d.sent();
|
|
2528
|
+
case 12:
|
|
2529
|
+
parsedBody = parsedOutput.body;
|
|
2530
|
+
response = new __BaseException({
|
|
2531
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2532
|
+
$fault: "client",
|
|
2533
|
+
$metadata: deserializeMetadata(output),
|
|
2534
|
+
});
|
|
2535
|
+
throw __decorateServiceException(response, parsedBody);
|
|
2536
|
+
}
|
|
2537
|
+
});
|
|
2538
|
+
}); };
|
|
2225
2539
|
export var deserializeAws_restJson1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2226
2540
|
var contents, data, _a, _b;
|
|
2227
2541
|
return __generator(this, function (_c) {
|
|
@@ -2311,6 +2625,7 @@ export var deserializeAws_restJson1RetryDataReplicationCommand = function (outpu
|
|
|
2311
2625
|
recoveryInstanceId: undefined,
|
|
2312
2626
|
sourceProperties: undefined,
|
|
2313
2627
|
sourceServerID: undefined,
|
|
2628
|
+
stagingArea: undefined,
|
|
2314
2629
|
tags: undefined,
|
|
2315
2630
|
};
|
|
2316
2631
|
_a = __expectNonNull;
|
|
@@ -2339,6 +2654,9 @@ export var deserializeAws_restJson1RetryDataReplicationCommand = function (outpu
|
|
|
2339
2654
|
if (data.sourceServerID !== undefined && data.sourceServerID !== null) {
|
|
2340
2655
|
contents.sourceServerID = __expectString(data.sourceServerID);
|
|
2341
2656
|
}
|
|
2657
|
+
if (data.stagingArea !== undefined && data.stagingArea !== null) {
|
|
2658
|
+
contents.stagingArea = deserializeAws_restJson1StagingArea(data.stagingArea, context);
|
|
2659
|
+
}
|
|
2342
2660
|
if (data.tags !== undefined && data.tags !== null) {
|
|
2343
2661
|
contents.tags = deserializeAws_restJson1TagsMap(data.tags, context);
|
|
2344
2662
|
}
|
|
@@ -3410,6 +3728,16 @@ var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput
|
|
|
3410
3728
|
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
3411
3729
|
});
|
|
3412
3730
|
}); };
|
|
3731
|
+
var serializeAws_restJson1AccountIDs = function (input, context) {
|
|
3732
|
+
return input
|
|
3733
|
+
.filter(function (e) { return e != null; })
|
|
3734
|
+
.map(function (entry) {
|
|
3735
|
+
if (entry === null) {
|
|
3736
|
+
return null;
|
|
3737
|
+
}
|
|
3738
|
+
return entry;
|
|
3739
|
+
});
|
|
3740
|
+
};
|
|
3413
3741
|
var serializeAws_restJson1DescribeJobsRequestFilters = function (input, context) {
|
|
3414
3742
|
return __assign(__assign(__assign({}, (input.fromDate !== undefined && input.fromDate !== null && { fromDate: input.fromDate })), (input.jobIDs !== undefined &&
|
|
3415
3743
|
input.jobIDs !== null && {
|
|
@@ -3439,9 +3767,12 @@ var serializeAws_restJson1DescribeRecoverySnapshotsRequestFilters = function (in
|
|
|
3439
3767
|
return __assign(__assign({}, (input.fromDateTime !== undefined && input.fromDateTime !== null && { fromDateTime: input.fromDateTime })), (input.toDateTime !== undefined && input.toDateTime !== null && { toDateTime: input.toDateTime }));
|
|
3440
3768
|
};
|
|
3441
3769
|
var serializeAws_restJson1DescribeSourceServersRequestFilters = function (input, context) {
|
|
3442
|
-
return __assign(__assign({}, (input.hardwareId !== undefined && input.hardwareId !== null && { hardwareId: input.hardwareId })), (input.sourceServerIDs !== undefined &&
|
|
3770
|
+
return __assign(__assign(__assign({}, (input.hardwareId !== undefined && input.hardwareId !== null && { hardwareId: input.hardwareId })), (input.sourceServerIDs !== undefined &&
|
|
3443
3771
|
input.sourceServerIDs !== null && {
|
|
3444
3772
|
sourceServerIDs: serializeAws_restJson1DescribeSourceServersRequestFiltersIDs(input.sourceServerIDs, context),
|
|
3773
|
+
})), (input.stagingAccountIDs !== undefined &&
|
|
3774
|
+
input.stagingAccountIDs !== null && {
|
|
3775
|
+
stagingAccountIDs: serializeAws_restJson1AccountIDs(input.stagingAccountIDs, context),
|
|
3445
3776
|
}));
|
|
3446
3777
|
};
|
|
3447
3778
|
var serializeAws_restJson1DescribeSourceServersRequestFiltersIDs = function (input, context) {
|
|
@@ -3570,6 +3901,45 @@ var serializeAws_restJson1TagsMap = function (input, context) {
|
|
|
3570
3901
|
return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
|
|
3571
3902
|
}, {});
|
|
3572
3903
|
};
|
|
3904
|
+
var deserializeAws_restJson1Account = function (output, context) {
|
|
3905
|
+
return {
|
|
3906
|
+
accountID: __expectString(output.accountID),
|
|
3907
|
+
};
|
|
3908
|
+
};
|
|
3909
|
+
var deserializeAws_restJson1Accounts = function (output, context) {
|
|
3910
|
+
var retVal = (output || [])
|
|
3911
|
+
.filter(function (e) { return e != null; })
|
|
3912
|
+
.map(function (entry) {
|
|
3913
|
+
if (entry === null) {
|
|
3914
|
+
return null;
|
|
3915
|
+
}
|
|
3916
|
+
return deserializeAws_restJson1Account(entry, context);
|
|
3917
|
+
});
|
|
3918
|
+
return retVal;
|
|
3919
|
+
};
|
|
3920
|
+
var deserializeAws_restJson1ConversionMap = function (output, context) {
|
|
3921
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
3922
|
+
var _b;
|
|
3923
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
3924
|
+
if (value === null) {
|
|
3925
|
+
return acc;
|
|
3926
|
+
}
|
|
3927
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectString(value), _b));
|
|
3928
|
+
}, {});
|
|
3929
|
+
};
|
|
3930
|
+
var deserializeAws_restJson1ConversionProperties = function (output, context) {
|
|
3931
|
+
return {
|
|
3932
|
+
dataTimestamp: __expectString(output.dataTimestamp),
|
|
3933
|
+
forceUefi: __expectBoolean(output.forceUefi),
|
|
3934
|
+
rootVolumeName: __expectString(output.rootVolumeName),
|
|
3935
|
+
volumeToConversionMap: output.volumeToConversionMap !== undefined && output.volumeToConversionMap !== null
|
|
3936
|
+
? deserializeAws_restJson1VolumeToConversionMap(output.volumeToConversionMap, context)
|
|
3937
|
+
: undefined,
|
|
3938
|
+
volumeToVolumeSize: output.volumeToVolumeSize !== undefined && output.volumeToVolumeSize !== null
|
|
3939
|
+
? deserializeAws_restJson1VolumeToSizeMap(output.volumeToVolumeSize, context)
|
|
3940
|
+
: undefined,
|
|
3941
|
+
};
|
|
3942
|
+
};
|
|
3573
3943
|
var deserializeAws_restJson1CPU = function (output, context) {
|
|
3574
3944
|
return {
|
|
3575
3945
|
cores: __expectLong(output.cores),
|
|
@@ -3741,6 +4111,9 @@ var deserializeAws_restJson1JobLog = function (output, context) {
|
|
|
3741
4111
|
};
|
|
3742
4112
|
var deserializeAws_restJson1JobLogEventData = function (output, context) {
|
|
3743
4113
|
return {
|
|
4114
|
+
conversionProperties: output.conversionProperties !== undefined && output.conversionProperties !== null
|
|
4115
|
+
? deserializeAws_restJson1ConversionProperties(output.conversionProperties, context)
|
|
4116
|
+
: undefined,
|
|
3744
4117
|
conversionServerID: __expectString(output.conversionServerID),
|
|
3745
4118
|
rawError: __expectString(output.rawError),
|
|
3746
4119
|
sourceServerID: __expectString(output.sourceServerID),
|
|
@@ -4130,6 +4503,9 @@ var deserializeAws_restJson1SourceServer = function (output, context) {
|
|
|
4130
4503
|
? deserializeAws_restJson1SourceProperties(output.sourceProperties, context)
|
|
4131
4504
|
: undefined,
|
|
4132
4505
|
sourceServerID: __expectString(output.sourceServerID),
|
|
4506
|
+
stagingArea: output.stagingArea !== undefined && output.stagingArea !== null
|
|
4507
|
+
? deserializeAws_restJson1StagingArea(output.stagingArea, context)
|
|
4508
|
+
: undefined,
|
|
4133
4509
|
tags: output.tags !== undefined && output.tags !== null
|
|
4134
4510
|
? deserializeAws_restJson1TagsMap(output.tags, context)
|
|
4135
4511
|
: undefined,
|
|
@@ -4146,6 +4522,34 @@ var deserializeAws_restJson1SourceServersList = function (output, context) {
|
|
|
4146
4522
|
});
|
|
4147
4523
|
return retVal;
|
|
4148
4524
|
};
|
|
4525
|
+
var deserializeAws_restJson1StagingArea = function (output, context) {
|
|
4526
|
+
return {
|
|
4527
|
+
errorMessage: __expectString(output.errorMessage),
|
|
4528
|
+
stagingAccountID: __expectString(output.stagingAccountID),
|
|
4529
|
+
stagingSourceServerArn: __expectString(output.stagingSourceServerArn),
|
|
4530
|
+
status: __expectString(output.status),
|
|
4531
|
+
};
|
|
4532
|
+
};
|
|
4533
|
+
var deserializeAws_restJson1StagingSourceServer = function (output, context) {
|
|
4534
|
+
return {
|
|
4535
|
+
arn: __expectString(output.arn),
|
|
4536
|
+
hostname: __expectString(output.hostname),
|
|
4537
|
+
tags: output.tags !== undefined && output.tags !== null
|
|
4538
|
+
? deserializeAws_restJson1TagsMap(output.tags, context)
|
|
4539
|
+
: undefined,
|
|
4540
|
+
};
|
|
4541
|
+
};
|
|
4542
|
+
var deserializeAws_restJson1StagingSourceServersList = function (output, context) {
|
|
4543
|
+
var retVal = (output || [])
|
|
4544
|
+
.filter(function (e) { return e != null; })
|
|
4545
|
+
.map(function (entry) {
|
|
4546
|
+
if (entry === null) {
|
|
4547
|
+
return null;
|
|
4548
|
+
}
|
|
4549
|
+
return deserializeAws_restJson1StagingSourceServer(entry, context);
|
|
4550
|
+
});
|
|
4551
|
+
return retVal;
|
|
4552
|
+
};
|
|
4149
4553
|
var deserializeAws_restJson1TagsMap = function (output, context) {
|
|
4150
4554
|
return Object.entries(output).reduce(function (acc, _a) {
|
|
4151
4555
|
var _b;
|
|
@@ -4173,6 +4577,26 @@ var deserializeAws_restJson1ValidationExceptionFieldList = function (output, con
|
|
|
4173
4577
|
});
|
|
4174
4578
|
return retVal;
|
|
4175
4579
|
};
|
|
4580
|
+
var deserializeAws_restJson1VolumeToConversionMap = function (output, context) {
|
|
4581
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
4582
|
+
var _b;
|
|
4583
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
4584
|
+
if (value === null) {
|
|
4585
|
+
return acc;
|
|
4586
|
+
}
|
|
4587
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = deserializeAws_restJson1ConversionMap(value, context), _b));
|
|
4588
|
+
}, {});
|
|
4589
|
+
};
|
|
4590
|
+
var deserializeAws_restJson1VolumeToSizeMap = function (output, context) {
|
|
4591
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
4592
|
+
var _b;
|
|
4593
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
4594
|
+
if (value === null) {
|
|
4595
|
+
return acc;
|
|
4596
|
+
}
|
|
4597
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = __expectLong(value), _b));
|
|
4598
|
+
}, {});
|
|
4599
|
+
};
|
|
4176
4600
|
var deserializeMetadata = function (output) {
|
|
4177
4601
|
var _a;
|
|
4178
4602
|
return ({
|