@aws-sdk/client-mgn 3.421.0 → 3.425.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.
Files changed (59) hide show
  1. package/README.md +40 -0
  2. package/dist-cjs/Mgn.js +10 -0
  3. package/dist-cjs/commands/CreateConnectorCommand.js +52 -0
  4. package/dist-cjs/commands/DeleteConnectorCommand.js +51 -0
  5. package/dist-cjs/commands/ListConnectorsCommand.js +52 -0
  6. package/dist-cjs/commands/UpdateConnectorCommand.js +52 -0
  7. package/dist-cjs/commands/UpdateSourceServerCommand.js +52 -0
  8. package/dist-cjs/commands/index.js +5 -0
  9. package/dist-cjs/models/models_0.js +17 -2
  10. package/dist-cjs/pagination/ListConnectorsPaginator.js +29 -0
  11. package/dist-cjs/pagination/index.js +1 -0
  12. package/dist-cjs/protocols/Aws_restJson1.js +341 -3
  13. package/dist-es/Mgn.js +10 -0
  14. package/dist-es/commands/CreateConnectorCommand.js +48 -0
  15. package/dist-es/commands/DeleteConnectorCommand.js +47 -0
  16. package/dist-es/commands/ListConnectorsCommand.js +48 -0
  17. package/dist-es/commands/UpdateConnectorCommand.js +48 -0
  18. package/dist-es/commands/UpdateSourceServerCommand.js +48 -0
  19. package/dist-es/commands/index.js +5 -0
  20. package/dist-es/models/models_0.js +12 -0
  21. package/dist-es/pagination/ListConnectorsPaginator.js +25 -0
  22. package/dist-es/pagination/index.js +1 -0
  23. package/dist-es/protocols/Aws_restJson1.js +328 -0
  24. package/dist-types/Mgn.d.ts +35 -0
  25. package/dist-types/MgnClient.d.ts +9 -2
  26. package/dist-types/commands/ChangeServerLifeCycleStateCommand.d.ts +4 -0
  27. package/dist-types/commands/CreateConnectorCommand.d.ts +101 -0
  28. package/dist-types/commands/DeleteConnectorCommand.d.ts +80 -0
  29. package/dist-types/commands/DescribeSourceServersCommand.d.ts +4 -0
  30. package/dist-types/commands/DisconnectFromServiceCommand.d.ts +4 -0
  31. package/dist-types/commands/FinalizeCutoverCommand.d.ts +4 -0
  32. package/dist-types/commands/ListConnectorsCommand.d.ts +102 -0
  33. package/dist-types/commands/MarkAsArchivedCommand.d.ts +4 -0
  34. package/dist-types/commands/PauseReplicationCommand.d.ts +4 -0
  35. package/dist-types/commands/ResumeReplicationCommand.d.ts +4 -0
  36. package/dist-types/commands/RetryDataReplicationCommand.d.ts +4 -0
  37. package/dist-types/commands/StartReplicationCommand.d.ts +4 -0
  38. package/dist-types/commands/StopReplicationCommand.d.ts +4 -0
  39. package/dist-types/commands/UpdateConnectorCommand.d.ts +101 -0
  40. package/dist-types/commands/UpdateSourceServerCommand.d.ts +202 -0
  41. package/dist-types/commands/UpdateSourceServerReplicationTypeCommand.d.ts +4 -0
  42. package/dist-types/commands/index.d.ts +5 -0
  43. package/dist-types/models/models_0.d.ts +243 -28
  44. package/dist-types/pagination/ListConnectorsPaginator.d.ts +7 -0
  45. package/dist-types/pagination/index.d.ts +1 -0
  46. package/dist-types/protocols/Aws_restJson1.d.ts +45 -0
  47. package/dist-types/ts3.4/Mgn.d.ts +85 -0
  48. package/dist-types/ts3.4/MgnClient.d.ts +30 -0
  49. package/dist-types/ts3.4/commands/CreateConnectorCommand.d.ts +35 -0
  50. package/dist-types/ts3.4/commands/DeleteConnectorCommand.d.ts +33 -0
  51. package/dist-types/ts3.4/commands/ListConnectorsCommand.d.ts +38 -0
  52. package/dist-types/ts3.4/commands/UpdateConnectorCommand.d.ts +35 -0
  53. package/dist-types/ts3.4/commands/UpdateSourceServerCommand.d.ts +36 -0
  54. package/dist-types/ts3.4/commands/index.d.ts +5 -0
  55. package/dist-types/ts3.4/models/models_0.d.ts +70 -13
  56. package/dist-types/ts3.4/pagination/ListConnectorsPaginator.d.ts +11 -0
  57. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  58. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +60 -0
  59. package/package.json +31 -31
@@ -0,0 +1,48 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { ListConnectorsResponseFilterSensitiveLog, } from "../models/models_0";
6
+ import { de_ListConnectorsCommand, se_ListConnectorsCommand } from "../protocols/Aws_restJson1";
7
+ export { $Command };
8
+ export class ListConnectorsCommand extends $Command {
9
+ static getEndpointParameterInstructions() {
10
+ return {
11
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
12
+ Endpoint: { type: "builtInParams", name: "endpoint" },
13
+ Region: { type: "builtInParams", name: "region" },
14
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
15
+ };
16
+ }
17
+ constructor(input) {
18
+ super();
19
+ this.input = input;
20
+ }
21
+ resolveMiddleware(clientStack, configuration, options) {
22
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
23
+ this.middlewareStack.use(getEndpointPlugin(configuration, ListConnectorsCommand.getEndpointParameterInstructions()));
24
+ const stack = clientStack.concat(this.middlewareStack);
25
+ const { logger } = configuration;
26
+ const clientName = "MgnClient";
27
+ const commandName = "ListConnectorsCommand";
28
+ const handlerExecutionContext = {
29
+ logger,
30
+ clientName,
31
+ commandName,
32
+ inputFilterSensitiveLog: (_) => _,
33
+ outputFilterSensitiveLog: ListConnectorsResponseFilterSensitiveLog,
34
+ [SMITHY_CONTEXT_KEY]: {
35
+ service: "ApplicationMigrationService",
36
+ operation: "ListConnectors",
37
+ },
38
+ };
39
+ const { requestHandler } = configuration;
40
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
41
+ }
42
+ serialize(input, context) {
43
+ return se_ListConnectorsCommand(input, context);
44
+ }
45
+ deserialize(output, context) {
46
+ return de_ListConnectorsCommand(output, context);
47
+ }
48
+ }
@@ -0,0 +1,48 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { ConnectorFilterSensitiveLog } from "../models/models_0";
6
+ import { de_UpdateConnectorCommand, se_UpdateConnectorCommand } from "../protocols/Aws_restJson1";
7
+ export { $Command };
8
+ export class UpdateConnectorCommand extends $Command {
9
+ static getEndpointParameterInstructions() {
10
+ return {
11
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
12
+ Endpoint: { type: "builtInParams", name: "endpoint" },
13
+ Region: { type: "builtInParams", name: "region" },
14
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
15
+ };
16
+ }
17
+ constructor(input) {
18
+ super();
19
+ this.input = input;
20
+ }
21
+ resolveMiddleware(clientStack, configuration, options) {
22
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
23
+ this.middlewareStack.use(getEndpointPlugin(configuration, UpdateConnectorCommand.getEndpointParameterInstructions()));
24
+ const stack = clientStack.concat(this.middlewareStack);
25
+ const { logger } = configuration;
26
+ const clientName = "MgnClient";
27
+ const commandName = "UpdateConnectorCommand";
28
+ const handlerExecutionContext = {
29
+ logger,
30
+ clientName,
31
+ commandName,
32
+ inputFilterSensitiveLog: (_) => _,
33
+ outputFilterSensitiveLog: ConnectorFilterSensitiveLog,
34
+ [SMITHY_CONTEXT_KEY]: {
35
+ service: "ApplicationMigrationService",
36
+ operation: "UpdateConnector",
37
+ },
38
+ };
39
+ const { requestHandler } = configuration;
40
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
41
+ }
42
+ serialize(input, context) {
43
+ return se_UpdateConnectorCommand(input, context);
44
+ }
45
+ deserialize(output, context) {
46
+ return de_UpdateConnectorCommand(output, context);
47
+ }
48
+ }
@@ -0,0 +1,48 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { SourceServerFilterSensitiveLog } from "../models/models_0";
6
+ import { de_UpdateSourceServerCommand, se_UpdateSourceServerCommand } from "../protocols/Aws_restJson1";
7
+ export { $Command };
8
+ export class UpdateSourceServerCommand extends $Command {
9
+ static getEndpointParameterInstructions() {
10
+ return {
11
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
12
+ Endpoint: { type: "builtInParams", name: "endpoint" },
13
+ Region: { type: "builtInParams", name: "region" },
14
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
15
+ };
16
+ }
17
+ constructor(input) {
18
+ super();
19
+ this.input = input;
20
+ }
21
+ resolveMiddleware(clientStack, configuration, options) {
22
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
23
+ this.middlewareStack.use(getEndpointPlugin(configuration, UpdateSourceServerCommand.getEndpointParameterInstructions()));
24
+ const stack = clientStack.concat(this.middlewareStack);
25
+ const { logger } = configuration;
26
+ const clientName = "MgnClient";
27
+ const commandName = "UpdateSourceServerCommand";
28
+ const handlerExecutionContext = {
29
+ logger,
30
+ clientName,
31
+ commandName,
32
+ inputFilterSensitiveLog: (_) => _,
33
+ outputFilterSensitiveLog: SourceServerFilterSensitiveLog,
34
+ [SMITHY_CONTEXT_KEY]: {
35
+ service: "ApplicationMigrationService",
36
+ operation: "UpdateSourceServer",
37
+ },
38
+ };
39
+ const { requestHandler } = configuration;
40
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
41
+ }
42
+ serialize(input, context) {
43
+ return se_UpdateSourceServerCommand(input, context);
44
+ }
45
+ deserialize(output, context) {
46
+ return de_UpdateSourceServerCommand(output, context);
47
+ }
48
+ }
@@ -4,10 +4,12 @@ export * from "./AssociateApplicationsCommand";
4
4
  export * from "./AssociateSourceServersCommand";
5
5
  export * from "./ChangeServerLifeCycleStateCommand";
6
6
  export * from "./CreateApplicationCommand";
7
+ export * from "./CreateConnectorCommand";
7
8
  export * from "./CreateLaunchConfigurationTemplateCommand";
8
9
  export * from "./CreateReplicationConfigurationTemplateCommand";
9
10
  export * from "./CreateWaveCommand";
10
11
  export * from "./DeleteApplicationCommand";
12
+ export * from "./DeleteConnectorCommand";
11
13
  export * from "./DeleteJobCommand";
12
14
  export * from "./DeleteLaunchConfigurationTemplateCommand";
13
15
  export * from "./DeleteReplicationConfigurationTemplateCommand";
@@ -28,6 +30,7 @@ export * from "./GetLaunchConfigurationCommand";
28
30
  export * from "./GetReplicationConfigurationCommand";
29
31
  export * from "./InitializeServiceCommand";
30
32
  export * from "./ListApplicationsCommand";
33
+ export * from "./ListConnectorsCommand";
31
34
  export * from "./ListExportErrorsCommand";
32
35
  export * from "./ListExportsCommand";
33
36
  export * from "./ListImportErrorsCommand";
@@ -57,9 +60,11 @@ export * from "./UnarchiveApplicationCommand";
57
60
  export * from "./UnarchiveWaveCommand";
58
61
  export * from "./UntagResourceCommand";
59
62
  export * from "./UpdateApplicationCommand";
63
+ export * from "./UpdateConnectorCommand";
60
64
  export * from "./UpdateLaunchConfigurationCommand";
61
65
  export * from "./UpdateLaunchConfigurationTemplateCommand";
62
66
  export * from "./UpdateReplicationConfigurationCommand";
63
67
  export * from "./UpdateReplicationConfigurationTemplateCommand";
68
+ export * from "./UpdateSourceServerCommand";
64
69
  export * from "./UpdateSourceServerReplicationTypeCommand";
65
70
  export * from "./UpdateWaveCommand";
@@ -372,6 +372,18 @@ export const ListApplicationsResponseFilterSensitiveLog = (obj) => ({
372
372
  ...obj,
373
373
  ...(obj.items && { items: obj.items.map((item) => ApplicationFilterSensitiveLog(item)) }),
374
374
  });
375
+ export const ConnectorFilterSensitiveLog = (obj) => ({
376
+ ...obj,
377
+ ...(obj.tags && { tags: SENSITIVE_STRING }),
378
+ });
379
+ export const CreateConnectorRequestFilterSensitiveLog = (obj) => ({
380
+ ...obj,
381
+ ...(obj.tags && { tags: SENSITIVE_STRING }),
382
+ });
383
+ export const ListConnectorsResponseFilterSensitiveLog = (obj) => ({
384
+ ...obj,
385
+ ...(obj.items && { items: obj.items.map((item) => ConnectorFilterSensitiveLog(item)) }),
386
+ });
375
387
  export const JobFilterSensitiveLog = (obj) => ({
376
388
  ...obj,
377
389
  ...(obj.tags && { tags: SENSITIVE_STRING }),
@@ -0,0 +1,25 @@
1
+ import { ListConnectorsCommand, } from "../commands/ListConnectorsCommand";
2
+ import { MgnClient } from "../MgnClient";
3
+ const makePagedClientRequest = async (client, input, ...args) => {
4
+ return await client.send(new ListConnectorsCommand(input), ...args);
5
+ };
6
+ export async function* paginateListConnectors(config, input, ...additionalArguments) {
7
+ let token = config.startingToken || undefined;
8
+ let hasNext = true;
9
+ let page;
10
+ while (hasNext) {
11
+ input.nextToken = token;
12
+ input["maxResults"] = config.pageSize;
13
+ if (config.client instanceof MgnClient) {
14
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
+ }
16
+ else {
17
+ throw new Error("Invalid client, expected Mgn | MgnClient");
18
+ }
19
+ yield page;
20
+ const prevToken = token;
21
+ token = page.nextToken;
22
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
+ }
24
+ return undefined;
25
+ }
@@ -6,6 +6,7 @@ export * from "./DescribeSourceServersPaginator";
6
6
  export * from "./DescribeVcenterClientsPaginator";
7
7
  export * from "./Interfaces";
8
8
  export * from "./ListApplicationsPaginator";
9
+ export * from "./ListConnectorsPaginator";
9
10
  export * from "./ListExportErrorsPaginator";
10
11
  export * from "./ListExportsPaginator";
11
12
  export * from "./ListImportErrorsPaginator";