Struct aws_sdk_pi::types::builders::MetricQueryBuilder
source · #[non_exhaustive]pub struct MetricQueryBuilder { /* private fields */ }
Expand description
A builder for MetricQuery
.
Implementations§
source§impl MetricQueryBuilder
impl MetricQueryBuilder
sourcepub fn metric(self, input: impl Into<String>) -> Self
pub fn metric(self, input: impl Into<String>) -> Self
The name of a Performance Insights metric to be measured.
Valid values for Metric
are:
-
db.load.avg
- A scaled representation of the number of active sessions for the database engine. -
db.sampledload.avg
- The raw number of active sessions for the database engine. -
The counter metrics listed in Performance Insights operating system counters in the Amazon Aurora User Guide.
-
The counter metrics listed in Performance Insights operating system counters in the Amazon RDS User Guide.
If the number of active sessions is less than an internal Performance Insights threshold, db.load.avg
and db.sampledload.avg
are the same value. If the number of active sessions is greater than the internal threshold, Performance Insights samples the active sessions, with db.load.avg
showing the scaled values, db.sampledload.avg
showing the raw values, and db.sampledload.avg
less than db.load.avg
. For most use cases, you can query db.load.avg
only.
sourcepub fn set_metric(self, input: Option<String>) -> Self
pub fn set_metric(self, input: Option<String>) -> Self
The name of a Performance Insights metric to be measured.
Valid values for Metric
are:
-
db.load.avg
- A scaled representation of the number of active sessions for the database engine. -
db.sampledload.avg
- The raw number of active sessions for the database engine. -
The counter metrics listed in Performance Insights operating system counters in the Amazon Aurora User Guide.
-
The counter metrics listed in Performance Insights operating system counters in the Amazon RDS User Guide.
If the number of active sessions is less than an internal Performance Insights threshold, db.load.avg
and db.sampledload.avg
are the same value. If the number of active sessions is greater than the internal threshold, Performance Insights samples the active sessions, with db.load.avg
showing the scaled values, db.sampledload.avg
showing the raw values, and db.sampledload.avg
less than db.load.avg
. For most use cases, you can query db.load.avg
only.
sourcepub fn get_metric(&self) -> &Option<String>
pub fn get_metric(&self) -> &Option<String>
The name of a Performance Insights metric to be measured.
Valid values for Metric
are:
-
db.load.avg
- A scaled representation of the number of active sessions for the database engine. -
db.sampledload.avg
- The raw number of active sessions for the database engine. -
The counter metrics listed in Performance Insights operating system counters in the Amazon Aurora User Guide.
-
The counter metrics listed in Performance Insights operating system counters in the Amazon RDS User Guide.
If the number of active sessions is less than an internal Performance Insights threshold, db.load.avg
and db.sampledload.avg
are the same value. If the number of active sessions is greater than the internal threshold, Performance Insights samples the active sessions, with db.load.avg
showing the scaled values, db.sampledload.avg
showing the raw values, and db.sampledload.avg
less than db.load.avg
. For most use cases, you can query db.load.avg
only.
sourcepub fn group_by(self, input: DimensionGroup) -> Self
pub fn group_by(self, input: DimensionGroup) -> Self
A specification for how to aggregate the data points from a query result. You must specify a valid dimension group. Performance Insights will return all of the dimensions within that group, unless you provide the names of specific dimensions within that group. You can also request that Performance Insights return a limited number of values for a dimension.
sourcepub fn set_group_by(self, input: Option<DimensionGroup>) -> Self
pub fn set_group_by(self, input: Option<DimensionGroup>) -> Self
A specification for how to aggregate the data points from a query result. You must specify a valid dimension group. Performance Insights will return all of the dimensions within that group, unless you provide the names of specific dimensions within that group. You can also request that Performance Insights return a limited number of values for a dimension.
sourcepub fn get_group_by(&self) -> &Option<DimensionGroup>
pub fn get_group_by(&self) -> &Option<DimensionGroup>
A specification for how to aggregate the data points from a query result. You must specify a valid dimension group. Performance Insights will return all of the dimensions within that group, unless you provide the names of specific dimensions within that group. You can also request that Performance Insights return a limited number of values for a dimension.
sourcepub fn filter(self, k: impl Into<String>, v: impl Into<String>) -> Self
pub fn filter(self, k: impl Into<String>, v: impl Into<String>) -> Self
Adds a key-value pair to filter
.
To override the contents of this collection use set_filter
.
One or more filters to apply in the request. Restrictions:
-
Any number of filters by the same dimension, as specified in the
GroupBy
parameter. -
A single filter for any other dimension in this dimension group.
sourcepub fn set_filter(self, input: Option<HashMap<String, String>>) -> Self
pub fn set_filter(self, input: Option<HashMap<String, String>>) -> Self
One or more filters to apply in the request. Restrictions:
-
Any number of filters by the same dimension, as specified in the
GroupBy
parameter. -
A single filter for any other dimension in this dimension group.
sourcepub fn get_filter(&self) -> &Option<HashMap<String, String>>
pub fn get_filter(&self) -> &Option<HashMap<String, String>>
One or more filters to apply in the request. Restrictions:
-
Any number of filters by the same dimension, as specified in the
GroupBy
parameter. -
A single filter for any other dimension in this dimension group.
sourcepub fn build(self) -> Result<MetricQuery, BuildError>
pub fn build(self) -> Result<MetricQuery, BuildError>
Consumes the builder and constructs a MetricQuery
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for MetricQueryBuilder
impl Clone for MetricQueryBuilder
source§fn clone(&self) -> MetricQueryBuilder
fn clone(&self) -> MetricQueryBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MetricQueryBuilder
impl Debug for MetricQueryBuilder
source§impl Default for MetricQueryBuilder
impl Default for MetricQueryBuilder
source§fn default() -> MetricQueryBuilder
fn default() -> MetricQueryBuilder
source§impl PartialEq for MetricQueryBuilder
impl PartialEq for MetricQueryBuilder
source§fn eq(&self, other: &MetricQueryBuilder) -> bool
fn eq(&self, other: &MetricQueryBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for MetricQueryBuilder
Auto Trait Implementations§
impl Freeze for MetricQueryBuilder
impl RefUnwindSafe for MetricQueryBuilder
impl Send for MetricQueryBuilder
impl Sync for MetricQueryBuilder
impl Unpin for MetricQueryBuilder
impl UnwindSafe for MetricQueryBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more