Struct aws_sdk_applicationautoscaling::types::builders::TargetTrackingMetricDataQueryBuilder
source · #[non_exhaustive]pub struct TargetTrackingMetricDataQueryBuilder { /* private fields */ }
Expand description
A builder for TargetTrackingMetricDataQuery
.
Implementations§
source§impl TargetTrackingMetricDataQueryBuilder
impl TargetTrackingMetricDataQueryBuilder
sourcepub fn expression(self, input: impl Into<String>) -> Self
pub fn expression(self, input: impl Into<String>) -> Self
The math expression to perform on the returned data, if this object is performing a math expression. This expression can use the Id
of the other metrics to refer to those metrics, and can also use the Id
of other expressions to use the result of those expressions.
Conditional: Within each TargetTrackingMetricDataQuery
object, you must specify either Expression
or MetricStat
, but not both.
sourcepub fn set_expression(self, input: Option<String>) -> Self
pub fn set_expression(self, input: Option<String>) -> Self
The math expression to perform on the returned data, if this object is performing a math expression. This expression can use the Id
of the other metrics to refer to those metrics, and can also use the Id
of other expressions to use the result of those expressions.
Conditional: Within each TargetTrackingMetricDataQuery
object, you must specify either Expression
or MetricStat
, but not both.
sourcepub fn get_expression(&self) -> &Option<String>
pub fn get_expression(&self) -> &Option<String>
The math expression to perform on the returned data, if this object is performing a math expression. This expression can use the Id
of the other metrics to refer to those metrics, and can also use the Id
of other expressions to use the result of those expressions.
Conditional: Within each TargetTrackingMetricDataQuery
object, you must specify either Expression
or MetricStat
, but not both.
sourcepub fn id(self, input: impl Into<String>) -> Self
pub fn id(self, input: impl Into<String>) -> Self
A short name that identifies the object's results in the response. This name must be unique among all MetricDataQuery
objects specified for a single scaling policy. If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the mathematical expression. The valid characters are letters, numbers, and underscores. The first character must be a lowercase letter.
sourcepub fn set_id(self, input: Option<String>) -> Self
pub fn set_id(self, input: Option<String>) -> Self
A short name that identifies the object's results in the response. This name must be unique among all MetricDataQuery
objects specified for a single scaling policy. If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the mathematical expression. The valid characters are letters, numbers, and underscores. The first character must be a lowercase letter.
sourcepub fn get_id(&self) -> &Option<String>
pub fn get_id(&self) -> &Option<String>
A short name that identifies the object's results in the response. This name must be unique among all MetricDataQuery
objects specified for a single scaling policy. If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the mathematical expression. The valid characters are letters, numbers, and underscores. The first character must be a lowercase letter.
sourcepub fn label(self, input: impl Into<String>) -> Self
pub fn label(self, input: impl Into<String>) -> Self
A human-readable label for this metric or expression. This is especially useful if this is a math expression, so that you know what the value represents.
sourcepub fn set_label(self, input: Option<String>) -> Self
pub fn set_label(self, input: Option<String>) -> Self
A human-readable label for this metric or expression. This is especially useful if this is a math expression, so that you know what the value represents.
sourcepub fn get_label(&self) -> &Option<String>
pub fn get_label(&self) -> &Option<String>
A human-readable label for this metric or expression. This is especially useful if this is a math expression, so that you know what the value represents.
sourcepub fn metric_stat(self, input: TargetTrackingMetricStat) -> Self
pub fn metric_stat(self, input: TargetTrackingMetricStat) -> Self
Information about the metric data to return.
Conditional: Within each MetricDataQuery
object, you must specify either Expression
or MetricStat
, but not both.
sourcepub fn set_metric_stat(self, input: Option<TargetTrackingMetricStat>) -> Self
pub fn set_metric_stat(self, input: Option<TargetTrackingMetricStat>) -> Self
Information about the metric data to return.
Conditional: Within each MetricDataQuery
object, you must specify either Expression
or MetricStat
, but not both.
sourcepub fn get_metric_stat(&self) -> &Option<TargetTrackingMetricStat>
pub fn get_metric_stat(&self) -> &Option<TargetTrackingMetricStat>
Information about the metric data to return.
Conditional: Within each MetricDataQuery
object, you must specify either Expression
or MetricStat
, but not both.
sourcepub fn return_data(self, input: bool) -> Self
pub fn return_data(self, input: bool) -> Self
Indicates whether to return the timestamps and raw data values of this metric.
If you use any math expressions, specify true
for this value for only the final math expression that the metric specification is based on. You must specify false
for ReturnData
for all the other metrics and expressions used in the metric specification.
If you are only retrieving metrics and not performing any math expressions, do not specify anything for ReturnData
. This sets it to its default (true
).
sourcepub fn set_return_data(self, input: Option<bool>) -> Self
pub fn set_return_data(self, input: Option<bool>) -> Self
Indicates whether to return the timestamps and raw data values of this metric.
If you use any math expressions, specify true
for this value for only the final math expression that the metric specification is based on. You must specify false
for ReturnData
for all the other metrics and expressions used in the metric specification.
If you are only retrieving metrics and not performing any math expressions, do not specify anything for ReturnData
. This sets it to its default (true
).
sourcepub fn get_return_data(&self) -> &Option<bool>
pub fn get_return_data(&self) -> &Option<bool>
Indicates whether to return the timestamps and raw data values of this metric.
If you use any math expressions, specify true
for this value for only the final math expression that the metric specification is based on. You must specify false
for ReturnData
for all the other metrics and expressions used in the metric specification.
If you are only retrieving metrics and not performing any math expressions, do not specify anything for ReturnData
. This sets it to its default (true
).
sourcepub fn build(self) -> Result<TargetTrackingMetricDataQuery, BuildError>
pub fn build(self) -> Result<TargetTrackingMetricDataQuery, BuildError>
Consumes the builder and constructs a TargetTrackingMetricDataQuery
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for TargetTrackingMetricDataQueryBuilder
impl Clone for TargetTrackingMetricDataQueryBuilder
source§fn clone(&self) -> TargetTrackingMetricDataQueryBuilder
fn clone(&self) -> TargetTrackingMetricDataQueryBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for TargetTrackingMetricDataQueryBuilder
impl Default for TargetTrackingMetricDataQueryBuilder
source§fn default() -> TargetTrackingMetricDataQueryBuilder
fn default() -> TargetTrackingMetricDataQueryBuilder
source§impl PartialEq for TargetTrackingMetricDataQueryBuilder
impl PartialEq for TargetTrackingMetricDataQueryBuilder
source§fn eq(&self, other: &TargetTrackingMetricDataQueryBuilder) -> bool
fn eq(&self, other: &TargetTrackingMetricDataQueryBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for TargetTrackingMetricDataQueryBuilder
Auto Trait Implementations§
impl Freeze for TargetTrackingMetricDataQueryBuilder
impl RefUnwindSafe for TargetTrackingMetricDataQueryBuilder
impl Send for TargetTrackingMetricDataQueryBuilder
impl Sync for TargetTrackingMetricDataQueryBuilder
impl Unpin for TargetTrackingMetricDataQueryBuilder
impl UnwindSafe for TargetTrackingMetricDataQueryBuilder
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