MetricStatProperty Struct
MetricStat is a property of the AWS::AutoScaling::ScalingPolicy MetricDataQuery property type.
This structure defines the CloudWatch metric to return, along with the statistic and unit.
For more information about the CloudWatch terminology below, see Amazon CloudWatch concepts in the Amazon CloudWatch User Guide .
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_autoscaling as autoscaling } from 'aws-cdk-lib';
const metricStatProperty: autoscaling.CfnScalingPolicy.MetricStatProperty = {
metric: {
metricName: 'metricName',
namespace: 'namespace',
// the properties below are optional
dimensions: [{
name: 'name',
value: 'value',
}],
},
stat: 'stat',
// the properties below are optional
unit: 'unit',
};
Properties
metricIResolvable | CfnScalingPolicy.MetricPropertymetrictyping.Union[IResolvable, MetricProperty]metricIResolvableMetricIResolvableMetricinterface{}required#notes
To get the exact metric name, namespace, and dimensions, inspect the Metric object that is returned by a call to ListMetrics .
notes
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 .
For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API Reference .