public static final class CfnScalingPolicy.MetricProperty.Builder
extends java.lang.Object
CfnScalingPolicy.MetricProperty
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
CfnScalingPolicy.MetricProperty |
build()
Builds the configured instance.
|
CfnScalingPolicy.MetricProperty.Builder |
dimensions(IResolvable dimensions)
Sets the value of
CfnScalingPolicy.MetricProperty.getDimensions() |
CfnScalingPolicy.MetricProperty.Builder |
dimensions(java.util.List<? extends java.lang.Object> dimensions)
Sets the value of
CfnScalingPolicy.MetricProperty.getDimensions() |
CfnScalingPolicy.MetricProperty.Builder |
metricName(java.lang.String metricName)
Sets the value of
CfnScalingPolicy.MetricProperty.getMetricName() |
CfnScalingPolicy.MetricProperty.Builder |
namespace(java.lang.String namespace)
Sets the value of
CfnScalingPolicy.MetricProperty.getNamespace() |
public CfnScalingPolicy.MetricProperty.Builder metricName(java.lang.String metricName)
CfnScalingPolicy.MetricProperty.getMetricName()
metricName
- The name of the metric. This parameter is required.this
public CfnScalingPolicy.MetricProperty.Builder namespace(java.lang.String namespace)
CfnScalingPolicy.MetricProperty.getNamespace()
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 .this
public CfnScalingPolicy.MetricProperty.Builder dimensions(IResolvable dimensions)
CfnScalingPolicy.MetricProperty.getDimensions()
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.
this
public CfnScalingPolicy.MetricProperty.Builder dimensions(java.util.List<? extends java.lang.Object> dimensions)
CfnScalingPolicy.MetricProperty.getDimensions()
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.
this
public CfnScalingPolicy.MetricProperty build()
CfnScalingPolicy.MetricProperty
java.lang.NullPointerException
- if any required attribute was not provided