@aws-sdk/client-inspector2 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 (43) hide show
  1. package/dist-cjs/pagination/ListAccountPermissionsPaginator.js +2 -24
  2. package/dist-cjs/pagination/ListCoveragePaginator.js +2 -24
  3. package/dist-cjs/pagination/ListCoverageStatisticsPaginator.js +2 -23
  4. package/dist-cjs/pagination/ListDelegatedAdminAccountsPaginator.js +2 -24
  5. package/dist-cjs/pagination/ListFiltersPaginator.js +2 -24
  6. package/dist-cjs/pagination/ListFindingAggregationsPaginator.js +2 -24
  7. package/dist-cjs/pagination/ListFindingsPaginator.js +2 -24
  8. package/dist-cjs/pagination/ListMembersPaginator.js +2 -24
  9. package/dist-cjs/pagination/ListUsageTotalsPaginator.js +2 -24
  10. package/dist-cjs/pagination/SearchVulnerabilitiesPaginator.js +2 -23
  11. package/dist-cjs/protocols/Aws_restJson1.js +199 -526
  12. package/dist-es/pagination/ListAccountPermissionsPaginator.js +2 -23
  13. package/dist-es/pagination/ListCoveragePaginator.js +2 -23
  14. package/dist-es/pagination/ListCoverageStatisticsPaginator.js +2 -22
  15. package/dist-es/pagination/ListDelegatedAdminAccountsPaginator.js +2 -23
  16. package/dist-es/pagination/ListFiltersPaginator.js +2 -23
  17. package/dist-es/pagination/ListFindingAggregationsPaginator.js +2 -23
  18. package/dist-es/pagination/ListFindingsPaginator.js +2 -23
  19. package/dist-es/pagination/ListMembersPaginator.js +2 -23
  20. package/dist-es/pagination/ListUsageTotalsPaginator.js +2 -23
  21. package/dist-es/pagination/SearchVulnerabilitiesPaginator.js +2 -22
  22. package/dist-es/protocols/Aws_restJson1.js +200 -527
  23. package/dist-types/pagination/ListAccountPermissionsPaginator.d.ts +1 -1
  24. package/dist-types/pagination/ListCoveragePaginator.d.ts +1 -1
  25. package/dist-types/pagination/ListCoverageStatisticsPaginator.d.ts +1 -1
  26. package/dist-types/pagination/ListDelegatedAdminAccountsPaginator.d.ts +1 -1
  27. package/dist-types/pagination/ListFiltersPaginator.d.ts +1 -1
  28. package/dist-types/pagination/ListFindingAggregationsPaginator.d.ts +1 -1
  29. package/dist-types/pagination/ListFindingsPaginator.d.ts +1 -1
  30. package/dist-types/pagination/ListMembersPaginator.d.ts +1 -1
  31. package/dist-types/pagination/ListUsageTotalsPaginator.d.ts +1 -1
  32. package/dist-types/pagination/SearchVulnerabilitiesPaginator.d.ts +1 -1
  33. package/dist-types/ts3.4/pagination/ListAccountPermissionsPaginator.d.ts +3 -3
  34. package/dist-types/ts3.4/pagination/ListCoveragePaginator.d.ts +3 -3
  35. package/dist-types/ts3.4/pagination/ListCoverageStatisticsPaginator.d.ts +3 -3
  36. package/dist-types/ts3.4/pagination/ListDelegatedAdminAccountsPaginator.d.ts +3 -3
  37. package/dist-types/ts3.4/pagination/ListFiltersPaginator.d.ts +3 -3
  38. package/dist-types/ts3.4/pagination/ListFindingAggregationsPaginator.d.ts +3 -3
  39. package/dist-types/ts3.4/pagination/ListFindingsPaginator.d.ts +3 -3
  40. package/dist-types/ts3.4/pagination/ListMembersPaginator.d.ts +3 -3
  41. package/dist-types/ts3.4/pagination/ListUsageTotalsPaginator.d.ts +3 -3
  42. package/dist-types/ts3.4/pagination/SearchVulnerabilitiesPaginator.d.ts +3 -3
  43. package/package.json +7 -6
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListAccountPermissionsCommand, } from "../commands/ListAccountPermissionsCommand";
2
3
  import { Inspector2Client } from "../Inspector2Client";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListAccountPermissionsCommand(input), ...args);
5
- };
6
- export async function* paginateListAccountPermissions(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 Inspector2Client) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Inspector2 | Inspector2Client");
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 paginateListAccountPermissions = createPaginator(Inspector2Client, ListAccountPermissionsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListCoverageCommand, } from "../commands/ListCoverageCommand";
2
3
  import { Inspector2Client } from "../Inspector2Client";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListCoverageCommand(input), ...args);
5
- };
6
- export async function* paginateListCoverage(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 Inspector2Client) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Inspector2 | Inspector2Client");
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 paginateListCoverage = createPaginator(Inspector2Client, ListCoverageCommand, "nextToken", "nextToken", "maxResults");
@@ -1,24 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListCoverageStatisticsCommand, } from "../commands/ListCoverageStatisticsCommand";
2
3
  import { Inspector2Client } from "../Inspector2Client";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListCoverageStatisticsCommand(input), ...args);
5
- };
6
- export async function* paginateListCoverageStatistics(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.nextToken = token;
12
- if (config.client instanceof Inspector2Client) {
13
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
14
- }
15
- else {
16
- throw new Error("Invalid client, expected Inspector2 | Inspector2Client");
17
- }
18
- yield page;
19
- const prevToken = token;
20
- token = page.nextToken;
21
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
22
- }
23
- return undefined;
24
- }
4
+ export const paginateListCoverageStatistics = createPaginator(Inspector2Client, ListCoverageStatisticsCommand, "nextToken", "nextToken", "");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListDelegatedAdminAccountsCommand, } from "../commands/ListDelegatedAdminAccountsCommand";
2
3
  import { Inspector2Client } from "../Inspector2Client";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListDelegatedAdminAccountsCommand(input), ...args);
5
- };
6
- export async function* paginateListDelegatedAdminAccounts(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 Inspector2Client) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Inspector2 | Inspector2Client");
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 paginateListDelegatedAdminAccounts = createPaginator(Inspector2Client, ListDelegatedAdminAccountsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListFiltersCommand } from "../commands/ListFiltersCommand";
2
3
  import { Inspector2Client } from "../Inspector2Client";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListFiltersCommand(input), ...args);
5
- };
6
- export async function* paginateListFilters(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 Inspector2Client) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Inspector2 | Inspector2Client");
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 paginateListFilters = createPaginator(Inspector2Client, ListFiltersCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListFindingAggregationsCommand, } from "../commands/ListFindingAggregationsCommand";
2
3
  import { Inspector2Client } from "../Inspector2Client";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListFindingAggregationsCommand(input), ...args);
5
- };
6
- export async function* paginateListFindingAggregations(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 Inspector2Client) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Inspector2 | Inspector2Client");
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 paginateListFindingAggregations = createPaginator(Inspector2Client, ListFindingAggregationsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListFindingsCommand, } from "../commands/ListFindingsCommand";
2
3
  import { Inspector2Client } from "../Inspector2Client";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListFindingsCommand(input), ...args);
5
- };
6
- export async function* paginateListFindings(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 Inspector2Client) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Inspector2 | Inspector2Client");
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 paginateListFindings = createPaginator(Inspector2Client, ListFindingsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListMembersCommand } from "../commands/ListMembersCommand";
2
3
  import { Inspector2Client } from "../Inspector2Client";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListMembersCommand(input), ...args);
5
- };
6
- export async function* paginateListMembers(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 Inspector2Client) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Inspector2 | Inspector2Client");
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 paginateListMembers = createPaginator(Inspector2Client, ListMembersCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListUsageTotalsCommand, } from "../commands/ListUsageTotalsCommand";
2
3
  import { Inspector2Client } from "../Inspector2Client";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListUsageTotalsCommand(input), ...args);
5
- };
6
- export async function* paginateListUsageTotals(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 Inspector2Client) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Inspector2 | Inspector2Client");
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 paginateListUsageTotals = createPaginator(Inspector2Client, ListUsageTotalsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,24 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { SearchVulnerabilitiesCommand, } from "../commands/SearchVulnerabilitiesCommand";
2
3
  import { Inspector2Client } from "../Inspector2Client";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new SearchVulnerabilitiesCommand(input), ...args);
5
- };
6
- export async function* paginateSearchVulnerabilities(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.nextToken = token;
12
- if (config.client instanceof Inspector2Client) {
13
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
14
- }
15
- else {
16
- throw new Error("Invalid client, expected Inspector2 | Inspector2Client");
17
- }
18
- yield page;
19
- const prevToken = token;
20
- token = page.nextToken;
21
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
22
- }
23
- return undefined;
24
- }
4
+ export const paginateSearchVulnerabilities = createPaginator(Inspector2Client, SearchVulnerabilitiesCommand, "nextToken", "nextToken", "");