Skip to content

Commit cd1e9a0

Browse files
author
awstools
committed
feat(client-cloudtrail): CloudTrail Feature Release: Support for Enriched Events with Configurable Context for Event Data Store
1 parent 3ccfc39 commit cd1e9a0

12 files changed

+1048
-30
lines changed

clients/client-cloudtrail/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,14 @@ GetDashboard
370370

371371
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudtrail/command/GetDashboardCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudtrail/Interface/GetDashboardCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudtrail/Interface/GetDashboardCommandOutput/)
372372

373+
</details>
374+
<details>
375+
<summary>
376+
GetEventConfiguration
377+
</summary>
378+
379+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudtrail/command/GetEventConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudtrail/Interface/GetEventConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudtrail/Interface/GetEventConfigurationCommandOutput/)
380+
373381
</details>
374382
<details>
375383
<summary>
@@ -522,6 +530,14 @@ LookupEvents
522530

523531
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudtrail/command/LookupEventsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudtrail/Interface/LookupEventsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudtrail/Interface/LookupEventsCommandOutput/)
524532

533+
</details>
534+
<details>
535+
<summary>
536+
PutEventConfiguration
537+
</summary>
538+
539+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudtrail/command/PutEventConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudtrail/Interface/PutEventConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudtrail/Interface/PutEventConfigurationCommandOutput/)
540+
525541
</details>
526542
<details>
527543
<summary>

clients/client-cloudtrail/src/CloudTrail.ts

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ import {
7878
GetDashboardCommandInput,
7979
GetDashboardCommandOutput,
8080
} from "./commands/GetDashboardCommand";
81+
import {
82+
GetEventConfigurationCommand,
83+
GetEventConfigurationCommandInput,
84+
GetEventConfigurationCommandOutput,
85+
} from "./commands/GetEventConfigurationCommand";
8186
import {
8287
GetEventDataStoreCommand,
8388
GetEventDataStoreCommandInput,
@@ -149,6 +154,11 @@ import {
149154
LookupEventsCommandInput,
150155
LookupEventsCommandOutput,
151156
} from "./commands/LookupEventsCommand";
157+
import {
158+
PutEventConfigurationCommand,
159+
PutEventConfigurationCommandInput,
160+
PutEventConfigurationCommandOutput,
161+
} from "./commands/PutEventConfigurationCommand";
152162
import {
153163
PutEventSelectorsCommand,
154164
PutEventSelectorsCommandInput,
@@ -241,6 +251,7 @@ const commands = {
241251
GenerateQueryCommand,
242252
GetChannelCommand,
243253
GetDashboardCommand,
254+
GetEventConfigurationCommand,
244255
GetEventDataStoreCommand,
245256
GetEventSelectorsCommand,
246257
GetImportCommand,
@@ -260,6 +271,7 @@ const commands = {
260271
ListTagsCommand,
261272
ListTrailsCommand,
262273
LookupEventsCommand,
274+
PutEventConfigurationCommand,
263275
PutEventSelectorsCommand,
264276
PutInsightSelectorsCommand,
265277
PutResourcePolicyCommand,
@@ -538,6 +550,24 @@ export interface CloudTrail {
538550
cb: (err: any, data?: GetDashboardCommandOutput) => void
539551
): void;
540552

553+
/**
554+
* @see {@link GetEventConfigurationCommand}
555+
*/
556+
getEventConfiguration(): Promise<GetEventConfigurationCommandOutput>;
557+
getEventConfiguration(
558+
args: GetEventConfigurationCommandInput,
559+
options?: __HttpHandlerOptions
560+
): Promise<GetEventConfigurationCommandOutput>;
561+
getEventConfiguration(
562+
args: GetEventConfigurationCommandInput,
563+
cb: (err: any, data?: GetEventConfigurationCommandOutput) => void
564+
): void;
565+
getEventConfiguration(
566+
args: GetEventConfigurationCommandInput,
567+
options: __HttpHandlerOptions,
568+
cb: (err: any, data?: GetEventConfigurationCommandOutput) => void
569+
): void;
570+
541571
/**
542572
* @see {@link GetEventDataStoreCommand}
543573
*/
@@ -809,6 +839,23 @@ export interface CloudTrail {
809839
cb: (err: any, data?: LookupEventsCommandOutput) => void
810840
): void;
811841

842+
/**
843+
* @see {@link PutEventConfigurationCommand}
844+
*/
845+
putEventConfiguration(
846+
args: PutEventConfigurationCommandInput,
847+
options?: __HttpHandlerOptions
848+
): Promise<PutEventConfigurationCommandOutput>;
849+
putEventConfiguration(
850+
args: PutEventConfigurationCommandInput,
851+
cb: (err: any, data?: PutEventConfigurationCommandOutput) => void
852+
): void;
853+
putEventConfiguration(
854+
args: PutEventConfigurationCommandInput,
855+
options: __HttpHandlerOptions,
856+
cb: (err: any, data?: PutEventConfigurationCommandOutput) => void
857+
): void;
858+
812859
/**
813860
* @see {@link PutEventSelectorsCommand}
814861
*/

clients/client-cloudtrail/src/CloudTrailClient.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ import { EnableFederationCommandInput, EnableFederationCommandOutput } from "./c
8484
import { GenerateQueryCommandInput, GenerateQueryCommandOutput } from "./commands/GenerateQueryCommand";
8585
import { GetChannelCommandInput, GetChannelCommandOutput } from "./commands/GetChannelCommand";
8686
import { GetDashboardCommandInput, GetDashboardCommandOutput } from "./commands/GetDashboardCommand";
87+
import {
88+
GetEventConfigurationCommandInput,
89+
GetEventConfigurationCommandOutput,
90+
} from "./commands/GetEventConfigurationCommand";
8791
import { GetEventDataStoreCommandInput, GetEventDataStoreCommandOutput } from "./commands/GetEventDataStoreCommand";
8892
import { GetEventSelectorsCommandInput, GetEventSelectorsCommandOutput } from "./commands/GetEventSelectorsCommand";
8993
import { GetImportCommandInput, GetImportCommandOutput } from "./commands/GetImportCommand";
@@ -112,6 +116,10 @@ import { ListQueriesCommandInput, ListQueriesCommandOutput } from "./commands/Li
112116
import { ListTagsCommandInput, ListTagsCommandOutput } from "./commands/ListTagsCommand";
113117
import { ListTrailsCommandInput, ListTrailsCommandOutput } from "./commands/ListTrailsCommand";
114118
import { LookupEventsCommandInput, LookupEventsCommandOutput } from "./commands/LookupEventsCommand";
119+
import {
120+
PutEventConfigurationCommandInput,
121+
PutEventConfigurationCommandOutput,
122+
} from "./commands/PutEventConfigurationCommand";
115123
import { PutEventSelectorsCommandInput, PutEventSelectorsCommandOutput } from "./commands/PutEventSelectorsCommand";
116124
import {
117125
PutInsightSelectorsCommandInput,
@@ -189,6 +197,7 @@ export type ServiceInputTypes =
189197
| GenerateQueryCommandInput
190198
| GetChannelCommandInput
191199
| GetDashboardCommandInput
200+
| GetEventConfigurationCommandInput
192201
| GetEventDataStoreCommandInput
193202
| GetEventSelectorsCommandInput
194203
| GetImportCommandInput
@@ -208,6 +217,7 @@ export type ServiceInputTypes =
208217
| ListTagsCommandInput
209218
| ListTrailsCommandInput
210219
| LookupEventsCommandInput
220+
| PutEventConfigurationCommandInput
211221
| PutEventSelectorsCommandInput
212222
| PutInsightSelectorsCommandInput
213223
| PutResourcePolicyCommandInput
@@ -251,6 +261,7 @@ export type ServiceOutputTypes =
251261
| GenerateQueryCommandOutput
252262
| GetChannelCommandOutput
253263
| GetDashboardCommandOutput
264+
| GetEventConfigurationCommandOutput
254265
| GetEventDataStoreCommandOutput
255266
| GetEventSelectorsCommandOutput
256267
| GetImportCommandOutput
@@ -270,6 +281,7 @@ export type ServiceOutputTypes =
270281
| ListTagsCommandOutput
271282
| ListTrailsCommandOutput
272283
| LookupEventsCommandOutput
284+
| PutEventConfigurationCommandOutput
273285
| PutEventSelectorsCommandOutput
274286
| PutInsightSelectorsCommandOutput
275287
| PutResourcePolicyCommandOutput
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { CloudTrailClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudTrailClient";
8+
import { commonParams } from "../endpoint/EndpointParameters";
9+
import { GetEventConfigurationRequest, GetEventConfigurationResponse } from "../models/models_0";
10+
import { de_GetEventConfigurationCommand, se_GetEventConfigurationCommand } from "../protocols/Aws_json1_1";
11+
12+
/**
13+
* @public
14+
*/
15+
export type { __MetadataBearer };
16+
export { $Command };
17+
/**
18+
* @public
19+
*
20+
* The input for {@link GetEventConfigurationCommand}.
21+
*/
22+
export interface GetEventConfigurationCommandInput extends GetEventConfigurationRequest {}
23+
/**
24+
* @public
25+
*
26+
* The output of {@link GetEventConfigurationCommand}.
27+
*/
28+
export interface GetEventConfigurationCommandOutput extends GetEventConfigurationResponse, __MetadataBearer {}
29+
30+
/**
31+
* <p>Retrieves the current event configuration settings for the specified event data store, including details
32+
* about maximum event size and context key selectors configured for the event data store.</p>
33+
* @example
34+
* Use a bare-bones client and the command you need to make an API call.
35+
* ```javascript
36+
* import { CloudTrailClient, GetEventConfigurationCommand } from "@aws-sdk/client-cloudtrail"; // ES Modules import
37+
* // const { CloudTrailClient, GetEventConfigurationCommand } = require("@aws-sdk/client-cloudtrail"); // CommonJS import
38+
* const client = new CloudTrailClient(config);
39+
* const input = { // GetEventConfigurationRequest
40+
* EventDataStore: "STRING_VALUE",
41+
* };
42+
* const command = new GetEventConfigurationCommand(input);
43+
* const response = await client.send(command);
44+
* // { // GetEventConfigurationResponse
45+
* // EventDataStoreArn: "STRING_VALUE",
46+
* // MaxEventSize: "Standard" || "Large",
47+
* // ContextKeySelectors: [ // ContextKeySelectors
48+
* // { // ContextKeySelector
49+
* // Type: "TagContext" || "RequestContext", // required
50+
* // Equals: [ // OperatorTargetList // required
51+
* // "STRING_VALUE",
52+
* // ],
53+
* // },
54+
* // ],
55+
* // };
56+
*
57+
* ```
58+
*
59+
* @param GetEventConfigurationCommandInput - {@link GetEventConfigurationCommandInput}
60+
* @returns {@link GetEventConfigurationCommandOutput}
61+
* @see {@link GetEventConfigurationCommandInput} for command's `input` shape.
62+
* @see {@link GetEventConfigurationCommandOutput} for command's `response` shape.
63+
* @see {@link CloudTrailClientResolvedConfig | config} for CloudTrailClient's `config` shape.
64+
*
65+
* @throws {@link CloudTrailARNInvalidException} (client fault)
66+
* <p>This exception is thrown when an operation is called with an ARN that is not valid.</p>
67+
* <p>The following is the format of a trail ARN: <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
68+
* </p>
69+
* <p>The following is the format of an event data store ARN:
70+
* <code>arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
71+
* </p>
72+
* <p>The following is the format of a dashboard ARN: <code>arn:aws:cloudtrail:us-east-1:123456789012:dashboard/exampleDash</code>
73+
* </p>
74+
* <p>The following is the format of a channel ARN:
75+
* <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890</code>
76+
* </p>
77+
*
78+
* @throws {@link EventDataStoreARNInvalidException} (client fault)
79+
* <p>The specified event data store ARN is not valid or does not map to an event data store
80+
* in your account.</p>
81+
*
82+
* @throws {@link EventDataStoreNotFoundException} (client fault)
83+
* <p>The specified event data store was not found.</p>
84+
*
85+
* @throws {@link InvalidEventDataStoreCategoryException} (client fault)
86+
* <p>This exception is thrown when event categories of specified event data stores are not
87+
* valid.</p>
88+
*
89+
* @throws {@link InvalidEventDataStoreStatusException} (client fault)
90+
* <p>The event data store is not in a status that supports the operation.</p>
91+
*
92+
* @throws {@link InvalidParameterCombinationException} (client fault)
93+
* <p>This exception is thrown when the combination of parameters provided is not
94+
* valid.</p>
95+
*
96+
* @throws {@link InvalidParameterException} (client fault)
97+
* <p>The request includes a parameter that is not valid.</p>
98+
*
99+
* @throws {@link NoManagementAccountSLRExistsException} (client fault)
100+
* <p> This exception is thrown when the management account does not have a service-linked
101+
* role. </p>
102+
*
103+
* @throws {@link OperationNotPermittedException} (client fault)
104+
* <p>This exception is thrown when the requested operation is not permitted.</p>
105+
*
106+
* @throws {@link UnsupportedOperationException} (client fault)
107+
* <p>This exception is thrown when the requested operation is not supported.</p>
108+
*
109+
* @throws {@link CloudTrailServiceException}
110+
* <p>Base exception class for all service exceptions from CloudTrail service.</p>
111+
*
112+
*
113+
* @public
114+
*/
115+
export class GetEventConfigurationCommand extends $Command
116+
.classBuilder<
117+
GetEventConfigurationCommandInput,
118+
GetEventConfigurationCommandOutput,
119+
CloudTrailClientResolvedConfig,
120+
ServiceInputTypes,
121+
ServiceOutputTypes
122+
>()
123+
.ep(commonParams)
124+
.m(function (this: any, Command: any, cs: any, config: CloudTrailClientResolvedConfig, o: any) {
125+
return [
126+
getSerdePlugin(config, this.serialize, this.deserialize),
127+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
128+
];
129+
})
130+
.s("CloudTrail_20131101", "GetEventConfiguration", {})
131+
.n("CloudTrailClient", "GetEventConfigurationCommand")
132+
.f(void 0, void 0)
133+
.ser(se_GetEventConfigurationCommand)
134+
.de(de_GetEventConfigurationCommand)
135+
.build() {
136+
/** @internal type navigation helper, not in runtime. */
137+
protected declare static __types: {
138+
api: {
139+
input: GetEventConfigurationRequest;
140+
output: GetEventConfigurationResponse;
141+
};
142+
sdk: {
143+
input: GetEventConfigurationCommandInput;
144+
output: GetEventConfigurationCommandOutput;
145+
};
146+
};
147+
}

0 commit comments

Comments
 (0)