Struct aws_sdk_autoscaling::types::MetricDataQuery
source · #[non_exhaustive]pub struct MetricDataQuery {
pub id: Option<String>,
pub expression: Option<String>,
pub metric_stat: Option<MetricStat>,
pub label: Option<String>,
pub return_data: Option<bool>,
}Expand description
The metric data to return. Also defines whether this call is returning data for one metric only, or whether it is performing a math expression on the values of returned metric statistics to create a new time series. A time series is a series of data points, each of which is associated with a timestamp.
For more information and examples, see Advanced predictive scaling policy configurations using custom metrics in the Amazon EC2 Auto Scaling User Guide.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: 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.
expression: 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 MetricDataQuery object, you must specify either Expression or MetricStat, but not both.
metric_stat: Option<MetricStat>Information about the metric data to return.
Conditional: Within each MetricDataQuery object, you must specify either Expression or MetricStat, but not both.
label: 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.
return_data: 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).
Implementations§
source§impl MetricDataQuery
impl MetricDataQuery
sourcepub fn id(&self) -> Option<&str>
pub fn id(&self) -> Option<&str>
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 expression(&self) -> Option<&str>
pub fn expression(&self) -> Option<&str>
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 MetricDataQuery object, you must specify either Expression or MetricStat, but not both.
sourcepub fn metric_stat(&self) -> Option<&MetricStat>
pub fn metric_stat(&self) -> Option<&MetricStat>
Information about the metric data to return.
Conditional: Within each MetricDataQuery object, you must specify either Expression or MetricStat, but not both.
sourcepub fn label(&self) -> Option<&str>
pub fn label(&self) -> Option<&str>
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 return_data(&self) -> Option<bool>
pub fn 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).
source§impl MetricDataQuery
impl MetricDataQuery
sourcepub fn builder() -> MetricDataQueryBuilder
pub fn builder() -> MetricDataQueryBuilder
Creates a new builder-style object to manufacture MetricDataQuery.
Trait Implementations§
source§impl Clone for MetricDataQuery
impl Clone for MetricDataQuery
source§fn clone(&self) -> MetricDataQuery
fn clone(&self) -> MetricDataQuery
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for MetricDataQuery
impl Debug for MetricDataQuery
source§impl PartialEq for MetricDataQuery
impl PartialEq for MetricDataQuery
source§fn eq(&self, other: &MetricDataQuery) -> bool
fn eq(&self, other: &MetricDataQuery) -> bool
self and other values to be equal, and is used
by ==.