AWS CloudTrail

2025/05/29 - AWS CloudTrail - 2 new api methods

Changes  CloudTrail Feature Release: Support for Enriched Events with Configurable Context for Event Data Store

PutEventConfiguration (new) Link ¶

Updates the event configuration settings for the specified event data store. You can update the maximum event size and context key selectors.

See also: AWS API Documentation

Request Syntax

client.put_event_configuration(
    EventDataStore='string',
    MaxEventSize='Standard'|'Large',
    ContextKeySelectors=[
        {
            'Type': 'TagContext'|'RequestContext',
            'Equals': [
                'string',
            ]
        },
    ]
)
type EventDataStore:

string

param EventDataStore:

The Amazon Resource Name (ARN) or ID suffix of the ARN of the event data store for which you want to update event configuration settings.

type MaxEventSize:

string

param MaxEventSize:

[REQUIRED]

The maximum allowed size for events to be stored in the specified event data store. If you are using context key selectors, MaxEventSize must be set to Large.

type ContextKeySelectors:

list

param ContextKeySelectors:

[REQUIRED]

A list of context key selectors that will be included to provide enriched event data.

  • (dict) --

    An object that contains information types to be included in CloudTrail enriched events.

    • Type (string) -- [REQUIRED]

      Specifies the type of the event record field in ContextKeySelector. Valid values include RequestContext, TagContext.

    • Equals (list) -- [REQUIRED]

      A list of keys defined by Type to be included in CloudTrail enriched events.

      • (string) --

rtype:

dict

returns:

Response Syntax

{
    'EventDataStoreArn': 'string',
    'MaxEventSize': 'Standard'|'Large',
    'ContextKeySelectors': [
        {
            'Type': 'TagContext'|'RequestContext',
            'Equals': [
                'string',
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • EventDataStoreArn (string) --

      The Amazon Resource Name (ARN) or ID suffix of the ARN of the event data store for which the event configuration settings were updated.

    • MaxEventSize (string) --

      The maximum allowed size for events stored in the specified event data store.

    • ContextKeySelectors (list) --

      The list of context key selectors that are configured for the event data store.

      • (dict) --

        An object that contains information types to be included in CloudTrail enriched events.

        • Type (string) --

          Specifies the type of the event record field in ContextKeySelector. Valid values include RequestContext, TagContext.

        • Equals (list) --

          A list of keys defined by Type to be included in CloudTrail enriched events.

          • (string) --

GetEventConfiguration (new) Link ¶

Retrieves the current event configuration settings for the specified event data store, including details about maximum event size and context key selectors configured for the event data store.

See also: AWS API Documentation

Request Syntax

client.get_event_configuration(
    EventDataStore='string'
)
type EventDataStore:

string

param EventDataStore:

The Amazon Resource Name (ARN) or ID suffix of the ARN of the event data store for which you want to retrieve event configuration settings.

rtype:

dict

returns:

Response Syntax

{
    'EventDataStoreArn': 'string',
    'MaxEventSize': 'Standard'|'Large',
    'ContextKeySelectors': [
        {
            'Type': 'TagContext'|'RequestContext',
            'Equals': [
                'string',
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • EventDataStoreArn (string) --

      The Amazon Resource Name (ARN) or ID suffix of the ARN of the event data store for which the event configuration settings are returned.

    • MaxEventSize (string) --

      The maximum allowed size for events stored in the specified event data store.

    • ContextKeySelectors (list) --

      The list of context key selectors that are configured for the event data store.

      • (dict) --

        An object that contains information types to be included in CloudTrail enriched events.

        • Type (string) --

          Specifies the type of the event record field in ContextKeySelector. Valid values include RequestContext, TagContext.

        • Equals (list) --

          A list of keys defined by Type to be included in CloudTrail enriched events.

          • (string) --