Class CfnScalingPolicy.MetricProperty.Builder
java.lang.Object
software.amazon.awscdk.services.autoscaling.CfnScalingPolicy.MetricProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnScalingPolicy.MetricProperty>
- Enclosing interface:
CfnScalingPolicy.MetricProperty
@Stability(Stable)
public static final class CfnScalingPolicy.MetricProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnScalingPolicy.MetricProperty>
A builder for
CfnScalingPolicy.MetricProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.dimensions
(List<? extends Object> dimensions) Sets the value ofCfnScalingPolicy.MetricProperty.getDimensions()
dimensions
(IResolvable dimensions) Sets the value ofCfnScalingPolicy.MetricProperty.getDimensions()
metricName
(String metricName) Sets the value ofCfnScalingPolicy.MetricProperty.getMetricName()
Sets the value ofCfnScalingPolicy.MetricProperty.getNamespace()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
metricName
Sets the value ofCfnScalingPolicy.MetricProperty.getMetricName()
- Parameters:
metricName
- The name of the metric. This parameter is required.- Returns:
this
-
namespace
Sets the value ofCfnScalingPolicy.MetricProperty.getNamespace()
- Parameters:
namespace
- The namespace of the metric. This parameter is required. For more information, see the table in AWS services that publish CloudWatch metrics in the Amazon CloudWatch User Guide .- Returns:
this
-
dimensions
@Stability(Stable) public CfnScalingPolicy.MetricProperty.Builder dimensions(IResolvable dimensions) Sets the value ofCfnScalingPolicy.MetricProperty.getDimensions()
- Parameters:
dimensions
- The dimensions for the metric. For the list of available dimensions, see the AWS documentation available from the table in AWS services that publish CloudWatch metrics in the Amazon CloudWatch User Guide .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.MetricProperty.Builder dimensions(List<? extends Object> dimensions) Sets the value ofCfnScalingPolicy.MetricProperty.getDimensions()
- Parameters:
dimensions
- The dimensions for the metric. For the list of available dimensions, see the AWS documentation available from the table in AWS services that publish CloudWatch metrics in the Amazon CloudWatch User Guide .Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnScalingPolicy.MetricProperty>
- Returns:
- a new instance of
CfnScalingPolicy.MetricProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-