public static final class CfnScalingPolicy.MetricStatProperty.Builder
extends java.lang.Object
CfnScalingPolicy.MetricStatProperty
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
CfnScalingPolicy.MetricStatProperty |
build()
Builds the configured instance.
|
CfnScalingPolicy.MetricStatProperty.Builder |
metric(CfnScalingPolicy.MetricProperty metric)
Sets the value of
CfnScalingPolicy.MetricStatProperty.getMetric() |
CfnScalingPolicy.MetricStatProperty.Builder |
metric(IResolvable metric)
Sets the value of
CfnScalingPolicy.MetricStatProperty.getMetric() |
CfnScalingPolicy.MetricStatProperty.Builder |
stat(java.lang.String stat)
Sets the value of
CfnScalingPolicy.MetricStatProperty.getStat() |
CfnScalingPolicy.MetricStatProperty.Builder |
unit(java.lang.String unit)
Sets the value of
CfnScalingPolicy.MetricStatProperty.getUnit() |
public CfnScalingPolicy.MetricStatProperty.Builder metric(IResolvable metric)
CfnScalingPolicy.MetricStatProperty.getMetric()
metric
- The CloudWatch metric to return, including the metric name, namespace, and dimensions. This parameter is required.
To get the exact metric name, namespace, and dimensions, inspect the Metric object that is returned by a call to ListMetrics .this
public CfnScalingPolicy.MetricStatProperty.Builder metric(CfnScalingPolicy.MetricProperty metric)
CfnScalingPolicy.MetricStatProperty.getMetric()
metric
- The CloudWatch metric to return, including the metric name, namespace, and dimensions. This parameter is required.
To get the exact metric name, namespace, and dimensions, inspect the Metric object that is returned by a call to ListMetrics .this
public CfnScalingPolicy.MetricStatProperty.Builder stat(java.lang.String stat)
CfnScalingPolicy.MetricStatProperty.getStat()
stat
- The statistic to return. This parameter is required.
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
.
this
public CfnScalingPolicy.MetricStatProperty.Builder unit(java.lang.String unit)
CfnScalingPolicy.MetricStatProperty.getUnit()
unit
- 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 .this
public CfnScalingPolicy.MetricStatProperty build()
CfnScalingPolicy.MetricStatProperty
java.lang.NullPointerException
- if any required attribute was not provided