Interface CfnScalingPolicy.MetricStatProperty

All Superinterfaces:
All Known Implementing Classes:
Enclosing class:

@Stability(Stable) public static interface CfnScalingPolicy.MetricStatProperty extends
MetricStat is a property of the AWS::AutoScaling::ScalingPolicy MetricDataQuery property type.

This structure defines the CloudWatch metric to return, along with the statistic, period, and unit.

For more information about the CloudWatch terminology below, see Amazon CloudWatch concepts in the Amazon CloudWatch User Guide .


 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 MetricStatProperty metricStatProperty = MetricStatProperty.builder()
                 // the properties below are optional
         // the properties below are optional
  • Method Details

    • getMetric

      @Stability(Stable) @NotNull Object getMetric()
      The CloudWatch metric to return, including the metric name, namespace, and dimensions.

      To get the exact metric name, namespace, and dimensions, inspect the Metric object that is returned by a call to ListMetrics .

    • getStat

      @Stability(Stable) @NotNull String getStat()
      The statistic to return.

      It can include any CloudWatch statistic or extended statistic. For a list of valid values, see the table in Statistics in the Amazon CloudWatch User Guide .

      The most commonly used metrics for predictive scaling are Average and Sum .

    • getUnit

      @Stability(Stable) @Nullable default String getUnit()
      The unit to use for the returned data points.

      For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API Reference .

    • builder

      @Stability(Stable) static CfnScalingPolicy.MetricStatProperty.Builder builder()
      a CfnScalingPolicy.MetricStatProperty.Builder of CfnScalingPolicy.MetricStatProperty