public class CreateLoadBalancerRequest extends AmazonWebServiceRequest implements Serializable
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 10 load balancers per region per account.
Elastic Load Balancing supports load balancing your Amazon EC2 instances launched within any one of the following platforms:
For information on creating and managing your load balancers in EC2-Classic, see Deploy Elastic Load Balancing in Amazon EC2-Classic .
For information on creating and managing your load balancers in EC2-VPC, see Deploy Elastic Load Balancing in Amazon VPC .
Constructor and Description |
---|
CreateLoadBalancerRequest()
Default constructor for a new CreateLoadBalancerRequest object.
|
CreateLoadBalancerRequest(String loadBalancerName)
Constructs a new CreateLoadBalancerRequest object.
|
CreateLoadBalancerRequest(String loadBalancerName,
List<Listener> listeners,
List<String> availabilityZones)
Constructs a new CreateLoadBalancerRequest object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
List<String> |
getAvailabilityZones()
A list of Availability Zones.
|
List<Listener> |
getListeners()
A list of the following tuples: LoadBalancerPort, InstancePort, and
Protocol.
|
String |
getLoadBalancerName()
The name associated with the load balancer.
|
String |
getScheme()
The type of a load balancer.
|
List<String> |
getSecurityGroups()
The security groups to assign to your load balancer within your VPC.
|
List<String> |
getSubnets()
A list of subnet IDs in your VPC to attach to your load balancer.
|
int |
hashCode() |
void |
setAvailabilityZones(Collection<String> availabilityZones)
A list of Availability Zones.
|
void |
setListeners(Collection<Listener> listeners)
A list of the following tuples: LoadBalancerPort, InstancePort, and
Protocol.
|
void |
setLoadBalancerName(String loadBalancerName)
The name associated with the load balancer.
|
void |
setScheme(String scheme)
The type of a load balancer.
|
void |
setSecurityGroups(Collection<String> securityGroups)
The security groups to assign to your load balancer within your VPC.
|
void |
setSubnets(Collection<String> subnets)
A list of subnet IDs in your VPC to attach to your load balancer.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreateLoadBalancerRequest |
withAvailabilityZones(Collection<String> availabilityZones)
A list of Availability Zones.
|
CreateLoadBalancerRequest |
withAvailabilityZones(String... availabilityZones)
A list of Availability Zones.
|
CreateLoadBalancerRequest |
withListeners(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(String loadBalancerName)
The name associated with the load balancer.
|
CreateLoadBalancerRequest |
withScheme(String scheme)
The type of a load balancer.
|
CreateLoadBalancerRequest |
withSecurityGroups(Collection<String> securityGroups)
The security groups to assign to your load balancer within your VPC.
|
CreateLoadBalancerRequest |
withSecurityGroups(String... securityGroups)
The security groups to assign to your load balancer within your VPC.
|
CreateLoadBalancerRequest |
withSubnets(Collection<String> subnets)
A list of subnet IDs in your VPC to attach to your load balancer.
|
CreateLoadBalancerRequest |
withSubnets(String... subnets)
A list of subnet IDs in your VPC to attach to your load balancer.
|
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
public CreateLoadBalancerRequest()
public CreateLoadBalancerRequest(String loadBalancerName)
loadBalancerName
- The name associated with the load balancer.
The name must be unique within your set of load balancers.public CreateLoadBalancerRequest(String loadBalancerName, List<Listener> listeners, List<String> availabilityZones)
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.
public String getLoadBalancerName()
public void setLoadBalancerName(String loadBalancerName)
loadBalancerName
- The name associated with the load balancer. The name must be unique
within your set of load balancers.public CreateLoadBalancerRequest withLoadBalancerName(String loadBalancerName)
Returns a reference to this object so that method calls can be chained together.
loadBalancerName
- The name associated with the load balancer. The name must be unique
within your set of load balancers.public List<Listener> getListeners()
public void setListeners(Collection<Listener> listeners)
listeners
- A list of the following tuples: LoadBalancerPort, InstancePort, and
Protocol.public CreateLoadBalancerRequest withListeners(Listener... listeners)
Returns a reference to this object so that method calls can be chained together.
listeners
- A list of the following tuples: LoadBalancerPort, InstancePort, and
Protocol.public CreateLoadBalancerRequest withListeners(Collection<Listener> listeners)
Returns a reference to this object so that method calls can be chained together.
listeners
- A list of the following tuples: LoadBalancerPort, InstancePort, and
Protocol.public List<String> getAvailabilityZones()
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.
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.
public void setAvailabilityZones(Collection<String> availabilityZones)
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.
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.
public CreateLoadBalancerRequest withAvailabilityZones(String... availabilityZones)
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.
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.
public CreateLoadBalancerRequest withAvailabilityZones(Collection<String> availabilityZones)
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.
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.
public List<String> getSubnets()
public void setSubnets(Collection<String> subnets)
subnets
- A list of subnet IDs in your VPC to attach to your load balancer.
Specify one subnet per Availability Zone.public CreateLoadBalancerRequest withSubnets(String... subnets)
Returns a reference to this object so that method calls can be chained together.
subnets
- A list of subnet IDs in your VPC to attach to your load balancer.
Specify one subnet per Availability Zone.public CreateLoadBalancerRequest withSubnets(Collection<String> subnets)
Returns a reference to this object so that method calls can be chained together.
subnets
- A list of subnet IDs in your VPC to attach to your load balancer.
Specify one subnet per Availability Zone.public List<String> getSecurityGroups()
public void setSecurityGroups(Collection<String> securityGroups)
securityGroups
- The security groups to assign to your load balancer within your VPC.public CreateLoadBalancerRequest withSecurityGroups(String... securityGroups)
Returns a reference to this object so that method calls can be chained together.
securityGroups
- The security groups to assign to your load balancer within your VPC.public CreateLoadBalancerRequest withSecurityGroups(Collection<String> securityGroups)
Returns a reference to this object so that method calls can be chained together.
securityGroups
- The security groups to assign to your load balancer within your VPC.public String getScheme()
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
This option is only available for load balancers created within
EC2-VPC. internal
for this option to create an internal load
balancer with a DNS name that resolves to private IP addresses.
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
This option is only available for load balancers created within
EC2-VPC. internal
for this option to create an internal load
balancer with a DNS name that resolves to private IP addresses.
public void setScheme(String scheme)
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
This option is only available for load balancers created within
EC2-VPC. internal
for this option to create an internal load
balancer with a DNS name that resolves to private IP addresses.
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
This option is only available for load balancers created within
EC2-VPC. internal
for this option to create an internal load
balancer with a DNS name that resolves to private IP addresses.
public CreateLoadBalancerRequest withScheme(String scheme)
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
This option is only available for load balancers created within
EC2-VPC. internal
for this option to create an internal load
balancer with a DNS name that resolves to private IP addresses.
Returns a reference to this object so that method calls can be chained together.
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
This option is only available for load balancers created within
EC2-VPC. internal
for this option to create an internal load
balancer with a DNS name that resolves to private IP addresses.
public String toString()
toString
in class Object
Object.toString()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.