com.amazonaws.services.autoscaling.model
Class EnableMetricsCollectionRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.autoscaling.model.EnableMetricsCollectionRequest

public class EnableMetricsCollectionRequest
extends AmazonWebServiceRequest

Container for the parameters to the 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 .

See Also:
AmazonAutoScaling.enableMetricsCollection(EnableMetricsCollectionRequest)

Constructor Summary
EnableMetricsCollectionRequest()
           
 
Method Summary
 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.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, setDelegationToken, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EnableMetricsCollectionRequest

public EnableMetricsCollectionRequest()
Method Detail

getAutoScalingGroupName

public String getAutoScalingGroupName()
The name or ARN of the Auto Scaling group.

Constraints:
Length: 1 - 1600
Pattern: [ -퟿-�𐀀-􏿿\r\n\t]*

Returns:
The name or ARN of the Auto Scaling group.

setAutoScalingGroupName

public void setAutoScalingGroupName(String autoScalingGroupName)
The name or ARN of the Auto Scaling group.

Constraints:
Length: 1 - 1600
Pattern: [ -퟿-�𐀀-􏿿\r\n\t]*

Parameters:
autoScalingGroupName - The name or ARN of the Auto Scaling group.

withAutoScalingGroupName

public EnableMetricsCollectionRequest withAutoScalingGroupName(String autoScalingGroupName)
The name or ARN of the Auto Scaling group.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 1600
Pattern: [ -퟿-�𐀀-􏿿\r\n\t]*

Parameters:
autoScalingGroupName - The name or ARN of the Auto Scaling group.
Returns:
A reference to this updated object so that method calls can be chained together.

getMetrics

public List<String> getMetrics()
The list of metrics to collect. If no metrics are specified, all metrics are enabled. The following metrics are supported:

Returns:
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


setMetrics

public void setMetrics(Collection<String> metrics)
The list of metrics to collect. If no metrics are specified, all metrics are enabled. The following metrics are supported:

Parameters:
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


withMetrics

public EnableMetricsCollectionRequest withMetrics(String... metrics)
The list of metrics to collect. If no metrics are specified, all metrics are enabled. The following metrics are supported:

Returns a reference to this object so that method calls can be chained together.

Parameters:
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

Returns:
A reference to this updated object so that method calls can be chained together.

withMetrics

public EnableMetricsCollectionRequest withMetrics(Collection<String> metrics)
The list of metrics to collect. If no metrics are specified, all metrics are enabled. The following metrics are supported:

Returns a reference to this object so that method calls can be chained together.

Parameters:
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

Returns:
A reference to this updated object so that method calls can be chained together.

getGranularity

public String getGranularity()
The granularity to associate with the metrics to collect. Currently, the only legal granularity is "1Minute".

Constraints:
Length: 1 - 255
Pattern: [ -퟿-�𐀀-􏿿\r\n\t]*

Returns:
The granularity to associate with the metrics to collect. Currently, the only legal granularity is "1Minute".

setGranularity

public void setGranularity(String granularity)
The granularity to associate with the metrics to collect. Currently, the only legal granularity is "1Minute".

Constraints:
Length: 1 - 255
Pattern: [ -퟿-�𐀀-􏿿\r\n\t]*

Parameters:
granularity - The granularity to associate with the metrics to collect. Currently, the only legal granularity is "1Minute".

withGranularity

public EnableMetricsCollectionRequest withGranularity(String granularity)
The granularity to associate with the metrics to collect. Currently, the only legal granularity is "1Minute".

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 255
Pattern: [ -퟿-�𐀀-􏿿\r\n\t]*

Parameters:
granularity - The granularity to associate with the metrics to collect. Currently, the only legal granularity is "1Minute".
Returns:
A reference to this updated object so that method calls can be chained together.

toString

public String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.