@aws-sdk/client-drs 3.476.0 → 3.478.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 (47) hide show
  1. package/dist-cjs/pagination/DescribeJobLogItemsPaginator.js +2 -24
  2. package/dist-cjs/pagination/DescribeJobsPaginator.js +2 -24
  3. package/dist-cjs/pagination/DescribeLaunchConfigurationTemplatesPaginator.js +2 -24
  4. package/dist-cjs/pagination/DescribeRecoveryInstancesPaginator.js +2 -24
  5. package/dist-cjs/pagination/DescribeRecoverySnapshotsPaginator.js +2 -24
  6. package/dist-cjs/pagination/DescribeReplicationConfigurationTemplatesPaginator.js +2 -24
  7. package/dist-cjs/pagination/DescribeSourceNetworksPaginator.js +2 -24
  8. package/dist-cjs/pagination/DescribeSourceServersPaginator.js +2 -24
  9. package/dist-cjs/pagination/ListExtensibleSourceServersPaginator.js +2 -24
  10. package/dist-cjs/pagination/ListLaunchActionsPaginator.js +2 -24
  11. package/dist-cjs/pagination/ListStagingAccountsPaginator.js +2 -24
  12. package/dist-cjs/protocols/Aws_restJson1.js +215 -566
  13. package/dist-es/pagination/DescribeJobLogItemsPaginator.js +2 -23
  14. package/dist-es/pagination/DescribeJobsPaginator.js +2 -23
  15. package/dist-es/pagination/DescribeLaunchConfigurationTemplatesPaginator.js +2 -23
  16. package/dist-es/pagination/DescribeRecoveryInstancesPaginator.js +2 -23
  17. package/dist-es/pagination/DescribeRecoverySnapshotsPaginator.js +2 -23
  18. package/dist-es/pagination/DescribeReplicationConfigurationTemplatesPaginator.js +2 -23
  19. package/dist-es/pagination/DescribeSourceNetworksPaginator.js +2 -23
  20. package/dist-es/pagination/DescribeSourceServersPaginator.js +2 -23
  21. package/dist-es/pagination/ListExtensibleSourceServersPaginator.js +2 -23
  22. package/dist-es/pagination/ListLaunchActionsPaginator.js +2 -23
  23. package/dist-es/pagination/ListStagingAccountsPaginator.js +2 -23
  24. package/dist-es/protocols/Aws_restJson1.js +216 -567
  25. package/dist-types/pagination/DescribeJobLogItemsPaginator.d.ts +1 -1
  26. package/dist-types/pagination/DescribeJobsPaginator.d.ts +1 -1
  27. package/dist-types/pagination/DescribeLaunchConfigurationTemplatesPaginator.d.ts +1 -1
  28. package/dist-types/pagination/DescribeRecoveryInstancesPaginator.d.ts +1 -1
  29. package/dist-types/pagination/DescribeRecoverySnapshotsPaginator.d.ts +1 -1
  30. package/dist-types/pagination/DescribeReplicationConfigurationTemplatesPaginator.d.ts +1 -1
  31. package/dist-types/pagination/DescribeSourceNetworksPaginator.d.ts +1 -1
  32. package/dist-types/pagination/DescribeSourceServersPaginator.d.ts +1 -1
  33. package/dist-types/pagination/ListExtensibleSourceServersPaginator.d.ts +1 -1
  34. package/dist-types/pagination/ListLaunchActionsPaginator.d.ts +1 -1
  35. package/dist-types/pagination/ListStagingAccountsPaginator.d.ts +1 -1
  36. package/dist-types/ts3.4/pagination/DescribeJobLogItemsPaginator.d.ts +3 -3
  37. package/dist-types/ts3.4/pagination/DescribeJobsPaginator.d.ts +3 -3
  38. package/dist-types/ts3.4/pagination/DescribeLaunchConfigurationTemplatesPaginator.d.ts +3 -3
  39. package/dist-types/ts3.4/pagination/DescribeRecoveryInstancesPaginator.d.ts +3 -3
  40. package/dist-types/ts3.4/pagination/DescribeRecoverySnapshotsPaginator.d.ts +3 -3
  41. package/dist-types/ts3.4/pagination/DescribeReplicationConfigurationTemplatesPaginator.d.ts +3 -3
  42. package/dist-types/ts3.4/pagination/DescribeSourceNetworksPaginator.d.ts +3 -3
  43. package/dist-types/ts3.4/pagination/DescribeSourceServersPaginator.d.ts +3 -3
  44. package/dist-types/ts3.4/pagination/ListExtensibleSourceServersPaginator.d.ts +3 -3
  45. package/dist-types/ts3.4/pagination/ListLaunchActionsPaginator.d.ts +3 -3
  46. package/dist-types/ts3.4/pagination/ListStagingAccountsPaginator.d.ts +3 -3
  47. package/package.json +7 -6
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeJobLogItemsCommand, } from "../commands/DescribeJobLogItemsCommand";
2
3
  import { DrsClient } from "../DrsClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeJobLogItemsCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeJobLogItems(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 DrsClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Drs | DrsClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribeJobLogItems = createPaginator(DrsClient, DescribeJobLogItemsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeJobsCommand, } from "../commands/DescribeJobsCommand";
2
3
  import { DrsClient } from "../DrsClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeJobsCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeJobs(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 DrsClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Drs | DrsClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribeJobs = createPaginator(DrsClient, DescribeJobsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeLaunchConfigurationTemplatesCommand, } from "../commands/DescribeLaunchConfigurationTemplatesCommand";
2
3
  import { DrsClient } from "../DrsClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeLaunchConfigurationTemplatesCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeLaunchConfigurationTemplates(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 DrsClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Drs | DrsClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribeLaunchConfigurationTemplates = createPaginator(DrsClient, DescribeLaunchConfigurationTemplatesCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeRecoveryInstancesCommand, } from "../commands/DescribeRecoveryInstancesCommand";
2
3
  import { DrsClient } from "../DrsClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeRecoveryInstancesCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeRecoveryInstances(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 DrsClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Drs | DrsClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribeRecoveryInstances = createPaginator(DrsClient, DescribeRecoveryInstancesCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeRecoverySnapshotsCommand, } from "../commands/DescribeRecoverySnapshotsCommand";
2
3
  import { DrsClient } from "../DrsClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeRecoverySnapshotsCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeRecoverySnapshots(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 DrsClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Drs | DrsClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribeRecoverySnapshots = createPaginator(DrsClient, DescribeRecoverySnapshotsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeReplicationConfigurationTemplatesCommand, } from "../commands/DescribeReplicationConfigurationTemplatesCommand";
2
3
  import { DrsClient } from "../DrsClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeReplicationConfigurationTemplatesCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeReplicationConfigurationTemplates(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 DrsClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Drs | DrsClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribeReplicationConfigurationTemplates = createPaginator(DrsClient, DescribeReplicationConfigurationTemplatesCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeSourceNetworksCommand, } from "../commands/DescribeSourceNetworksCommand";
2
3
  import { DrsClient } from "../DrsClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeSourceNetworksCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeSourceNetworks(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 DrsClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Drs | DrsClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribeSourceNetworks = createPaginator(DrsClient, DescribeSourceNetworksCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeSourceServersCommand, } from "../commands/DescribeSourceServersCommand";
2
3
  import { DrsClient } from "../DrsClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeSourceServersCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeSourceServers(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 DrsClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Drs | DrsClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribeSourceServers = createPaginator(DrsClient, DescribeSourceServersCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListExtensibleSourceServersCommand, } from "../commands/ListExtensibleSourceServersCommand";
2
3
  import { DrsClient } from "../DrsClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListExtensibleSourceServersCommand(input), ...args);
5
- };
6
- export async function* paginateListExtensibleSourceServers(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 DrsClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Drs | DrsClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListExtensibleSourceServers = createPaginator(DrsClient, ListExtensibleSourceServersCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListLaunchActionsCommand, } from "../commands/ListLaunchActionsCommand";
2
3
  import { DrsClient } from "../DrsClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListLaunchActionsCommand(input), ...args);
5
- };
6
- export async function* paginateListLaunchActions(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 DrsClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Drs | DrsClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListLaunchActions = createPaginator(DrsClient, ListLaunchActionsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListStagingAccountsCommand, } from "../commands/ListStagingAccountsCommand";
2
3
  import { DrsClient } from "../DrsClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListStagingAccountsCommand(input), ...args);
5
- };
6
- export async function* paginateListStagingAccounts(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 DrsClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Drs | DrsClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.nextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListStagingAccounts = createPaginator(DrsClient, ListStagingAccountsCommand, "nextToken", "nextToken", "maxResults");