You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::AutoScaling::LoadBalancer

Inherits:
Resources::Resource show all
Defined in:
(unknown)

Instance Attribute Summary collapse

Attributes inherited from Resources::Resource

#client, #identifiers

Instance Method Summary collapse

Methods inherited from Resources::Resource

add_data_attribute, add_identifier, #data, data_attributes, #data_loaded?, identifiers, #load, #wait_until

Methods included from Resources::OperationMethods

#add_batch_operation, #add_operation, #batch_operation, #batch_operation_names, #batch_operations, #operation, #operation_names, #operations

Constructor Details

#initialize(group_name, name, options = {}) ⇒ Object #initialize(options = {}) ⇒ Object

Overloads:

  • #initialize(group_name, name, options = {}) ⇒ Object

    Parameters:

    • group_name (String)
    • name (String)

    Options Hash (options):

    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

  • #initialize(options = {}) ⇒ Object

    Options Hash (options):

    • :group_name (required, String)
    • :name (required, String)
    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

Instance Attribute Details

#group_nameString (readonly)

Returns:

  • (String)

#load_balancer_nameString (readonly)

The name of the load balancer.

Returns:

  • (String)

    The name of the load balancer.

#nameString (readonly)

Returns:

  • (String)

#stateString (readonly)

One of the following load balancer states:

  • 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 in the group 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.

  • Removed - All instances in the group are deregistered from the load balancer.

Returns:

  • (String)

    One of the following load balancer states:.

Instance Method Details

#attachStruct

To attach an Application Load Balancer or a Network Load Balancer, use the AttachLoadBalancerTargetGroups API operation instead.

Attaches one or more Classic Load Balancers to the specified Auto Scaling group. Amazon EC2 Auto Scaling registers the running instances with these Classic Load Balancers.

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

For more information, see Attaching a load balancer to your Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.

Examples:

Request syntax example with placeholder values


loadbalancer.attach()

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#detachStruct

Detaches one or more Classic Load Balancers from the specified Auto Scaling group.

This operation detaches only Classic Load Balancers. If you have Application Load Balancers or Network Load Balancers, use the DetachLoadBalancerTargetGroups API instead.

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 the DescribeLoadBalancers API call. The instances remain running.

Examples:

Request syntax example with placeholder values


loadbalancer.detach()

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#groupAutoScalingGroup

Returns: