Menu
Auto Scaling
API Reference (API Version 2011-01-01)

EnableMetricsCollection

Enables monitoring of the specified metrics for the specified Auto Scaling group.

You can only enable metrics collection if InstanceMonitoring in the launch configuration for the group is set to True.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

AutoScalingGroupName

The name or ARN of the Auto Scaling group.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1600.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes

Granularity

The granularity to associate with the metrics to collect. The only valid value is 1Minute.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes

Metrics.member.N

One or more of the following metrics. If you omit this parameter, all metrics are enabled.

  • GroupMinSize

  • GroupMaxSize

  • GroupDesiredCapacity

  • GroupInServiceInstances

  • GroupPendingInstances

  • GroupStandbyInstances

  • GroupTerminatingInstances

  • GroupTotalInstances

Note that the GroupStandbyInstances metric is not enabled by default. You must explicitly request this metric.

Type: array of Strings

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

Errors

For information about the errors that are common to all actions, see Common Errors.

ResourceContention

You already have a pending update to an Auto Scaling resource (for example, a group, instance, or load balancer).

HTTP Status Code: 500

Example

Sample Request

https://autoscaling.amazonaws.com/?Action=EnableMetricsCollection
&AutoScalingGroupName=my-asg
&Granularity=1Minute
&Version=2011-01-01
&AUTHPARAMS