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 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:
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 .
NOOP
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: Protocol, LoadBalancerPort,
InstanceProtocol, InstancePort, and SSLCertificateId.
|
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.
|
List<Tag> |
getTags()
A list of tags to assign to the 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: Protocol, LoadBalancerPort,
InstanceProtocol, InstancePort, and SSLCertificateId.
|
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.
|
void |
setTags(Collection<Tag> tags)
A list of tags to assign to the 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: Protocol, LoadBalancerPort,
InstanceProtocol, InstancePort, and SSLCertificateId.
|
CreateLoadBalancerRequest |
withListeners(Listener... listeners)
A list of the following tuples: Protocol, LoadBalancerPort,
InstanceProtocol, InstancePort, and SSLCertificateId.
|
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.
|
CreateLoadBalancerRequest |
withTags(Collection<Tag> tags)
A list of tags to assign to the load balancer.
|
CreateLoadBalancerRequest |
withTags(Tag... tags)
A list of tags to assign to the load balancer.
|
copyPrivateRequestParameters, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, 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, must have a
maximum of 32 characters, and must only contain alphanumeric
characters or hyphens.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, must have a
maximum of 32 characters, and must only contain alphanumeric
characters or hyphens.listeners
- A list of the following tuples: Protocol,
LoadBalancerPort, InstanceProtocol, InstancePort, and
SSLCertificateId.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, must have a maximum of 32
characters, and must only contain alphanumeric characters or hyphens.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, must have a maximum of 32
characters, and must only contain alphanumeric characters or hyphens.public List<Listener> getListeners()
public void setListeners(Collection<Listener> listeners)
listeners
- A list of the following tuples: Protocol, LoadBalancerPort,
InstanceProtocol, InstancePort, and SSLCertificateId.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: Protocol, LoadBalancerPort,
InstanceProtocol, InstancePort, and SSLCertificateId.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: Protocol, LoadBalancerPort,
InstanceProtocol, InstancePort, and SSLCertificateId.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 information about 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 information about 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 information about 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 information about 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 information about 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 information about 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 List<Tag> getTags()
For more information about setting tags for your load balancer, see Tagging.
Constraints:
Length: 1 -
For more information about setting tags for your load balancer, see Tagging.
public void setTags(Collection<Tag> tags)
For more information about setting tags for your load balancer, see Tagging.
Constraints:
Length: 1 -
tags
- A list of tags to assign to the load balancer. For more information about setting tags for your load balancer, see Tagging.
public CreateLoadBalancerRequest withTags(Tag... tags)
For more information about setting tags for your load balancer, see Tagging.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 -
tags
- A list of tags to assign to the load balancer. For more information about setting tags for your load balancer, see Tagging.
public CreateLoadBalancerRequest withTags(Collection<Tag> tags)
For more information about setting tags for your load balancer, see Tagging.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 -
tags
- A list of tags to assign to the load balancer. For more information about setting tags for your load balancer, see Tagging.
public String toString()
toString
in class Object
Object.toString()
Copyright © 2014. All rights reserved.