com.amazonaws.services.elasticloadbalancing.model
Class CreateLoadBalancerRequest

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

public class CreateLoadBalancerRequest
extends AmazonWebServiceRequest
implements java.io.Serializable

Container for the parameters to the CreateLoadBalancer operation.

Creates a new load balancer.

After the call has completed successfully, a new load balancer is created with a unique Domain Name Service (DNS) name. The DNS name includes the name of the AWS region in which the load balance was created. For example, if your load balancer was created in the United States, the DNS name might end with either of the following:

For information about the AWS regions supported by Elastic Load Balancing, see Regions and Endpoints .

You can create up to 20 load balancers per region per account.

Elastic Load Balancing supports load balancing your Amazon EC2 instances launched within any one of the following platforms:

See Also:
AmazonElasticLoadBalancing.createLoadBalancer(CreateLoadBalancerRequest), Serialized Form

Constructor Summary
CreateLoadBalancerRequest()
          Default constructor for a new CreateLoadBalancerRequest object.
CreateLoadBalancerRequest(java.lang.String loadBalancerName)
          Constructs a new CreateLoadBalancerRequest object.
CreateLoadBalancerRequest(java.lang.String loadBalancerName, java.util.List<Listener> listeners, java.util.List<java.lang.String> availabilityZones)
          Constructs a new CreateLoadBalancerRequest object.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.util.List<java.lang.String> getAvailabilityZones()
          A list of Availability Zones.
 java.util.List<Listener> getListeners()
          A list of the following tuples: LoadBalancerPort, InstancePort, and Protocol.
 java.lang.String getLoadBalancerName()
          The name associated with the load balancer.
 java.lang.String getScheme()
          The type of a load balancer.
 java.util.List<java.lang.String> getSecurityGroups()
          The security groups to assign to your load balancer within your VPC.
 java.util.List<java.lang.String> getSubnets()
          A list of subnet IDs in your VPC to attach to your load balancer.
 int hashCode()
           
 void setAvailabilityZones(java.util.Collection<java.lang.String> availabilityZones)
          A list of Availability Zones.
 void setListeners(java.util.Collection<Listener> listeners)
          A list of the following tuples: LoadBalancerPort, InstancePort, and Protocol.
 void setLoadBalancerName(java.lang.String loadBalancerName)
          The name associated with the load balancer.
 void setScheme(java.lang.String scheme)
          The type of a load balancer.
 void setSecurityGroups(java.util.Collection<java.lang.String> securityGroups)
          The security groups to assign to your load balancer within your VPC.
 void setSubnets(java.util.Collection<java.lang.String> subnets)
          A list of subnet IDs in your VPC to attach to your load balancer.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 CreateLoadBalancerRequest withAvailabilityZones(java.util.Collection<java.lang.String> availabilityZones)
          A list of Availability Zones.
 CreateLoadBalancerRequest withAvailabilityZones(java.lang.String... availabilityZones)
          A list of Availability Zones.
 CreateLoadBalancerRequest withListeners(java.util.Collection<Listener> listeners)
          A list of the following tuples: LoadBalancerPort, InstancePort, and Protocol.
 CreateLoadBalancerRequest withListeners(Listener... listeners)
          A list of the following tuples: LoadBalancerPort, InstancePort, and Protocol.
 CreateLoadBalancerRequest withLoadBalancerName(java.lang.String loadBalancerName)
          The name associated with the load balancer.
 CreateLoadBalancerRequest withScheme(java.lang.String scheme)
          The type of a load balancer.
 CreateLoadBalancerRequest withSecurityGroups(java.util.Collection<java.lang.String> securityGroups)
          The security groups to assign to your load balancer within your VPC.
 CreateLoadBalancerRequest withSecurityGroups(java.lang.String... securityGroups)
          The security groups to assign to your load balancer within your VPC.
 CreateLoadBalancerRequest withSubnets(java.util.Collection<java.lang.String> subnets)
          A list of subnet IDs in your VPC to attach to your load balancer.
 CreateLoadBalancerRequest withSubnets(java.lang.String... subnets)
          A list of subnet IDs in your VPC to attach to your 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

CreateLoadBalancerRequest

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


CreateLoadBalancerRequest

public CreateLoadBalancerRequest(java.lang.String loadBalancerName)
Constructs a new CreateLoadBalancerRequest 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.

CreateLoadBalancerRequest

public CreateLoadBalancerRequest(java.lang.String loadBalancerName,
                                 java.util.List<Listener> listeners,
                                 java.util.List<java.lang.String> availabilityZones)
Constructs a new CreateLoadBalancerRequest 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.
listeners - A list of the following tuples: LoadBalancerPort, InstancePort, and Protocol.
availabilityZones - A list of Availability Zones.

At least one Availability Zone must be specified. Specified Availability Zones must be in the same EC2 Region as the load balancer. Traffic will be equally distributed across all zones.

You can later add more Availability Zones after the creation of the load balancer by calling EnableAvailabilityZonesForLoadBalancer action.

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 CreateLoadBalancerRequest 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.

getListeners

public java.util.List<Listener> getListeners()
A list of the following tuples: LoadBalancerPort, InstancePort, and Protocol.

Returns:
A list of the following tuples: LoadBalancerPort, InstancePort, and Protocol.

setListeners

public void setListeners(java.util.Collection<Listener> listeners)
A list of the following tuples: LoadBalancerPort, InstancePort, and Protocol.

Parameters:
listeners - A list of the following tuples: LoadBalancerPort, InstancePort, and Protocol.

withListeners

public CreateLoadBalancerRequest withListeners(Listener... listeners)
A list of the following tuples: LoadBalancerPort, InstancePort, and Protocol.

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

Parameters:
listeners - A list of the following tuples: LoadBalancerPort, InstancePort, and Protocol.
Returns:
A reference to this updated object so that method calls can be chained together.

withListeners

public CreateLoadBalancerRequest withListeners(java.util.Collection<Listener> listeners)
A list of the following tuples: LoadBalancerPort, InstancePort, and Protocol.

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

Parameters:
listeners - A list of the following tuples: LoadBalancerPort, InstancePort, and Protocol.
Returns:
A reference to this updated object so that method calls can be chained together.

getAvailabilityZones

public java.util.List<java.lang.String> getAvailabilityZones()
A list of Availability Zones.

At least one Availability Zone must be specified. Specified Availability Zones must be in the same EC2 Region as the load balancer. Traffic will be equally distributed across all zones.

You can later add more Availability Zones after the creation of the load balancer by calling EnableAvailabilityZonesForLoadBalancer action.

Returns:
A list of Availability Zones.

At least one Availability Zone must be specified. Specified Availability Zones must be in the same EC2 Region as the load balancer. Traffic will be equally distributed across all zones.

You can later add more Availability Zones after the creation of the load balancer by calling EnableAvailabilityZonesForLoadBalancer action.


setAvailabilityZones

public void setAvailabilityZones(java.util.Collection<java.lang.String> availabilityZones)
A list of Availability Zones.

At least one Availability Zone must be specified. Specified Availability Zones must be in the same EC2 Region as the load balancer. Traffic will be equally distributed across all zones.

You can later add more Availability Zones after the creation of the load balancer by calling EnableAvailabilityZonesForLoadBalancer action.

Parameters:
availabilityZones - A list of Availability Zones.

At least one Availability Zone must be specified. Specified Availability Zones must be in the same EC2 Region as the load balancer. Traffic will be equally distributed across all zones.

You can later add more Availability Zones after the creation of the load balancer by calling EnableAvailabilityZonesForLoadBalancer action.


withAvailabilityZones

public CreateLoadBalancerRequest withAvailabilityZones(java.lang.String... availabilityZones)
A list of Availability Zones.

At least one Availability Zone must be specified. Specified Availability Zones must be in the same EC2 Region as the load balancer. Traffic will be equally distributed across all zones.

You can later add more Availability Zones after the creation of the load balancer by calling EnableAvailabilityZonesForLoadBalancer action.

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

Parameters:
availabilityZones - A list of Availability Zones.

At least one Availability Zone must be specified. Specified Availability Zones must be in the same EC2 Region as the load balancer. Traffic will be equally distributed across all zones.

You can later add more Availability Zones after the creation of the load balancer by calling EnableAvailabilityZonesForLoadBalancer action.

Returns:
A reference to this updated object so that method calls can be chained together.

withAvailabilityZones

public CreateLoadBalancerRequest withAvailabilityZones(java.util.Collection<java.lang.String> availabilityZones)
A list of Availability Zones.

At least one Availability Zone must be specified. Specified Availability Zones must be in the same EC2 Region as the load balancer. Traffic will be equally distributed across all zones.

You can later add more Availability Zones after the creation of the load balancer by calling EnableAvailabilityZonesForLoadBalancer action.

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

Parameters:
availabilityZones - A list of Availability Zones.

At least one Availability Zone must be specified. Specified Availability Zones must be in the same EC2 Region as the load balancer. Traffic will be equally distributed across all zones.

You can later add more Availability Zones after the creation of the load balancer by calling EnableAvailabilityZonesForLoadBalancer action.

Returns:
A reference to this updated object so that method calls can be chained together.

getSubnets

public java.util.List<java.lang.String> getSubnets()
A list of subnet IDs in your VPC to attach to your load balancer. Specify one subnet per Availability Zone.

Returns:
A list of subnet IDs in your VPC to attach to your load balancer. Specify one subnet per Availability Zone.

setSubnets

public void setSubnets(java.util.Collection<java.lang.String> subnets)
A list of subnet IDs in your VPC to attach to your load balancer. Specify one subnet per Availability Zone.

Parameters:
subnets - A list of subnet IDs in your VPC to attach to your load balancer. Specify one subnet per Availability Zone.

withSubnets

public CreateLoadBalancerRequest withSubnets(java.lang.String... subnets)
A list of subnet IDs in your VPC to attach to your load balancer. Specify one subnet per Availability Zone.

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

Parameters:
subnets - A list of subnet IDs in your VPC to attach to your load balancer. Specify one subnet per Availability Zone.
Returns:
A reference to this updated object so that method calls can be chained together.

withSubnets

public CreateLoadBalancerRequest withSubnets(java.util.Collection<java.lang.String> subnets)
A list of subnet IDs in your VPC to attach to your load balancer. Specify one subnet per Availability Zone.

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

Parameters:
subnets - A list of subnet IDs in your VPC to attach to your load balancer. Specify one subnet per Availability Zone.
Returns:
A reference to this updated object so that method calls can be chained together.

getSecurityGroups

public java.util.List<java.lang.String> getSecurityGroups()
The security groups to assign to your load balancer within your VPC.

Returns:
The security groups to assign to your load balancer within your VPC.

setSecurityGroups

public void setSecurityGroups(java.util.Collection<java.lang.String> securityGroups)
The security groups to assign to your load balancer within your VPC.

Parameters:
securityGroups - The security groups to assign to your load balancer within your VPC.

withSecurityGroups

public CreateLoadBalancerRequest withSecurityGroups(java.lang.String... securityGroups)
The security groups to assign to your load balancer within your VPC.

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

Parameters:
securityGroups - The security groups to assign to your load balancer within your VPC.
Returns:
A reference to this updated object so that method calls can be chained together.

withSecurityGroups

public CreateLoadBalancerRequest withSecurityGroups(java.util.Collection<java.lang.String> securityGroups)
The security groups to assign to your load balancer within your VPC.

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

Parameters:
securityGroups - The security groups to assign to your load balancer within your VPC.
Returns:
A reference to this updated object so that method calls can be chained together.

getScheme

public java.lang.String getScheme()
The type of a load balancer.

By default, Elastic Load Balancing creates an Internet-facing load balancer with a publicly resolvable DNS name, which resolves to public IP addresses. For more informationabout Internet-facing and Internal load balancers, see Internet-facing and Internal Load Balancers.

Specify the value internal for this option to create an internal load balancer with a DNS name that resolves to private IP addresses.

This option is only available for load balancers created within EC2-VPC.

Returns:
The type of a load balancer.

By default, Elastic Load Balancing creates an Internet-facing load balancer with a publicly resolvable DNS name, which resolves to public IP addresses. For more informationabout Internet-facing and Internal load balancers, see Internet-facing and Internal Load Balancers.

Specify the value internal for this option to create an internal load balancer with a DNS name that resolves to private IP addresses.

This option is only available for load balancers created within EC2-VPC.


setScheme

public void setScheme(java.lang.String scheme)
The type of a load balancer.

By default, Elastic Load Balancing creates an Internet-facing load balancer with a publicly resolvable DNS name, which resolves to public IP addresses. For more informationabout Internet-facing and Internal load balancers, see Internet-facing and Internal Load Balancers.

Specify the value internal for this option to create an internal load balancer with a DNS name that resolves to private IP addresses.

This option is only available for load balancers created within EC2-VPC.

Parameters:
scheme - The type of a load balancer.

By default, Elastic Load Balancing creates an Internet-facing load balancer with a publicly resolvable DNS name, which resolves to public IP addresses. For more informationabout Internet-facing and Internal load balancers, see Internet-facing and Internal Load Balancers.

Specify the value internal for this option to create an internal load balancer with a DNS name that resolves to private IP addresses.

This option is only available for load balancers created within EC2-VPC.


withScheme

public CreateLoadBalancerRequest withScheme(java.lang.String scheme)
The type of a load balancer.

By default, Elastic Load Balancing creates an Internet-facing load balancer with a publicly resolvable DNS name, which resolves to public IP addresses. For more informationabout Internet-facing and Internal load balancers, see Internet-facing and Internal Load Balancers.

Specify the value internal for this option to create an internal load balancer with a DNS name that resolves to private IP addresses.

This option is only available for load balancers created within EC2-VPC.

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

Parameters:
scheme - The type of a load balancer.

By default, Elastic Load Balancing creates an Internet-facing load balancer with a publicly resolvable DNS name, which resolves to public IP addresses. For more informationabout Internet-facing and Internal load balancers, see Internet-facing and Internal Load Balancers.

Specify the value internal for this option to create an internal load balancer with a DNS name that resolves to private IP addresses.

This option is only available for load balancers created within EC2-VPC.

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.