@aws-sdk/client-neptune 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 (67) hide show
  1. package/dist-cjs/pagination/DescribeDBClusterEndpointsPaginator.js +2 -24
  2. package/dist-cjs/pagination/DescribeDBClusterParameterGroupsPaginator.js +2 -24
  3. package/dist-cjs/pagination/DescribeDBClusterParametersPaginator.js +2 -24
  4. package/dist-cjs/pagination/DescribeDBClusterSnapshotsPaginator.js +2 -24
  5. package/dist-cjs/pagination/DescribeDBClustersPaginator.js +2 -24
  6. package/dist-cjs/pagination/DescribeDBEngineVersionsPaginator.js +2 -24
  7. package/dist-cjs/pagination/DescribeDBInstancesPaginator.js +2 -24
  8. package/dist-cjs/pagination/DescribeDBParameterGroupsPaginator.js +2 -24
  9. package/dist-cjs/pagination/DescribeDBParametersPaginator.js +2 -24
  10. package/dist-cjs/pagination/DescribeDBSubnetGroupsPaginator.js +2 -24
  11. package/dist-cjs/pagination/DescribeEngineDefaultParametersPaginator.js +2 -24
  12. package/dist-cjs/pagination/DescribeEventSubscriptionsPaginator.js +2 -24
  13. package/dist-cjs/pagination/DescribeEventsPaginator.js +2 -24
  14. package/dist-cjs/pagination/DescribeGlobalClustersPaginator.js +2 -24
  15. package/dist-cjs/pagination/DescribeOrderableDBInstanceOptionsPaginator.js +2 -24
  16. package/dist-cjs/pagination/DescribePendingMaintenanceActionsPaginator.js +2 -24
  17. package/dist-cjs/protocols/Aws_query.js +2408 -2048
  18. package/dist-es/pagination/DescribeDBClusterEndpointsPaginator.js +2 -23
  19. package/dist-es/pagination/DescribeDBClusterParameterGroupsPaginator.js +2 -23
  20. package/dist-es/pagination/DescribeDBClusterParametersPaginator.js +2 -23
  21. package/dist-es/pagination/DescribeDBClusterSnapshotsPaginator.js +2 -23
  22. package/dist-es/pagination/DescribeDBClustersPaginator.js +2 -23
  23. package/dist-es/pagination/DescribeDBEngineVersionsPaginator.js +2 -23
  24. package/dist-es/pagination/DescribeDBInstancesPaginator.js +2 -23
  25. package/dist-es/pagination/DescribeDBParameterGroupsPaginator.js +2 -23
  26. package/dist-es/pagination/DescribeDBParametersPaginator.js +2 -23
  27. package/dist-es/pagination/DescribeDBSubnetGroupsPaginator.js +2 -23
  28. package/dist-es/pagination/DescribeEngineDefaultParametersPaginator.js +2 -23
  29. package/dist-es/pagination/DescribeEventSubscriptionsPaginator.js +2 -23
  30. package/dist-es/pagination/DescribeEventsPaginator.js +2 -23
  31. package/dist-es/pagination/DescribeGlobalClustersPaginator.js +2 -23
  32. package/dist-es/pagination/DescribeOrderableDBInstanceOptionsPaginator.js +2 -23
  33. package/dist-es/pagination/DescribePendingMaintenanceActionsPaginator.js +2 -23
  34. package/dist-es/protocols/Aws_query.js +2408 -2048
  35. package/dist-types/pagination/DescribeDBClusterEndpointsPaginator.d.ts +1 -1
  36. package/dist-types/pagination/DescribeDBClusterParameterGroupsPaginator.d.ts +1 -1
  37. package/dist-types/pagination/DescribeDBClusterParametersPaginator.d.ts +1 -1
  38. package/dist-types/pagination/DescribeDBClusterSnapshotsPaginator.d.ts +1 -1
  39. package/dist-types/pagination/DescribeDBClustersPaginator.d.ts +1 -1
  40. package/dist-types/pagination/DescribeDBEngineVersionsPaginator.d.ts +1 -1
  41. package/dist-types/pagination/DescribeDBInstancesPaginator.d.ts +1 -1
  42. package/dist-types/pagination/DescribeDBParameterGroupsPaginator.d.ts +1 -1
  43. package/dist-types/pagination/DescribeDBParametersPaginator.d.ts +1 -1
  44. package/dist-types/pagination/DescribeDBSubnetGroupsPaginator.d.ts +1 -1
  45. package/dist-types/pagination/DescribeEngineDefaultParametersPaginator.d.ts +1 -1
  46. package/dist-types/pagination/DescribeEventSubscriptionsPaginator.d.ts +1 -1
  47. package/dist-types/pagination/DescribeEventsPaginator.d.ts +1 -1
  48. package/dist-types/pagination/DescribeGlobalClustersPaginator.d.ts +1 -1
  49. package/dist-types/pagination/DescribeOrderableDBInstanceOptionsPaginator.d.ts +1 -1
  50. package/dist-types/pagination/DescribePendingMaintenanceActionsPaginator.d.ts +1 -1
  51. package/dist-types/ts3.4/pagination/DescribeDBClusterEndpointsPaginator.d.ts +3 -3
  52. package/dist-types/ts3.4/pagination/DescribeDBClusterParameterGroupsPaginator.d.ts +3 -3
  53. package/dist-types/ts3.4/pagination/DescribeDBClusterParametersPaginator.d.ts +3 -3
  54. package/dist-types/ts3.4/pagination/DescribeDBClusterSnapshotsPaginator.d.ts +3 -3
  55. package/dist-types/ts3.4/pagination/DescribeDBClustersPaginator.d.ts +3 -3
  56. package/dist-types/ts3.4/pagination/DescribeDBEngineVersionsPaginator.d.ts +3 -3
  57. package/dist-types/ts3.4/pagination/DescribeDBInstancesPaginator.d.ts +3 -3
  58. package/dist-types/ts3.4/pagination/DescribeDBParameterGroupsPaginator.d.ts +3 -3
  59. package/dist-types/ts3.4/pagination/DescribeDBParametersPaginator.d.ts +3 -3
  60. package/dist-types/ts3.4/pagination/DescribeDBSubnetGroupsPaginator.d.ts +3 -3
  61. package/dist-types/ts3.4/pagination/DescribeEngineDefaultParametersPaginator.d.ts +3 -3
  62. package/dist-types/ts3.4/pagination/DescribeEventSubscriptionsPaginator.d.ts +3 -3
  63. package/dist-types/ts3.4/pagination/DescribeEventsPaginator.d.ts +3 -3
  64. package/dist-types/ts3.4/pagination/DescribeGlobalClustersPaginator.d.ts +3 -3
  65. package/dist-types/ts3.4/pagination/DescribeOrderableDBInstanceOptionsPaginator.d.ts +3 -3
  66. package/dist-types/ts3.4/pagination/DescribePendingMaintenanceActionsPaginator.d.ts +3 -3
  67. package/package.json +7 -6
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeDBClusterEndpointsCommand, } from "../commands/DescribeDBClusterEndpointsCommand";
2
3
  import { NeptuneClient } from "../NeptuneClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeDBClusterEndpointsCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeDBClusterEndpoints(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.Marker = token;
12
- input["MaxRecords"] = config.pageSize;
13
- if (config.client instanceof NeptuneClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Neptune | NeptuneClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.Marker;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribeDBClusterEndpoints = createPaginator(NeptuneClient, DescribeDBClusterEndpointsCommand, "Marker", "Marker", "MaxRecords");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeDBClusterParameterGroupsCommand, } from "../commands/DescribeDBClusterParameterGroupsCommand";
2
3
  import { NeptuneClient } from "../NeptuneClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeDBClusterParameterGroupsCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeDBClusterParameterGroups(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.Marker = token;
12
- input["MaxRecords"] = config.pageSize;
13
- if (config.client instanceof NeptuneClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Neptune | NeptuneClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.Marker;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribeDBClusterParameterGroups = createPaginator(NeptuneClient, DescribeDBClusterParameterGroupsCommand, "Marker", "Marker", "MaxRecords");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeDBClusterParametersCommand, } from "../commands/DescribeDBClusterParametersCommand";
2
3
  import { NeptuneClient } from "../NeptuneClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeDBClusterParametersCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeDBClusterParameters(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.Marker = token;
12
- input["MaxRecords"] = config.pageSize;
13
- if (config.client instanceof NeptuneClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Neptune | NeptuneClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.Marker;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribeDBClusterParameters = createPaginator(NeptuneClient, DescribeDBClusterParametersCommand, "Marker", "Marker", "MaxRecords");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeDBClusterSnapshotsCommand, } from "../commands/DescribeDBClusterSnapshotsCommand";
2
3
  import { NeptuneClient } from "../NeptuneClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeDBClusterSnapshotsCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeDBClusterSnapshots(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.Marker = token;
12
- input["MaxRecords"] = config.pageSize;
13
- if (config.client instanceof NeptuneClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Neptune | NeptuneClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.Marker;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribeDBClusterSnapshots = createPaginator(NeptuneClient, DescribeDBClusterSnapshotsCommand, "Marker", "Marker", "MaxRecords");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeDBClustersCommand, } from "../commands/DescribeDBClustersCommand";
2
3
  import { NeptuneClient } from "../NeptuneClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeDBClustersCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeDBClusters(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.Marker = token;
12
- input["MaxRecords"] = config.pageSize;
13
- if (config.client instanceof NeptuneClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Neptune | NeptuneClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.Marker;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribeDBClusters = createPaginator(NeptuneClient, DescribeDBClustersCommand, "Marker", "Marker", "MaxRecords");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeDBEngineVersionsCommand, } from "../commands/DescribeDBEngineVersionsCommand";
2
3
  import { NeptuneClient } from "../NeptuneClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeDBEngineVersionsCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeDBEngineVersions(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.Marker = token;
12
- input["MaxRecords"] = config.pageSize;
13
- if (config.client instanceof NeptuneClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Neptune | NeptuneClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.Marker;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribeDBEngineVersions = createPaginator(NeptuneClient, DescribeDBEngineVersionsCommand, "Marker", "Marker", "MaxRecords");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeDBInstancesCommand, } from "../commands/DescribeDBInstancesCommand";
2
3
  import { NeptuneClient } from "../NeptuneClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeDBInstancesCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeDBInstances(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.Marker = token;
12
- input["MaxRecords"] = config.pageSize;
13
- if (config.client instanceof NeptuneClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Neptune | NeptuneClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.Marker;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribeDBInstances = createPaginator(NeptuneClient, DescribeDBInstancesCommand, "Marker", "Marker", "MaxRecords");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeDBParameterGroupsCommand, } from "../commands/DescribeDBParameterGroupsCommand";
2
3
  import { NeptuneClient } from "../NeptuneClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeDBParameterGroupsCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeDBParameterGroups(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.Marker = token;
12
- input["MaxRecords"] = config.pageSize;
13
- if (config.client instanceof NeptuneClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Neptune | NeptuneClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.Marker;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribeDBParameterGroups = createPaginator(NeptuneClient, DescribeDBParameterGroupsCommand, "Marker", "Marker", "MaxRecords");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeDBParametersCommand, } from "../commands/DescribeDBParametersCommand";
2
3
  import { NeptuneClient } from "../NeptuneClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeDBParametersCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeDBParameters(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.Marker = token;
12
- input["MaxRecords"] = config.pageSize;
13
- if (config.client instanceof NeptuneClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Neptune | NeptuneClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.Marker;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribeDBParameters = createPaginator(NeptuneClient, DescribeDBParametersCommand, "Marker", "Marker", "MaxRecords");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeDBSubnetGroupsCommand, } from "../commands/DescribeDBSubnetGroupsCommand";
2
3
  import { NeptuneClient } from "../NeptuneClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeDBSubnetGroupsCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeDBSubnetGroups(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.Marker = token;
12
- input["MaxRecords"] = config.pageSize;
13
- if (config.client instanceof NeptuneClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Neptune | NeptuneClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.Marker;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribeDBSubnetGroups = createPaginator(NeptuneClient, DescribeDBSubnetGroupsCommand, "Marker", "Marker", "MaxRecords");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeEngineDefaultParametersCommand, } from "../commands/DescribeEngineDefaultParametersCommand";
2
3
  import { NeptuneClient } from "../NeptuneClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeEngineDefaultParametersCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeEngineDefaultParameters(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.Marker = token;
12
- input["MaxRecords"] = config.pageSize;
13
- if (config.client instanceof NeptuneClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Neptune | NeptuneClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.EngineDefaults.Marker;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribeEngineDefaultParameters = createPaginator(NeptuneClient, DescribeEngineDefaultParametersCommand, "Marker", "EngineDefaults.Marker", "MaxRecords");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeEventSubscriptionsCommand, } from "../commands/DescribeEventSubscriptionsCommand";
2
3
  import { NeptuneClient } from "../NeptuneClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeEventSubscriptionsCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeEventSubscriptions(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.Marker = token;
12
- input["MaxRecords"] = config.pageSize;
13
- if (config.client instanceof NeptuneClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Neptune | NeptuneClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.Marker;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribeEventSubscriptions = createPaginator(NeptuneClient, DescribeEventSubscriptionsCommand, "Marker", "Marker", "MaxRecords");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeEventsCommand, } from "../commands/DescribeEventsCommand";
2
3
  import { NeptuneClient } from "../NeptuneClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeEventsCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeEvents(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.Marker = token;
12
- input["MaxRecords"] = config.pageSize;
13
- if (config.client instanceof NeptuneClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Neptune | NeptuneClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.Marker;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribeEvents = createPaginator(NeptuneClient, DescribeEventsCommand, "Marker", "Marker", "MaxRecords");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeGlobalClustersCommand, } from "../commands/DescribeGlobalClustersCommand";
2
3
  import { NeptuneClient } from "../NeptuneClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeGlobalClustersCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeGlobalClusters(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.Marker = token;
12
- input["MaxRecords"] = config.pageSize;
13
- if (config.client instanceof NeptuneClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Neptune | NeptuneClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.Marker;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribeGlobalClusters = createPaginator(NeptuneClient, DescribeGlobalClustersCommand, "Marker", "Marker", "MaxRecords");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeOrderableDBInstanceOptionsCommand, } from "../commands/DescribeOrderableDBInstanceOptionsCommand";
2
3
  import { NeptuneClient } from "../NeptuneClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeOrderableDBInstanceOptionsCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeOrderableDBInstanceOptions(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.Marker = token;
12
- input["MaxRecords"] = config.pageSize;
13
- if (config.client instanceof NeptuneClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Neptune | NeptuneClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.Marker;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribeOrderableDBInstanceOptions = createPaginator(NeptuneClient, DescribeOrderableDBInstanceOptionsCommand, "Marker", "Marker", "MaxRecords");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribePendingMaintenanceActionsCommand, } from "../commands/DescribePendingMaintenanceActionsCommand";
2
3
  import { NeptuneClient } from "../NeptuneClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribePendingMaintenanceActionsCommand(input), ...args);
5
- };
6
- export async function* paginateDescribePendingMaintenanceActions(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.Marker = token;
12
- input["MaxRecords"] = config.pageSize;
13
- if (config.client instanceof NeptuneClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Neptune | NeptuneClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.Marker;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateDescribePendingMaintenanceActions = createPaginator(NeptuneClient, DescribePendingMaintenanceActionsCommand, "Marker", "Marker", "MaxRecords");