org.jclouds.elb.domain
Class LoadBalancer

java.lang.Object
  extended by org.jclouds.elb.domain.LoadBalancer

public class LoadBalancer
extends Object

A load balancer is represented by a DNS name and a set of ports. The load balancer is the destination to which all requests intended for your application should be directed. Each load balancer can distribute requests to multiple EC2 instances. Load Balancers can span multiple Availability Zones within an EC2 region, but they cannot span multiple regions.

note

Elastic Load Balancing automatically generates a DNS name for each load balancer. You can map any other domain name (such as www.example.com) to the automatically generated DNS name using CNAME. Or you can use an Amazon Route 53 alias for the load balancer's DNS name. Amazon Route 53 provides secure and reliable routing to the infrastructure that uses AWS products, such as Amazon EC2, Amazon Simple Storage Service (Amazon S3), or Elastic Load Balancing. For more information on using Amazon Route 53 for your load balancer, see Using Domain Names with Elastic Load Balancing. For information about CNAME records, see the CNAME Record Wikipedia article.

Author:
Adrian Cole
See Also:
doc

Nested Class Summary
static class LoadBalancer.Builder<T extends LoadBalancer.Builder<T>>
           
 
Field Summary
protected  Set<String> availabilityZones
           
protected  Date createdTime
           
protected  String dnsName
           
protected  HealthCheck healthCheck
           
protected  com.google.common.base.Optional<String> hostedZoneId
           
protected  com.google.common.base.Optional<String> hostedZoneName
           
protected  Set<String> instanceIds
           
protected  Set<ListenerWithPolicies> listeners
           
protected  String name
           
protected  com.google.common.base.Optional<Scheme> scheme
           
protected  Set<String> securityGroups
           
protected  com.google.common.base.Optional<SecurityGroupAndOwner> sourceSecurityGroup
           
protected  Set<String> subnets
           
protected  com.google.common.base.Optional<String> VPCId
           
 
Constructor Summary
protected LoadBalancer(String name, Date createdTime, String dnsName, HealthCheck healthCheck, Iterable<String> instanceIds, Iterable<ListenerWithPolicies> listeners, Iterable<String> availabilityZones, com.google.common.base.Optional<Scheme> scheme, com.google.common.base.Optional<SecurityGroupAndOwner> sourceSecurityGroup, com.google.common.base.Optional<String> VPCId, Iterable<String> securityGroups, Iterable<String> subnets, com.google.common.base.Optional<String> hostedZoneName, com.google.common.base.Optional<String> hostedZoneId)
           
 
Method Summary
static LoadBalancer.Builder<?> builder()
           
 boolean equals(Object obj)
          
 Set<String> getAvailabilityZones()
          Specifies a list of Availability Zones.
 Date getCreatedTime()
          Provides the date and time the LoadBalancer was created.
 String getDnsName()
          Specifies the external DNS name associated with the LoadBalancer.
 HealthCheck getHealthCheck()
          Specifies information regarding the various health probes conducted on the LoadBalancer.
 com.google.common.base.Optional<String> getHostedZoneId()
          Provides the ID of the Amazon Route 53 hosted zone name that is associated with the LoadBalancer.
 com.google.common.base.Optional<String> getHostedZoneName()
          Provides the name of the Amazon Route 53 hosted zone that is associated with the LoadBalancer
 Set<String> getInstanceIds()
          Provides a list of EC2 instance IDs for the LoadBalancer.
 Set<ListenerWithPolicies> getListeners()
          Provides a list of listeners for the LoadBalancer.
 String getName()
          The name associated with the LoadBalancer.
 com.google.common.base.Optional<Scheme> getScheme()
          Type of the loadbalancer; This option is only available for LoadBalancers attached to an Amazon VPC.
 Set<String> getSecurityGroups()
          The security groups the LoadBalancer is a member of (VPC only).
 com.google.common.base.Optional<SecurityGroupAndOwner> getSourceSecurityGroup()
          The security group that you can use as part of your inbound rules for your LoadBalancer's back-end Amazon EC2 application instances.
 Set<String> getSubnets()
          Provides a list of VPC subnet IDs for the LoadBalancer.
 com.google.common.base.Optional<String> getVPCId()
          Provides the ID of the VPC attached to the LoadBalancer.
 int hashCode()
          
 LoadBalancer.Builder<?> toBuilder()
           
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected final String name

createdTime

protected final Date createdTime

dnsName

protected final String dnsName

healthCheck

protected final HealthCheck healthCheck

instanceIds

protected final Set<String> instanceIds

listeners

protected final Set<ListenerWithPolicies> listeners

availabilityZones

protected final Set<String> availabilityZones

scheme

protected final com.google.common.base.Optional<Scheme> scheme

sourceSecurityGroup

protected final com.google.common.base.Optional<SecurityGroupAndOwner> sourceSecurityGroup

VPCId

protected final com.google.common.base.Optional<String> VPCId

securityGroups

protected final Set<String> securityGroups

subnets

protected final Set<String> subnets

hostedZoneName

protected final com.google.common.base.Optional<String> hostedZoneName

hostedZoneId

protected final com.google.common.base.Optional<String> hostedZoneId
Constructor Detail

LoadBalancer

protected LoadBalancer(String name,
                       Date createdTime,
                       String dnsName,
                       HealthCheck healthCheck,
                       Iterable<String> instanceIds,
                       Iterable<ListenerWithPolicies> listeners,
                       Iterable<String> availabilityZones,
                       com.google.common.base.Optional<Scheme> scheme,
                       com.google.common.base.Optional<SecurityGroupAndOwner> sourceSecurityGroup,
                       com.google.common.base.Optional<String> VPCId,
                       Iterable<String> securityGroups,
                       Iterable<String> subnets,
                       com.google.common.base.Optional<String> hostedZoneName,
                       com.google.common.base.Optional<String> hostedZoneId)
Method Detail

builder

public static LoadBalancer.Builder<?> builder()

toBuilder

public LoadBalancer.Builder<?> toBuilder()

getName

public String getName()
The name associated with the LoadBalancer. The name must be unique within your set of LoadBalancers.


getCreatedTime

public Date getCreatedTime()
Provides the date and time the LoadBalancer was created.


getDnsName

public String getDnsName()
Specifies the external DNS name associated with the LoadBalancer.


getHealthCheck

public HealthCheck getHealthCheck()
Specifies information regarding the various health probes conducted on the LoadBalancer.


getInstanceIds

public Set<String> getInstanceIds()
Provides a list of EC2 instance IDs for the LoadBalancer.


getListeners

public Set<ListenerWithPolicies> getListeners()
Provides a list of listeners for the LoadBalancer.


getAvailabilityZones

public Set<String> getAvailabilityZones()
Specifies a list of Availability Zones.


getScheme

public com.google.common.base.Optional<Scheme> getScheme()
Type of the loadbalancer; This option is only available for LoadBalancers attached to an Amazon VPC.


getSourceSecurityGroup

public com.google.common.base.Optional<SecurityGroupAndOwner> getSourceSecurityGroup()
The security group that you can use as part of your inbound rules for your LoadBalancer's back-end Amazon EC2 application instances. To only allow traffic from LoadBalancers, add a security group rule to your back end instance that specifies this source security group as the inbound source.


getVPCId

public com.google.common.base.Optional<String> getVPCId()
Provides the ID of the VPC attached to the LoadBalancer.


getSecurityGroups

public Set<String> getSecurityGroups()
The security groups the LoadBalancer is a member of (VPC only).


getSubnets

public Set<String> getSubnets()
Provides a list of VPC subnet IDs for the LoadBalancer.


getHostedZoneName

public com.google.common.base.Optional<String> getHostedZoneName()
Provides the name of the Amazon Route 53 hosted zone that is associated with the LoadBalancer


getHostedZoneId

public com.google.common.base.Optional<String> getHostedZoneId()
Provides the ID of the Amazon Route 53 hosted zone name that is associated with the LoadBalancer.


hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2009-2012 jclouds. All Rights Reserved.