@aws-sdk/client-eks 3.477.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 (84) hide show
  1. package/README.md +16 -0
  2. package/dist-cjs/EKS.js +4 -0
  3. package/dist-cjs/commands/DescribeInsightCommand.js +51 -0
  4. package/dist-cjs/commands/ListInsightsCommand.js +51 -0
  5. package/dist-cjs/commands/index.js +2 -0
  6. package/dist-cjs/models/models_0.js +10 -1
  7. package/dist-cjs/pagination/DescribeAddonVersionsPaginator.js +2 -24
  8. package/dist-cjs/pagination/ListAccessEntriesPaginator.js +2 -24
  9. package/dist-cjs/pagination/ListAccessPoliciesPaginator.js +2 -24
  10. package/dist-cjs/pagination/ListAddonsPaginator.js +2 -24
  11. package/dist-cjs/pagination/ListAssociatedAccessPoliciesPaginator.js +2 -24
  12. package/dist-cjs/pagination/ListClustersPaginator.js +2 -24
  13. package/dist-cjs/pagination/ListEksAnywhereSubscriptionsPaginator.js +2 -24
  14. package/dist-cjs/pagination/ListFargateProfilesPaginator.js +2 -24
  15. package/dist-cjs/pagination/ListIdentityProviderConfigsPaginator.js +2 -24
  16. package/dist-cjs/pagination/ListInsightsPaginator.js +7 -0
  17. package/dist-cjs/pagination/ListNodegroupsPaginator.js +2 -24
  18. package/dist-cjs/pagination/ListPodIdentityAssociationsPaginator.js +2 -24
  19. package/dist-cjs/pagination/ListUpdatesPaginator.js +2 -24
  20. package/dist-cjs/pagination/index.js +1 -0
  21. package/dist-cjs/protocols/Aws_restJson1.js +250 -134
  22. package/dist-es/EKS.js +4 -0
  23. package/dist-es/commands/DescribeInsightCommand.js +47 -0
  24. package/dist-es/commands/ListInsightsCommand.js +47 -0
  25. package/dist-es/commands/index.js +2 -0
  26. package/dist-es/models/models_0.js +9 -0
  27. package/dist-es/pagination/DescribeAddonVersionsPaginator.js +2 -23
  28. package/dist-es/pagination/ListAccessEntriesPaginator.js +2 -23
  29. package/dist-es/pagination/ListAccessPoliciesPaginator.js +2 -23
  30. package/dist-es/pagination/ListAddonsPaginator.js +2 -23
  31. package/dist-es/pagination/ListAssociatedAccessPoliciesPaginator.js +2 -23
  32. package/dist-es/pagination/ListClustersPaginator.js +2 -23
  33. package/dist-es/pagination/ListEksAnywhereSubscriptionsPaginator.js +2 -23
  34. package/dist-es/pagination/ListFargateProfilesPaginator.js +2 -23
  35. package/dist-es/pagination/ListIdentityProviderConfigsPaginator.js +2 -23
  36. package/dist-es/pagination/ListInsightsPaginator.js +4 -0
  37. package/dist-es/pagination/ListNodegroupsPaginator.js +2 -23
  38. package/dist-es/pagination/ListPodIdentityAssociationsPaginator.js +2 -23
  39. package/dist-es/pagination/ListUpdatesPaginator.js +2 -23
  40. package/dist-es/pagination/index.js +1 -0
  41. package/dist-es/protocols/Aws_restJson1.js +244 -132
  42. package/dist-types/EKS.d.ts +14 -0
  43. package/dist-types/EKSClient.d.ts +4 -2
  44. package/dist-types/commands/DescribeInsightCommand.d.ts +133 -0
  45. package/dist-types/commands/ListInsightsCommand.d.ts +117 -0
  46. package/dist-types/commands/index.d.ts +2 -0
  47. package/dist-types/models/models_0.d.ts +359 -5
  48. package/dist-types/pagination/DescribeAddonVersionsPaginator.d.ts +1 -1
  49. package/dist-types/pagination/ListAccessEntriesPaginator.d.ts +1 -1
  50. package/dist-types/pagination/ListAccessPoliciesPaginator.d.ts +1 -1
  51. package/dist-types/pagination/ListAddonsPaginator.d.ts +1 -1
  52. package/dist-types/pagination/ListAssociatedAccessPoliciesPaginator.d.ts +1 -1
  53. package/dist-types/pagination/ListClustersPaginator.d.ts +1 -1
  54. package/dist-types/pagination/ListEksAnywhereSubscriptionsPaginator.d.ts +1 -1
  55. package/dist-types/pagination/ListFargateProfilesPaginator.d.ts +1 -1
  56. package/dist-types/pagination/ListIdentityProviderConfigsPaginator.d.ts +1 -1
  57. package/dist-types/pagination/ListInsightsPaginator.d.ts +7 -0
  58. package/dist-types/pagination/ListNodegroupsPaginator.d.ts +1 -1
  59. package/dist-types/pagination/ListPodIdentityAssociationsPaginator.d.ts +1 -1
  60. package/dist-types/pagination/ListUpdatesPaginator.d.ts +1 -1
  61. package/dist-types/pagination/index.d.ts +1 -0
  62. package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
  63. package/dist-types/ts3.4/EKS.d.ts +34 -0
  64. package/dist-types/ts3.4/EKSClient.d.ts +12 -0
  65. package/dist-types/ts3.4/commands/DescribeInsightCommand.d.ts +38 -0
  66. package/dist-types/ts3.4/commands/ListInsightsCommand.d.ts +35 -0
  67. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  68. package/dist-types/ts3.4/models/models_0.d.ts +82 -0
  69. package/dist-types/ts3.4/pagination/DescribeAddonVersionsPaginator.d.ts +3 -3
  70. package/dist-types/ts3.4/pagination/ListAccessEntriesPaginator.d.ts +3 -3
  71. package/dist-types/ts3.4/pagination/ListAccessPoliciesPaginator.d.ts +3 -3
  72. package/dist-types/ts3.4/pagination/ListAddonsPaginator.d.ts +3 -3
  73. package/dist-types/ts3.4/pagination/ListAssociatedAccessPoliciesPaginator.d.ts +3 -3
  74. package/dist-types/ts3.4/pagination/ListClustersPaginator.d.ts +3 -3
  75. package/dist-types/ts3.4/pagination/ListEksAnywhereSubscriptionsPaginator.d.ts +3 -3
  76. package/dist-types/ts3.4/pagination/ListFargateProfilesPaginator.d.ts +3 -3
  77. package/dist-types/ts3.4/pagination/ListIdentityProviderConfigsPaginator.d.ts +3 -3
  78. package/dist-types/ts3.4/pagination/ListInsightsPaginator.d.ts +11 -0
  79. package/dist-types/ts3.4/pagination/ListNodegroupsPaginator.d.ts +3 -3
  80. package/dist-types/ts3.4/pagination/ListPodIdentityAssociationsPaginator.d.ts +3 -3
  81. package/dist-types/ts3.4/pagination/ListUpdatesPaginator.d.ts +3 -3
  82. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  83. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +24 -0
  84. package/package.json +5 -5
@@ -0,0 +1,47 @@
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 { de_ListInsightsCommand, se_ListInsightsCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class ListInsightsCommand extends $Command {
8
+ static getEndpointParameterInstructions() {
9
+ return {
10
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
11
+ Endpoint: { type: "builtInParams", name: "endpoint" },
12
+ Region: { type: "builtInParams", name: "region" },
13
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
14
+ };
15
+ }
16
+ constructor(input) {
17
+ super();
18
+ this.input = input;
19
+ }
20
+ resolveMiddleware(clientStack, configuration, options) {
21
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
+ this.middlewareStack.use(getEndpointPlugin(configuration, ListInsightsCommand.getEndpointParameterInstructions()));
23
+ const stack = clientStack.concat(this.middlewareStack);
24
+ const { logger } = configuration;
25
+ const clientName = "EKSClient";
26
+ const commandName = "ListInsightsCommand";
27
+ const handlerExecutionContext = {
28
+ logger,
29
+ clientName,
30
+ commandName,
31
+ inputFilterSensitiveLog: (_) => _,
32
+ outputFilterSensitiveLog: (_) => _,
33
+ [SMITHY_CONTEXT_KEY]: {
34
+ service: "AWSWesleyFrontend",
35
+ operation: "ListInsights",
36
+ },
37
+ };
38
+ const { requestHandler } = configuration;
39
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
40
+ }
41
+ serialize(input, context) {
42
+ return se_ListInsightsCommand(input, context);
43
+ }
44
+ deserialize(output, context) {
45
+ return de_ListInsightsCommand(output, context);
46
+ }
47
+ }
@@ -24,6 +24,7 @@ export * from "./DescribeClusterCommand";
24
24
  export * from "./DescribeEksAnywhereSubscriptionCommand";
25
25
  export * from "./DescribeFargateProfileCommand";
26
26
  export * from "./DescribeIdentityProviderConfigCommand";
27
+ export * from "./DescribeInsightCommand";
27
28
  export * from "./DescribeNodegroupCommand";
28
29
  export * from "./DescribePodIdentityAssociationCommand";
29
30
  export * from "./DescribeUpdateCommand";
@@ -37,6 +38,7 @@ export * from "./ListClustersCommand";
37
38
  export * from "./ListEksAnywhereSubscriptionsCommand";
38
39
  export * from "./ListFargateProfilesCommand";
39
40
  export * from "./ListIdentityProviderConfigsCommand";
41
+ export * from "./ListInsightsCommand";
40
42
  export * from "./ListNodegroupsCommand";
41
43
  export * from "./ListPodIdentityAssociationsCommand";
42
44
  export * from "./ListTagsForResourceCommand";
@@ -375,6 +375,15 @@ export const ConfigStatus = {
375
375
  CREATING: "CREATING",
376
376
  DELETING: "DELETING",
377
377
  };
378
+ export const Category = {
379
+ UPGRADE_READINESS: "UPGRADE_READINESS",
380
+ };
381
+ export const InsightStatusValue = {
382
+ ERROR: "ERROR",
383
+ PASSING: "PASSING",
384
+ UNKNOWN: "UNKNOWN",
385
+ WARNING: "WARNING",
386
+ };
378
387
  export const EksAnywhereSubscriptionStatus = {
379
388
  ACTIVE: "ACTIVE",
380
389
  CREATING: "CREATING",
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { DescribeAddonVersionsCommand, } from "../commands/DescribeAddonVersionsCommand";
2
3
  import { EKSClient } from "../EKSClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new DescribeAddonVersionsCommand(input), ...args);
5
- };
6
- export async function* paginateDescribeAddonVersions(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 EKSClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected EKS | EKSClient");
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 paginateDescribeAddonVersions = createPaginator(EKSClient, DescribeAddonVersionsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListAccessEntriesCommand, } from "../commands/ListAccessEntriesCommand";
2
3
  import { EKSClient } from "../EKSClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListAccessEntriesCommand(input), ...args);
5
- };
6
- export async function* paginateListAccessEntries(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 EKSClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected EKS | EKSClient");
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 paginateListAccessEntries = createPaginator(EKSClient, ListAccessEntriesCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListAccessPoliciesCommand, } from "../commands/ListAccessPoliciesCommand";
2
3
  import { EKSClient } from "../EKSClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListAccessPoliciesCommand(input), ...args);
5
- };
6
- export async function* paginateListAccessPolicies(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 EKSClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected EKS | EKSClient");
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 paginateListAccessPolicies = createPaginator(EKSClient, ListAccessPoliciesCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListAddonsCommand } from "../commands/ListAddonsCommand";
2
3
  import { EKSClient } from "../EKSClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListAddonsCommand(input), ...args);
5
- };
6
- export async function* paginateListAddons(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 EKSClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected EKS | EKSClient");
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 paginateListAddons = createPaginator(EKSClient, ListAddonsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListAssociatedAccessPoliciesCommand, } from "../commands/ListAssociatedAccessPoliciesCommand";
2
3
  import { EKSClient } from "../EKSClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListAssociatedAccessPoliciesCommand(input), ...args);
5
- };
6
- export async function* paginateListAssociatedAccessPolicies(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 EKSClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected EKS | EKSClient");
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 paginateListAssociatedAccessPolicies = createPaginator(EKSClient, ListAssociatedAccessPoliciesCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListClustersCommand, } from "../commands/ListClustersCommand";
2
3
  import { EKSClient } from "../EKSClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListClustersCommand(input), ...args);
5
- };
6
- export async function* paginateListClusters(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 EKSClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected EKS | EKSClient");
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 paginateListClusters = createPaginator(EKSClient, ListClustersCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListEksAnywhereSubscriptionsCommand, } from "../commands/ListEksAnywhereSubscriptionsCommand";
2
3
  import { EKSClient } from "../EKSClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListEksAnywhereSubscriptionsCommand(input), ...args);
5
- };
6
- export async function* paginateListEksAnywhereSubscriptions(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 EKSClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected EKS | EKSClient");
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 paginateListEksAnywhereSubscriptions = createPaginator(EKSClient, ListEksAnywhereSubscriptionsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListFargateProfilesCommand, } from "../commands/ListFargateProfilesCommand";
2
3
  import { EKSClient } from "../EKSClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListFargateProfilesCommand(input), ...args);
5
- };
6
- export async function* paginateListFargateProfiles(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 EKSClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected EKS | EKSClient");
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 paginateListFargateProfiles = createPaginator(EKSClient, ListFargateProfilesCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListIdentityProviderConfigsCommand, } from "../commands/ListIdentityProviderConfigsCommand";
2
3
  import { EKSClient } from "../EKSClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListIdentityProviderConfigsCommand(input), ...args);
5
- };
6
- export async function* paginateListIdentityProviderConfigs(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 EKSClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected EKS | EKSClient");
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 paginateListIdentityProviderConfigs = createPaginator(EKSClient, ListIdentityProviderConfigsCommand, "nextToken", "nextToken", "maxResults");
@@ -0,0 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
2
+ import { ListInsightsCommand, } from "../commands/ListInsightsCommand";
3
+ import { EKSClient } from "../EKSClient";
4
+ export const paginateListInsights = createPaginator(EKSClient, ListInsightsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListNodegroupsCommand, } from "../commands/ListNodegroupsCommand";
2
3
  import { EKSClient } from "../EKSClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListNodegroupsCommand(input), ...args);
5
- };
6
- export async function* paginateListNodegroups(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 EKSClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected EKS | EKSClient");
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 paginateListNodegroups = createPaginator(EKSClient, ListNodegroupsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListPodIdentityAssociationsCommand, } from "../commands/ListPodIdentityAssociationsCommand";
2
3
  import { EKSClient } from "../EKSClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListPodIdentityAssociationsCommand(input), ...args);
5
- };
6
- export async function* paginateListPodIdentityAssociations(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 EKSClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected EKS | EKSClient");
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 paginateListPodIdentityAssociations = createPaginator(EKSClient, ListPodIdentityAssociationsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListUpdatesCommand } from "../commands/ListUpdatesCommand";
2
3
  import { EKSClient } from "../EKSClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListUpdatesCommand(input), ...args);
5
- };
6
- export async function* paginateListUpdates(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 EKSClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected EKS | EKSClient");
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 paginateListUpdates = createPaginator(EKSClient, ListUpdatesCommand, "nextToken", "nextToken", "maxResults");
@@ -8,6 +8,7 @@ export * from "./ListClustersPaginator";
8
8
  export * from "./ListEksAnywhereSubscriptionsPaginator";
9
9
  export * from "./ListFargateProfilesPaginator";
10
10
  export * from "./ListIdentityProviderConfigsPaginator";
11
+ export * from "./ListInsightsPaginator";
11
12
  export * from "./ListNodegroupsPaginator";
12
13
  export * from "./ListPodIdentityAssociationsPaginator";
13
14
  export * from "./ListUpdatesPaginator";