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

DescribeLoadBalancers

Describes the load balancers for the specified Auto Scaling group.

Note that this operation describes only Classic Load Balancers. If you have Application Load Balancers, use DescribeLoadBalancerTargetGroups instead.

Request Parameters

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

AutoScalingGroupName

The name of the 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

MaxRecords

The maximum number of items to return with this call. The default value is 50 and the maximum value is 100.

Type: Integer

Required: No

NextToken

The token for the next set of items to return. (You received this token from a previous call.)

Type: String

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

Required: No

Response Elements

The following elements are returned by the service.

LoadBalancers.member.N

The load balancers.

Type: Array of LoadBalancerState objects

NextToken

The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

Type: String

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

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

Copy
https://autoscaling.amazonaws.com/?Action=DescribeLoadBalancers &AutoScalingGroupName=my-asg &Version=2011-01-01 &AUTHPARAMS

Sample Response

Copy
<DescribeLoadBalancersResponse xmlns="http://autoscaling.amazonaws.com/doc/2011-01-01/"> <DescribeLoadBalancersResult> <LoadBalancers> <member> <LoadBalancerName>my-loadbalancer</LoadBalancerName> <State>Added</State> </member> </LoadBalancers> </DescribeLoadBalancersResult> <ResponseMetadata> <RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId> </ResponseMetadata> </DescribeLoadBalancersResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: