Skip to content

get_insight_selectors

Operation

get_insight_selectors

get_insight_selectors(request: GetInsightSelectorsInput | GetInsightSelectorsInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetInsightSelectorsInputDict]) -> GetInsightSelectorsOutput

Describes the settings for the Insights event selectors that you configured for your trail or event data store. GetInsightSelectors shows if CloudTrail Insights logging is enabled and which Insights types are configured with corresponding event categories. If you run GetInsightSelectors on a trail or event data store that does not have Insights events enabled, the operation throws the exception InsightNotEnabledException

Specify either the EventDataStore parameter to get Insights event selectors for an event data store, or the TrailName parameter to the get Insights event selectors for a trail. You cannot specify these parameters together.

For more information, see Working with CloudTrail Insights in the CloudTrail User Guide.

Parameters:

Name Type Description Default
request GetInsightSelectorsInput | GetInsightSelectorsInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[GetInsightSelectorsInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
GetInsightSelectorsOutput

An instance of GetInsightSelectorsOutput.

get_insight_selectors async

get_insight_selectors(request: GetInsightSelectorsInput | GetInsightSelectorsInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetInsightSelectorsInputDict]) -> GetInsightSelectorsOutput

Describes the settings for the Insights event selectors that you configured for your trail or event data store. GetInsightSelectors shows if CloudTrail Insights logging is enabled and which Insights types are configured with corresponding event categories. If you run GetInsightSelectors on a trail or event data store that does not have Insights events enabled, the operation throws the exception InsightNotEnabledException

Specify either the EventDataStore parameter to get Insights event selectors for an event data store, or the TrailName parameter to the get Insights event selectors for a trail. You cannot specify these parameters together.

For more information, see Working with CloudTrail Insights in the CloudTrail User Guide.

Parameters:

Name Type Description Default
request GetInsightSelectorsInput | GetInsightSelectorsInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[GetInsightSelectorsInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
GetInsightSelectorsOutput

An instance of GetInsightSelectorsOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

GetInsightSelectorsInputDict

Bases: TypedDict

Dictionary form of GetInsightSelectorsInput.

Attributes

event_data_store instance-attribute
event_data_store: str | None

Specifies the ARN (or ID suffix of the ARN) of the event data store for which you want to get Insights selectors.

You cannot use this parameter with the TrailName parameter.

trail_name instance-attribute
trail_name: str | None

Specifies the name of the trail or trail ARN. If you specify a trail name, the string must meet the following requirements:

  • Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)

  • Start with a letter or number, and end with a letter or number

  • Be between 3 and 128 characters

  • Have no adjacent periods, underscores or dashes. Names like my-_namespace and my--namespace are not valid.

  • Not be in IP address format (for example, 192.168.5.4)

If you specify a trail ARN, it must be in the format:

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail

You cannot use this parameter with the EventDataStore parameter.

GetInsightSelectorsInput dataclass

Bases: _SerdeShape

Dataclass for GetInsightSelectorsInput structure.

Attributes

event_data_store class-attribute instance-attribute
event_data_store: str | None = ...

Specifies the ARN (or ID suffix of the ARN) of the event data store for which you want to get Insights selectors.

You cannot use this parameter with the TrailName parameter.

trail_name class-attribute instance-attribute
trail_name: str | None = ...

Specifies the name of the trail or trail ARN. If you specify a trail name, the string must meet the following requirements:

  • Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)

  • Start with a letter or number, and end with a letter or number

  • Be between 3 and 128 characters

  • Have no adjacent periods, underscores or dashes. Names like my-_namespace and my--namespace are not valid.

  • Not be in IP address format (for example, 192.168.5.4)

If you specify a trail ARN, it must be in the format:

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail

You cannot use this parameter with the EventDataStore parameter.

Output

GetInsightSelectorsOutput dataclass

Bases: _SerdeShape

Dataclass for GetInsightSelectorsOutput structure.

Attributes

event_data_store_arn class-attribute instance-attribute
event_data_store_arn: str | None = ...

The ARN of the source event data store that enabled Insights events.

insight_selectors class-attribute instance-attribute
insight_selectors: list[InsightSelector] | None = ...

Contains the Insights types that are enabled on a trail or event data store. It also specifies the event categories on which a particular Insight type is enabled. ApiCallRateInsight and ApiErrorRateInsight are valid Insight types.The EventCategory field can specify Management or Data events or both. For event data store, you can log Insights for management events only.

insights_destination class-attribute instance-attribute
insights_destination: str | None = ...

The ARN of the destination event data store that logs Insights events.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

trail_arn class-attribute instance-attribute
trail_arn: str | None = ...

The Amazon Resource Name (ARN) of a trail for which you want to get Insights selectors.