list_insights_data
async
¶
list_insights_data(
insight_source: ResourceArn,
data_type: ListInsightsDataType,
*,
config_overrides: Optional[AsyncCloudTrailClientConfig] = None,
dimensions: Optional[ListInsightsDataDimensions] = None,
start_time: Optional[Date] = None,
end_time: Optional[Date] = None,
max_results: Optional[ListInsightsDataMaxResultsCount] = None,
next_token: Optional[PaginationToken] = None,
) -> ListInsightsDataResponse
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 you can use to get the next page of results.
The rate of ListInsightsData requests is limited to two per second, per account, per Region. If this limit is exceeded, a throttling error occurs.
For data event Insights on organization trails, only the management account and delegated administrator accounts can call ListInsightsData. For these callers, the API returns Insights events only for the caller's own account. Member accounts cannot call this API on organization trails.
Parameters:
-
insight_source(ResourceArn) –The Amazon Resource Name(ARN) of the trail for which you want to retrieve Insights events.
-
data_type(ListInsightsDataType) –Specifies the category of events returned. To fetch Insights events, specify
InsightsEventsas the value ofDataType -
dimensions(Optional[ListInsightsDataDimensions], default:None) –Contains a map of dimensions. Currently the map can contain only one item.
-
start_time(Optional[Date], default:None) –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(Optional[Date], default:None) –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(Optional[ListInsightsDataMaxResultsCount], default:None) –The number of events to return. Possible values are 1 through 50. The default is 50.
-
next_token(Optional[PaginationToken], default:None) –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
PutObjectas a value, the call with NextToken should include those same parameters.
Raises:
-
InvalidParameterException–The request includes a parameter that is not valid.
-
OperationNotPermittedException–This exception is thrown when the requested operation is not permitted.
-
UnsupportedOperationException–This exception is thrown when the requested operation is not supported.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_cloudtrail/_services/async_cloud_trail.py
2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 | |