aws_sdk_cloudtrail/client/
list_insights_metric_data.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`ListInsightsMetricData`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder) operation.
4    /// This operation supports pagination; See [`into_paginator()`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::into_paginator).
5    ///
6    /// - The fluent builder is configurable:
7    ///   - [`trail_name(impl Into<String>)`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::trail_name) / [`set_trail_name(Option<String>)`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::set_trail_name):<br>required: **false**<br><p>The Amazon Resource Name(ARN) or name of the trail for which you want to retrieve Insights metrics data. This parameter should only be provided to fetch Insights metrics data generated on trails logging data events. This parameter is not required for Insights metric data generated on trails logging management events.</p><br>
8    ///   - [`event_source(impl Into<String>)`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::event_source) / [`set_event_source(Option<String>)`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::set_event_source):<br>required: **true**<br><p>The Amazon Web Services service to which the request was made, such as <code>iam.amazonaws.com</code> or <code>s3.amazonaws.com</code>.</p><br>
9    ///   - [`event_name(impl Into<String>)`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::event_name) / [`set_event_name(Option<String>)`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::set_event_name):<br>required: **true**<br><p>The name of the event, typically the Amazon Web Services API on which unusual levels of activity were recorded.</p><br>
10    ///   - [`insight_type(InsightType)`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::insight_type) / [`set_insight_type(Option<InsightType>)`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::set_insight_type):<br>required: **true**<br><p>The type of CloudTrail Insights event, which is either <code>ApiCallRateInsight</code> or <code>ApiErrorRateInsight</code>. The <code>ApiCallRateInsight</code> Insights type analyzes write-only management API calls that are aggregated per minute against a baseline API call volume. The <code>ApiErrorRateInsight</code> Insights type analyzes management API calls that result in error codes.</p><br>
11    ///   - [`error_code(impl Into<String>)`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::error_code) / [`set_error_code(Option<String>)`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::set_error_code):<br>required: **false**<br><p>Conditionally required if the <code>InsightType</code> parameter is set to <code>ApiErrorRateInsight</code>.</p> <p>If returning metrics for the <code>ApiErrorRateInsight</code> Insights type, this is the error to retrieve data for. For example, <code>AccessDenied</code>.</p><br>
12    ///   - [`start_time(DateTime)`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::start_time) / [`set_start_time(Option<DateTime>)`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::set_start_time):<br>required: **false**<br><p>Specifies, in UTC, the start time for time-series data. The value specified is inclusive; results include data points with the specified time stamp.</p> <p>The default is 90 days before the time of request.</p><br>
13    ///   - [`end_time(DateTime)`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::end_time) / [`set_end_time(Option<DateTime>)`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::set_end_time):<br>required: **false**<br><p>Specifies, in UTC, the end time for time-series data. The value specified is exclusive; results include data points up to the specified time stamp.</p> <p>The default is the time of request.</p><br>
14    ///   - [`period(i32)`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::period) / [`set_period(Option<i32>)`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::set_period):<br>required: **false**<br><p>Granularity of data to retrieve, in seconds. Valid values are <code>60</code>, <code>300</code>, and <code>3600</code>. If you specify any other value, you will get an error. The default is 3600 seconds.</p><br>
15    ///   - [`data_type(InsightsMetricDataType)`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::data_type) / [`set_data_type(Option<InsightsMetricDataType>)`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::set_data_type):<br>required: **false**<br><p>Type of data points to return. Valid values are <code>NonZeroData</code> and <code>FillWithZeros</code>. The default is <code>NonZeroData</code>.</p><br>
16    ///   - [`max_results(i32)`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::max_results) / [`set_max_results(Option<i32>)`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::set_max_results):<br>required: **false**<br><p>The maximum number of data points to return. Valid values are integers from 1 to 21600. The default value is 21600.</p><br>
17    ///   - [`next_token(impl Into<String>)`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::set_next_token):<br>required: **false**<br><p>Returned if all datapoints can't be returned in a single call. For example, due to reaching <code>MaxResults</code>.</p> <p>Add this parameter to the request to continue retrieving results starting from the last evaluated point.</p><br>
18    /// - On success, responds with [`ListInsightsMetricDataOutput`](crate::operation::list_insights_metric_data::ListInsightsMetricDataOutput) with field(s):
19    ///   - [`trail_arn(Option<String>)`](crate::operation::list_insights_metric_data::ListInsightsMetricDataOutput::trail_arn): <p>Specifies the ARN of the trail. This is only returned when Insights is enabled on a trail logging data events.</p>
20    ///   - [`event_source(Option<String>)`](crate::operation::list_insights_metric_data::ListInsightsMetricDataOutput::event_source): <p>The Amazon Web Services service to which the request was made, such as <code>iam.amazonaws.com</code> or <code>s3.amazonaws.com</code>.</p>
21    ///   - [`event_name(Option<String>)`](crate::operation::list_insights_metric_data::ListInsightsMetricDataOutput::event_name): <p>The name of the event, typically the Amazon Web Services API on which unusual levels of activity were recorded.</p>
22    ///   - [`insight_type(Option<InsightType>)`](crate::operation::list_insights_metric_data::ListInsightsMetricDataOutput::insight_type): <p>The type of CloudTrail Insights event, which is either <code>ApiCallRateInsight</code> or <code>ApiErrorRateInsight</code>. The <code>ApiCallRateInsight</code> Insights type analyzes write-only management API calls that are aggregated per minute against a baseline API call volume. The <code>ApiErrorRateInsight</code> Insights type analyzes management API calls that result in error codes.</p>
23    ///   - [`error_code(Option<String>)`](crate::operation::list_insights_metric_data::ListInsightsMetricDataOutput::error_code): <p>Only returned if <code>InsightType</code> parameter was set to <code>ApiErrorRateInsight</code>.</p> <p>If returning metrics for the <code>ApiErrorRateInsight</code> Insights type, this is the error to retrieve data for. For example, <code>AccessDenied</code>.</p>
24    ///   - [`timestamps(Option<Vec::<DateTime>>)`](crate::operation::list_insights_metric_data::ListInsightsMetricDataOutput::timestamps): <p>List of timestamps at intervals corresponding to the specified time period.</p>
25    ///   - [`values(Option<Vec::<f64>>)`](crate::operation::list_insights_metric_data::ListInsightsMetricDataOutput::values): <p>List of values representing the API call rate or error rate at each timestamp. The number of values is equal to the number of timestamps.</p>
26    ///   - [`next_token(Option<String>)`](crate::operation::list_insights_metric_data::ListInsightsMetricDataOutput::next_token): <p>Only returned if the full results could not be returned in a single query. You can set the <code>NextToken</code> parameter in the next request to this value to continue retrieval.</p>
27    /// - On failure, responds with [`SdkError<ListInsightsMetricDataError>`](crate::operation::list_insights_metric_data::ListInsightsMetricDataError)
28    pub fn list_insights_metric_data(&self) -> crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder {
29        crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::new(self.handle.clone())
30    }
31}