@aws-sdk/client-cloudtrail 3.33.0 → 3.36.1
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 → dist-cjs}/CloudTrail.js +0 -19
- package/dist-cjs/CloudTrailClient.js +35 -0
- package/{dist/cjs → dist-cjs}/commands/AddTagsCommand.js +2 -30
- package/{dist/cjs → dist-cjs}/commands/CreateTrailCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/DeleteTrailCommand.js +2 -29
- package/{dist/cjs → dist-cjs}/commands/DescribeTrailsCommand.js +2 -27
- package/dist-cjs/commands/GetEventSelectorsCommand.js +36 -0
- package/dist-cjs/commands/GetInsightSelectorsCommand.js +36 -0
- package/{dist/cjs → dist-cjs}/commands/GetTrailCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/GetTrailStatusCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/ListPublicKeysCommand.js +2 -32
- package/{dist/cjs → dist-cjs}/commands/ListTagsCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/ListTrailsCommand.js +2 -27
- package/dist-cjs/commands/LookupEventsCommand.js +36 -0
- package/dist-cjs/commands/PutEventSelectorsCommand.js +36 -0
- package/{dist/cjs → dist-cjs}/commands/PutInsightSelectorsCommand.js +2 -30
- package/{dist/cjs → dist-cjs}/commands/RemoveTagsCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/StartLoggingCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/StopLoggingCommand.js +2 -33
- package/{dist/cjs → dist-cjs}/commands/UpdateTrailCommand.js +2 -32
- package/{dist/cjs → dist-cjs}/endpoints.js +0 -1
- package/{dist/cjs → dist-cjs}/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/models_0.js +0 -280
- package/{dist/cjs → dist-cjs}/pagination/Interfaces.js +0 -1
- package/{dist/cjs → dist-cjs}/pagination/ListPublicKeysPaginator.js +0 -11
- package/{dist/cjs → dist-cjs}/pagination/ListTagsPaginator.js +0 -11
- package/{dist/cjs → dist-cjs}/pagination/ListTrailsPaginator.js +0 -11
- package/{dist/cjs → dist-cjs}/pagination/LookupEventsPaginator.js +0 -11
- package/{dist/cjs → dist-cjs}/protocols/Aws_json1_1.js +0 -6
- package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +1 -5
- package/{dist/cjs → dist-cjs}/runtimeConfig.js +1 -5
- package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +0 -4
- package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -5
- package/{dist/es → dist-es}/CloudTrail.js +1 -20
- package/dist-es/CloudTrailClient.js +37 -0
- package/{dist/es → dist-es}/commands/AddTagsCommand.js +4 -33
- package/{dist/es → dist-es}/commands/CreateTrailCommand.js +4 -31
- package/{dist/es → dist-es}/commands/DeleteTrailCommand.js +4 -32
- package/{dist/es → dist-es}/commands/DescribeTrailsCommand.js +4 -30
- package/dist-es/commands/GetEventSelectorsCommand.js +39 -0
- package/{dist/es → dist-es}/commands/GetInsightSelectorsCommand.js +4 -36
- package/{dist/es → dist-es}/commands/GetTrailCommand.js +4 -30
- package/{dist/es → dist-es}/commands/GetTrailStatusCommand.js +4 -30
- package/{dist/es → dist-es}/commands/ListPublicKeysCommand.js +4 -35
- package/{dist/es → dist-es}/commands/ListTagsCommand.js +4 -30
- package/{dist/es → dist-es}/commands/ListTrailsCommand.js +4 -30
- package/dist-es/commands/LookupEventsCommand.js +39 -0
- package/dist-es/commands/PutEventSelectorsCommand.js +39 -0
- package/{dist/es → dist-es}/commands/PutInsightSelectorsCommand.js +4 -33
- package/{dist/es → dist-es}/commands/RemoveTagsCommand.js +4 -30
- package/{dist/es → dist-es}/commands/StartLoggingCommand.js +4 -30
- package/{dist/es → dist-es}/commands/StopLoggingCommand.js +4 -36
- package/{dist/es → dist-es}/commands/UpdateTrailCommand.js +4 -35
- package/{dist/es → dist-es}/endpoints.js +1 -2
- package/{dist/types/index.d.ts → dist-es/index.js} +0 -0
- package/{dist/types/models/index.d.ts → dist-es/models/index.js} +0 -0
- package/{dist/es → dist-es}/models/models_0.js +0 -280
- package/dist-es/pagination/Interfaces.js +1 -0
- package/{dist/es → dist-es}/pagination/ListPublicKeysPaginator.js +16 -29
- package/{dist/es → dist-es}/pagination/ListTagsPaginator.js +16 -29
- package/{dist/es → dist-es}/pagination/ListTrailsPaginator.js +16 -29
- package/{dist/es → dist-es}/pagination/LookupEventsPaginator.js +16 -29
- package/{dist/es → dist-es}/protocols/Aws_json1_1.js +788 -794
- package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -5
- package/{dist/es → dist-es}/runtimeConfig.js +1 -5
- package/{dist/es → dist-es}/runtimeConfig.native.js +0 -4
- package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -5
- package/{dist/types → dist-types}/CloudTrail.d.ts +1 -1
- package/{dist/types → dist-types}/CloudTrailClient.d.ts +8 -8
- package/{dist/types → dist-types}/commands/AddTagsCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/CreateTrailCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/DeleteTrailCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/DescribeTrailsCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/GetEventSelectorsCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/GetInsightSelectorsCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/GetTrailCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/GetTrailStatusCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/ListPublicKeysCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/ListTagsCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/ListTrailsCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/LookupEventsCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/PutEventSelectorsCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/PutInsightSelectorsCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/RemoveTagsCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/StartLoggingCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/StopLoggingCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/UpdateTrailCommand.d.ts +2 -2
- package/{dist/types → dist-types}/endpoints.d.ts +0 -0
- package/{index.ts → dist-types/index.d.ts} +0 -0
- package/{models/index.ts → dist-types/models/index.d.ts} +0 -0
- package/{dist/types → dist-types}/models/models_0.d.ts +0 -0
- package/{dist/types → dist-types}/pagination/Interfaces.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListPublicKeysPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListTagsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListTrailsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/LookupEventsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/protocols/Aws_json1_1.d.ts +2 -2
- package/{dist/types → dist-types}/runtimeConfig.browser.d.ts +0 -0
- package/{dist/types → dist-types}/runtimeConfig.d.ts +1 -1
- package/{dist/types → dist-types}/runtimeConfig.native.d.ts +0 -0
- package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
- package/dist-types/ts3.4/CloudTrail.d.ts +95 -0
- package/{dist/types → dist-types}/ts3.4/CloudTrailClient.d.ts +32 -112
- package/dist-types/ts3.4/commands/AddTagsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateTrailCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteTrailCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeTrailsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetEventSelectorsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetInsightSelectorsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetTrailCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetTrailStatusCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListPublicKeysCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListTagsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListTrailsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/LookupEventsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/PutEventSelectorsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/PutInsightSelectorsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/RemoveTagsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StartLoggingCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StopLoggingCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateTrailCommand.d.ts +17 -0
- package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
- package/dist-types/ts3.4/models/models_0.d.ts +1181 -0
- package/{dist/types → dist-types}/ts3.4/pagination/Interfaces.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListPublicKeysPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListTagsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListTrailsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/LookupEventsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/protocols/Aws_json1_1.d.ts +2 -2
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.d.ts +2 -4
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/package.json +52 -49
- package/CloudTrail.ts +0 -730
- package/CloudTrailClient.ts +0 -310
- package/commands/AddTagsCommand.ts +0 -94
- package/commands/CreateTrailCommand.ts +0 -95
- package/commands/DeleteTrailCommand.ts +0 -96
- package/commands/DescribeTrailsCommand.ts +0 -94
- package/commands/GetEventSelectorsCommand.ts +0 -110
- package/commands/GetInsightSelectorsCommand.ts +0 -100
- package/commands/GetTrailCommand.ts +0 -91
- package/commands/GetTrailStatusCommand.ts +0 -94
- package/commands/ListPublicKeysCommand.ts +0 -99
- package/commands/ListTagsCommand.ts +0 -91
- package/commands/ListTrailsCommand.ts +0 -94
- package/commands/LookupEventsCommand.ts +0 -141
- package/commands/PutEventSelectorsCommand.ts +0 -138
- package/commands/PutInsightSelectorsCommand.ts +0 -97
- package/commands/RemoveTagsCommand.ts +0 -94
- package/commands/StartLoggingCommand.ts +0 -94
- package/commands/StopLoggingCommand.ts +0 -100
- package/commands/UpdateTrailCommand.ts +0 -99
- package/dist/cjs/CloudTrail.js.map +0 -1
- package/dist/cjs/CloudTrailClient.js +0 -59
- package/dist/cjs/CloudTrailClient.js.map +0 -1
- package/dist/cjs/commands/AddTagsCommand.js.map +0 -1
- package/dist/cjs/commands/CreateTrailCommand.js.map +0 -1
- package/dist/cjs/commands/DeleteTrailCommand.js.map +0 -1
- package/dist/cjs/commands/DescribeTrailsCommand.js.map +0 -1
- package/dist/cjs/commands/GetEventSelectorsCommand.js +0 -77
- package/dist/cjs/commands/GetEventSelectorsCommand.js.map +0 -1
- package/dist/cjs/commands/GetInsightSelectorsCommand.js +0 -67
- package/dist/cjs/commands/GetInsightSelectorsCommand.js.map +0 -1
- package/dist/cjs/commands/GetTrailCommand.js.map +0 -1
- package/dist/cjs/commands/GetTrailStatusCommand.js.map +0 -1
- package/dist/cjs/commands/ListPublicKeysCommand.js.map +0 -1
- package/dist/cjs/commands/ListTagsCommand.js.map +0 -1
- package/dist/cjs/commands/ListTrailsCommand.js.map +0 -1
- package/dist/cjs/commands/LookupEventsCommand.js +0 -108
- package/dist/cjs/commands/LookupEventsCommand.js.map +0 -1
- package/dist/cjs/commands/PutEventSelectorsCommand.js +0 -105
- package/dist/cjs/commands/PutEventSelectorsCommand.js.map +0 -1
- package/dist/cjs/commands/PutInsightSelectorsCommand.js.map +0 -1
- package/dist/cjs/commands/RemoveTagsCommand.js.map +0 -1
- package/dist/cjs/commands/StartLoggingCommand.js.map +0 -1
- package/dist/cjs/commands/StopLoggingCommand.js.map +0 -1
- package/dist/cjs/commands/UpdateTrailCommand.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/package.json +0 -91
- package/dist/cjs/pagination/Interfaces.js.map +0 -1
- package/dist/cjs/pagination/ListPublicKeysPaginator.js.map +0 -1
- package/dist/cjs/pagination/ListTagsPaginator.js.map +0 -1
- package/dist/cjs/pagination/ListTrailsPaginator.js.map +0 -1
- package/dist/cjs/pagination/LookupEventsPaginator.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/CloudTrail.js.map +0 -1
- package/dist/es/CloudTrailClient.js +0 -61
- package/dist/es/CloudTrailClient.js.map +0 -1
- package/dist/es/commands/AddTagsCommand.js.map +0 -1
- package/dist/es/commands/CreateTrailCommand.js.map +0 -1
- package/dist/es/commands/DeleteTrailCommand.js.map +0 -1
- package/dist/es/commands/DescribeTrailsCommand.js.map +0 -1
- package/dist/es/commands/GetEventSelectorsCommand.js +0 -81
- package/dist/es/commands/GetEventSelectorsCommand.js.map +0 -1
- package/dist/es/commands/GetInsightSelectorsCommand.js.map +0 -1
- package/dist/es/commands/GetTrailCommand.js.map +0 -1
- package/dist/es/commands/GetTrailStatusCommand.js.map +0 -1
- package/dist/es/commands/ListPublicKeysCommand.js.map +0 -1
- package/dist/es/commands/ListTagsCommand.js.map +0 -1
- package/dist/es/commands/ListTrailsCommand.js.map +0 -1
- package/dist/es/commands/LookupEventsCommand.js +0 -112
- package/dist/es/commands/LookupEventsCommand.js.map +0 -1
- package/dist/es/commands/PutEventSelectorsCommand.js +0 -109
- package/dist/es/commands/PutEventSelectorsCommand.js.map +0 -1
- package/dist/es/commands/PutInsightSelectorsCommand.js.map +0 -1
- package/dist/es/commands/RemoveTagsCommand.js.map +0 -1
- package/dist/es/commands/StartLoggingCommand.js.map +0 -1
- package/dist/es/commands/StopLoggingCommand.js.map +0 -1
- package/dist/es/commands/UpdateTrailCommand.js.map +0 -1
- package/dist/es/endpoints.js.map +0 -1
- package/dist/es/index.js +0 -27
- package/dist/es/index.js.map +0 -1
- package/dist/es/models/index.js +0 -2
- package/dist/es/models/index.js.map +0 -1
- package/dist/es/models/models_0.js.map +0 -1
- package/dist/es/package.json +0 -91
- package/dist/es/pagination/Interfaces.js +0 -2
- package/dist/es/pagination/Interfaces.js.map +0 -1
- package/dist/es/pagination/ListPublicKeysPaginator.js.map +0 -1
- package/dist/es/pagination/ListTagsPaginator.js.map +0 -1
- package/dist/es/pagination/ListTrailsPaginator.js.map +0 -1
- package/dist/es/pagination/LookupEventsPaginator.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/dist/types/ts3.4/CloudTrail.d.ts +0 -286
- package/dist/types/ts3.4/commands/AddTagsCommand.d.ts +0 -38
- package/dist/types/ts3.4/commands/CreateTrailCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/DeleteTrailCommand.d.ts +0 -37
- package/dist/types/ts3.4/commands/DescribeTrailsCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/GetEventSelectorsCommand.d.ts +0 -51
- package/dist/types/ts3.4/commands/GetInsightSelectorsCommand.d.ts +0 -41
- package/dist/types/ts3.4/commands/GetTrailCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/GetTrailStatusCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/ListPublicKeysCommand.d.ts +0 -40
- package/dist/types/ts3.4/commands/ListTagsCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/ListTrailsCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/LookupEventsCommand.d.ts +0 -82
- package/dist/types/ts3.4/commands/PutEventSelectorsCommand.d.ts +0 -79
- package/dist/types/ts3.4/commands/PutInsightSelectorsCommand.d.ts +0 -38
- package/dist/types/ts3.4/commands/RemoveTagsCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/StartLoggingCommand.d.ts +0 -35
- package/dist/types/ts3.4/commands/StopLoggingCommand.d.ts +0 -41
- package/dist/types/ts3.4/commands/UpdateTrailCommand.d.ts +0 -40
- package/dist/types/ts3.4/models/models_0.d.ts +0 -2668
- package/endpoints.ts +0 -86
- package/jest.config.js +0 -4
- package/models/models_0.ts +0 -3167
- package/pagination/Interfaces.ts +0 -7
- package/pagination/ListPublicKeysPaginator.ts +0 -57
- package/pagination/ListTagsPaginator.ts +0 -53
- package/pagination/ListTrailsPaginator.ts +0 -53
- package/pagination/LookupEventsPaginator.ts +0 -58
- package/protocols/Aws_json1_1.ts +0 -4521
- package/runtimeConfig.browser.ts +0 -40
- package/runtimeConfig.native.ts +0 -16
- package/runtimeConfig.shared.ts +0 -16
- package/runtimeConfig.ts +0 -45
- package/tsconfig.es.json +0 -12
- package/tsconfig.json +0 -32
package/pagination/Interfaces.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { CloudTrail } from "../CloudTrail";
|
|
2
|
-
import { CloudTrailClient } from "../CloudTrailClient";
|
|
3
|
-
import { PaginationConfiguration } from "@aws-sdk/types";
|
|
4
|
-
|
|
5
|
-
export interface CloudTrailPaginationConfiguration extends PaginationConfiguration {
|
|
6
|
-
client: CloudTrail | CloudTrailClient;
|
|
7
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { CloudTrail } from "../CloudTrail";
|
|
2
|
-
import { CloudTrailClient } from "../CloudTrailClient";
|
|
3
|
-
import {
|
|
4
|
-
ListPublicKeysCommand,
|
|
5
|
-
ListPublicKeysCommandInput,
|
|
6
|
-
ListPublicKeysCommandOutput,
|
|
7
|
-
} from "../commands/ListPublicKeysCommand";
|
|
8
|
-
import { CloudTrailPaginationConfiguration } from "./Interfaces";
|
|
9
|
-
import { Paginator } from "@aws-sdk/types";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @private
|
|
13
|
-
*/
|
|
14
|
-
const makePagedClientRequest = async (
|
|
15
|
-
client: CloudTrailClient,
|
|
16
|
-
input: ListPublicKeysCommandInput,
|
|
17
|
-
...args: any
|
|
18
|
-
): Promise<ListPublicKeysCommandOutput> => {
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
return await client.send(new ListPublicKeysCommand(input), ...args);
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* @private
|
|
24
|
-
*/
|
|
25
|
-
const makePagedRequest = async (
|
|
26
|
-
client: CloudTrail,
|
|
27
|
-
input: ListPublicKeysCommandInput,
|
|
28
|
-
...args: any
|
|
29
|
-
): Promise<ListPublicKeysCommandOutput> => {
|
|
30
|
-
// @ts-ignore
|
|
31
|
-
return await client.listPublicKeys(input, ...args);
|
|
32
|
-
};
|
|
33
|
-
export async function* paginateListPublicKeys(
|
|
34
|
-
config: CloudTrailPaginationConfiguration,
|
|
35
|
-
input: ListPublicKeysCommandInput,
|
|
36
|
-
...additionalArguments: any
|
|
37
|
-
): Paginator<ListPublicKeysCommandOutput> {
|
|
38
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
39
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
40
|
-
let hasNext = true;
|
|
41
|
-
let page: ListPublicKeysCommandOutput;
|
|
42
|
-
while (hasNext) {
|
|
43
|
-
input.NextToken = token;
|
|
44
|
-
if (config.client instanceof CloudTrail) {
|
|
45
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
46
|
-
} else if (config.client instanceof CloudTrailClient) {
|
|
47
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else {
|
|
49
|
-
throw new Error("Invalid client, expected CloudTrail | CloudTrailClient");
|
|
50
|
-
}
|
|
51
|
-
yield page;
|
|
52
|
-
token = page.NextToken;
|
|
53
|
-
hasNext = !!token;
|
|
54
|
-
}
|
|
55
|
-
// @ts-ignore
|
|
56
|
-
return undefined;
|
|
57
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { CloudTrail } from "../CloudTrail";
|
|
2
|
-
import { CloudTrailClient } from "../CloudTrailClient";
|
|
3
|
-
import { ListTagsCommand, ListTagsCommandInput, ListTagsCommandOutput } from "../commands/ListTagsCommand";
|
|
4
|
-
import { CloudTrailPaginationConfiguration } from "./Interfaces";
|
|
5
|
-
import { Paginator } from "@aws-sdk/types";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @private
|
|
9
|
-
*/
|
|
10
|
-
const makePagedClientRequest = async (
|
|
11
|
-
client: CloudTrailClient,
|
|
12
|
-
input: ListTagsCommandInput,
|
|
13
|
-
...args: any
|
|
14
|
-
): Promise<ListTagsCommandOutput> => {
|
|
15
|
-
// @ts-ignore
|
|
16
|
-
return await client.send(new ListTagsCommand(input), ...args);
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* @private
|
|
20
|
-
*/
|
|
21
|
-
const makePagedRequest = async (
|
|
22
|
-
client: CloudTrail,
|
|
23
|
-
input: ListTagsCommandInput,
|
|
24
|
-
...args: any
|
|
25
|
-
): Promise<ListTagsCommandOutput> => {
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
return await client.listTags(input, ...args);
|
|
28
|
-
};
|
|
29
|
-
export async function* paginateListTags(
|
|
30
|
-
config: CloudTrailPaginationConfiguration,
|
|
31
|
-
input: ListTagsCommandInput,
|
|
32
|
-
...additionalArguments: any
|
|
33
|
-
): Paginator<ListTagsCommandOutput> {
|
|
34
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
35
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
36
|
-
let hasNext = true;
|
|
37
|
-
let page: ListTagsCommandOutput;
|
|
38
|
-
while (hasNext) {
|
|
39
|
-
input.NextToken = token;
|
|
40
|
-
if (config.client instanceof CloudTrail) {
|
|
41
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
42
|
-
} else if (config.client instanceof CloudTrailClient) {
|
|
43
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
44
|
-
} else {
|
|
45
|
-
throw new Error("Invalid client, expected CloudTrail | CloudTrailClient");
|
|
46
|
-
}
|
|
47
|
-
yield page;
|
|
48
|
-
token = page.NextToken;
|
|
49
|
-
hasNext = !!token;
|
|
50
|
-
}
|
|
51
|
-
// @ts-ignore
|
|
52
|
-
return undefined;
|
|
53
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { CloudTrail } from "../CloudTrail";
|
|
2
|
-
import { CloudTrailClient } from "../CloudTrailClient";
|
|
3
|
-
import { ListTrailsCommand, ListTrailsCommandInput, ListTrailsCommandOutput } from "../commands/ListTrailsCommand";
|
|
4
|
-
import { CloudTrailPaginationConfiguration } from "./Interfaces";
|
|
5
|
-
import { Paginator } from "@aws-sdk/types";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @private
|
|
9
|
-
*/
|
|
10
|
-
const makePagedClientRequest = async (
|
|
11
|
-
client: CloudTrailClient,
|
|
12
|
-
input: ListTrailsCommandInput,
|
|
13
|
-
...args: any
|
|
14
|
-
): Promise<ListTrailsCommandOutput> => {
|
|
15
|
-
// @ts-ignore
|
|
16
|
-
return await client.send(new ListTrailsCommand(input), ...args);
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* @private
|
|
20
|
-
*/
|
|
21
|
-
const makePagedRequest = async (
|
|
22
|
-
client: CloudTrail,
|
|
23
|
-
input: ListTrailsCommandInput,
|
|
24
|
-
...args: any
|
|
25
|
-
): Promise<ListTrailsCommandOutput> => {
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
return await client.listTrails(input, ...args);
|
|
28
|
-
};
|
|
29
|
-
export async function* paginateListTrails(
|
|
30
|
-
config: CloudTrailPaginationConfiguration,
|
|
31
|
-
input: ListTrailsCommandInput,
|
|
32
|
-
...additionalArguments: any
|
|
33
|
-
): Paginator<ListTrailsCommandOutput> {
|
|
34
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
35
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
36
|
-
let hasNext = true;
|
|
37
|
-
let page: ListTrailsCommandOutput;
|
|
38
|
-
while (hasNext) {
|
|
39
|
-
input.NextToken = token;
|
|
40
|
-
if (config.client instanceof CloudTrail) {
|
|
41
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
42
|
-
} else if (config.client instanceof CloudTrailClient) {
|
|
43
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
44
|
-
} else {
|
|
45
|
-
throw new Error("Invalid client, expected CloudTrail | CloudTrailClient");
|
|
46
|
-
}
|
|
47
|
-
yield page;
|
|
48
|
-
token = page.NextToken;
|
|
49
|
-
hasNext = !!token;
|
|
50
|
-
}
|
|
51
|
-
// @ts-ignore
|
|
52
|
-
return undefined;
|
|
53
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { CloudTrail } from "../CloudTrail";
|
|
2
|
-
import { CloudTrailClient } from "../CloudTrailClient";
|
|
3
|
-
import {
|
|
4
|
-
LookupEventsCommand,
|
|
5
|
-
LookupEventsCommandInput,
|
|
6
|
-
LookupEventsCommandOutput,
|
|
7
|
-
} from "../commands/LookupEventsCommand";
|
|
8
|
-
import { CloudTrailPaginationConfiguration } from "./Interfaces";
|
|
9
|
-
import { Paginator } from "@aws-sdk/types";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @private
|
|
13
|
-
*/
|
|
14
|
-
const makePagedClientRequest = async (
|
|
15
|
-
client: CloudTrailClient,
|
|
16
|
-
input: LookupEventsCommandInput,
|
|
17
|
-
...args: any
|
|
18
|
-
): Promise<LookupEventsCommandOutput> => {
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
return await client.send(new LookupEventsCommand(input), ...args);
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* @private
|
|
24
|
-
*/
|
|
25
|
-
const makePagedRequest = async (
|
|
26
|
-
client: CloudTrail,
|
|
27
|
-
input: LookupEventsCommandInput,
|
|
28
|
-
...args: any
|
|
29
|
-
): Promise<LookupEventsCommandOutput> => {
|
|
30
|
-
// @ts-ignore
|
|
31
|
-
return await client.lookupEvents(input, ...args);
|
|
32
|
-
};
|
|
33
|
-
export async function* paginateLookupEvents(
|
|
34
|
-
config: CloudTrailPaginationConfiguration,
|
|
35
|
-
input: LookupEventsCommandInput,
|
|
36
|
-
...additionalArguments: any
|
|
37
|
-
): Paginator<LookupEventsCommandOutput> {
|
|
38
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
39
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
40
|
-
let hasNext = true;
|
|
41
|
-
let page: LookupEventsCommandOutput;
|
|
42
|
-
while (hasNext) {
|
|
43
|
-
input.NextToken = token;
|
|
44
|
-
input["MaxResults"] = config.pageSize;
|
|
45
|
-
if (config.client instanceof CloudTrail) {
|
|
46
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
47
|
-
} else if (config.client instanceof CloudTrailClient) {
|
|
48
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
49
|
-
} else {
|
|
50
|
-
throw new Error("Invalid client, expected CloudTrail | CloudTrailClient");
|
|
51
|
-
}
|
|
52
|
-
yield page;
|
|
53
|
-
token = page.NextToken;
|
|
54
|
-
hasNext = !!token;
|
|
55
|
-
}
|
|
56
|
-
// @ts-ignore
|
|
57
|
-
return undefined;
|
|
58
|
-
}
|