public static final class CfnScalingPolicy.CustomizedMetricSpecificationProperty.Builder
extends java.lang.Object
CfnScalingPolicy.CustomizedMetricSpecificationProperty
Constructor and Description |
---|
Builder() |
public CfnScalingPolicy.CustomizedMetricSpecificationProperty.Builder metricName(java.lang.String metricName)
CfnScalingPolicy.CustomizedMetricSpecificationProperty.getMetricName()
metricName
- The name of the metric. 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.CustomizedMetricSpecificationProperty.Builder namespace(java.lang.String namespace)
CfnScalingPolicy.CustomizedMetricSpecificationProperty.getNamespace()
namespace
- The namespace of the metric. This parameter is required.this
public CfnScalingPolicy.CustomizedMetricSpecificationProperty.Builder statistic(java.lang.String statistic)
CfnScalingPolicy.CustomizedMetricSpecificationProperty.getStatistic()
statistic
- The statistic of the metric. This parameter is required.this
public CfnScalingPolicy.CustomizedMetricSpecificationProperty.Builder dimensions(IResolvable dimensions)
CfnScalingPolicy.CustomizedMetricSpecificationProperty.getDimensions()
dimensions
- The dimensions of the metric.
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.this
public CfnScalingPolicy.CustomizedMetricSpecificationProperty.Builder dimensions(java.util.List<? extends java.lang.Object> dimensions)
CfnScalingPolicy.CustomizedMetricSpecificationProperty.getDimensions()
dimensions
- The dimensions of the metric.
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.this
public CfnScalingPolicy.CustomizedMetricSpecificationProperty.Builder unit(java.lang.String unit)
CfnScalingPolicy.CustomizedMetricSpecificationProperty.getUnit()
unit
- The unit of the metric.
For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API Reference .this
public CfnScalingPolicy.CustomizedMetricSpecificationProperty build()
CfnScalingPolicy.CustomizedMetricSpecificationProperty
java.lang.NullPointerException
- if any required attribute was not provided