async fn is_valid_metric(
        &self,
        namespace: &str,
        dimension_filters: &[DimensionFilter],
        metric_name: &str,
    ) -> bool {
        let result = self
            .client
            .list_metrics(ListMetricsInput {
                dimensions: Some(dimension_filters.to_vec()),
                metric_name: Some(metric_name.into()),
                namespace: Some(namespace.into()),
                ..Default::default()
            })
            .await
            .map_err(|err| err.to_string())
            .unwrap()
            .metrics;

        result.is_some() && result.unwrap().len() > 0
    }
/// Validates if a given metric is valid for the provided namespace
Validates if a given metric is valid for the provided namespace
Validates if a given metric is valid for the provided namespace
async fn is_valid_metric(
        &self,
        namespace: &str,
        dimension_filters: &[DimensionFilter],
        metric_name: &str,
    ) -> bool {
        let result = self
            .client
            .list_metrics(ListMetricsInput {
                dimensions: Some(dimension_filters.to_vec()),
                metric_name: Some(metric_name.into()),
                namespace: Some(namespace.into()),
                ..Default::default()
            })
            .await
            .map_err(|err| err.to_string())
            .unwrap()
            .metrics;
        result.is_some() && result.unwrap().len() > 0
    }
async fn is_valid_metric ( & self , namespace : & str , dimension_filters : & [ DimensionFilter ] , metric_name : & str , ) -> bool { let result = self . client . list_metrics ( ListMetricsInput { dimensions : Some ( dimension_filters . to_vec ( ) ) , metric_name : Some ( metric_name . into ( ) ) , namespace : Some ( namespace . into ( ) ) , .. Default :: default ( ) } ) . await . map_err ( | err | err . to_string ( ) ) . unwrap ( ) . metrics ; result . is_some ( ) && result . unwrap ( ) . len ( ) > 0 }
Validates if a given metric is valid for the provided namespace
Validates if a given metric is valid for the provided namespace
&self
namespace
&str
dimension_filters
&[DimensionFilter]
metric_name
&str