Struct aws_sdk_autoscaling::types::Metric
source · #[non_exhaustive]pub struct Metric {
pub namespace: Option<String>,
pub metric_name: Option<String>,
pub dimensions: Option<Vec<MetricDimension>>,
}Expand description
Represents a specific metric.
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.namespace: Option<String>The namespace of the metric. For more information, see the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User Guide.
metric_name: Option<String>The name of the metric.
dimensions: Option<Vec<MetricDimension>>The dimensions for the metric. For the list of available dimensions, see the Amazon Web Services documentation available from the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User Guide.
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
Implementations§
source§impl Metric
impl Metric
sourcepub fn namespace(&self) -> Option<&str>
pub fn namespace(&self) -> Option<&str>
The namespace of the metric. For more information, see the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User Guide.
sourcepub fn metric_name(&self) -> Option<&str>
pub fn metric_name(&self) -> Option<&str>
The name of the metric.
sourcepub fn dimensions(&self) -> &[MetricDimension]
pub fn dimensions(&self) -> &[MetricDimension]
The dimensions for the metric. For the list of available dimensions, see the Amazon Web Services documentation available from the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User Guide.
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .dimensions.is_none().