/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.elasticloadbalancing.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** *
* Contains the parameters for CreateLoadBalancer. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateLoadBalancerRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** ** 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. *
*/ private String loadBalancerName; /** ** The listeners. *
** For more information, see Listeners for * Your Classic Load Balancer in the Classic Load Balancers Guide. *
*/ private com.amazonaws.internal.SdkInternalList* 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. *
*/ private com.amazonaws.internal.SdkInternalList
* 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 security groups to assign to the load balancer. *
*/ private com.amazonaws.internal.SdkInternalList* 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.
*
* 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. *
*/ private com.amazonaws.internal.SdkInternalList* 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) { setLoadBalancerName(loadBalancerName); } /** * Constructs a new CreateLoadBalancerRequest object. Callers should use the setter or fluent setter (with...) * methods to initialize any additional object members. * * @param 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. * @param listeners * The listeners. *
** For more information, see Listeners * for Your Classic Load Balancer in the Classic Load Balancers Guide. * @param 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(String loadBalancerName, java.util.List
* 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.
*
* 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.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. *
* * @return 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 String getLoadBalancerName() { return this.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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLoadBalancerRequest withLoadBalancerName(String loadBalancerName) { setLoadBalancerName(loadBalancerName); return this; } /** *
* The listeners. *
** For more information, see Listeners for * Your Classic Load Balancer in the Classic Load Balancers Guide. *
* * @return The listeners. *
* For more information, see Listeners
* for Your Classic Load Balancer in the Classic Load Balancers Guide.
*/
public java.util.List
* The listeners.
*
* For more information, see Listeners for
* Your Classic Load Balancer in the Classic Load Balancers Guide.
*
* For more information, see Listeners
* for Your Classic Load Balancer in the Classic Load Balancers Guide.
*/
public void setListeners(java.util.Collection
* The listeners.
*
* For more information, see Listeners for
* Your Classic Load Balancer in the Classic Load Balancers Guide.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setListeners(java.util.Collection)} or {@link #withListeners(java.util.Collection)} if you want to
* override the existing values.
*
* For more information, see Listeners
* for Your Classic Load Balancer in the Classic Load Balancers Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLoadBalancerRequest withListeners(Listener... listeners) {
if (this.listeners == null) {
setListeners(new com.amazonaws.internal.SdkInternalList
* The listeners.
*
* For more information, see Listeners for
* Your Classic Load Balancer in the Classic Load Balancers Guide.
*
* For more information, see Listeners
* for Your Classic Load Balancer in the Classic Load Balancers Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLoadBalancerRequest withListeners(java.util.Collection
* 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.
*
* You must specify at least one Availability Zone. *
*
* You can add more Availability Zones after you create the load balancer using
* EnableAvailabilityZonesForLoadBalancer.
*/
public java.util.List
* 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.
*
* 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(java.util.Collection
* 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.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAvailabilityZones(java.util.Collection)} or {@link #withAvailabilityZones(java.util.Collection)} if
* you want to override the existing values.
*
* You must specify at least one Availability Zone. *
*
* You can add more Availability Zones after you create the load balancer using
* EnableAvailabilityZonesForLoadBalancer.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLoadBalancerRequest withAvailabilityZones(String... availabilityZones) {
if (this.availabilityZones == null) {
setAvailabilityZones(new com.amazonaws.internal.SdkInternalList
* 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.
*
* You must specify at least one Availability Zone. *
*
* You can add more Availability Zones after you create the load balancer using
* EnableAvailabilityZonesForLoadBalancer.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLoadBalancerRequest withAvailabilityZones(java.util.Collection
* The IDs of the subnets in your VPC to attach to the load balancer. Specify one subnet per Availability Zone
* specified in
* The IDs of the subnets in your VPC to attach to the load balancer. Specify one subnet per Availability Zone
* specified in
* The IDs of the subnets in your VPC to attach to the load balancer. Specify one subnet per Availability Zone
* specified in
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSubnets(java.util.Collection)} or {@link #withSubnets(java.util.Collection)} if you want to override
* the existing values.
*
* The IDs of the subnets in your VPC to attach to the load balancer. Specify one subnet per Availability Zone
* specified in
* The IDs of the security groups to assign to the load balancer.
*
* The IDs of the security groups to assign to the load balancer.
*
* The IDs of the security groups to assign to the load balancer.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSecurityGroups(java.util.Collection)} or {@link #withSecurityGroups(java.util.Collection)} if you want
* to override the existing values.
*
* The IDs of the security groups to assign to the load balancer.
*
* 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 AvailabilityZones
.
* AvailabilityZones
.
*/
public java.util.ListAvailabilityZones
.
* AvailabilityZones
.
*/
public void setSubnets(java.util.CollectionAvailabilityZones
.
* AvailabilityZones
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLoadBalancerRequest withSubnets(String... subnets) {
if (this.subnets == null) {
setSubnets(new com.amazonaws.internal.SdkInternalListAvailabilityZones
.
* AvailabilityZones
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLoadBalancerRequest withSubnets(java.util.Collectioninternal
to create a 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 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) {
this.scheme = 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.
*
* 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 String getScheme() {
return this.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.
*
* 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLoadBalancerRequest withScheme(String scheme) {
setScheme(scheme);
return this;
}
/**
*
* 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. *
* * @return 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 java.util.List
* 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.
*
* For more information about tagging your load balancer, see Tag Your
* Classic Load Balancer in the Classic Load Balancers Guide.
*/
public void setTags(java.util.Collection
* 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.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
*
* For more information about tagging your load balancer, see Tag Your
* Classic Load Balancer in the Classic Load Balancers Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLoadBalancerRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new com.amazonaws.internal.SdkInternalList
* 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.
*
* For more information about tagging your load balancer, see Tag Your
* Classic Load Balancer in the Classic Load Balancers Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLoadBalancerRequest withTags(java.util.Collection