@aws-sdk/client-migration-hub 3.35.0 → 3.38.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 +47 -0
- package/dist-cjs/MigrationHub.js +0 -9
- package/dist-cjs/MigrationHubClient.js +0 -14
- package/dist-cjs/commands/AssociateCreatedArtifactCommand.js +0 -42
- package/dist-cjs/commands/AssociateDiscoveredResourceCommand.js +0 -26
- package/dist-cjs/commands/CreateProgressUpdateStreamCommand.js +0 -29
- package/dist-cjs/commands/DeleteProgressUpdateStreamCommand.js +0 -55
- package/dist-cjs/commands/DescribeApplicationStateCommand.js +0 -25
- package/dist-cjs/commands/DescribeMigrationTaskCommand.js +0 -25
- package/dist-cjs/commands/DisassociateCreatedArtifactCommand.js +0 -41
- package/dist-cjs/commands/DisassociateDiscoveredResourceCommand.js +0 -26
- package/dist-cjs/commands/ImportMigrationTaskCommand.js +0 -28
- package/dist-cjs/commands/ListApplicationStatesCommand.js +0 -27
- package/dist-cjs/commands/ListCreatedArtifactsCommand.js +0 -39
- package/dist-cjs/commands/ListDiscoveredResourcesCommand.js +0 -25
- package/dist-cjs/commands/ListMigrationTasksCommand.js +0 -38
- package/dist-cjs/commands/ListProgressUpdateStreamsCommand.js +0 -25
- package/dist-cjs/commands/NotifyApplicationStateCommand.js +0 -28
- package/dist-cjs/commands/NotifyMigrationTaskStateCommand.js +0 -42
- package/dist-cjs/commands/PutResourceAttributesCommand.js +0 -50
- package/dist-cjs/commands/index.js +20 -0
- package/dist-cjs/endpoints.js +1 -2
- package/dist-cjs/index.js +4 -26
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -157
- package/dist-cjs/pagination/Interfaces.js +0 -1
- package/dist-cjs/pagination/ListApplicationStatesPaginator.js +0 -11
- package/dist-cjs/pagination/ListCreatedArtifactsPaginator.js +0 -11
- package/dist-cjs/pagination/ListDiscoveredResourcesPaginator.js +0 -11
- package/dist-cjs/pagination/ListMigrationTasksPaginator.js +0 -11
- package/dist-cjs/pagination/ListProgressUpdateStreamsPaginator.js +0 -11
- package/dist-cjs/pagination/index.js +9 -0
- package/dist-cjs/protocols/Aws_json1_1.js +0 -6
- package/dist-cjs/runtimeConfig.browser.js +1 -6
- package/dist-cjs/runtimeConfig.js +2 -7
- package/dist-cjs/runtimeConfig.native.js +0 -4
- package/dist-cjs/runtimeConfig.shared.js +0 -4
- package/dist-es/MigrationHub.js +0 -1
- package/dist-es/MigrationHubClient.js +0 -1
- package/dist-es/commands/AssociateCreatedArtifactCommand.js +0 -1
- package/dist-es/commands/AssociateDiscoveredResourceCommand.js +0 -1
- package/dist-es/commands/CreateProgressUpdateStreamCommand.js +0 -1
- package/dist-es/commands/DeleteProgressUpdateStreamCommand.js +0 -1
- package/dist-es/commands/DescribeApplicationStateCommand.js +0 -1
- package/dist-es/commands/DescribeMigrationTaskCommand.js +0 -1
- package/dist-es/commands/DisassociateCreatedArtifactCommand.js +0 -1
- package/dist-es/commands/DisassociateDiscoveredResourceCommand.js +0 -1
- package/dist-es/commands/ImportMigrationTaskCommand.js +0 -1
- package/dist-es/commands/ListApplicationStatesCommand.js +0 -1
- package/dist-es/commands/ListCreatedArtifactsCommand.js +0 -1
- package/dist-es/commands/ListDiscoveredResourcesCommand.js +0 -1
- package/dist-es/commands/ListMigrationTasksCommand.js +0 -1
- package/dist-es/commands/ListProgressUpdateStreamsCommand.js +0 -1
- package/dist-es/commands/NotifyApplicationStateCommand.js +0 -1
- package/dist-es/commands/NotifyMigrationTaskStateCommand.js +0 -1
- package/dist-es/commands/PutResourceAttributesCommand.js +0 -1
- package/dist-es/commands/index.js +17 -0
- package/dist-es/endpoints.js +1 -2
- package/dist-es/index.js +4 -26
- package/dist-es/models/index.js +0 -1
- package/dist-es/models/models_0.js +0 -1
- package/dist-es/pagination/Interfaces.js +0 -1
- package/dist-es/pagination/ListApplicationStatesPaginator.js +0 -1
- package/dist-es/pagination/ListCreatedArtifactsPaginator.js +0 -1
- package/dist-es/pagination/ListDiscoveredResourcesPaginator.js +0 -1
- package/dist-es/pagination/ListMigrationTasksPaginator.js +0 -1
- package/dist-es/pagination/ListProgressUpdateStreamsPaginator.js +0 -1
- package/dist-es/pagination/index.js +6 -0
- package/dist-es/protocols/Aws_json1_1.js +0 -1
- package/dist-es/runtimeConfig.browser.js +1 -2
- package/dist-es/runtimeConfig.js +2 -3
- package/dist-es/runtimeConfig.native.js +0 -1
- package/dist-es/runtimeConfig.shared.js +0 -1
- package/dist-types/commands/index.d.ts +17 -0
- package/dist-types/index.d.ts +4 -25
- package/dist-types/pagination/index.d.ts +6 -0
- package/dist-types/ts3.4/MigrationHub.d.ts +18 -205
- package/dist-types/ts3.4/MigrationHubClient.d.ts +24 -94
- package/dist-types/ts3.4/commands/AssociateCreatedArtifactCommand.d.ts +2 -37
- package/dist-types/ts3.4/commands/AssociateDiscoveredResourceCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/CreateProgressUpdateStreamCommand.d.ts +2 -24
- package/dist-types/ts3.4/commands/DeleteProgressUpdateStreamCommand.d.ts +2 -50
- package/dist-types/ts3.4/commands/DescribeApplicationStateCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/DescribeMigrationTaskCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/DisassociateCreatedArtifactCommand.d.ts +2 -36
- package/dist-types/ts3.4/commands/DisassociateDiscoveredResourceCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/ImportMigrationTaskCommand.d.ts +2 -23
- package/dist-types/ts3.4/commands/ListApplicationStatesCommand.d.ts +2 -22
- package/dist-types/ts3.4/commands/ListCreatedArtifactsCommand.d.ts +2 -34
- package/dist-types/ts3.4/commands/ListDiscoveredResourcesCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListMigrationTasksCommand.d.ts +2 -33
- package/dist-types/ts3.4/commands/ListProgressUpdateStreamsCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/NotifyApplicationStateCommand.d.ts +2 -23
- package/dist-types/ts3.4/commands/NotifyMigrationTaskStateCommand.d.ts +2 -37
- package/dist-types/ts3.4/commands/PutResourceAttributesCommand.d.ts +2 -45
- package/dist-types/ts3.4/commands/index.d.ts +17 -0
- package/dist-types/ts3.4/index.d.ts +4 -25
- package/dist-types/ts3.4/models/models_0.d.ts +165 -648
- package/dist-types/ts3.4/pagination/index.d.ts +6 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/package.json +33 -30
- package/dist-cjs/MigrationHub.js.map +0 -1
- package/dist-cjs/MigrationHubClient.js.map +0 -1
- package/dist-cjs/commands/AssociateCreatedArtifactCommand.js.map +0 -1
- package/dist-cjs/commands/AssociateDiscoveredResourceCommand.js.map +0 -1
- package/dist-cjs/commands/CreateProgressUpdateStreamCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteProgressUpdateStreamCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeApplicationStateCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeMigrationTaskCommand.js.map +0 -1
- package/dist-cjs/commands/DisassociateCreatedArtifactCommand.js.map +0 -1
- package/dist-cjs/commands/DisassociateDiscoveredResourceCommand.js.map +0 -1
- package/dist-cjs/commands/ImportMigrationTaskCommand.js.map +0 -1
- package/dist-cjs/commands/ListApplicationStatesCommand.js.map +0 -1
- package/dist-cjs/commands/ListCreatedArtifactsCommand.js.map +0 -1
- package/dist-cjs/commands/ListDiscoveredResourcesCommand.js.map +0 -1
- package/dist-cjs/commands/ListMigrationTasksCommand.js.map +0 -1
- package/dist-cjs/commands/ListProgressUpdateStreamsCommand.js.map +0 -1
- package/dist-cjs/commands/NotifyApplicationStateCommand.js.map +0 -1
- package/dist-cjs/commands/NotifyMigrationTaskStateCommand.js.map +0 -1
- package/dist-cjs/commands/PutResourceAttributesCommand.js.map +0 -1
- package/dist-cjs/endpoints.js.map +0 -1
- package/dist-cjs/index.js.map +0 -1
- package/dist-cjs/models/index.js.map +0 -1
- package/dist-cjs/models/models_0.js.map +0 -1
- package/dist-cjs/pagination/Interfaces.js.map +0 -1
- package/dist-cjs/pagination/ListApplicationStatesPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListCreatedArtifactsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListDiscoveredResourcesPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListMigrationTasksPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListProgressUpdateStreamsPaginator.js.map +0 -1
- package/dist-cjs/protocols/Aws_json1_1.js.map +0 -1
- package/dist-cjs/runtimeConfig.browser.js.map +0 -1
- package/dist-cjs/runtimeConfig.js.map +0 -1
- package/dist-cjs/runtimeConfig.native.js.map +0 -1
- package/dist-cjs/runtimeConfig.shared.js.map +0 -1
- package/dist-es/MigrationHub.js.map +0 -1
- package/dist-es/MigrationHubClient.js.map +0 -1
- package/dist-es/commands/AssociateCreatedArtifactCommand.js.map +0 -1
- package/dist-es/commands/AssociateDiscoveredResourceCommand.js.map +0 -1
- package/dist-es/commands/CreateProgressUpdateStreamCommand.js.map +0 -1
- package/dist-es/commands/DeleteProgressUpdateStreamCommand.js.map +0 -1
- package/dist-es/commands/DescribeApplicationStateCommand.js.map +0 -1
- package/dist-es/commands/DescribeMigrationTaskCommand.js.map +0 -1
- package/dist-es/commands/DisassociateCreatedArtifactCommand.js.map +0 -1
- package/dist-es/commands/DisassociateDiscoveredResourceCommand.js.map +0 -1
- package/dist-es/commands/ImportMigrationTaskCommand.js.map +0 -1
- package/dist-es/commands/ListApplicationStatesCommand.js.map +0 -1
- package/dist-es/commands/ListCreatedArtifactsCommand.js.map +0 -1
- package/dist-es/commands/ListDiscoveredResourcesCommand.js.map +0 -1
- package/dist-es/commands/ListMigrationTasksCommand.js.map +0 -1
- package/dist-es/commands/ListProgressUpdateStreamsCommand.js.map +0 -1
- package/dist-es/commands/NotifyApplicationStateCommand.js.map +0 -1
- package/dist-es/commands/NotifyMigrationTaskStateCommand.js.map +0 -1
- package/dist-es/commands/PutResourceAttributesCommand.js.map +0 -1
- package/dist-es/endpoints.js.map +0 -1
- package/dist-es/index.js.map +0 -1
- package/dist-es/models/index.js.map +0 -1
- package/dist-es/models/models_0.js.map +0 -1
- package/dist-es/pagination/Interfaces.js.map +0 -1
- package/dist-es/pagination/ListApplicationStatesPaginator.js.map +0 -1
- package/dist-es/pagination/ListCreatedArtifactsPaginator.js.map +0 -1
- package/dist-es/pagination/ListDiscoveredResourcesPaginator.js.map +0 -1
- package/dist-es/pagination/ListMigrationTasksPaginator.js.map +0 -1
- package/dist-es/pagination/ListProgressUpdateStreamsPaginator.js.map +0 -1
- package/dist-es/protocols/Aws_json1_1.js.map +0 -1
- package/dist-es/runtimeConfig.browser.js.map +0 -1
- package/dist-es/runtimeConfig.js.map +0 -1
- package/dist-es/runtimeConfig.native.js.map +0 -1
- package/dist-es/runtimeConfig.shared.js.map +0 -1
- package/jest.config.js +0 -4
- package/src/MigrationHub.ts +0 -788
- package/src/MigrationHubClient.ts +0 -340
- package/src/commands/AssociateCreatedArtifactCommand.ts +0 -112
- package/src/commands/AssociateDiscoveredResourceCommand.ts +0 -99
- package/src/commands/CreateProgressUpdateStreamCommand.ts +0 -102
- package/src/commands/DeleteProgressUpdateStreamCommand.ts +0 -128
- package/src/commands/DescribeApplicationStateCommand.ts +0 -95
- package/src/commands/DescribeMigrationTaskCommand.ts +0 -95
- package/src/commands/DisassociateCreatedArtifactCommand.ts +0 -114
- package/src/commands/DisassociateDiscoveredResourceCommand.ts +0 -104
- package/src/commands/ImportMigrationTaskCommand.ts +0 -98
- package/src/commands/ListApplicationStatesCommand.ts +0 -97
- package/src/commands/ListCreatedArtifactsCommand.ts +0 -109
- package/src/commands/ListDiscoveredResourcesCommand.ts +0 -95
- package/src/commands/ListMigrationTasksCommand.ts +0 -108
- package/src/commands/ListProgressUpdateStreamsCommand.ts +0 -98
- package/src/commands/NotifyApplicationStateCommand.ts +0 -98
- package/src/commands/NotifyMigrationTaskStateCommand.ts +0 -112
- package/src/commands/PutResourceAttributesCommand.ts +0 -120
- package/src/endpoints.ts +0 -57
- package/src/index.ts +0 -26
- package/src/models/index.ts +0 -1
- package/src/models/models_0.ts +0 -1319
- package/src/pagination/Interfaces.ts +0 -8
- package/src/pagination/ListApplicationStatesPaginator.ts +0 -59
- package/src/pagination/ListCreatedArtifactsPaginator.ts +0 -59
- package/src/pagination/ListDiscoveredResourcesPaginator.ts +0 -59
- package/src/pagination/ListMigrationTasksPaginator.ts +0 -59
- package/src/pagination/ListProgressUpdateStreamsPaginator.ts +0 -59
- package/src/protocols/Aws_json1_1.ts +0 -3163
- package/src/runtimeConfig.browser.ts +0 -41
- package/src/runtimeConfig.native.ts +0 -17
- package/src/runtimeConfig.shared.ts +0 -17
- package/src/runtimeConfig.ts +0 -46
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -33
- package/tsconfig.types.json +0 -9
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PaginationConfiguration } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import { MigrationHub } from "../MigrationHub";
|
|
4
|
-
import { MigrationHubClient } from "../MigrationHubClient";
|
|
5
|
-
|
|
6
|
-
export interface MigrationHubPaginationConfiguration extends PaginationConfiguration {
|
|
7
|
-
client: MigrationHub | MigrationHubClient;
|
|
8
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
ListApplicationStatesCommand,
|
|
5
|
-
ListApplicationStatesCommandInput,
|
|
6
|
-
ListApplicationStatesCommandOutput,
|
|
7
|
-
} from "../commands/ListApplicationStatesCommand";
|
|
8
|
-
import { MigrationHub } from "../MigrationHub";
|
|
9
|
-
import { MigrationHubClient } from "../MigrationHubClient";
|
|
10
|
-
import { MigrationHubPaginationConfiguration } from "./Interfaces";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
const makePagedClientRequest = async (
|
|
16
|
-
client: MigrationHubClient,
|
|
17
|
-
input: ListApplicationStatesCommandInput,
|
|
18
|
-
...args: any
|
|
19
|
-
): Promise<ListApplicationStatesCommandOutput> => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
return await client.send(new ListApplicationStatesCommand(input), ...args);
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
const makePagedRequest = async (
|
|
27
|
-
client: MigrationHub,
|
|
28
|
-
input: ListApplicationStatesCommandInput,
|
|
29
|
-
...args: any
|
|
30
|
-
): Promise<ListApplicationStatesCommandOutput> => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return await client.listApplicationStates(input, ...args);
|
|
33
|
-
};
|
|
34
|
-
export async function* paginateListApplicationStates(
|
|
35
|
-
config: MigrationHubPaginationConfiguration,
|
|
36
|
-
input: ListApplicationStatesCommandInput,
|
|
37
|
-
...additionalArguments: any
|
|
38
|
-
): Paginator<ListApplicationStatesCommandOutput> {
|
|
39
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
40
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
41
|
-
let hasNext = true;
|
|
42
|
-
let page: ListApplicationStatesCommandOutput;
|
|
43
|
-
while (hasNext) {
|
|
44
|
-
input.NextToken = token;
|
|
45
|
-
input["MaxResults"] = config.pageSize;
|
|
46
|
-
if (config.client instanceof MigrationHub) {
|
|
47
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else if (config.client instanceof MigrationHubClient) {
|
|
49
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Invalid client, expected MigrationHub | MigrationHubClient");
|
|
52
|
-
}
|
|
53
|
-
yield page;
|
|
54
|
-
token = page.NextToken;
|
|
55
|
-
hasNext = !!token;
|
|
56
|
-
}
|
|
57
|
-
// @ts-ignore
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
ListCreatedArtifactsCommand,
|
|
5
|
-
ListCreatedArtifactsCommandInput,
|
|
6
|
-
ListCreatedArtifactsCommandOutput,
|
|
7
|
-
} from "../commands/ListCreatedArtifactsCommand";
|
|
8
|
-
import { MigrationHub } from "../MigrationHub";
|
|
9
|
-
import { MigrationHubClient } from "../MigrationHubClient";
|
|
10
|
-
import { MigrationHubPaginationConfiguration } from "./Interfaces";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
const makePagedClientRequest = async (
|
|
16
|
-
client: MigrationHubClient,
|
|
17
|
-
input: ListCreatedArtifactsCommandInput,
|
|
18
|
-
...args: any
|
|
19
|
-
): Promise<ListCreatedArtifactsCommandOutput> => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
return await client.send(new ListCreatedArtifactsCommand(input), ...args);
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
const makePagedRequest = async (
|
|
27
|
-
client: MigrationHub,
|
|
28
|
-
input: ListCreatedArtifactsCommandInput,
|
|
29
|
-
...args: any
|
|
30
|
-
): Promise<ListCreatedArtifactsCommandOutput> => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return await client.listCreatedArtifacts(input, ...args);
|
|
33
|
-
};
|
|
34
|
-
export async function* paginateListCreatedArtifacts(
|
|
35
|
-
config: MigrationHubPaginationConfiguration,
|
|
36
|
-
input: ListCreatedArtifactsCommandInput,
|
|
37
|
-
...additionalArguments: any
|
|
38
|
-
): Paginator<ListCreatedArtifactsCommandOutput> {
|
|
39
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
40
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
41
|
-
let hasNext = true;
|
|
42
|
-
let page: ListCreatedArtifactsCommandOutput;
|
|
43
|
-
while (hasNext) {
|
|
44
|
-
input.NextToken = token;
|
|
45
|
-
input["MaxResults"] = config.pageSize;
|
|
46
|
-
if (config.client instanceof MigrationHub) {
|
|
47
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else if (config.client instanceof MigrationHubClient) {
|
|
49
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Invalid client, expected MigrationHub | MigrationHubClient");
|
|
52
|
-
}
|
|
53
|
-
yield page;
|
|
54
|
-
token = page.NextToken;
|
|
55
|
-
hasNext = !!token;
|
|
56
|
-
}
|
|
57
|
-
// @ts-ignore
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
ListDiscoveredResourcesCommand,
|
|
5
|
-
ListDiscoveredResourcesCommandInput,
|
|
6
|
-
ListDiscoveredResourcesCommandOutput,
|
|
7
|
-
} from "../commands/ListDiscoveredResourcesCommand";
|
|
8
|
-
import { MigrationHub } from "../MigrationHub";
|
|
9
|
-
import { MigrationHubClient } from "../MigrationHubClient";
|
|
10
|
-
import { MigrationHubPaginationConfiguration } from "./Interfaces";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
const makePagedClientRequest = async (
|
|
16
|
-
client: MigrationHubClient,
|
|
17
|
-
input: ListDiscoveredResourcesCommandInput,
|
|
18
|
-
...args: any
|
|
19
|
-
): Promise<ListDiscoveredResourcesCommandOutput> => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
return await client.send(new ListDiscoveredResourcesCommand(input), ...args);
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
const makePagedRequest = async (
|
|
27
|
-
client: MigrationHub,
|
|
28
|
-
input: ListDiscoveredResourcesCommandInput,
|
|
29
|
-
...args: any
|
|
30
|
-
): Promise<ListDiscoveredResourcesCommandOutput> => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return await client.listDiscoveredResources(input, ...args);
|
|
33
|
-
};
|
|
34
|
-
export async function* paginateListDiscoveredResources(
|
|
35
|
-
config: MigrationHubPaginationConfiguration,
|
|
36
|
-
input: ListDiscoveredResourcesCommandInput,
|
|
37
|
-
...additionalArguments: any
|
|
38
|
-
): Paginator<ListDiscoveredResourcesCommandOutput> {
|
|
39
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
40
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
41
|
-
let hasNext = true;
|
|
42
|
-
let page: ListDiscoveredResourcesCommandOutput;
|
|
43
|
-
while (hasNext) {
|
|
44
|
-
input.NextToken = token;
|
|
45
|
-
input["MaxResults"] = config.pageSize;
|
|
46
|
-
if (config.client instanceof MigrationHub) {
|
|
47
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else if (config.client instanceof MigrationHubClient) {
|
|
49
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Invalid client, expected MigrationHub | MigrationHubClient");
|
|
52
|
-
}
|
|
53
|
-
yield page;
|
|
54
|
-
token = page.NextToken;
|
|
55
|
-
hasNext = !!token;
|
|
56
|
-
}
|
|
57
|
-
// @ts-ignore
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
ListMigrationTasksCommand,
|
|
5
|
-
ListMigrationTasksCommandInput,
|
|
6
|
-
ListMigrationTasksCommandOutput,
|
|
7
|
-
} from "../commands/ListMigrationTasksCommand";
|
|
8
|
-
import { MigrationHub } from "../MigrationHub";
|
|
9
|
-
import { MigrationHubClient } from "../MigrationHubClient";
|
|
10
|
-
import { MigrationHubPaginationConfiguration } from "./Interfaces";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
const makePagedClientRequest = async (
|
|
16
|
-
client: MigrationHubClient,
|
|
17
|
-
input: ListMigrationTasksCommandInput,
|
|
18
|
-
...args: any
|
|
19
|
-
): Promise<ListMigrationTasksCommandOutput> => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
return await client.send(new ListMigrationTasksCommand(input), ...args);
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
const makePagedRequest = async (
|
|
27
|
-
client: MigrationHub,
|
|
28
|
-
input: ListMigrationTasksCommandInput,
|
|
29
|
-
...args: any
|
|
30
|
-
): Promise<ListMigrationTasksCommandOutput> => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return await client.listMigrationTasks(input, ...args);
|
|
33
|
-
};
|
|
34
|
-
export async function* paginateListMigrationTasks(
|
|
35
|
-
config: MigrationHubPaginationConfiguration,
|
|
36
|
-
input: ListMigrationTasksCommandInput,
|
|
37
|
-
...additionalArguments: any
|
|
38
|
-
): Paginator<ListMigrationTasksCommandOutput> {
|
|
39
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
40
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
41
|
-
let hasNext = true;
|
|
42
|
-
let page: ListMigrationTasksCommandOutput;
|
|
43
|
-
while (hasNext) {
|
|
44
|
-
input.NextToken = token;
|
|
45
|
-
input["MaxResults"] = config.pageSize;
|
|
46
|
-
if (config.client instanceof MigrationHub) {
|
|
47
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else if (config.client instanceof MigrationHubClient) {
|
|
49
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Invalid client, expected MigrationHub | MigrationHubClient");
|
|
52
|
-
}
|
|
53
|
-
yield page;
|
|
54
|
-
token = page.NextToken;
|
|
55
|
-
hasNext = !!token;
|
|
56
|
-
}
|
|
57
|
-
// @ts-ignore
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
ListProgressUpdateStreamsCommand,
|
|
5
|
-
ListProgressUpdateStreamsCommandInput,
|
|
6
|
-
ListProgressUpdateStreamsCommandOutput,
|
|
7
|
-
} from "../commands/ListProgressUpdateStreamsCommand";
|
|
8
|
-
import { MigrationHub } from "../MigrationHub";
|
|
9
|
-
import { MigrationHubClient } from "../MigrationHubClient";
|
|
10
|
-
import { MigrationHubPaginationConfiguration } from "./Interfaces";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
const makePagedClientRequest = async (
|
|
16
|
-
client: MigrationHubClient,
|
|
17
|
-
input: ListProgressUpdateStreamsCommandInput,
|
|
18
|
-
...args: any
|
|
19
|
-
): Promise<ListProgressUpdateStreamsCommandOutput> => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
return await client.send(new ListProgressUpdateStreamsCommand(input), ...args);
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
const makePagedRequest = async (
|
|
27
|
-
client: MigrationHub,
|
|
28
|
-
input: ListProgressUpdateStreamsCommandInput,
|
|
29
|
-
...args: any
|
|
30
|
-
): Promise<ListProgressUpdateStreamsCommandOutput> => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return await client.listProgressUpdateStreams(input, ...args);
|
|
33
|
-
};
|
|
34
|
-
export async function* paginateListProgressUpdateStreams(
|
|
35
|
-
config: MigrationHubPaginationConfiguration,
|
|
36
|
-
input: ListProgressUpdateStreamsCommandInput,
|
|
37
|
-
...additionalArguments: any
|
|
38
|
-
): Paginator<ListProgressUpdateStreamsCommandOutput> {
|
|
39
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
40
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
41
|
-
let hasNext = true;
|
|
42
|
-
let page: ListProgressUpdateStreamsCommandOutput;
|
|
43
|
-
while (hasNext) {
|
|
44
|
-
input.NextToken = token;
|
|
45
|
-
input["MaxResults"] = config.pageSize;
|
|
46
|
-
if (config.client instanceof MigrationHub) {
|
|
47
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else if (config.client instanceof MigrationHubClient) {
|
|
49
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Invalid client, expected MigrationHub | MigrationHubClient");
|
|
52
|
-
}
|
|
53
|
-
yield page;
|
|
54
|
-
token = page.NextToken;
|
|
55
|
-
hasNext = !!token;
|
|
56
|
-
}
|
|
57
|
-
// @ts-ignore
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|