@aws-sdk/client-drs 3.99.0 → 3.105.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/README.md +7 -7
- package/dist-cjs/Drs.js +45 -0
- package/dist-cjs/DrsClient.js +2 -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/DrsClient.js +2 -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 +723 -537
- 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 +437 -338
- 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 +4 -3
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.paginateListStagingAccounts = void 0;
|
|
4
|
+
const ListStagingAccountsCommand_1 = require("../commands/ListStagingAccountsCommand");
|
|
5
|
+
const Drs_1 = require("../Drs");
|
|
6
|
+
const DrsClient_1 = require("../DrsClient");
|
|
7
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
8
|
+
return await client.send(new ListStagingAccountsCommand_1.ListStagingAccountsCommand(input), ...args);
|
|
9
|
+
};
|
|
10
|
+
const makePagedRequest = async (client, input, ...args) => {
|
|
11
|
+
return await client.listStagingAccounts(input, ...args);
|
|
12
|
+
};
|
|
13
|
+
async function* paginateListStagingAccounts(config, input, ...additionalArguments) {
|
|
14
|
+
let token = config.startingToken || undefined;
|
|
15
|
+
let hasNext = true;
|
|
16
|
+
let page;
|
|
17
|
+
while (hasNext) {
|
|
18
|
+
input.nextToken = token;
|
|
19
|
+
input["maxResults"] = config.pageSize;
|
|
20
|
+
if (config.client instanceof Drs_1.Drs) {
|
|
21
|
+
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
22
|
+
}
|
|
23
|
+
else if (config.client instanceof DrsClient_1.DrsClient) {
|
|
24
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
throw new Error("Invalid client, expected Drs | DrsClient");
|
|
28
|
+
}
|
|
29
|
+
yield page;
|
|
30
|
+
const prevToken = token;
|
|
31
|
+
token = page.nextToken;
|
|
32
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
33
|
+
}
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
exports.paginateListStagingAccounts = paginateListStagingAccounts;
|
|
@@ -8,3 +8,5 @@ tslib_1.__exportStar(require("./DescribeRecoverySnapshotsPaginator"), exports);
|
|
|
8
8
|
tslib_1.__exportStar(require("./DescribeReplicationConfigurationTemplatesPaginator"), exports);
|
|
9
9
|
tslib_1.__exportStar(require("./DescribeSourceServersPaginator"), exports);
|
|
10
10
|
tslib_1.__exportStar(require("./Interfaces"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./ListExtensibleSourceServersPaginator"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./ListStagingAccountsPaginator"), exports);
|
|
@@ -1,11 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.deserializeAws_restJson1UpdateReplicationConfigurationTemplateCommand = exports.deserializeAws_restJson1UpdateReplicationConfigurationCommand = exports.deserializeAws_restJson1UpdateLaunchConfigurationCommand = exports.deserializeAws_restJson1UpdateFailbackReplicationConfigurationCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TerminateRecoveryInstancesCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StopFailbackCommand = void 0;
|
|
3
|
+
exports.deserializeAws_restJson1InitializeServiceCommand = exports.deserializeAws_restJson1GetReplicationConfigurationCommand = exports.deserializeAws_restJson1GetLaunchConfigurationCommand = exports.deserializeAws_restJson1GetFailbackReplicationConfigurationCommand = exports.deserializeAws_restJson1DisconnectSourceServerCommand = exports.deserializeAws_restJson1DisconnectRecoveryInstanceCommand = exports.deserializeAws_restJson1DescribeSourceServersCommand = exports.deserializeAws_restJson1DescribeReplicationConfigurationTemplatesCommand = exports.deserializeAws_restJson1DescribeRecoverySnapshotsCommand = exports.deserializeAws_restJson1DescribeRecoveryInstancesCommand = exports.deserializeAws_restJson1DescribeJobsCommand = exports.deserializeAws_restJson1DescribeJobLogItemsCommand = exports.deserializeAws_restJson1DeleteSourceServerCommand = exports.deserializeAws_restJson1DeleteReplicationConfigurationTemplateCommand = exports.deserializeAws_restJson1DeleteRecoveryInstanceCommand = exports.deserializeAws_restJson1DeleteJobCommand = exports.deserializeAws_restJson1CreateReplicationConfigurationTemplateCommand = exports.deserializeAws_restJson1CreateExtendedSourceServerCommand = exports.serializeAws_restJson1UpdateReplicationConfigurationTemplateCommand = exports.serializeAws_restJson1UpdateReplicationConfigurationCommand = exports.serializeAws_restJson1UpdateLaunchConfigurationCommand = exports.serializeAws_restJson1UpdateFailbackReplicationConfigurationCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TerminateRecoveryInstancesCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StopFailbackCommand = exports.serializeAws_restJson1StartRecoveryCommand = exports.serializeAws_restJson1StartFailbackLaunchCommand = exports.serializeAws_restJson1RetryDataReplicationCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListStagingAccountsCommand = exports.serializeAws_restJson1ListExtensibleSourceServersCommand = exports.serializeAws_restJson1InitializeServiceCommand = exports.serializeAws_restJson1GetReplicationConfigurationCommand = exports.serializeAws_restJson1GetLaunchConfigurationCommand = exports.serializeAws_restJson1GetFailbackReplicationConfigurationCommand = exports.serializeAws_restJson1DisconnectSourceServerCommand = exports.serializeAws_restJson1DisconnectRecoveryInstanceCommand = exports.serializeAws_restJson1DescribeSourceServersCommand = exports.serializeAws_restJson1DescribeReplicationConfigurationTemplatesCommand = exports.serializeAws_restJson1DescribeRecoverySnapshotsCommand = exports.serializeAws_restJson1DescribeRecoveryInstancesCommand = exports.serializeAws_restJson1DescribeJobsCommand = exports.serializeAws_restJson1DescribeJobLogItemsCommand = exports.serializeAws_restJson1DeleteSourceServerCommand = exports.serializeAws_restJson1DeleteReplicationConfigurationTemplateCommand = exports.serializeAws_restJson1DeleteRecoveryInstanceCommand = exports.serializeAws_restJson1DeleteJobCommand = exports.serializeAws_restJson1CreateReplicationConfigurationTemplateCommand = exports.serializeAws_restJson1CreateExtendedSourceServerCommand = void 0;
|
|
4
|
+
exports.deserializeAws_restJson1UpdateReplicationConfigurationTemplateCommand = exports.deserializeAws_restJson1UpdateReplicationConfigurationCommand = exports.deserializeAws_restJson1UpdateLaunchConfigurationCommand = exports.deserializeAws_restJson1UpdateFailbackReplicationConfigurationCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TerminateRecoveryInstancesCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StopFailbackCommand = exports.deserializeAws_restJson1StartRecoveryCommand = exports.deserializeAws_restJson1StartFailbackLaunchCommand = exports.deserializeAws_restJson1RetryDataReplicationCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListStagingAccountsCommand = exports.deserializeAws_restJson1ListExtensibleSourceServersCommand = void 0;
|
|
5
5
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
7
|
const DrsServiceException_1 = require("../models/DrsServiceException");
|
|
8
8
|
const models_0_1 = require("../models/models_0");
|
|
9
|
+
const serializeAws_restJson1CreateExtendedSourceServerCommand = async (input, context) => {
|
|
10
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
11
|
+
const headers = {
|
|
12
|
+
"content-type": "application/json",
|
|
13
|
+
};
|
|
14
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/CreateExtendedSourceServer";
|
|
15
|
+
let body;
|
|
16
|
+
body = JSON.stringify({
|
|
17
|
+
...(input.sourceServerArn !== undefined &&
|
|
18
|
+
input.sourceServerArn !== null && { sourceServerArn: input.sourceServerArn }),
|
|
19
|
+
...(input.tags !== undefined &&
|
|
20
|
+
input.tags !== null && { tags: serializeAws_restJson1TagsMap(input.tags, context) }),
|
|
21
|
+
});
|
|
22
|
+
return new protocol_http_1.HttpRequest({
|
|
23
|
+
protocol,
|
|
24
|
+
hostname,
|
|
25
|
+
port,
|
|
26
|
+
method: "POST",
|
|
27
|
+
headers,
|
|
28
|
+
path: resolvedPath,
|
|
29
|
+
body,
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
exports.serializeAws_restJson1CreateExtendedSourceServerCommand = serializeAws_restJson1CreateExtendedSourceServerCommand;
|
|
9
33
|
const serializeAws_restJson1CreateReplicationConfigurationTemplateCommand = async (input, context) => {
|
|
10
34
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
11
35
|
const headers = {
|
|
@@ -436,6 +460,51 @@ const serializeAws_restJson1InitializeServiceCommand = async (input, context) =>
|
|
|
436
460
|
});
|
|
437
461
|
};
|
|
438
462
|
exports.serializeAws_restJson1InitializeServiceCommand = serializeAws_restJson1InitializeServiceCommand;
|
|
463
|
+
const serializeAws_restJson1ListExtensibleSourceServersCommand = async (input, context) => {
|
|
464
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
465
|
+
const headers = {
|
|
466
|
+
"content-type": "application/json",
|
|
467
|
+
};
|
|
468
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/ListExtensibleSourceServers";
|
|
469
|
+
let body;
|
|
470
|
+
body = JSON.stringify({
|
|
471
|
+
...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
|
|
472
|
+
...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
|
|
473
|
+
...(input.stagingAccountID !== undefined &&
|
|
474
|
+
input.stagingAccountID !== null && { stagingAccountID: input.stagingAccountID }),
|
|
475
|
+
});
|
|
476
|
+
return new protocol_http_1.HttpRequest({
|
|
477
|
+
protocol,
|
|
478
|
+
hostname,
|
|
479
|
+
port,
|
|
480
|
+
method: "POST",
|
|
481
|
+
headers,
|
|
482
|
+
path: resolvedPath,
|
|
483
|
+
body,
|
|
484
|
+
});
|
|
485
|
+
};
|
|
486
|
+
exports.serializeAws_restJson1ListExtensibleSourceServersCommand = serializeAws_restJson1ListExtensibleSourceServersCommand;
|
|
487
|
+
const serializeAws_restJson1ListStagingAccountsCommand = async (input, context) => {
|
|
488
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
489
|
+
const headers = {};
|
|
490
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/ListStagingAccounts";
|
|
491
|
+
const query = {
|
|
492
|
+
...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
|
|
493
|
+
...(input.nextToken !== undefined && { nextToken: input.nextToken }),
|
|
494
|
+
};
|
|
495
|
+
let body;
|
|
496
|
+
return new protocol_http_1.HttpRequest({
|
|
497
|
+
protocol,
|
|
498
|
+
hostname,
|
|
499
|
+
port,
|
|
500
|
+
method: "GET",
|
|
501
|
+
headers,
|
|
502
|
+
path: resolvedPath,
|
|
503
|
+
query,
|
|
504
|
+
body,
|
|
505
|
+
});
|
|
506
|
+
};
|
|
507
|
+
exports.serializeAws_restJson1ListStagingAccountsCommand = serializeAws_restJson1ListStagingAccountsCommand;
|
|
439
508
|
const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
|
|
440
509
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
441
510
|
const headers = {};
|
|
@@ -826,6 +895,61 @@ const serializeAws_restJson1UpdateReplicationConfigurationTemplateCommand = asyn
|
|
|
826
895
|
});
|
|
827
896
|
};
|
|
828
897
|
exports.serializeAws_restJson1UpdateReplicationConfigurationTemplateCommand = serializeAws_restJson1UpdateReplicationConfigurationTemplateCommand;
|
|
898
|
+
const deserializeAws_restJson1CreateExtendedSourceServerCommand = async (output, context) => {
|
|
899
|
+
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
900
|
+
return deserializeAws_restJson1CreateExtendedSourceServerCommandError(output, context);
|
|
901
|
+
}
|
|
902
|
+
const contents = {
|
|
903
|
+
$metadata: deserializeMetadata(output),
|
|
904
|
+
sourceServer: undefined,
|
|
905
|
+
};
|
|
906
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
907
|
+
if (data.sourceServer !== undefined && data.sourceServer !== null) {
|
|
908
|
+
contents.sourceServer = deserializeAws_restJson1SourceServer(data.sourceServer, context);
|
|
909
|
+
}
|
|
910
|
+
return Promise.resolve(contents);
|
|
911
|
+
};
|
|
912
|
+
exports.deserializeAws_restJson1CreateExtendedSourceServerCommand = deserializeAws_restJson1CreateExtendedSourceServerCommand;
|
|
913
|
+
const deserializeAws_restJson1CreateExtendedSourceServerCommandError = async (output, context) => {
|
|
914
|
+
const parsedOutput = {
|
|
915
|
+
...output,
|
|
916
|
+
body: await parseBody(output.body, context),
|
|
917
|
+
};
|
|
918
|
+
let response;
|
|
919
|
+
let errorCode = "UnknownError";
|
|
920
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
921
|
+
switch (errorCode) {
|
|
922
|
+
case "AccessDeniedException":
|
|
923
|
+
case "com.amazonaws.drs#AccessDeniedException":
|
|
924
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
925
|
+
case "InternalServerException":
|
|
926
|
+
case "com.amazonaws.drs#InternalServerException":
|
|
927
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
928
|
+
case "ResourceNotFoundException":
|
|
929
|
+
case "com.amazonaws.drs#ResourceNotFoundException":
|
|
930
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
931
|
+
case "ServiceQuotaExceededException":
|
|
932
|
+
case "com.amazonaws.drs#ServiceQuotaExceededException":
|
|
933
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
934
|
+
case "ThrottlingException":
|
|
935
|
+
case "com.amazonaws.drs#ThrottlingException":
|
|
936
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
937
|
+
case "UninitializedAccountException":
|
|
938
|
+
case "com.amazonaws.drs#UninitializedAccountException":
|
|
939
|
+
throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
|
|
940
|
+
case "ValidationException":
|
|
941
|
+
case "com.amazonaws.drs#ValidationException":
|
|
942
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
943
|
+
default:
|
|
944
|
+
const parsedBody = parsedOutput.body;
|
|
945
|
+
response = new DrsServiceException_1.DrsServiceException({
|
|
946
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
947
|
+
$fault: "client",
|
|
948
|
+
$metadata: deserializeMetadata(output),
|
|
949
|
+
});
|
|
950
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
951
|
+
}
|
|
952
|
+
};
|
|
829
953
|
const deserializeAws_restJson1CreateReplicationConfigurationTemplateCommand = async (output, context) => {
|
|
830
954
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
831
955
|
return deserializeAws_restJson1CreateReplicationConfigurationTemplateCommandError(output, context);
|
|
@@ -1485,6 +1609,7 @@ const deserializeAws_restJson1DisconnectSourceServerCommand = async (output, con
|
|
|
1485
1609
|
recoveryInstanceId: undefined,
|
|
1486
1610
|
sourceProperties: undefined,
|
|
1487
1611
|
sourceServerID: undefined,
|
|
1612
|
+
stagingArea: undefined,
|
|
1488
1613
|
tags: undefined,
|
|
1489
1614
|
};
|
|
1490
1615
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
@@ -1509,6 +1634,9 @@ const deserializeAws_restJson1DisconnectSourceServerCommand = async (output, con
|
|
|
1509
1634
|
if (data.sourceServerID !== undefined && data.sourceServerID !== null) {
|
|
1510
1635
|
contents.sourceServerID = (0, smithy_client_1.expectString)(data.sourceServerID);
|
|
1511
1636
|
}
|
|
1637
|
+
if (data.stagingArea !== undefined && data.stagingArea !== null) {
|
|
1638
|
+
contents.stagingArea = deserializeAws_restJson1StagingArea(data.stagingArea, context);
|
|
1639
|
+
}
|
|
1512
1640
|
if (data.tags !== undefined && data.tags !== null) {
|
|
1513
1641
|
contents.tags = deserializeAws_restJson1TagsMap(data.tags, context);
|
|
1514
1642
|
}
|
|
@@ -1765,6 +1893,9 @@ const deserializeAws_restJson1GetReplicationConfigurationCommandError = async (o
|
|
|
1765
1893
|
let errorCode = "UnknownError";
|
|
1766
1894
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1767
1895
|
switch (errorCode) {
|
|
1896
|
+
case "AccessDeniedException":
|
|
1897
|
+
case "com.amazonaws.drs#AccessDeniedException":
|
|
1898
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1768
1899
|
case "InternalServerException":
|
|
1769
1900
|
case "com.amazonaws.drs#InternalServerException":
|
|
1770
1901
|
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
@@ -1829,6 +1960,112 @@ const deserializeAws_restJson1InitializeServiceCommandError = async (output, con
|
|
|
1829
1960
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1830
1961
|
}
|
|
1831
1962
|
};
|
|
1963
|
+
const deserializeAws_restJson1ListExtensibleSourceServersCommand = async (output, context) => {
|
|
1964
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1965
|
+
return deserializeAws_restJson1ListExtensibleSourceServersCommandError(output, context);
|
|
1966
|
+
}
|
|
1967
|
+
const contents = {
|
|
1968
|
+
$metadata: deserializeMetadata(output),
|
|
1969
|
+
items: undefined,
|
|
1970
|
+
nextToken: undefined,
|
|
1971
|
+
};
|
|
1972
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1973
|
+
if (data.items !== undefined && data.items !== null) {
|
|
1974
|
+
contents.items = deserializeAws_restJson1StagingSourceServersList(data.items, context);
|
|
1975
|
+
}
|
|
1976
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
1977
|
+
contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
1978
|
+
}
|
|
1979
|
+
return Promise.resolve(contents);
|
|
1980
|
+
};
|
|
1981
|
+
exports.deserializeAws_restJson1ListExtensibleSourceServersCommand = deserializeAws_restJson1ListExtensibleSourceServersCommand;
|
|
1982
|
+
const deserializeAws_restJson1ListExtensibleSourceServersCommandError = async (output, context) => {
|
|
1983
|
+
const parsedOutput = {
|
|
1984
|
+
...output,
|
|
1985
|
+
body: await parseBody(output.body, context),
|
|
1986
|
+
};
|
|
1987
|
+
let response;
|
|
1988
|
+
let errorCode = "UnknownError";
|
|
1989
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1990
|
+
switch (errorCode) {
|
|
1991
|
+
case "AccessDeniedException":
|
|
1992
|
+
case "com.amazonaws.drs#AccessDeniedException":
|
|
1993
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1994
|
+
case "InternalServerException":
|
|
1995
|
+
case "com.amazonaws.drs#InternalServerException":
|
|
1996
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1997
|
+
case "ThrottlingException":
|
|
1998
|
+
case "com.amazonaws.drs#ThrottlingException":
|
|
1999
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2000
|
+
case "UninitializedAccountException":
|
|
2001
|
+
case "com.amazonaws.drs#UninitializedAccountException":
|
|
2002
|
+
throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
|
|
2003
|
+
case "ValidationException":
|
|
2004
|
+
case "com.amazonaws.drs#ValidationException":
|
|
2005
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2006
|
+
default:
|
|
2007
|
+
const parsedBody = parsedOutput.body;
|
|
2008
|
+
response = new DrsServiceException_1.DrsServiceException({
|
|
2009
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2010
|
+
$fault: "client",
|
|
2011
|
+
$metadata: deserializeMetadata(output),
|
|
2012
|
+
});
|
|
2013
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2014
|
+
}
|
|
2015
|
+
};
|
|
2016
|
+
const deserializeAws_restJson1ListStagingAccountsCommand = async (output, context) => {
|
|
2017
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2018
|
+
return deserializeAws_restJson1ListStagingAccountsCommandError(output, context);
|
|
2019
|
+
}
|
|
2020
|
+
const contents = {
|
|
2021
|
+
$metadata: deserializeMetadata(output),
|
|
2022
|
+
accounts: undefined,
|
|
2023
|
+
nextToken: undefined,
|
|
2024
|
+
};
|
|
2025
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
2026
|
+
if (data.accounts !== undefined && data.accounts !== null) {
|
|
2027
|
+
contents.accounts = deserializeAws_restJson1Accounts(data.accounts, context);
|
|
2028
|
+
}
|
|
2029
|
+
if (data.nextToken !== undefined && data.nextToken !== null) {
|
|
2030
|
+
contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
|
|
2031
|
+
}
|
|
2032
|
+
return Promise.resolve(contents);
|
|
2033
|
+
};
|
|
2034
|
+
exports.deserializeAws_restJson1ListStagingAccountsCommand = deserializeAws_restJson1ListStagingAccountsCommand;
|
|
2035
|
+
const deserializeAws_restJson1ListStagingAccountsCommandError = async (output, context) => {
|
|
2036
|
+
const parsedOutput = {
|
|
2037
|
+
...output,
|
|
2038
|
+
body: await parseBody(output.body, context),
|
|
2039
|
+
};
|
|
2040
|
+
let response;
|
|
2041
|
+
let errorCode = "UnknownError";
|
|
2042
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2043
|
+
switch (errorCode) {
|
|
2044
|
+
case "AccessDeniedException":
|
|
2045
|
+
case "com.amazonaws.drs#AccessDeniedException":
|
|
2046
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
2047
|
+
case "InternalServerException":
|
|
2048
|
+
case "com.amazonaws.drs#InternalServerException":
|
|
2049
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
2050
|
+
case "ThrottlingException":
|
|
2051
|
+
case "com.amazonaws.drs#ThrottlingException":
|
|
2052
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2053
|
+
case "UninitializedAccountException":
|
|
2054
|
+
case "com.amazonaws.drs#UninitializedAccountException":
|
|
2055
|
+
throw await deserializeAws_restJson1UninitializedAccountExceptionResponse(parsedOutput, context);
|
|
2056
|
+
case "ValidationException":
|
|
2057
|
+
case "com.amazonaws.drs#ValidationException":
|
|
2058
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2059
|
+
default:
|
|
2060
|
+
const parsedBody = parsedOutput.body;
|
|
2061
|
+
response = new DrsServiceException_1.DrsServiceException({
|
|
2062
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2063
|
+
$fault: "client",
|
|
2064
|
+
$metadata: deserializeMetadata(output),
|
|
2065
|
+
});
|
|
2066
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
2067
|
+
}
|
|
2068
|
+
};
|
|
1832
2069
|
const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
1833
2070
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1834
2071
|
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
@@ -1891,6 +2128,7 @@ const deserializeAws_restJson1RetryDataReplicationCommand = async (output, conte
|
|
|
1891
2128
|
recoveryInstanceId: undefined,
|
|
1892
2129
|
sourceProperties: undefined,
|
|
1893
2130
|
sourceServerID: undefined,
|
|
2131
|
+
stagingArea: undefined,
|
|
1894
2132
|
tags: undefined,
|
|
1895
2133
|
};
|
|
1896
2134
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
@@ -1915,6 +2153,9 @@ const deserializeAws_restJson1RetryDataReplicationCommand = async (output, conte
|
|
|
1915
2153
|
if (data.sourceServerID !== undefined && data.sourceServerID !== null) {
|
|
1916
2154
|
contents.sourceServerID = (0, smithy_client_1.expectString)(data.sourceServerID);
|
|
1917
2155
|
}
|
|
2156
|
+
if (data.stagingArea !== undefined && data.stagingArea !== null) {
|
|
2157
|
+
contents.stagingArea = deserializeAws_restJson1StagingArea(data.stagingArea, context);
|
|
2158
|
+
}
|
|
1918
2159
|
if (data.tags !== undefined && data.tags !== null) {
|
|
1919
2160
|
contents.tags = deserializeAws_restJson1TagsMap(data.tags, context);
|
|
1920
2161
|
}
|
|
@@ -2745,6 +2986,16 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
|
|
|
2745
2986
|
});
|
|
2746
2987
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
2747
2988
|
};
|
|
2989
|
+
const serializeAws_restJson1AccountIDs = (input, context) => {
|
|
2990
|
+
return input
|
|
2991
|
+
.filter((e) => e != null)
|
|
2992
|
+
.map((entry) => {
|
|
2993
|
+
if (entry === null) {
|
|
2994
|
+
return null;
|
|
2995
|
+
}
|
|
2996
|
+
return entry;
|
|
2997
|
+
});
|
|
2998
|
+
};
|
|
2748
2999
|
const serializeAws_restJson1DescribeJobsRequestFilters = (input, context) => {
|
|
2749
3000
|
return {
|
|
2750
3001
|
...(input.fromDate !== undefined && input.fromDate !== null && { fromDate: input.fromDate }),
|
|
@@ -2790,6 +3041,10 @@ const serializeAws_restJson1DescribeSourceServersRequestFilters = (input, contex
|
|
|
2790
3041
|
input.sourceServerIDs !== null && {
|
|
2791
3042
|
sourceServerIDs: serializeAws_restJson1DescribeSourceServersRequestFiltersIDs(input.sourceServerIDs, context),
|
|
2792
3043
|
}),
|
|
3044
|
+
...(input.stagingAccountIDs !== undefined &&
|
|
3045
|
+
input.stagingAccountIDs !== null && {
|
|
3046
|
+
stagingAccountIDs: serializeAws_restJson1AccountIDs(input.stagingAccountIDs, context),
|
|
3047
|
+
}),
|
|
2793
3048
|
};
|
|
2794
3049
|
};
|
|
2795
3050
|
const serializeAws_restJson1DescribeSourceServersRequestFiltersIDs = (input, context) => {
|
|
@@ -2936,6 +3191,46 @@ const serializeAws_restJson1TagsMap = (input, context) => {
|
|
|
2936
3191
|
};
|
|
2937
3192
|
}, {});
|
|
2938
3193
|
};
|
|
3194
|
+
const deserializeAws_restJson1Account = (output, context) => {
|
|
3195
|
+
return {
|
|
3196
|
+
accountID: (0, smithy_client_1.expectString)(output.accountID),
|
|
3197
|
+
};
|
|
3198
|
+
};
|
|
3199
|
+
const deserializeAws_restJson1Accounts = (output, context) => {
|
|
3200
|
+
const retVal = (output || [])
|
|
3201
|
+
.filter((e) => e != null)
|
|
3202
|
+
.map((entry) => {
|
|
3203
|
+
if (entry === null) {
|
|
3204
|
+
return null;
|
|
3205
|
+
}
|
|
3206
|
+
return deserializeAws_restJson1Account(entry, context);
|
|
3207
|
+
});
|
|
3208
|
+
return retVal;
|
|
3209
|
+
};
|
|
3210
|
+
const deserializeAws_restJson1ConversionMap = (output, context) => {
|
|
3211
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
3212
|
+
if (value === null) {
|
|
3213
|
+
return acc;
|
|
3214
|
+
}
|
|
3215
|
+
return {
|
|
3216
|
+
...acc,
|
|
3217
|
+
[key]: (0, smithy_client_1.expectString)(value),
|
|
3218
|
+
};
|
|
3219
|
+
}, {});
|
|
3220
|
+
};
|
|
3221
|
+
const deserializeAws_restJson1ConversionProperties = (output, context) => {
|
|
3222
|
+
return {
|
|
3223
|
+
dataTimestamp: (0, smithy_client_1.expectString)(output.dataTimestamp),
|
|
3224
|
+
forceUefi: (0, smithy_client_1.expectBoolean)(output.forceUefi),
|
|
3225
|
+
rootVolumeName: (0, smithy_client_1.expectString)(output.rootVolumeName),
|
|
3226
|
+
volumeToConversionMap: output.volumeToConversionMap !== undefined && output.volumeToConversionMap !== null
|
|
3227
|
+
? deserializeAws_restJson1VolumeToConversionMap(output.volumeToConversionMap, context)
|
|
3228
|
+
: undefined,
|
|
3229
|
+
volumeToVolumeSize: output.volumeToVolumeSize !== undefined && output.volumeToVolumeSize !== null
|
|
3230
|
+
? deserializeAws_restJson1VolumeToSizeMap(output.volumeToVolumeSize, context)
|
|
3231
|
+
: undefined,
|
|
3232
|
+
};
|
|
3233
|
+
};
|
|
2939
3234
|
const deserializeAws_restJson1CPU = (output, context) => {
|
|
2940
3235
|
return {
|
|
2941
3236
|
cores: (0, smithy_client_1.expectLong)(output.cores),
|
|
@@ -3107,6 +3402,9 @@ const deserializeAws_restJson1JobLog = (output, context) => {
|
|
|
3107
3402
|
};
|
|
3108
3403
|
const deserializeAws_restJson1JobLogEventData = (output, context) => {
|
|
3109
3404
|
return {
|
|
3405
|
+
conversionProperties: output.conversionProperties !== undefined && output.conversionProperties !== null
|
|
3406
|
+
? deserializeAws_restJson1ConversionProperties(output.conversionProperties, context)
|
|
3407
|
+
: undefined,
|
|
3110
3408
|
conversionServerID: (0, smithy_client_1.expectString)(output.conversionServerID),
|
|
3111
3409
|
rawError: (0, smithy_client_1.expectString)(output.rawError),
|
|
3112
3410
|
sourceServerID: (0, smithy_client_1.expectString)(output.sourceServerID),
|
|
@@ -3496,6 +3794,9 @@ const deserializeAws_restJson1SourceServer = (output, context) => {
|
|
|
3496
3794
|
? deserializeAws_restJson1SourceProperties(output.sourceProperties, context)
|
|
3497
3795
|
: undefined,
|
|
3498
3796
|
sourceServerID: (0, smithy_client_1.expectString)(output.sourceServerID),
|
|
3797
|
+
stagingArea: output.stagingArea !== undefined && output.stagingArea !== null
|
|
3798
|
+
? deserializeAws_restJson1StagingArea(output.stagingArea, context)
|
|
3799
|
+
: undefined,
|
|
3499
3800
|
tags: output.tags !== undefined && output.tags !== null
|
|
3500
3801
|
? deserializeAws_restJson1TagsMap(output.tags, context)
|
|
3501
3802
|
: undefined,
|
|
@@ -3512,6 +3813,34 @@ const deserializeAws_restJson1SourceServersList = (output, context) => {
|
|
|
3512
3813
|
});
|
|
3513
3814
|
return retVal;
|
|
3514
3815
|
};
|
|
3816
|
+
const deserializeAws_restJson1StagingArea = (output, context) => {
|
|
3817
|
+
return {
|
|
3818
|
+
errorMessage: (0, smithy_client_1.expectString)(output.errorMessage),
|
|
3819
|
+
stagingAccountID: (0, smithy_client_1.expectString)(output.stagingAccountID),
|
|
3820
|
+
stagingSourceServerArn: (0, smithy_client_1.expectString)(output.stagingSourceServerArn),
|
|
3821
|
+
status: (0, smithy_client_1.expectString)(output.status),
|
|
3822
|
+
};
|
|
3823
|
+
};
|
|
3824
|
+
const deserializeAws_restJson1StagingSourceServer = (output, context) => {
|
|
3825
|
+
return {
|
|
3826
|
+
arn: (0, smithy_client_1.expectString)(output.arn),
|
|
3827
|
+
hostname: (0, smithy_client_1.expectString)(output.hostname),
|
|
3828
|
+
tags: output.tags !== undefined && output.tags !== null
|
|
3829
|
+
? deserializeAws_restJson1TagsMap(output.tags, context)
|
|
3830
|
+
: undefined,
|
|
3831
|
+
};
|
|
3832
|
+
};
|
|
3833
|
+
const deserializeAws_restJson1StagingSourceServersList = (output, context) => {
|
|
3834
|
+
const retVal = (output || [])
|
|
3835
|
+
.filter((e) => e != null)
|
|
3836
|
+
.map((entry) => {
|
|
3837
|
+
if (entry === null) {
|
|
3838
|
+
return null;
|
|
3839
|
+
}
|
|
3840
|
+
return deserializeAws_restJson1StagingSourceServer(entry, context);
|
|
3841
|
+
});
|
|
3842
|
+
return retVal;
|
|
3843
|
+
};
|
|
3515
3844
|
const deserializeAws_restJson1TagsMap = (output, context) => {
|
|
3516
3845
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
3517
3846
|
if (value === null) {
|
|
@@ -3540,6 +3869,28 @@ const deserializeAws_restJson1ValidationExceptionFieldList = (output, context) =
|
|
|
3540
3869
|
});
|
|
3541
3870
|
return retVal;
|
|
3542
3871
|
};
|
|
3872
|
+
const deserializeAws_restJson1VolumeToConversionMap = (output, context) => {
|
|
3873
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
3874
|
+
if (value === null) {
|
|
3875
|
+
return acc;
|
|
3876
|
+
}
|
|
3877
|
+
return {
|
|
3878
|
+
...acc,
|
|
3879
|
+
[key]: deserializeAws_restJson1ConversionMap(value, context),
|
|
3880
|
+
};
|
|
3881
|
+
}, {});
|
|
3882
|
+
};
|
|
3883
|
+
const deserializeAws_restJson1VolumeToSizeMap = (output, context) => {
|
|
3884
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
3885
|
+
if (value === null) {
|
|
3886
|
+
return acc;
|
|
3887
|
+
}
|
|
3888
|
+
return {
|
|
3889
|
+
...acc,
|
|
3890
|
+
[key]: (0, smithy_client_1.expectLong)(value),
|
|
3891
|
+
};
|
|
3892
|
+
}, {});
|
|
3893
|
+
};
|
|
3543
3894
|
const deserializeMetadata = (output) => {
|
|
3544
3895
|
var _a;
|
|
3545
3896
|
return ({
|
package/dist-es/Drs.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __extends } from "tslib";
|
|
2
|
+
import { CreateExtendedSourceServerCommand, } from "./commands/CreateExtendedSourceServerCommand";
|
|
2
3
|
import { CreateReplicationConfigurationTemplateCommand, } from "./commands/CreateReplicationConfigurationTemplateCommand";
|
|
3
4
|
import { DeleteJobCommand } from "./commands/DeleteJobCommand";
|
|
4
5
|
import { DeleteRecoveryInstanceCommand, } from "./commands/DeleteRecoveryInstanceCommand";
|
|
@@ -16,6 +17,8 @@ import { GetFailbackReplicationConfigurationCommand, } from "./commands/GetFailb
|
|
|
16
17
|
import { GetLaunchConfigurationCommand, } from "./commands/GetLaunchConfigurationCommand";
|
|
17
18
|
import { GetReplicationConfigurationCommand, } from "./commands/GetReplicationConfigurationCommand";
|
|
18
19
|
import { InitializeServiceCommand, } from "./commands/InitializeServiceCommand";
|
|
20
|
+
import { ListExtensibleSourceServersCommand, } from "./commands/ListExtensibleSourceServersCommand";
|
|
21
|
+
import { ListStagingAccountsCommand, } from "./commands/ListStagingAccountsCommand";
|
|
19
22
|
import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
|
|
20
23
|
import { RetryDataReplicationCommand, } from "./commands/RetryDataReplicationCommand";
|
|
21
24
|
import { StartFailbackLaunchCommand, } from "./commands/StartFailbackLaunchCommand";
|
|
@@ -34,6 +37,20 @@ var Drs = (function (_super) {
|
|
|
34
37
|
function Drs() {
|
|
35
38
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
36
39
|
}
|
|
40
|
+
Drs.prototype.createExtendedSourceServer = function (args, optionsOrCb, cb) {
|
|
41
|
+
var command = new CreateExtendedSourceServerCommand(args);
|
|
42
|
+
if (typeof optionsOrCb === "function") {
|
|
43
|
+
this.send(command, optionsOrCb);
|
|
44
|
+
}
|
|
45
|
+
else if (typeof cb === "function") {
|
|
46
|
+
if (typeof optionsOrCb !== "object")
|
|
47
|
+
throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
|
|
48
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
return this.send(command, optionsOrCb);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
37
54
|
Drs.prototype.createReplicationConfigurationTemplate = function (args, optionsOrCb, cb) {
|
|
38
55
|
var command = new CreateReplicationConfigurationTemplateCommand(args);
|
|
39
56
|
if (typeof optionsOrCb === "function") {
|
|
@@ -272,6 +289,34 @@ var Drs = (function (_super) {
|
|
|
272
289
|
return this.send(command, optionsOrCb);
|
|
273
290
|
}
|
|
274
291
|
};
|
|
292
|
+
Drs.prototype.listExtensibleSourceServers = function (args, optionsOrCb, cb) {
|
|
293
|
+
var command = new ListExtensibleSourceServersCommand(args);
|
|
294
|
+
if (typeof optionsOrCb === "function") {
|
|
295
|
+
this.send(command, optionsOrCb);
|
|
296
|
+
}
|
|
297
|
+
else if (typeof cb === "function") {
|
|
298
|
+
if (typeof optionsOrCb !== "object")
|
|
299
|
+
throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
|
|
300
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
301
|
+
}
|
|
302
|
+
else {
|
|
303
|
+
return this.send(command, optionsOrCb);
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
Drs.prototype.listStagingAccounts = function (args, optionsOrCb, cb) {
|
|
307
|
+
var command = new ListStagingAccountsCommand(args);
|
|
308
|
+
if (typeof optionsOrCb === "function") {
|
|
309
|
+
this.send(command, optionsOrCb);
|
|
310
|
+
}
|
|
311
|
+
else if (typeof cb === "function") {
|
|
312
|
+
if (typeof optionsOrCb !== "object")
|
|
313
|
+
throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
|
|
314
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
315
|
+
}
|
|
316
|
+
else {
|
|
317
|
+
return this.send(command, optionsOrCb);
|
|
318
|
+
}
|
|
319
|
+
};
|
|
275
320
|
Drs.prototype.listTagsForResource = function (args, optionsOrCb, cb) {
|
|
276
321
|
var command = new ListTagsForResourceCommand(args);
|
|
277
322
|
if (typeof optionsOrCb === "function") {
|
package/dist-es/DrsClient.js
CHANGED
|
@@ -3,6 +3,7 @@ import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-re
|
|
|
3
3
|
import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
|
|
4
4
|
import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
|
|
5
5
|
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
|
|
6
|
+
import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
|
|
6
7
|
import { getRetryPlugin, resolveRetryConfig } from "@aws-sdk/middleware-retry";
|
|
7
8
|
import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-signing";
|
|
8
9
|
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
|
@@ -25,6 +26,7 @@ var DrsClient = (function (_super) {
|
|
|
25
26
|
_this.middlewareStack.use(getContentLengthPlugin(_this.config));
|
|
26
27
|
_this.middlewareStack.use(getHostHeaderPlugin(_this.config));
|
|
27
28
|
_this.middlewareStack.use(getLoggerPlugin(_this.config));
|
|
29
|
+
_this.middlewareStack.use(getRecursionDetectionPlugin(_this.config));
|
|
28
30
|
_this.middlewareStack.use(getAwsAuthPlugin(_this.config));
|
|
29
31
|
_this.middlewareStack.use(getUserAgentPlugin(_this.config));
|
|
30
32
|
return _this;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { CreateExtendedSourceServerRequest, CreateExtendedSourceServerResponse } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_restJson1CreateExtendedSourceServerCommand, serializeAws_restJson1CreateExtendedSourceServerCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
var CreateExtendedSourceServerCommand = (function (_super) {
|
|
7
|
+
__extends(CreateExtendedSourceServerCommand, _super);
|
|
8
|
+
function CreateExtendedSourceServerCommand(input) {
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
10
|
+
_this.input = input;
|
|
11
|
+
return _this;
|
|
12
|
+
}
|
|
13
|
+
CreateExtendedSourceServerCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
+
var stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
var logger = configuration.logger;
|
|
17
|
+
var clientName = "DrsClient";
|
|
18
|
+
var commandName = "CreateExtendedSourceServerCommand";
|
|
19
|
+
var handlerExecutionContext = {
|
|
20
|
+
logger: logger,
|
|
21
|
+
clientName: clientName,
|
|
22
|
+
commandName: commandName,
|
|
23
|
+
inputFilterSensitiveLog: CreateExtendedSourceServerRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: CreateExtendedSourceServerResponse.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
var requestHandler = configuration.requestHandler;
|
|
27
|
+
return stack.resolve(function (request) {
|
|
28
|
+
return requestHandler.handle(request.request, options || {});
|
|
29
|
+
}, handlerExecutionContext);
|
|
30
|
+
};
|
|
31
|
+
CreateExtendedSourceServerCommand.prototype.serialize = function (input, context) {
|
|
32
|
+
return serializeAws_restJson1CreateExtendedSourceServerCommand(input, context);
|
|
33
|
+
};
|
|
34
|
+
CreateExtendedSourceServerCommand.prototype.deserialize = function (output, context) {
|
|
35
|
+
return deserializeAws_restJson1CreateExtendedSourceServerCommand(output, context);
|
|
36
|
+
};
|
|
37
|
+
return CreateExtendedSourceServerCommand;
|
|
38
|
+
}($Command));
|
|
39
|
+
export { CreateExtendedSourceServerCommand };
|