// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`GetResourceMetrics`](crate::operation::get_resource_metrics::builders::GetResourceMetricsFluentBuilder) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::operation::get_resource_metrics::builders::GetResourceMetricsFluentBuilder::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`service_type(ServiceType)`](crate::operation::get_resource_metrics::builders::GetResourceMetricsFluentBuilder::service_type) / [`set_service_type(Option<ServiceType>)`](crate::operation::get_resource_metrics::builders::GetResourceMetricsFluentBuilder::set_service_type):<br>required: **true**<br><p>The Amazon Web Services service for which Performance Insights returns metrics. Valid values are as follows:</p> <ul> <li> <p> <code>RDS</code> </p> </li> <li> <p> <code>DOCDB</code> </p> </li> </ul><br>
/// - [`identifier(impl Into<String>)`](crate::operation::get_resource_metrics::builders::GetResourceMetricsFluentBuilder::identifier) / [`set_identifier(Option<String>)`](crate::operation::get_resource_metrics::builders::GetResourceMetricsFluentBuilder::set_identifier):<br>required: **true**<br><p>An immutable identifier for a data source that is unique for an Amazon Web Services Region. Performance Insights gathers metrics from this data source. In the console, the identifier is shown as <i>ResourceID</i>. When you call <code>DescribeDBInstances</code>, the identifier is returned as <code>DbiResourceId</code>.</p> <p>To use a DB instance as a data source, specify its <code>DbiResourceId</code> value. For example, specify <code>db-ABCDEFGHIJKLMNOPQRSTU1VW2X</code>.</p><br>
/// - [`metric_queries(MetricQuery)`](crate::operation::get_resource_metrics::builders::GetResourceMetricsFluentBuilder::metric_queries) / [`set_metric_queries(Option<Vec::<MetricQuery>>)`](crate::operation::get_resource_metrics::builders::GetResourceMetricsFluentBuilder::set_metric_queries):<br>required: **true**<br><p>An array of one or more queries to perform. Each query must specify a Performance Insights metric, and can optionally specify aggregation and filtering criteria.</p><br>
/// - [`start_time(DateTime)`](crate::operation::get_resource_metrics::builders::GetResourceMetricsFluentBuilder::start_time) / [`set_start_time(Option<DateTime>)`](crate::operation::get_resource_metrics::builders::GetResourceMetricsFluentBuilder::set_start_time):<br>required: **true**<br><p>The date and time specifying the beginning of the requested time series query range. You can't specify a <code>StartTime</code> that is earlier than 7 days ago. By default, Performance Insights has 7 days of retention, but you can extend this range up to 2 years. The value specified is <i>inclusive</i>. Thus, the command returns data points equal to or greater than <code>StartTime</code>.</p> <p>The value for <code>StartTime</code> must be earlier than the value for <code>EndTime</code>.</p><br>
/// - [`end_time(DateTime)`](crate::operation::get_resource_metrics::builders::GetResourceMetricsFluentBuilder::end_time) / [`set_end_time(Option<DateTime>)`](crate::operation::get_resource_metrics::builders::GetResourceMetricsFluentBuilder::set_end_time):<br>required: **true**<br><p>The date and time specifying the end of the requested time series query range. The value specified is <i>exclusive</i>. Thus, the command returns data points less than (but not equal to) <code>EndTime</code>.</p> <p>The value for <code>EndTime</code> must be later than the value for <code>StartTime</code>.</p><br>
/// - [`period_in_seconds(i32)`](crate::operation::get_resource_metrics::builders::GetResourceMetricsFluentBuilder::period_in_seconds) / [`set_period_in_seconds(Option<i32>)`](crate::operation::get_resource_metrics::builders::GetResourceMetricsFluentBuilder::set_period_in_seconds):<br>required: **false**<br><p>The granularity, in seconds, of the data points returned from Performance Insights. A period can be as short as one second, or as long as one day (86400 seconds). Valid values are:</p> <ul> <li> <p> <code>1</code> (one second)</p> </li> <li> <p> <code>60</code> (one minute)</p> </li> <li> <p> <code>300</code> (five minutes)</p> </li> <li> <p> <code>3600</code> (one hour)</p> </li> <li> <p> <code>86400</code> (twenty-four hours)</p> </li> </ul> <p>If you don't specify <code>PeriodInSeconds</code>, then Performance Insights will choose a value for you, with a goal of returning roughly 100-200 data points in the response.</p><br>
/// - [`max_results(i32)`](crate::operation::get_resource_metrics::builders::GetResourceMetricsFluentBuilder::max_results) / [`set_max_results(Option<i32>)`](crate::operation::get_resource_metrics::builders::GetResourceMetricsFluentBuilder::set_max_results):<br>required: **false**<br><p>The maximum number of items to return in the response. If more items exist than the specified <code>MaxRecords</code> value, a pagination token is included in the response so that the remaining results can be retrieved. </p><br>
/// - [`next_token(impl Into<String>)`](crate::operation::get_resource_metrics::builders::GetResourceMetricsFluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::get_resource_metrics::builders::GetResourceMetricsFluentBuilder::set_next_token):<br>required: **false**<br><p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the token, up to the value specified by <code>MaxRecords</code>.</p><br>
/// - [`period_alignment(PeriodAlignment)`](crate::operation::get_resource_metrics::builders::GetResourceMetricsFluentBuilder::period_alignment) / [`set_period_alignment(Option<PeriodAlignment>)`](crate::operation::get_resource_metrics::builders::GetResourceMetricsFluentBuilder::set_period_alignment):<br>required: **false**<br><p>The returned timestamp which is the start or end time of the time periods. The default value is <code>END_TIME</code>.</p><br>
/// - On success, responds with [`GetResourceMetricsOutput`](crate::operation::get_resource_metrics::GetResourceMetricsOutput) with field(s):
/// - [`aligned_start_time(Option<DateTime>)`](crate::operation::get_resource_metrics::GetResourceMetricsOutput::aligned_start_time): <p>The start time for the returned metrics, after alignment to a granular boundary (as specified by <code>PeriodInSeconds</code>). <code>AlignedStartTime</code> will be less than or equal to the value of the user-specified <code>StartTime</code>.</p>
/// - [`aligned_end_time(Option<DateTime>)`](crate::operation::get_resource_metrics::GetResourceMetricsOutput::aligned_end_time): <p>The end time for the returned metrics, after alignment to a granular boundary (as specified by <code>PeriodInSeconds</code>). <code>AlignedEndTime</code> will be greater than or equal to the value of the user-specified <code>Endtime</code>.</p>
/// - [`identifier(Option<String>)`](crate::operation::get_resource_metrics::GetResourceMetricsOutput::identifier): <p>An immutable identifier for a data source that is unique for an Amazon Web Services Region. Performance Insights gathers metrics from this data source. In the console, the identifier is shown as <i>ResourceID</i>. When you call <code>DescribeDBInstances</code>, the identifier is returned as <code>DbiResourceId</code>.</p>
/// - [`metric_list(Option<Vec::<MetricKeyDataPoints>>)`](crate::operation::get_resource_metrics::GetResourceMetricsOutput::metric_list): <p>An array of metric results, where each array element contains all of the data points for a particular dimension.</p>
/// - [`next_token(Option<String>)`](crate::operation::get_resource_metrics::GetResourceMetricsOutput::next_token): <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the token, up to the value specified by <code>MaxRecords</code>. </p>
/// - On failure, responds with [`SdkError<GetResourceMetricsError>`](crate::operation::get_resource_metrics::GetResourceMetricsError)
pub fn get_resource_metrics(&self) -> crate::operation::get_resource_metrics::builders::GetResourceMetricsFluentBuilder {
crate::operation::get_resource_metrics::builders::GetResourceMetricsFluentBuilder::new(self.handle.clone())
}
}