/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace ElasticLoadBalancingv2 { namespace Model { /** */ class AWS_ELASTICLOADBALANCINGV2_API CreateLoadBalancerRequest : public ElasticLoadBalancingv2Request { public: CreateLoadBalancerRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateLoadBalancer"; } Aws::String SerializePayload() const override; protected: void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The name of the load balancer.

This name must be unique per region per * account, can have a maximum of 32 characters, must contain only alphanumeric * characters or hyphens, must not begin or end with a hyphen, and must not begin * with "internal-".

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the load balancer.

This name must be unique per region per * account, can have a maximum of 32 characters, must contain only alphanumeric * characters or hyphens, must not begin or end with a hyphen, and must not begin * with "internal-".

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the load balancer.

This name must be unique per region per * account, can have a maximum of 32 characters, must contain only alphanumeric * characters or hyphens, must not begin or end with a hyphen, and must not begin * with "internal-".

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the load balancer.

This name must be unique per region per * account, can have a maximum of 32 characters, must contain only alphanumeric * characters or hyphens, must not begin or end with a hyphen, and must not begin * with "internal-".

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the load balancer.

This name must be unique per region per * account, can have a maximum of 32 characters, must contain only alphanumeric * characters or hyphens, must not begin or end with a hyphen, and must not begin * with "internal-".

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the load balancer.

This name must be unique per region per * account, can have a maximum of 32 characters, must contain only alphanumeric * characters or hyphens, must not begin or end with a hyphen, and must not begin * with "internal-".

*/ inline CreateLoadBalancerRequest& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the load balancer.

This name must be unique per region per * account, can have a maximum of 32 characters, must contain only alphanumeric * characters or hyphens, must not begin or end with a hyphen, and must not begin * with "internal-".

*/ inline CreateLoadBalancerRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the load balancer.

This name must be unique per region per * account, can have a maximum of 32 characters, must contain only alphanumeric * characters or hyphens, must not begin or end with a hyphen, and must not begin * with "internal-".

*/ inline CreateLoadBalancerRequest& WithName(const char* value) { SetName(value); return *this;} /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones.

[Network Load Balancers] You can specify subnets from * one or more Availability Zones.

*/ inline const Aws::Vector& GetSubnets() const{ return m_subnets; } /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones.

[Network Load Balancers] You can specify subnets from * one or more Availability Zones.

*/ inline bool SubnetsHasBeenSet() const { return m_subnetsHasBeenSet; } /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones.

[Network Load Balancers] You can specify subnets from * one or more Availability Zones.

*/ inline void SetSubnets(const Aws::Vector& value) { m_subnetsHasBeenSet = true; m_subnets = value; } /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones.

[Network Load Balancers] You can specify subnets from * one or more Availability Zones.

*/ inline void SetSubnets(Aws::Vector&& value) { m_subnetsHasBeenSet = true; m_subnets = std::move(value); } /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones.

[Network Load Balancers] You can specify subnets from * one or more Availability Zones.

*/ inline CreateLoadBalancerRequest& WithSubnets(const Aws::Vector& value) { SetSubnets(value); return *this;} /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones.

[Network Load Balancers] You can specify subnets from * one or more Availability Zones.

*/ inline CreateLoadBalancerRequest& WithSubnets(Aws::Vector&& value) { SetSubnets(std::move(value)); return *this;} /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones.

[Network Load Balancers] You can specify subnets from * one or more Availability Zones.

*/ inline CreateLoadBalancerRequest& AddSubnets(const Aws::String& value) { m_subnetsHasBeenSet = true; m_subnets.push_back(value); return *this; } /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones.

[Network Load Balancers] You can specify subnets from * one or more Availability Zones.

*/ inline CreateLoadBalancerRequest& AddSubnets(Aws::String&& value) { m_subnetsHasBeenSet = true; m_subnets.push_back(std::move(value)); return *this; } /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones.

[Network Load Balancers] You can specify subnets from * one or more Availability Zones.

*/ inline CreateLoadBalancerRequest& AddSubnets(const char* value) { m_subnetsHasBeenSet = true; m_subnets.push_back(value); return *this; } /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones. You cannot specify Elastic IP addresses for your * subnets.

[Network Load Balancers] You can specify subnets from one or * more Availability Zones. You can specify one Elastic IP address per subnet if * you need static IP addresses for your internet-facing load balancer. For * internal load balancers, you can specify one private IP address per subnet from * the IPv4 range of the subnet.

*/ inline const Aws::Vector& GetSubnetMappings() const{ return m_subnetMappings; } /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones. You cannot specify Elastic IP addresses for your * subnets.

[Network Load Balancers] You can specify subnets from one or * more Availability Zones. You can specify one Elastic IP address per subnet if * you need static IP addresses for your internet-facing load balancer. For * internal load balancers, you can specify one private IP address per subnet from * the IPv4 range of the subnet.

*/ inline bool SubnetMappingsHasBeenSet() const { return m_subnetMappingsHasBeenSet; } /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones. You cannot specify Elastic IP addresses for your * subnets.

[Network Load Balancers] You can specify subnets from one or * more Availability Zones. You can specify one Elastic IP address per subnet if * you need static IP addresses for your internet-facing load balancer. For * internal load balancers, you can specify one private IP address per subnet from * the IPv4 range of the subnet.

*/ inline void SetSubnetMappings(const Aws::Vector& value) { m_subnetMappingsHasBeenSet = true; m_subnetMappings = value; } /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones. You cannot specify Elastic IP addresses for your * subnets.

[Network Load Balancers] You can specify subnets from one or * more Availability Zones. You can specify one Elastic IP address per subnet if * you need static IP addresses for your internet-facing load balancer. For * internal load balancers, you can specify one private IP address per subnet from * the IPv4 range of the subnet.

*/ inline void SetSubnetMappings(Aws::Vector&& value) { m_subnetMappingsHasBeenSet = true; m_subnetMappings = std::move(value); } /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones. You cannot specify Elastic IP addresses for your * subnets.

[Network Load Balancers] You can specify subnets from one or * more Availability Zones. You can specify one Elastic IP address per subnet if * you need static IP addresses for your internet-facing load balancer. For * internal load balancers, you can specify one private IP address per subnet from * the IPv4 range of the subnet.

*/ inline CreateLoadBalancerRequest& WithSubnetMappings(const Aws::Vector& value) { SetSubnetMappings(value); return *this;} /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones. You cannot specify Elastic IP addresses for your * subnets.

[Network Load Balancers] You can specify subnets from one or * more Availability Zones. You can specify one Elastic IP address per subnet if * you need static IP addresses for your internet-facing load balancer. For * internal load balancers, you can specify one private IP address per subnet from * the IPv4 range of the subnet.

*/ inline CreateLoadBalancerRequest& WithSubnetMappings(Aws::Vector&& value) { SetSubnetMappings(std::move(value)); return *this;} /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones. You cannot specify Elastic IP addresses for your * subnets.

[Network Load Balancers] You can specify subnets from one or * more Availability Zones. You can specify one Elastic IP address per subnet if * you need static IP addresses for your internet-facing load balancer. For * internal load balancers, you can specify one private IP address per subnet from * the IPv4 range of the subnet.

*/ inline CreateLoadBalancerRequest& AddSubnetMappings(const SubnetMapping& value) { m_subnetMappingsHasBeenSet = true; m_subnetMappings.push_back(value); return *this; } /** *

The IDs of the public subnets. You can specify only one subnet per * Availability Zone. You must specify either subnets or subnet mappings.

*

[Application Load Balancers] You must specify subnets from at least two * Availability Zones. You cannot specify Elastic IP addresses for your * subnets.

[Network Load Balancers] You can specify subnets from one or * more Availability Zones. You can specify one Elastic IP address per subnet if * you need static IP addresses for your internet-facing load balancer. For * internal load balancers, you can specify one private IP address per subnet from * the IPv4 range of the subnet.

*/ inline CreateLoadBalancerRequest& AddSubnetMappings(SubnetMapping&& value) { m_subnetMappingsHasBeenSet = true; m_subnetMappings.push_back(std::move(value)); return *this; } /** *

[Application Load Balancers] The IDs of the security groups for the load * balancer.

*/ inline const Aws::Vector& GetSecurityGroups() const{ return m_securityGroups; } /** *

[Application Load Balancers] The IDs of the security groups for the load * balancer.

*/ inline bool SecurityGroupsHasBeenSet() const { return m_securityGroupsHasBeenSet; } /** *

[Application Load Balancers] The IDs of the security groups for the load * balancer.

*/ inline void SetSecurityGroups(const Aws::Vector& value) { m_securityGroupsHasBeenSet = true; m_securityGroups = value; } /** *

[Application Load Balancers] The IDs of the security groups for the load * balancer.

*/ inline void SetSecurityGroups(Aws::Vector&& value) { m_securityGroupsHasBeenSet = true; m_securityGroups = std::move(value); } /** *

[Application Load Balancers] The IDs of the security groups for the load * balancer.

*/ inline CreateLoadBalancerRequest& WithSecurityGroups(const Aws::Vector& value) { SetSecurityGroups(value); return *this;} /** *

[Application Load Balancers] The IDs of the security groups for the load * balancer.

*/ inline CreateLoadBalancerRequest& WithSecurityGroups(Aws::Vector&& value) { SetSecurityGroups(std::move(value)); return *this;} /** *

[Application Load Balancers] The IDs of the security groups for the load * balancer.

*/ inline CreateLoadBalancerRequest& AddSecurityGroups(const Aws::String& value) { m_securityGroupsHasBeenSet = true; m_securityGroups.push_back(value); return *this; } /** *

[Application Load Balancers] The IDs of the security groups for the load * balancer.

*/ inline CreateLoadBalancerRequest& AddSecurityGroups(Aws::String&& value) { m_securityGroupsHasBeenSet = true; m_securityGroups.push_back(std::move(value)); return *this; } /** *

[Application Load Balancers] The IDs of the security groups for the load * balancer.

*/ inline CreateLoadBalancerRequest& AddSecurityGroups(const char* value) { m_securityGroupsHasBeenSet = true; m_securityGroups.push_back(value); return *this; } /** *

The nodes of an Internet-facing load balancer have public IP addresses. The * DNS name of an Internet-facing load balancer is publicly resolvable to the * public IP addresses of the nodes. Therefore, Internet-facing load balancers can * route requests from clients over the internet.

The nodes of an internal * load balancer have only private IP addresses. The DNS name of an internal load * balancer is publicly resolvable to the private IP addresses of the nodes. * Therefore, internal load balancers can route requests only from clients with * access to the VPC for the load balancer.

The default is an * Internet-facing load balancer.

*/ inline const LoadBalancerSchemeEnum& GetScheme() const{ return m_scheme; } /** *

The nodes of an Internet-facing load balancer have public IP addresses. The * DNS name of an Internet-facing load balancer is publicly resolvable to the * public IP addresses of the nodes. Therefore, Internet-facing load balancers can * route requests from clients over the internet.

The nodes of an internal * load balancer have only private IP addresses. The DNS name of an internal load * balancer is publicly resolvable to the private IP addresses of the nodes. * Therefore, internal load balancers can route requests only from clients with * access to the VPC for the load balancer.

The default is an * Internet-facing load balancer.

*/ inline bool SchemeHasBeenSet() const { return m_schemeHasBeenSet; } /** *

The nodes of an Internet-facing load balancer have public IP addresses. The * DNS name of an Internet-facing load balancer is publicly resolvable to the * public IP addresses of the nodes. Therefore, Internet-facing load balancers can * route requests from clients over the internet.

The nodes of an internal * load balancer have only private IP addresses. The DNS name of an internal load * balancer is publicly resolvable to the private IP addresses of the nodes. * Therefore, internal load balancers can route requests only from clients with * access to the VPC for the load balancer.

The default is an * Internet-facing load balancer.

*/ inline void SetScheme(const LoadBalancerSchemeEnum& value) { m_schemeHasBeenSet = true; m_scheme = value; } /** *

The nodes of an Internet-facing load balancer have public IP addresses. The * DNS name of an Internet-facing load balancer is publicly resolvable to the * public IP addresses of the nodes. Therefore, Internet-facing load balancers can * route requests from clients over the internet.

The nodes of an internal * load balancer have only private IP addresses. The DNS name of an internal load * balancer is publicly resolvable to the private IP addresses of the nodes. * Therefore, internal load balancers can route requests only from clients with * access to the VPC for the load balancer.

The default is an * Internet-facing load balancer.

*/ inline void SetScheme(LoadBalancerSchemeEnum&& value) { m_schemeHasBeenSet = true; m_scheme = std::move(value); } /** *

The nodes of an Internet-facing load balancer have public IP addresses. The * DNS name of an Internet-facing load balancer is publicly resolvable to the * public IP addresses of the nodes. Therefore, Internet-facing load balancers can * route requests from clients over the internet.

The nodes of an internal * load balancer have only private IP addresses. The DNS name of an internal load * balancer is publicly resolvable to the private IP addresses of the nodes. * Therefore, internal load balancers can route requests only from clients with * access to the VPC for the load balancer.

The default is an * Internet-facing load balancer.

*/ inline CreateLoadBalancerRequest& WithScheme(const LoadBalancerSchemeEnum& value) { SetScheme(value); return *this;} /** *

The nodes of an Internet-facing load balancer have public IP addresses. The * DNS name of an Internet-facing load balancer is publicly resolvable to the * public IP addresses of the nodes. Therefore, Internet-facing load balancers can * route requests from clients over the internet.

The nodes of an internal * load balancer have only private IP addresses. The DNS name of an internal load * balancer is publicly resolvable to the private IP addresses of the nodes. * Therefore, internal load balancers can route requests only from clients with * access to the VPC for the load balancer.

The default is an * Internet-facing load balancer.

*/ inline CreateLoadBalancerRequest& WithScheme(LoadBalancerSchemeEnum&& value) { SetScheme(std::move(value)); return *this;} /** *

One or more tags to assign to the load balancer.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

One or more tags to assign to the load balancer.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

One or more tags to assign to the load balancer.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

One or more tags to assign to the load balancer.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

One or more tags to assign to the load balancer.

*/ inline CreateLoadBalancerRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

One or more tags to assign to the load balancer.

*/ inline CreateLoadBalancerRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

One or more tags to assign to the load balancer.

*/ inline CreateLoadBalancerRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

One or more tags to assign to the load balancer.

*/ inline CreateLoadBalancerRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

The type of load balancer. The default is application.

*/ inline const LoadBalancerTypeEnum& GetType() const{ return m_type; } /** *

The type of load balancer. The default is application.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The type of load balancer. The default is application.

*/ inline void SetType(const LoadBalancerTypeEnum& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The type of load balancer. The default is application.

*/ inline void SetType(LoadBalancerTypeEnum&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The type of load balancer. The default is application.

*/ inline CreateLoadBalancerRequest& WithType(const LoadBalancerTypeEnum& value) { SetType(value); return *this;} /** *

The type of load balancer. The default is application.

*/ inline CreateLoadBalancerRequest& WithType(LoadBalancerTypeEnum&& value) { SetType(std::move(value)); return *this;} /** *

[Application Load Balancers] The type of IP addresses used by the subnets for * your load balancer. The possible values are ipv4 (for IPv4 * addresses) and dualstack (for IPv4 and IPv6 addresses). Internal * load balancers must use ipv4.

*/ inline const IpAddressType& GetIpAddressType() const{ return m_ipAddressType; } /** *

[Application Load Balancers] The type of IP addresses used by the subnets for * your load balancer. The possible values are ipv4 (for IPv4 * addresses) and dualstack (for IPv4 and IPv6 addresses). Internal * load balancers must use ipv4.

*/ inline bool IpAddressTypeHasBeenSet() const { return m_ipAddressTypeHasBeenSet; } /** *

[Application Load Balancers] The type of IP addresses used by the subnets for * your load balancer. The possible values are ipv4 (for IPv4 * addresses) and dualstack (for IPv4 and IPv6 addresses). Internal * load balancers must use ipv4.

*/ inline void SetIpAddressType(const IpAddressType& value) { m_ipAddressTypeHasBeenSet = true; m_ipAddressType = value; } /** *

[Application Load Balancers] The type of IP addresses used by the subnets for * your load balancer. The possible values are ipv4 (for IPv4 * addresses) and dualstack (for IPv4 and IPv6 addresses). Internal * load balancers must use ipv4.

*/ inline void SetIpAddressType(IpAddressType&& value) { m_ipAddressTypeHasBeenSet = true; m_ipAddressType = std::move(value); } /** *

[Application Load Balancers] The type of IP addresses used by the subnets for * your load balancer. The possible values are ipv4 (for IPv4 * addresses) and dualstack (for IPv4 and IPv6 addresses). Internal * load balancers must use ipv4.

*/ inline CreateLoadBalancerRequest& WithIpAddressType(const IpAddressType& value) { SetIpAddressType(value); return *this;} /** *

[Application Load Balancers] The type of IP addresses used by the subnets for * your load balancer. The possible values are ipv4 (for IPv4 * addresses) and dualstack (for IPv4 and IPv6 addresses). Internal * load balancers must use ipv4.

*/ inline CreateLoadBalancerRequest& WithIpAddressType(IpAddressType&& value) { SetIpAddressType(std::move(value)); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet; Aws::Vector m_subnets; bool m_subnetsHasBeenSet; Aws::Vector m_subnetMappings; bool m_subnetMappingsHasBeenSet; Aws::Vector m_securityGroups; bool m_securityGroupsHasBeenSet; LoadBalancerSchemeEnum m_scheme; bool m_schemeHasBeenSet; Aws::Vector m_tags; bool m_tagsHasBeenSet; LoadBalancerTypeEnum m_type; bool m_typeHasBeenSet; IpAddressType m_ipAddressType; bool m_ipAddressTypeHasBeenSet; }; } // namespace Model } // namespace ElasticLoadBalancingv2 } // namespace Aws