public class EnableMetricsCollectionRequest extends AmazonWebServiceRequest implements Serializable
EnableMetricsCollection operation
.
Enables monitoring of group metrics for the Auto Scaling group specified in AutoScalingGroupName
.
You can specify the list of enabled metrics with the Metrics
parameter.
Auto Scaling metrics collection can be turned on only if the InstanceMonitoring
flag, in the Auto Scaling group's launch configuration,
is set to True
.
Constructor and Description |
---|
EnableMetricsCollectionRequest() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getAutoScalingGroupName()
The name or ARN of the Auto Scaling group.
|
String |
getGranularity()
The granularity to associate with the metrics to collect.
|
List<String> |
getMetrics()
The list of metrics to collect.
|
int |
hashCode() |
void |
setAutoScalingGroupName(String autoScalingGroupName)
The name or ARN of the Auto Scaling group.
|
void |
setGranularity(String granularity)
The granularity to associate with the metrics to collect.
|
void |
setMetrics(Collection<String> metrics)
The list of metrics to collect.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
EnableMetricsCollectionRequest |
withAutoScalingGroupName(String autoScalingGroupName)
The name or ARN of the Auto Scaling group.
|
EnableMetricsCollectionRequest |
withGranularity(String granularity)
The granularity to associate with the metrics to collect.
|
EnableMetricsCollectionRequest |
withMetrics(Collection<String> metrics)
The list of metrics to collect.
|
EnableMetricsCollectionRequest |
withMetrics(String... metrics)
The list of metrics to collect.
|
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
public String getAutoScalingGroupName()
Constraints:
Length: 1 - 1600
Pattern: [ --�𐀀-\r\n\t]*
public void setAutoScalingGroupName(String autoScalingGroupName)
Constraints:
Length: 1 - 1600
Pattern: [ --�𐀀-\r\n\t]*
autoScalingGroupName
- The name or ARN of the Auto Scaling group.public EnableMetricsCollectionRequest withAutoScalingGroupName(String autoScalingGroupName)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 1600
Pattern: [ --�𐀀-\r\n\t]*
autoScalingGroupName
- The name or ARN of the Auto Scaling group.public List<String> getMetrics()
GroupMinSize
GroupMaxSize
GroupDesiredCapacity
GroupInServiceInstances
GroupPendingInstances
GroupTerminatingInstances
GroupTotalInstances
GroupMinSize
GroupMaxSize
GroupDesiredCapacity
GroupInServiceInstances
GroupPendingInstances
GroupTerminatingInstances
GroupTotalInstances
public void setMetrics(Collection<String> metrics)
GroupMinSize
GroupMaxSize
GroupDesiredCapacity
GroupInServiceInstances
GroupPendingInstances
GroupTerminatingInstances
GroupTotalInstances
metrics
- The list of metrics to collect. If no metrics are specified, all
metrics are enabled. The following metrics are supported: GroupMinSize
GroupMaxSize
GroupDesiredCapacity
GroupInServiceInstances
GroupPendingInstances
GroupTerminatingInstances
GroupTotalInstances
public EnableMetricsCollectionRequest withMetrics(String... metrics)
GroupMinSize
GroupMaxSize
GroupDesiredCapacity
GroupInServiceInstances
GroupPendingInstances
GroupTerminatingInstances
GroupTotalInstances
Returns a reference to this object so that method calls can be chained together.
metrics
- The list of metrics to collect. If no metrics are specified, all
metrics are enabled. The following metrics are supported: GroupMinSize
GroupMaxSize
GroupDesiredCapacity
GroupInServiceInstances
GroupPendingInstances
GroupTerminatingInstances
GroupTotalInstances
public EnableMetricsCollectionRequest withMetrics(Collection<String> metrics)
GroupMinSize
GroupMaxSize
GroupDesiredCapacity
GroupInServiceInstances
GroupPendingInstances
GroupTerminatingInstances
GroupTotalInstances
Returns a reference to this object so that method calls can be chained together.
metrics
- The list of metrics to collect. If no metrics are specified, all
metrics are enabled. The following metrics are supported: GroupMinSize
GroupMaxSize
GroupDesiredCapacity
GroupInServiceInstances
GroupPendingInstances
GroupTerminatingInstances
GroupTotalInstances
public String getGranularity()
Constraints:
Length: 1 - 255
Pattern: [ --�𐀀-\r\n\t]*
public void setGranularity(String granularity)
Constraints:
Length: 1 - 255
Pattern: [ --�𐀀-\r\n\t]*
granularity
- The granularity to associate with the metrics to collect. Currently,
the only legal granularity is "1Minute".public EnableMetricsCollectionRequest withGranularity(String granularity)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 255
Pattern: [ --�𐀀-\r\n\t]*
granularity
- The granularity to associate with the metrics to collect. Currently,
the only legal granularity is "1Minute".public String toString()
toString
in class Object
Object.toString()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.