1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`ListInsightsMetricData`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder) operation.
    /// This operation supports pagination; See [`into_paginator()`](crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::into_paginator).
    ///
    /// - The fluent builder is configurable:
    ///   - [`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>
    ///   - [`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>
    ///   - [`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>
    ///   - [`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>
    ///   - [`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>
    ///   - [`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>
    ///   - [`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>
    ///   - [`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 datapoints to return. Valid values are <code>NonZeroData</code> and <code>FillWithZeros</code>. The default is <code>NonZeroData</code>.</p><br>
    ///   - [`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 datapoints to return. Valid values are integers from 1 to 21600. The default value is 21600.</p><br>
    ///   - [`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>
    /// - On success, responds with [`ListInsightsMetricDataOutput`](crate::operation::list_insights_metric_data::ListInsightsMetricDataOutput) with field(s):
    ///   - [`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>
    ///   - [`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>
    ///   - [`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>
    ///   - [`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>
    ///   - [`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>
    ///   - [`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>
    ///   - [`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>
    /// - On failure, responds with [`SdkError<ListInsightsMetricDataError>`](crate::operation::list_insights_metric_data::ListInsightsMetricDataError)
    pub fn list_insights_metric_data(&self) -> crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder {
        crate::operation::list_insights_metric_data::builders::ListInsightsMetricDataFluentBuilder::new(self.handle.clone())
    }
}