Skip to content

CloudTrailClient.list_insights_data

rboto-cloudtrail==0.4.0 · Service index · Types

Model summary (excerpt): Returns Insights events generated on a trail that logs data events. You can list Insights events that occurred in a Region within the last 90 days. ListInsightsData supports the following Dimensions for Insights events: Event ID Event name Event source All dimensions are optional. The default number of results returned is 50, with a maximum of 50 possible. The response includes a token that...

Install and imports

python -m pip install "rboto[cloudtrail]==0.4.0"
from rboto import CloudTrailClient
from rboto_cloudtrail.types import (
    ListInsightsDataDimensionKey,
    ListInsightsDataOutput,
    ListInsightsDataType,
)

Signature

async def list_insights_data(
    *,
    insight_source: str,
    data_type: ListInsightsDataType,
    dimensions: dict[ListInsightsDataDimensionKey, str] | None = None,
    start_time: str | None = None,
    end_time: str | None = None,
    max_results: int | None = None,
    next_token: str | None = None,
) -> ListInsightsDataOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
insight_source Yes The Amazon Resource Name(ARN) of the trail for which you want to retrieve Insights events.
data_type Yes Specifies the category of events returned. To fetch Insights events, specify InsightsEvents as the value of DataType
dimensions No Contains a map of dimensions. Currently the map can contain only one item.
start_time No Specifies that only events that occur after or at the specified time are returned. If the specified start time is after the specified end time, an error is returned.
end_time No Specifies that only events that occur before or at the specified time are returned. If the specified end time is before the specified start time, an error is returned.
max_results No The number of events to return. Possible values are 1 through 50. The default is 50.
next_token No The token to use to get the next page of results after a previous API call. This token must be passed in with the same parameters that were specified in the original call. For example, if the original call specified a EventName as a dimension with PutObject as a value, the call with NextToken should include those same parameters.

Output

ListInsightsDataOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
events list[EventOutput] | None Always present EventOutput
next_token str | None Always present —

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

ListInsightsDataDimensionKey, ListInsightsDataOutput, ListInsightsDataType

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

client.paginators.list_insights_data(...) accepts the same arguments and returns AsyncIterator[ListInsightsDataOutput]. Direct calls return one page. Pages preserve the Output representation above.

Input cursors: next_token. Page-size argument: max_results.

No output stream.

Errors

Import from rboto_cloudtrail.exceptions:

InvalidParameterError, OperationNotPermittedError, UnsupportedOperationError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model