public class CreateLoadBalancerRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
CreateLoadBalancer operation
.
Creates a load balancer.
If the call completes successfully, a new load balancer is created with a unique Domain Name Service (DNS) name. The load balancer receives incoming traffic and routes it to the registered instances. For more information, see How Elastic Load Balancing Works in the Elastic Load Balancing Developer Guide .
You can create up to 20 load balancers per region per account. You can request an increase for the number of load balancers for your account. For more information, see Elastic Load Balancing Limits in the Elastic Load Balancing Developer Guide .
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 |
---|---|
CreateLoadBalancerRequest |
clone()
Creates a shallow clone of this request.
|
boolean |
equals(Object obj) |
List<String> |
getAvailabilityZones()
One or more Availability Zones from the same region as the load
balancer.
|
List<Listener> |
getListeners()
The listeners.
|
String |
getLoadBalancerName()
The name of the load balancer.
|
String |
getScheme()
The type of a load balancer.
|
List<String> |
getSecurityGroups()
The IDs of the security groups to assign to the load balancer.
|
List<String> |
getSubnets()
The IDs of the subnets in your VPC to attach to the load balancer.
|
List<Tag> |
getTags()
A list of tags to assign to the load balancer.
|
int |
hashCode() |
void |
setAvailabilityZones(Collection<String> availabilityZones)
One or more Availability Zones from the same region as the load
balancer.
|
void |
setListeners(Collection<Listener> listeners)
The listeners.
|
void |
setLoadBalancerName(String loadBalancerName)
The name of the load balancer.
|
void |
setScheme(String scheme)
The type of a load balancer.
|
void |
setSecurityGroups(Collection<String> securityGroups)
The IDs of the security groups to assign to the load balancer.
|
void |
setSubnets(Collection<String> subnets)
The IDs of the subnets in your VPC to attach to the 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)
One or more Availability Zones from the same region as the load
balancer.
|
CreateLoadBalancerRequest |
withAvailabilityZones(String... availabilityZones)
One or more Availability Zones from the same region as the load
balancer.
|
CreateLoadBalancerRequest |
withListeners(Collection<Listener> listeners)
The listeners.
|
CreateLoadBalancerRequest |
withListeners(Listener... listeners)
The listeners.
|
CreateLoadBalancerRequest |
withLoadBalancerName(String loadBalancerName)
The name of the load balancer.
|
CreateLoadBalancerRequest |
withScheme(String scheme)
The type of a load balancer.
|
CreateLoadBalancerRequest |
withSecurityGroups(Collection<String> securityGroups)
The IDs of the security groups to assign to the load balancer.
|
CreateLoadBalancerRequest |
withSecurityGroups(String... securityGroups)
The IDs of the security groups to assign to the load balancer.
|
CreateLoadBalancerRequest |
withSubnets(Collection<String> subnets)
The IDs of the subnets in your VPC to attach to the load balancer.
|
CreateLoadBalancerRequest |
withSubnets(String... subnets)
The IDs of the subnets in your VPC to attach to the 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.
|
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
public CreateLoadBalancerRequest()
public CreateLoadBalancerRequest(String loadBalancerName)
loadBalancerName
- The name of the load balancer. This name must be unique within your set of load balancers for the region, must have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and cannot begin or end with a hyphen.
public CreateLoadBalancerRequest(String loadBalancerName, List<Listener> listeners, List<String> availabilityZones)
loadBalancerName
- The name of the load balancer. This name must be unique within your set of load balancers for the region, must have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and cannot begin or end with a hyphen.
listeners
- The listeners. For more information, see Listeners for Your Load Balancer in the Elastic Load Balancing Developer Guide.
availabilityZones
- One or more Availability Zones from the same
region as the load balancer. Traffic is equally distributed across all
specified Availability Zones. You must specify at least one Availability Zone.
You can add more Availability Zones after you create the load balancer using EnableAvailabilityZonesForLoadBalancer.
public String getLoadBalancerName()
This name must be unique within your set of load balancers for the region, must have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and cannot begin or end with a hyphen.
This name must be unique within your set of load balancers for the region, must have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and cannot begin or end with a hyphen.
public void setLoadBalancerName(String loadBalancerName)
This name must be unique within your set of load balancers for the region, must have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and cannot begin or end with a hyphen.
loadBalancerName
- The name of the load balancer. This name must be unique within your set of load balancers for the region, must have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and cannot begin or end with a hyphen.
public CreateLoadBalancerRequest withLoadBalancerName(String loadBalancerName)
This name must be unique within your set of load balancers for the region, must have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and cannot begin or end with a hyphen.
Returns a reference to this object so that method calls can be chained together.
loadBalancerName
- The name of the load balancer. This name must be unique within your set of load balancers for the region, must have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and cannot begin or end with a hyphen.
public List<Listener> getListeners()
For more information, see Listeners for Your Load Balancer in the Elastic Load Balancing Developer Guide.
For more information, see Listeners for Your Load Balancer in the Elastic Load Balancing Developer Guide.
public void setListeners(Collection<Listener> listeners)
For more information, see Listeners for Your Load Balancer in the Elastic Load Balancing Developer Guide.
listeners
- The listeners. For more information, see Listeners for Your Load Balancer in the Elastic Load Balancing Developer Guide.
public CreateLoadBalancerRequest withListeners(Listener... listeners)
For more information, see Listeners for Your Load Balancer in the Elastic Load Balancing Developer Guide.
NOTE: This method appends the values to the existing list (if
any). Use setListeners(java.util.Collection)
or withListeners(java.util.Collection)
if you want to override the
existing values.
Returns a reference to this object so that method calls can be chained together.
listeners
- The listeners. For more information, see Listeners for Your Load Balancer in the Elastic Load Balancing Developer Guide.
public CreateLoadBalancerRequest withListeners(Collection<Listener> listeners)
For more information, see Listeners for Your Load Balancer in the Elastic Load Balancing Developer Guide.
Returns a reference to this object so that method calls can be chained together.
listeners
- The listeners. For more information, see Listeners for Your Load Balancer in the Elastic Load Balancing Developer Guide.
public List<String> getAvailabilityZones()
You must specify at least one Availability Zone.
You can add more Availability Zones after you create the load balancer using EnableAvailabilityZonesForLoadBalancer.
You must specify at least one Availability Zone.
You can add more Availability Zones after you create the load balancer using EnableAvailabilityZonesForLoadBalancer.
public void setAvailabilityZones(Collection<String> availabilityZones)
You must specify at least one Availability Zone.
You can add more Availability Zones after you create the load balancer using EnableAvailabilityZonesForLoadBalancer.
availabilityZones
- One or more Availability Zones from the same region as the load
balancer. Traffic is equally distributed across all specified
Availability Zones. You must specify at least one Availability Zone.
You can add more Availability Zones after you create the load balancer using EnableAvailabilityZonesForLoadBalancer.
public CreateLoadBalancerRequest withAvailabilityZones(String... availabilityZones)
You must specify at least one Availability Zone.
You can add more Availability Zones after you create the load balancer using EnableAvailabilityZonesForLoadBalancer.
NOTE: This method appends the values to the existing list (if
any). Use setAvailabilityZones(java.util.Collection)
or
withAvailabilityZones(java.util.Collection)
if you want to
override the existing values.
Returns a reference to this object so that method calls can be chained together.
availabilityZones
- One or more Availability Zones from the same region as the load
balancer. Traffic is equally distributed across all specified
Availability Zones. You must specify at least one Availability Zone.
You can add more Availability Zones after you create the load balancer using EnableAvailabilityZonesForLoadBalancer.
public CreateLoadBalancerRequest withAvailabilityZones(Collection<String> availabilityZones)
You must specify at least one Availability Zone.
You can add more Availability Zones after you create the load balancer using EnableAvailabilityZonesForLoadBalancer.
Returns a reference to this object so that method calls can be chained together.
availabilityZones
- One or more Availability Zones from the same region as the load
balancer. Traffic is equally distributed across all specified
Availability Zones. You must specify at least one Availability Zone.
You can add more Availability Zones after you create the load balancer using EnableAvailabilityZonesForLoadBalancer.
public List<String> getSubnets()
AvailabilityZones
.AvailabilityZones
.public void setSubnets(Collection<String> subnets)
AvailabilityZones
.subnets
- The IDs of the subnets in your VPC to attach to the load balancer.
Specify one subnet per Availability Zone specified in
AvailabilityZones
.public CreateLoadBalancerRequest withSubnets(String... subnets)
AvailabilityZones
.
NOTE: This method appends the values to the existing list (if
any). Use setSubnets(java.util.Collection)
or withSubnets(java.util.Collection)
if you want to override the
existing values.
Returns a reference to this object so that method calls can be chained together.
subnets
- The IDs of the subnets in your VPC to attach to the load balancer.
Specify one subnet per Availability Zone specified in
AvailabilityZones
.public CreateLoadBalancerRequest withSubnets(Collection<String> subnets)
AvailabilityZones
.
Returns a reference to this object so that method calls can be chained together.
subnets
- The IDs of the subnets in your VPC to attach to the load balancer.
Specify one subnet per Availability Zone specified in
AvailabilityZones
.public List<String> getSecurityGroups()
public void setSecurityGroups(Collection<String> securityGroups)
securityGroups
- The IDs of the security groups to assign to the load balancer.public CreateLoadBalancerRequest withSecurityGroups(String... securityGroups)
NOTE: This method appends the values to the existing list (if
any). Use setSecurityGroups(java.util.Collection)
or withSecurityGroups(java.util.Collection)
if you want to override the
existing values.
Returns a reference to this object so that method calls can be chained together.
securityGroups
- The IDs of the security groups to assign to the load balancer.public CreateLoadBalancerRequest withSecurityGroups(Collection<String> securityGroups)
Returns a reference to this object so that method calls can be chained together.
securityGroups
- The IDs of the security groups to assign to the load balancer.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 in the Elastic Load Balancing Developer Guide.
Specify internal
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 in the Elastic Load Balancing Developer Guide.
Specify internal
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 in the Elastic Load Balancing Developer Guide.
Specify internal
to create an
internal load balancer with a DNS name that resolves to private IP
addresses.
scheme
- The type of a load balancer. Valid only for load balancers in a VPC.
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 in the Elastic Load Balancing Developer Guide.
Specify internal
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 in the Elastic Load Balancing Developer Guide.
Specify internal
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. Valid only for load balancers in a VPC.
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 in the Elastic Load Balancing Developer Guide.
Specify internal
to create an
internal load balancer with a DNS name that resolves to private IP
addresses.
public List<Tag> getTags()
For more information about tagging your load balancer, see Tagging in the Elastic Load Balancing Developer Guide.
Constraints:
Length: 1 -
For more information about tagging your load balancer, see Tagging in the Elastic Load Balancing Developer Guide.
public void setTags(Collection<Tag> tags)
For more information about tagging your load balancer, see Tagging in the Elastic Load Balancing Developer Guide.
Constraints:
Length: 1 -
tags
- A list of tags to assign to the load balancer. For more information about tagging your load balancer, see Tagging in the Elastic Load Balancing Developer Guide.
public CreateLoadBalancerRequest withTags(Tag... tags)
For more information about tagging your load balancer, see Tagging in the Elastic Load Balancing Developer Guide.
NOTE: This method appends the values to the existing list (if
any). Use setTags(java.util.Collection)
or withTags(java.util.Collection)
if you want to override the existing
values.
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 tagging your load balancer, see Tagging in the Elastic Load Balancing Developer Guide.
public CreateLoadBalancerRequest withTags(Collection<Tag> tags)
For more information about tagging your load balancer, see Tagging in the Elastic Load Balancing Developer Guide.
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 tagging your load balancer, see Tagging in the Elastic Load Balancing Developer Guide.
public String toString()
toString
in class Object
Object.toString()
public CreateLoadBalancerRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()
Copyright © 2015. All rights reserved.