Class CfnAutoScalingGroup.MetricsCollectionProperty.Builder
java.lang.Object
software.amazon.awscdk.services.autoscaling.CfnAutoScalingGroup.MetricsCollectionProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnAutoScalingGroup.MetricsCollectionProperty>
- Enclosing interface:
CfnAutoScalingGroup.MetricsCollectionProperty
@Stability(Stable)
public static final class CfnAutoScalingGroup.MetricsCollectionProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnAutoScalingGroup.MetricsCollectionProperty>
A builder for
CfnAutoScalingGroup.MetricsCollectionProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.granularity
(String granularity) Sets the value ofCfnAutoScalingGroup.MetricsCollectionProperty.getGranularity()
Sets the value ofCfnAutoScalingGroup.MetricsCollectionProperty.getMetrics()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
granularity
@Stability(Stable) public CfnAutoScalingGroup.MetricsCollectionProperty.Builder granularity(String granularity) Sets the value ofCfnAutoScalingGroup.MetricsCollectionProperty.getGranularity()
- Parameters:
granularity
- The frequency at which Amazon EC2 Auto Scaling sends aggregated data to CloudWatch. This parameter is required. The only valid value is1Minute
.- Returns:
this
-
metrics
@Stability(Stable) public CfnAutoScalingGroup.MetricsCollectionProperty.Builder metrics(List<String> metrics) Sets the value ofCfnAutoScalingGroup.MetricsCollectionProperty.getMetrics()
- Parameters:
metrics
- Identifies the metrics to enable. You can specify one or more of the following metrics:GroupMinSize
GroupMaxSize
GroupDesiredCapacity
GroupInServiceInstances
GroupPendingInstances
GroupStandbyInstances
GroupTerminatingInstances
GroupTotalInstances
GroupInServiceCapacity
GroupPendingCapacity
GroupStandbyCapacity
GroupTerminatingCapacity
GroupTotalCapacity
WarmPoolDesiredCapacity
WarmPoolWarmedCapacity
WarmPoolPendingCapacity
WarmPoolTerminatingCapacity
WarmPoolTotalCapacity
GroupAndWarmPoolDesiredCapacity
GroupAndWarmPoolTotalCapacity
If you specify
Granularity
and don't specify any metrics, all metrics are enabled.For more information, see Amazon CloudWatch metrics for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide .
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnAutoScalingGroup.MetricsCollectionProperty>
- Returns:
- a new instance of
CfnAutoScalingGroup.MetricsCollectionProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-