org.jclouds.elb.features
Interface InstanceApi


public interface InstanceApi

Provides access to Amazon ELB via the Query API

Author:
Adrian Cole
See Also:
, InstanceAsyncApi

Method Summary
 Set<String> deregisterInstanceFromLoadBalancer(String instanceId, String loadBalancerName)
           
 Set<String> deregisterInstancesFromLoadBalancer(Iterable<String> instanceIds, String loadBalancerName)
          Deregisters instances from the LoadBalancer.
 Set<InstanceHealth> getHealthOfInstancesOfLoadBalancer(Iterable<String> instanceIds, String loadBalancerName)
          Returns the current state of the instances of the specified LoadBalancer.
 Set<InstanceHealth> getHealthOfInstancesOfLoadBalancer(String loadBalancerName)
          Returns the current state of the instances of the specified LoadBalancer.
 Set<String> registerInstancesWithLoadBalancer(Iterable<String> instanceIds, String loadBalancerName)
          Adds new instances to the LoadBalancer.
 Set<String> registerInstanceWithLoadBalancer(String instanceId, String loadBalancerName)
           
 

Method Detail

getHealthOfInstancesOfLoadBalancer

Set<InstanceHealth> getHealthOfInstancesOfLoadBalancer(String loadBalancerName)
Returns the current state of the instances of the specified LoadBalancer.

Note

The api must have created the specified input LoadBalancer in order to retrieve this information; the api must provide the same account credentials as those that were used to create the LoadBalancer.

Parameters:
loadBalancerName - The name associated with the LoadBalancer. The name must be unique within the api AWS account.
Returns:
state of all instances of the load balancer

getHealthOfInstancesOfLoadBalancer

Set<InstanceHealth> getHealthOfInstancesOfLoadBalancer(Iterable<String> instanceIds,
                                                       String loadBalancerName)
Returns the current state of the instances of the specified LoadBalancer.

Note

The api must have created the specified input LoadBalancer in order to retrieve this information; the api must provide the same account credentials as those that were used to create the LoadBalancer.

Parameters:
instanceIds - A list of instance IDs whose states are being queried.
loadBalancerName - The name associated with the LoadBalancer. The name must be unique within the api AWS account.
Returns:
state of all instances of the load balancer

registerInstancesWithLoadBalancer

Set<String> registerInstancesWithLoadBalancer(Iterable<String> instanceIds,
                                              String loadBalancerName)
Adds new instances to the LoadBalancer. Once the instance is registered, it starts receiving traffic and requests from the LoadBalancer. Any instance that is not in any of the Availability Zones registered for the LoadBalancer will be moved to the OutOfService state. It will move to the InService state when the Availability Zone is added to the LoadBalancer.

Note

In order for this call to be successful, the api must have created the LoadBalancer. The api must provide the same account credentials as those that were used to create the LoadBalancer.

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.

Parameters:
instanceIds - A list of instance IDs that should be registered with the LoadBalancer.

Note

When the instance is stopped and then restarted, the IP addresses associated with your instance changes. Elastic Load Balancing cannot recognize the new IP address, which prevents it from routing traffic to your 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.
loadBalancerName - The name associated with the LoadBalancer. The name must be unique within the api AWS account.
Returns:
instanceIds registered with load balancer

registerInstanceWithLoadBalancer

Set<String> registerInstanceWithLoadBalancer(String instanceId,
                                             String loadBalancerName)

deregisterInstancesFromLoadBalancer

Set<String> deregisterInstancesFromLoadBalancer(Iterable<String> instanceIds,
                                                String loadBalancerName)
Deregisters instances from the LoadBalancer. Once the instance is deregistered, it will stop receiving traffic from the LoadBalancer. In order to successfully call this API, the same account credentials as those used to create the LoadBalancer must be provided.

Parameters:
instanceIds - A list of EC2 instance IDs consisting of all instances to be deregistered.
loadBalancerName - The name associated with the LoadBalancer. The name must be unique within the api AWS account.
Returns:
instanceIds still registered with load balancer

deregisterInstanceFromLoadBalancer

Set<String> deregisterInstanceFromLoadBalancer(String instanceId,
                                               String loadBalancerName)


Copyright © 2009-2012 jclouds. All Rights Reserved.