public class CreateLoadBalancerRequest extends AmazonWebServiceRequest implements Serializable
Creates a Classic Load Balancer.
You can add listeners, security groups, subnets, and tags when you create your load balancer, or you can add them later using CreateLoadBalancerListeners, ApplySecurityGroupsToLoadBalancer, AttachLoadBalancerToSubnets, and AddTags.
To describe your current load balancers, see DescribeLoadBalancers. When you are finished with a load balancer, you can delete it using DeleteLoadBalancer.
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 Limits for Your Classic Load Balancer in the Classic Load Balancers Guide.
| Constructor and Description |
|---|
CreateLoadBalancerRequest()
Default constructor for 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()
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.
|
clone, copyBaseTo, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollectorpublic 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 Classic Load Balancer in the Classic Load Balancers Guide.
availabilityZones - One or more Availability Zones from the same region as the load balancer.
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()
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.
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 void setLoadBalancerName(String 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.
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)
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.
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()
The listeners.
For more information, see Listeners for Your Classic Load Balancer in the Classic Load Balancers Guide.
The listeners.
For more information, see Listeners for Your Classic Load Balancer in the Classic Load Balancers Guide.
public void setListeners(Collection<Listener> listeners)
The listeners.
For more information, see Listeners for Your Classic Load Balancer in the Classic Load Balancers Guide.
listeners - The listeners.
For more information, see Listeners for Your Classic Load Balancer in the Classic Load Balancers Guide.
public CreateLoadBalancerRequest withListeners(Listener... listeners)
The listeners.
For more information, see Listeners for Your Classic Load Balancer in the Classic Load Balancers 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 Classic Load Balancer in the Classic Load Balancers Guide.
public CreateLoadBalancerRequest withListeners(Collection<Listener> listeners)
The listeners.
For more information, see Listeners for Your Classic Load Balancer in the Classic Load Balancers 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 Classic Load Balancer in the Classic Load Balancers Guide.
public List<String> getAvailabilityZones()
One or more Availability Zones from the same region as the load balancer.
You must specify at least one Availability Zone.
You can add more Availability Zones after you create the load balancer using EnableAvailabilityZonesForLoadBalancer.
One or more Availability Zones from the same region as the load balancer.
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)
One or more Availability Zones from the same region as the load balancer.
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.
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)
One or more Availability Zones from the same region as the load balancer.
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.
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)
One or more Availability Zones from the same region as the load balancer.
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.
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()
The IDs of the subnets in your VPC to attach to the load balancer.
Specify one subnet per Availability Zone specified in
AvailabilityZones.
The IDs of the subnets in your VPC to attach to the load
balancer. Specify one subnet per Availability Zone specified in
AvailabilityZones.
public void setSubnets(Collection<String> subnets)
The IDs of the subnets in your VPC to attach to the load balancer.
Specify one subnet per Availability Zone specified in
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)
The IDs of the subnets in your VPC to attach to the load balancer.
Specify one subnet per Availability Zone specified in
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 CreateLoadBalancerRequest withSubnets(Collection<String> subnets)
The IDs of the subnets in your VPC to attach to the load balancer.
Specify one subnet per Availability Zone specified in
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()
The IDs of the security groups to assign to the load balancer.
The IDs of the security groups to assign to the load balancer.
public void setSecurityGroups(Collection<String> securityGroups)
The IDs of the security groups to assign to the load balancer.
securityGroups - The IDs of the security groups to assign to the load balancer.
public CreateLoadBalancerRequest withSecurityGroups(String... securityGroups)
The IDs of the security groups to assign to the load balancer.
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)
The IDs of the security groups to assign to the load balancer.
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()
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 DNS name that resolves to public IP addresses. For more information about Internet-facing and Internal load balancers, see Load Balancer Scheme in the Elastic Load Balancing User Guide.
Specify internal to create a load balancer with a DNS name
that resolves to private IP addresses.
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 DNS name that resolves to public IP addresses. For more information about Internet-facing and Internal load balancers, see Load Balancer Scheme in the Elastic Load Balancing User Guide.
Specify internal to create a load balancer with a
DNS name that resolves to private IP addresses.
public void setScheme(String 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 DNS name that resolves to public IP addresses. For more information about Internet-facing and Internal load balancers, see Load Balancer Scheme in the Elastic Load Balancing User Guide.
Specify internal to create a 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 DNS name that resolves to public IP addresses. For more information about Internet-facing and Internal load balancers, see Load Balancer Scheme in the Elastic Load Balancing User Guide.
Specify internal to create a load balancer with a
DNS name that resolves to private IP addresses.
public CreateLoadBalancerRequest withScheme(String 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 DNS name that resolves to public IP addresses. For more information about Internet-facing and Internal load balancers, see Load Balancer Scheme in the Elastic Load Balancing User Guide.
Specify internal to create a 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 DNS name that resolves to public IP addresses. For more information about Internet-facing and Internal load balancers, see Load Balancer Scheme in the Elastic Load Balancing User Guide.
Specify internal to create a load balancer with a
DNS name that resolves to private IP addresses.
public List<Tag> getTags()
A list of tags to assign to the load balancer.
For more information about tagging your load balancer, see Tag Your Classic Load Balancer in the Classic Load Balancers Guide.
A list of tags to assign to the load balancer.
For more information about tagging your load balancer, see Tag Your Classic Load Balancer in the Classic Load Balancers Guide.
public void setTags(Collection<Tag> tags)
A list of tags to assign to the load balancer.
For more information about tagging your load balancer, see Tag Your Classic Load Balancer in the Classic Load Balancers Guide.
tags - A list of tags to assign to the load balancer.
For more information about tagging your load balancer, see Tag Your Classic Load Balancer in the Classic Load Balancers Guide.
public CreateLoadBalancerRequest withTags(Tag... tags)
A list of tags to assign to the load balancer.
For more information about tagging your load balancer, see Tag Your Classic Load Balancer in the Classic Load Balancers Guide.
Returns a reference to this object so that method calls can be chained together.
tags - A list of tags to assign to the load balancer.
For more information about tagging your load balancer, see Tag Your Classic Load Balancer in the Classic Load Balancers Guide.
public CreateLoadBalancerRequest withTags(Collection<Tag> tags)
A list of tags to assign to the load balancer.
For more information about tagging your load balancer, see Tag Your Classic Load Balancer in the Classic Load Balancers Guide.
Returns a reference to this object so that method calls can be chained together.
tags - A list of tags to assign to the load balancer.
For more information about tagging your load balancer, see Tag Your Classic Load Balancer in the Classic Load Balancers Guide.
public String toString()
toString in class ObjectObject.toString()Copyright © 2018. All rights reserved.