Class CfnScalingPolicy.CustomizedMetricSpecificationProperty.Builder
java.lang.Object
software.amazon.awscdk.services.applicationautoscaling.CfnScalingPolicy.CustomizedMetricSpecificationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnScalingPolicy.CustomizedMetricSpecificationProperty>
- Enclosing interface:
- CfnScalingPolicy.CustomizedMetricSpecificationProperty
@Stability(Stable)
public static final class CfnScalingPolicy.CustomizedMetricSpecificationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnScalingPolicy.CustomizedMetricSpecificationProperty>
A builder for
CfnScalingPolicy.CustomizedMetricSpecificationProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.dimensions(List<? extends Object> dimensions) Sets the value ofCfnScalingPolicy.CustomizedMetricSpecificationProperty.getDimensions()dimensions(IResolvable dimensions) Sets the value ofCfnScalingPolicy.CustomizedMetricSpecificationProperty.getDimensions()metricName(String metricName) Sets the value ofCfnScalingPolicy.CustomizedMetricSpecificationProperty.getMetricName()Sets the value ofCfnScalingPolicy.CustomizedMetricSpecificationProperty.getNamespace()Sets the value ofCfnScalingPolicy.CustomizedMetricSpecificationProperty.getStatistic()Sets the value ofCfnScalingPolicy.CustomizedMetricSpecificationProperty.getUnit()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
metricName
@Stability(Stable) public CfnScalingPolicy.CustomizedMetricSpecificationProperty.Builder metricName(String metricName) Sets the value ofCfnScalingPolicy.CustomizedMetricSpecificationProperty.getMetricName()- Parameters:
metricName- The name of the metric. This parameter is required. To get the exact metric name, namespace, and dimensions, inspect the Metric object that's returned by a call to ListMetrics .- Returns:
this
-
namespace
@Stability(Stable) public CfnScalingPolicy.CustomizedMetricSpecificationProperty.Builder namespace(String namespace) Sets the value ofCfnScalingPolicy.CustomizedMetricSpecificationProperty.getNamespace()- Parameters:
namespace- The namespace of the metric. This parameter is required.- Returns:
this
-
statistic
@Stability(Stable) public CfnScalingPolicy.CustomizedMetricSpecificationProperty.Builder statistic(String statistic) Sets the value ofCfnScalingPolicy.CustomizedMetricSpecificationProperty.getStatistic()- Parameters:
statistic- The statistic of the metric. This parameter is required.- Returns:
this
-
dimensions
@Stability(Stable) public CfnScalingPolicy.CustomizedMetricSpecificationProperty.Builder dimensions(IResolvable dimensions) Sets the value ofCfnScalingPolicy.CustomizedMetricSpecificationProperty.getDimensions()- Parameters:
dimensions- The dimensions of the metric. Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.- Returns:
this
-
dimensions
@Stability(Stable) public CfnScalingPolicy.CustomizedMetricSpecificationProperty.Builder dimensions(List<? extends Object> dimensions) Sets the value ofCfnScalingPolicy.CustomizedMetricSpecificationProperty.getDimensions()- Parameters:
dimensions- The dimensions of the metric. Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.- Returns:
this
-
unit
@Stability(Stable) public CfnScalingPolicy.CustomizedMetricSpecificationProperty.Builder unit(String unit) Sets the value ofCfnScalingPolicy.CustomizedMetricSpecificationProperty.getUnit()- Parameters:
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 .- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnScalingPolicy.CustomizedMetricSpecificationProperty>- Returns:
- a new instance of
CfnScalingPolicy.CustomizedMetricSpecificationProperty - Throws:
NullPointerException- if any required attribute was not provided
-