@aws-sdk/client-cloudtrail 3.43.0 → 3.47.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.
Files changed (93) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/dist-cjs/CloudTrail.js +165 -0
  3. package/dist-cjs/commands/CancelQueryCommand.js +36 -0
  4. package/dist-cjs/commands/CreateEventDataStoreCommand.js +36 -0
  5. package/dist-cjs/commands/DeleteEventDataStoreCommand.js +36 -0
  6. package/dist-cjs/commands/DescribeQueryCommand.js +36 -0
  7. package/dist-cjs/commands/GetEventDataStoreCommand.js +36 -0
  8. package/dist-cjs/commands/GetQueryResultsCommand.js +36 -0
  9. package/dist-cjs/commands/ListEventDataStoresCommand.js +36 -0
  10. package/dist-cjs/commands/ListQueriesCommand.js +36 -0
  11. package/dist-cjs/commands/RestoreEventDataStoreCommand.js +36 -0
  12. package/dist-cjs/commands/StartQueryCommand.js +36 -0
  13. package/dist-cjs/commands/UpdateEventDataStoreCommand.js +36 -0
  14. package/dist-cjs/commands/index.js +11 -0
  15. package/dist-cjs/endpoints.js +1 -16
  16. package/dist-cjs/models/models_0.js +158 -252
  17. package/dist-cjs/pagination/GetQueryResultsPaginator.js +34 -0
  18. package/dist-cjs/pagination/ListEventDataStoresPaginator.js +35 -0
  19. package/dist-cjs/pagination/ListQueriesPaginator.js +35 -0
  20. package/dist-cjs/pagination/index.js +3 -0
  21. package/dist-cjs/protocols/Aws_json1_1.js +2319 -389
  22. package/dist-cjs/runtimeConfig.browser.js +7 -2
  23. package/dist-cjs/runtimeConfig.js +9 -3
  24. package/dist-es/CloudTrail.js +165 -0
  25. package/dist-es/commands/CancelQueryCommand.js +39 -0
  26. package/dist-es/commands/CreateEventDataStoreCommand.js +39 -0
  27. package/dist-es/commands/DeleteEventDataStoreCommand.js +39 -0
  28. package/dist-es/commands/DescribeQueryCommand.js +39 -0
  29. package/dist-es/commands/GetEventDataStoreCommand.js +39 -0
  30. package/dist-es/commands/GetQueryResultsCommand.js +39 -0
  31. package/dist-es/commands/ListEventDataStoresCommand.js +39 -0
  32. package/dist-es/commands/ListQueriesCommand.js +39 -0
  33. package/dist-es/commands/RestoreEventDataStoreCommand.js +39 -0
  34. package/dist-es/commands/StartQueryCommand.js +39 -0
  35. package/dist-es/commands/UpdateEventDataStoreCommand.js +39 -0
  36. package/dist-es/commands/index.js +11 -0
  37. package/dist-es/endpoints.js +1 -16
  38. package/dist-es/models/models_0.js +118 -176
  39. package/dist-es/pagination/GetQueryResultsPaginator.js +73 -0
  40. package/dist-es/pagination/ListEventDataStoresPaginator.js +74 -0
  41. package/dist-es/pagination/ListQueriesPaginator.js +74 -0
  42. package/dist-es/pagination/index.js +3 -0
  43. package/dist-es/protocols/Aws_json1_1.js +2669 -704
  44. package/dist-es/runtimeConfig.browser.js +12 -3
  45. package/dist-es/runtimeConfig.js +13 -6
  46. package/dist-types/CloudTrail.d.ts +100 -1
  47. package/dist-types/CloudTrailClient.d.ts +18 -3
  48. package/dist-types/commands/CancelQueryCommand.d.ts +37 -0
  49. package/dist-types/commands/CreateEventDataStoreCommand.d.ts +35 -0
  50. package/dist-types/commands/DeleteEventDataStoreCommand.d.ts +41 -0
  51. package/dist-types/commands/DescribeQueryCommand.d.ts +36 -0
  52. package/dist-types/commands/GetEventDataStoreCommand.d.ts +35 -0
  53. package/dist-types/commands/GetQueryResultsCommand.d.ts +36 -0
  54. package/dist-types/commands/ListEventDataStoresCommand.d.ts +35 -0
  55. package/dist-types/commands/ListQueriesCommand.d.ts +39 -0
  56. package/dist-types/commands/PutInsightSelectorsCommand.d.ts +1 -1
  57. package/dist-types/commands/RestoreEventDataStoreCommand.d.ts +37 -0
  58. package/dist-types/commands/StartQueryCommand.d.ts +36 -0
  59. package/dist-types/commands/UpdateEventDataStoreCommand.d.ts +40 -0
  60. package/dist-types/commands/index.d.ts +11 -0
  61. package/dist-types/models/models_0.d.ts +926 -328
  62. package/dist-types/pagination/GetQueryResultsPaginator.d.ts +4 -0
  63. package/dist-types/pagination/ListEventDataStoresPaginator.d.ts +4 -0
  64. package/dist-types/pagination/ListQueriesPaginator.d.ts +4 -0
  65. package/dist-types/pagination/index.d.ts +3 -0
  66. package/dist-types/protocols/Aws_json1_1.d.ts +33 -0
  67. package/dist-types/runtimeConfig.browser.d.ts +3 -2
  68. package/dist-types/runtimeConfig.d.ts +4 -3
  69. package/dist-types/runtimeConfig.native.d.ts +1 -0
  70. package/dist-types/ts3.4/CloudTrail.d.ts +55 -0
  71. package/dist-types/ts3.4/CloudTrailClient.d.ts +16 -3
  72. package/dist-types/ts3.4/commands/CancelQueryCommand.d.ts +17 -0
  73. package/dist-types/ts3.4/commands/CreateEventDataStoreCommand.d.ts +17 -0
  74. package/dist-types/ts3.4/commands/DeleteEventDataStoreCommand.d.ts +17 -0
  75. package/dist-types/ts3.4/commands/DescribeQueryCommand.d.ts +17 -0
  76. package/dist-types/ts3.4/commands/GetEventDataStoreCommand.d.ts +17 -0
  77. package/dist-types/ts3.4/commands/GetQueryResultsCommand.d.ts +17 -0
  78. package/dist-types/ts3.4/commands/ListEventDataStoresCommand.d.ts +17 -0
  79. package/dist-types/ts3.4/commands/ListQueriesCommand.d.ts +17 -0
  80. package/dist-types/ts3.4/commands/RestoreEventDataStoreCommand.d.ts +17 -0
  81. package/dist-types/ts3.4/commands/StartQueryCommand.d.ts +17 -0
  82. package/dist-types/ts3.4/commands/UpdateEventDataStoreCommand.d.ts +17 -0
  83. package/dist-types/ts3.4/commands/index.d.ts +11 -0
  84. package/dist-types/ts3.4/models/models_0.d.ts +523 -205
  85. package/dist-types/ts3.4/pagination/GetQueryResultsPaginator.d.ts +4 -0
  86. package/dist-types/ts3.4/pagination/ListEventDataStoresPaginator.d.ts +4 -0
  87. package/dist-types/ts3.4/pagination/ListQueriesPaginator.d.ts +4 -0
  88. package/dist-types/ts3.4/pagination/index.d.ts +3 -0
  89. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +33 -0
  90. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +3 -2
  91. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -3
  92. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
  93. package/package.json +39 -46
@@ -0,0 +1,74 @@
1
+ import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
+ import { CloudTrail } from "../CloudTrail";
3
+ import { CloudTrailClient } from "../CloudTrailClient";
4
+ import { ListEventDataStoresCommand, } from "../commands/ListEventDataStoresCommand";
5
+ var makePagedClientRequest = function (client, input) {
6
+ var args = [];
7
+ for (var _i = 2; _i < arguments.length; _i++) {
8
+ args[_i - 2] = arguments[_i];
9
+ }
10
+ return __awaiter(void 0, void 0, void 0, function () {
11
+ return __generator(this, function (_a) {
12
+ switch (_a.label) {
13
+ case 0: return [4, client.send.apply(client, __spreadArray([new ListEventDataStoresCommand(input)], __read(args)))];
14
+ case 1: return [2, _a.sent()];
15
+ }
16
+ });
17
+ });
18
+ };
19
+ var makePagedRequest = function (client, input) {
20
+ var args = [];
21
+ for (var _i = 2; _i < arguments.length; _i++) {
22
+ args[_i - 2] = arguments[_i];
23
+ }
24
+ return __awaiter(void 0, void 0, void 0, function () {
25
+ return __generator(this, function (_a) {
26
+ switch (_a.label) {
27
+ case 0: return [4, client.listEventDataStores.apply(client, __spreadArray([input], __read(args)))];
28
+ case 1: return [2, _a.sent()];
29
+ }
30
+ });
31
+ });
32
+ };
33
+ export function paginateListEventDataStores(config, input) {
34
+ var additionalArguments = [];
35
+ for (var _i = 2; _i < arguments.length; _i++) {
36
+ additionalArguments[_i - 2] = arguments[_i];
37
+ }
38
+ return __asyncGenerator(this, arguments, function paginateListEventDataStores_1() {
39
+ var token, hasNext, page;
40
+ return __generator(this, function (_a) {
41
+ switch (_a.label) {
42
+ case 0:
43
+ token = config.startingToken || undefined;
44
+ hasNext = true;
45
+ _a.label = 1;
46
+ case 1:
47
+ if (!hasNext) return [3, 9];
48
+ input.NextToken = token;
49
+ input["MaxResults"] = config.pageSize;
50
+ if (!(config.client instanceof CloudTrail)) return [3, 3];
51
+ return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments))))];
52
+ case 2:
53
+ page = _a.sent();
54
+ return [3, 6];
55
+ case 3:
56
+ if (!(config.client instanceof CloudTrailClient)) return [3, 5];
57
+ return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments))))];
58
+ case 4:
59
+ page = _a.sent();
60
+ return [3, 6];
61
+ case 5: throw new Error("Invalid client, expected CloudTrail | CloudTrailClient");
62
+ case 6: return [4, __await(page)];
63
+ case 7: return [4, _a.sent()];
64
+ case 8:
65
+ _a.sent();
66
+ token = page.NextToken;
67
+ hasNext = !!token;
68
+ return [3, 1];
69
+ case 9: return [4, __await(undefined)];
70
+ case 10: return [2, _a.sent()];
71
+ }
72
+ });
73
+ });
74
+ }
@@ -0,0 +1,74 @@
1
+ import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
+ import { CloudTrail } from "../CloudTrail";
3
+ import { CloudTrailClient } from "../CloudTrailClient";
4
+ import { ListQueriesCommand } from "../commands/ListQueriesCommand";
5
+ var makePagedClientRequest = function (client, input) {
6
+ var args = [];
7
+ for (var _i = 2; _i < arguments.length; _i++) {
8
+ args[_i - 2] = arguments[_i];
9
+ }
10
+ return __awaiter(void 0, void 0, void 0, function () {
11
+ return __generator(this, function (_a) {
12
+ switch (_a.label) {
13
+ case 0: return [4, client.send.apply(client, __spreadArray([new ListQueriesCommand(input)], __read(args)))];
14
+ case 1: return [2, _a.sent()];
15
+ }
16
+ });
17
+ });
18
+ };
19
+ var makePagedRequest = function (client, input) {
20
+ var args = [];
21
+ for (var _i = 2; _i < arguments.length; _i++) {
22
+ args[_i - 2] = arguments[_i];
23
+ }
24
+ return __awaiter(void 0, void 0, void 0, function () {
25
+ return __generator(this, function (_a) {
26
+ switch (_a.label) {
27
+ case 0: return [4, client.listQueries.apply(client, __spreadArray([input], __read(args)))];
28
+ case 1: return [2, _a.sent()];
29
+ }
30
+ });
31
+ });
32
+ };
33
+ export function paginateListQueries(config, input) {
34
+ var additionalArguments = [];
35
+ for (var _i = 2; _i < arguments.length; _i++) {
36
+ additionalArguments[_i - 2] = arguments[_i];
37
+ }
38
+ return __asyncGenerator(this, arguments, function paginateListQueries_1() {
39
+ var token, hasNext, page;
40
+ return __generator(this, function (_a) {
41
+ switch (_a.label) {
42
+ case 0:
43
+ token = config.startingToken || undefined;
44
+ hasNext = true;
45
+ _a.label = 1;
46
+ case 1:
47
+ if (!hasNext) return [3, 9];
48
+ input.NextToken = token;
49
+ input["MaxResults"] = config.pageSize;
50
+ if (!(config.client instanceof CloudTrail)) return [3, 3];
51
+ return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments))))];
52
+ case 2:
53
+ page = _a.sent();
54
+ return [3, 6];
55
+ case 3:
56
+ if (!(config.client instanceof CloudTrailClient)) return [3, 5];
57
+ return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments))))];
58
+ case 4:
59
+ page = _a.sent();
60
+ return [3, 6];
61
+ case 5: throw new Error("Invalid client, expected CloudTrail | CloudTrailClient");
62
+ case 6: return [4, __await(page)];
63
+ case 7: return [4, _a.sent()];
64
+ case 8:
65
+ _a.sent();
66
+ token = page.NextToken;
67
+ hasNext = !!token;
68
+ return [3, 1];
69
+ case 9: return [4, __await(undefined)];
70
+ case 10: return [2, _a.sent()];
71
+ }
72
+ });
73
+ });
74
+ }
@@ -1,5 +1,8 @@
1
+ export * from "./GetQueryResultsPaginator";
1
2
  export * from "./Interfaces";
3
+ export * from "./ListEventDataStoresPaginator";
2
4
  export * from "./ListPublicKeysPaginator";
5
+ export * from "./ListQueriesPaginator";
3
6
  export * from "./ListTagsPaginator";
4
7
  export * from "./ListTrailsPaginator";
5
8
  export * from "./LookupEventsPaginator";