Smaws_Client_CloudTrail.ListInsightsMetricDataReturns Insights metrics data for trails that have enabled Insights. The request must include the EventSource, EventName, and InsightType parameters.
If the InsightType is set to ApiErrorRateInsight, the request must also include the ErrorCode parameter.
The following are the available time periods for ListInsightsMetricData. Each cutoff is inclusive.
To use ListInsightsMetricData operation, you must have the following permissions:
ListInsightsMetricData is invoked with TrailName parameter, access to the ListInsightsMetricData API operation is linked to the cloudtrail:LookupEvents action and cloudtrail:ListInsightsData. To use this operation, you must have permissions to perform the cloudtrail:LookupEvents and cloudtrail:ListInsightsData action on the specific trail.ListInsightsMetricData is invoked without TrailName parameter, access to the ListInsightsMetricData API operation is linked to the cloudtrail:LookupEvents action only. To use this operation, you must have permissions to perform the cloudtrail:LookupEvents action.val error_to_string :
[ Smaws_Lib.Protocols.AwsJson.error
| `InvalidParameterException of Types.invalid_parameter_exception
| `InvalidTrailNameException of Types.invalid_trail_name_exception
| `OperationNotPermittedException of Types.operation_not_permitted_exception
| `UnsupportedOperationException of Types.unsupported_operation_exception ] ->
stringval request :
'http_type Smaws_Lib.Context.t ->
Types.list_insights_metric_data_request ->
(Types.list_insights_metric_data_response,
[> Smaws_Lib.Protocols.AwsJson.error
| `InvalidParameterException of Types.invalid_parameter_exception
| `InvalidTrailNameException of Types.invalid_trail_name_exception
| `OperationNotPermittedException of
Types.operation_not_permitted_exception
| `UnsupportedOperationException of Types.unsupported_operation_exception ])
Stdlib.resultval request_with_metadata :
'http_type Smaws_Lib.Context.t ->
Types.list_insights_metric_data_request ->
(Types.list_insights_metric_data_response Smaws_Lib.Response.t,
[> Smaws_Lib.Protocols.AwsJson.error
| `InvalidParameterException of Types.invalid_parameter_exception
| `InvalidTrailNameException of Types.invalid_trail_name_exception
| `OperationNotPermittedException of
Types.operation_not_permitted_exception
| `UnsupportedOperationException of Types.unsupported_operation_exception ]
* Smaws_Lib.Response.metadata)
Stdlib.result