Auto Scaling

2015/06/22 - Auto Scaling - 3 new api methods

AttachLoadBalancers (new) Link ¶

Attaches one or more load balancers to the specified Auto Scaling group.

To describe the load balancers for an Auto Scaling group, use DescribeLoadBalancers. To detach the load balancer from the Auto Scaling group, use DetachLoadBalancers.

For more information, see Attach a Load Balancer to Your Auto Scaling Group in the Auto Scaling Developer Guide.

Request Syntax

client.attach_load_balancers(
    AutoScalingGroupName='string',
    LoadBalancerNames=[
        'string',
    ]
)
type AutoScalingGroupName:

string

param AutoScalingGroupName:

The name of the group.

type LoadBalancerNames:

list

param LoadBalancerNames:

One or more load balancer names.

  • (string) --

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

DescribeLoadBalancers (new) Link ¶

Describes the load balancers for the specified Auto Scaling group.

Request Syntax

client.describe_load_balancers(
    AutoScalingGroupName='string',
    NextToken='string',
    MaxRecords=123
)
type AutoScalingGroupName:

string

param AutoScalingGroupName:

[REQUIRED]

The name of the group.

type NextToken:

string

param NextToken:

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

type MaxRecords:

integer

param MaxRecords:

The maximum number of items to return with this call.

rtype:

dict

returns:

Response Syntax

{
    'LoadBalancers': [
        {
            'LoadBalancerName': 'string',
            'State': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • LoadBalancers (list) --

      The load balancers.

      • (dict) --

        Describes the state of a load balancer.

        • LoadBalancerName (string) --

          The name of the load balancer.

        • State (string) --

          The state of the load balancer.

          • Adding - The instances in the group are being registered with the load balancer.

          • Added - All instances in the group are registered with the load balancer.

          • InService - At least one instance in the group passed an ELB health check.

          • Removing - The instances are being deregistered from the load balancer. If connection draining is enabled, Elastic Load Balancing waits for in-flight requests to complete before deregistering the instances.

    • NextToken (string) --

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

DetachLoadBalancers (new) Link ¶

Removes one or more load balancers from the specified Auto Scaling group.

When you detach a load balancer, it enters the Removing state while deregistering the instances in the group. When all instances are deregistered, then you can no longer describe the load balancer using DescribeLoadBalancers. Note that the instances remain running.

Request Syntax

client.detach_load_balancers(
    AutoScalingGroupName='string',
    LoadBalancerNames=[
        'string',
    ]
)
type AutoScalingGroupName:

string

param AutoScalingGroupName:

The name of the group.

type LoadBalancerNames:

list

param LoadBalancerNames:

One or more load balancer names.

  • (string) --

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --