com.amazonaws.services.elasticloadbalancing.model
Class RegisterInstancesWithLoadBalancerRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.elasticloadbalancing.model.RegisterInstancesWithLoadBalancerRequest
All Implemented Interfaces:
java.io.Serializable

public class RegisterInstancesWithLoadBalancerRequest
extends AmazonWebServiceRequest
implements java.io.Serializable

Container for the parameters to the RegisterInstancesWithLoadBalancer operation.

Adds new instances to the load balancer.

Once the instance is registered, it starts receiving traffic and requests from the load balancer. Any instance that is not in any of the Availability Zones registered for the load balancer will be moved to the OutOfService state. It will move to the InService state when the Availability Zone is added to the load balancer.

When an instance registered with a load balancer is stopped and then restarted, the IP addresses associated with the instance changes. Elastic Load Balancing cannot recognize the new IP address, which prevents it from routing traffic to the instances. We recommend that you de-register your Amazon EC2 instances from your load balancer after you stop your instance, and then register the load balancer with your instance after you've restarted. To de-register your instances from load balancer, use DeregisterInstancesFromLoadBalancer action.

For more information, see De-register and Register Amazon EC2 Instances in the Elastic Load Balancing Developer Guide .

NOTE: In order for this call to be successful, you must provide the same account credentials as those that were used to create the load balancer.

NOTE: Completion of this API does not guarantee that operation has completed. Rather, it means that the request has been registered and the changes will happen shortly.

You can use DescribeLoadBalancers or DescribeInstanceHealth action to check the state of the newly registered instances.

See Also:
AmazonElasticLoadBalancing.registerInstancesWithLoadBalancer(RegisterInstancesWithLoadBalancerRequest), Serialized Form

Constructor Summary
RegisterInstancesWithLoadBalancerRequest()
          Default constructor for a new RegisterInstancesWithLoadBalancerRequest object.
RegisterInstancesWithLoadBalancerRequest(java.lang.String loadBalancerName, java.util.List<Instance> instances)
          Constructs a new RegisterInstancesWithLoadBalancerRequest object.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.util.List<Instance> getInstances()
          A list of instance IDs that should be registered with the load balancer.
 java.lang.String getLoadBalancerName()
          The name associated with the load balancer.
 int hashCode()
           
 void setInstances(java.util.Collection<Instance> instances)
          A list of instance IDs that should be registered with the load balancer.
 void setLoadBalancerName(java.lang.String loadBalancerName)
          The name associated with the load balancer.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 RegisterInstancesWithLoadBalancerRequest withInstances(java.util.Collection<Instance> instances)
          A list of instance IDs that should be registered with the load balancer.
 RegisterInstancesWithLoadBalancerRequest withInstances(Instance... instances)
          A list of instance IDs that should be registered with the load balancer.
 RegisterInstancesWithLoadBalancerRequest withLoadBalancerName(java.lang.String loadBalancerName)
          The name associated with the load balancer.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setDelegationToken, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RegisterInstancesWithLoadBalancerRequest

public RegisterInstancesWithLoadBalancerRequest()
Default constructor for a new RegisterInstancesWithLoadBalancerRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


RegisterInstancesWithLoadBalancerRequest

public RegisterInstancesWithLoadBalancerRequest(java.lang.String loadBalancerName,
                                                java.util.List<Instance> instances)
Constructs a new RegisterInstancesWithLoadBalancerRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
loadBalancerName - The name associated with the load balancer. The name must be unique within your set of load balancers.
instances - A list of instance IDs that should be registered with the load balancer.
Method Detail

getLoadBalancerName

public java.lang.String getLoadBalancerName()
The name associated with the load balancer. The name must be unique within your set of load balancers.

Returns:
The name associated with the load balancer. The name must be unique within your set of load balancers.

setLoadBalancerName

public void setLoadBalancerName(java.lang.String loadBalancerName)
The name associated with the load balancer. The name must be unique within your set of load balancers.

Parameters:
loadBalancerName - The name associated with the load balancer. The name must be unique within your set of load balancers.

withLoadBalancerName

public RegisterInstancesWithLoadBalancerRequest withLoadBalancerName(java.lang.String loadBalancerName)
The name associated with the load balancer. The name must be unique within your set of load balancers.

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

Parameters:
loadBalancerName - The name associated with the load balancer. The name must be unique within your set of load balancers.
Returns:
A reference to this updated object so that method calls can be chained together.

getInstances

public java.util.List<Instance> getInstances()
A list of instance IDs that should be registered with the load balancer.

Returns:
A list of instance IDs that should be registered with the load balancer.

setInstances

public void setInstances(java.util.Collection<Instance> instances)
A list of instance IDs that should be registered with the load balancer.

Parameters:
instances - A list of instance IDs that should be registered with the load balancer.

withInstances

public RegisterInstancesWithLoadBalancerRequest withInstances(Instance... instances)
A list of instance IDs that should be registered with the load balancer.

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

Parameters:
instances - A list of instance IDs that should be registered with the load balancer.
Returns:
A reference to this updated object so that method calls can be chained together.

withInstances

public RegisterInstancesWithLoadBalancerRequest withInstances(java.util.Collection<Instance> instances)
A list of instance IDs that should be registered with the load balancer.

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

Parameters:
instances - A list of instance IDs that should be registered with the load balancer.
Returns:
A reference to this updated object so that method calls can be chained together.

toString

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

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

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


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