/** * 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 namespace Aws { namespace ElasticLoadBalancingv2 { namespace Model { /** */ class SetSubnetsRequest : public ElasticLoadBalancingv2Request { public: AWS_ELASTICLOADBALANCINGV2_API SetSubnetsRequest(); // 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 "SetSubnets"; } AWS_ELASTICLOADBALANCINGV2_API Aws::String SerializePayload() const override; protected: AWS_ELASTICLOADBALANCINGV2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The Amazon Resource Name (ARN) of the load balancer.

*/ inline const Aws::String& GetLoadBalancerArn() const{ return m_loadBalancerArn; } /** *

The Amazon Resource Name (ARN) of the load balancer.

*/ inline bool LoadBalancerArnHasBeenSet() const { return m_loadBalancerArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the load balancer.

*/ inline void SetLoadBalancerArn(const Aws::String& value) { m_loadBalancerArnHasBeenSet = true; m_loadBalancerArn = value; } /** *

The Amazon Resource Name (ARN) of the load balancer.

*/ inline void SetLoadBalancerArn(Aws::String&& value) { m_loadBalancerArnHasBeenSet = true; m_loadBalancerArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the load balancer.

*/ inline void SetLoadBalancerArn(const char* value) { m_loadBalancerArnHasBeenSet = true; m_loadBalancerArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the load balancer.

*/ inline SetSubnetsRequest& WithLoadBalancerArn(const Aws::String& value) { SetLoadBalancerArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the load balancer.

*/ inline SetSubnetsRequest& WithLoadBalancerArn(Aws::String&& value) { SetLoadBalancerArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the load balancer.

*/ inline SetSubnetsRequest& WithLoadBalancerArn(const char* value) { SetLoadBalancerArn(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.

[Application Load Balancers on Outposts] You must * specify one Outpost subnet.

[Application Load Balancers on Local Zones] * You can specify subnets from one or more Local 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.

[Application Load Balancers on Outposts] You must * specify one Outpost subnet.

[Application Load Balancers on Local Zones] * You can specify subnets from one or more Local 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.

[Application Load Balancers on Outposts] You must * specify one Outpost subnet.

[Application Load Balancers on Local Zones] * You can specify subnets from one or more Local 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.

[Application Load Balancers on Outposts] You must * specify one Outpost subnet.

[Application Load Balancers on Local Zones] * You can specify subnets from one or more Local 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.

[Application Load Balancers on Outposts] You must * specify one Outpost subnet.

[Application Load Balancers on Local Zones] * You can specify subnets from one or more Local Zones.

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

*/ inline SetSubnetsRequest& 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.

[Application Load Balancers on Outposts] You must * specify one Outpost subnet.

[Application Load Balancers on Local Zones] * You can specify subnets from one or more Local Zones.

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

*/ inline SetSubnetsRequest& 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.

[Application Load Balancers on Outposts] You must * specify one Outpost subnet.

[Application Load Balancers on Local Zones] * You can specify subnets from one or more Local Zones.

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

*/ inline SetSubnetsRequest& 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.

[Application Load Balancers on Outposts] You must * specify one Outpost subnet.

[Application Load Balancers on Local Zones] * You can specify subnets from one or more Local Zones.

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

*/ inline SetSubnetsRequest& 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.

[Application Load Balancers on Outposts] You must * specify one Outpost subnet.

[Application Load Balancers on Local Zones] * You can specify subnets from one or more Local Zones.

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

*/ inline SetSubnetsRequest& 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.

[Application Load Balancers on Outposts] You must specify one * Outpost subnet.

[Application Load Balancers on Local Zones] You can * specify subnets from one or more Local Zones.

[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. For * internet-facing load balancer, you can specify one IPv6 address per 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.

[Application Load Balancers on Outposts] You must specify one * Outpost subnet.

[Application Load Balancers on Local Zones] You can * specify subnets from one or more Local Zones.

[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. For * internet-facing load balancer, you can specify one IPv6 address per 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.

[Application Load Balancers on Outposts] You must specify one * Outpost subnet.

[Application Load Balancers on Local Zones] You can * specify subnets from one or more Local Zones.

[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. For * internet-facing load balancer, you can specify one IPv6 address per 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.

[Application Load Balancers on Outposts] You must specify one * Outpost subnet.

[Application Load Balancers on Local Zones] You can * specify subnets from one or more Local Zones.

[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. For * internet-facing load balancer, you can specify one IPv6 address per 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.

[Application Load Balancers on Outposts] You must specify one * Outpost subnet.

[Application Load Balancers on Local Zones] You can * specify subnets from one or more Local Zones.

[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. For * internet-facing load balancer, you can specify one IPv6 address per subnet.

*/ inline SetSubnetsRequest& 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.

[Application Load Balancers on Outposts] You must specify one * Outpost subnet.

[Application Load Balancers on Local Zones] You can * specify subnets from one or more Local Zones.

[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. For * internet-facing load balancer, you can specify one IPv6 address per subnet.

*/ inline SetSubnetsRequest& 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.

[Application Load Balancers on Outposts] You must specify one * Outpost subnet.

[Application Load Balancers on Local Zones] You can * specify subnets from one or more Local Zones.

[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. For * internet-facing load balancer, you can specify one IPv6 address per subnet.

*/ inline SetSubnetsRequest& 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.

[Application Load Balancers on Outposts] You must specify one * Outpost subnet.

[Application Load Balancers on Local Zones] You can * specify subnets from one or more Local Zones.

[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. For * internet-facing load balancer, you can specify one IPv6 address per subnet.

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

[Network 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). You can’t * specify dualstack for a load balancer with a UDP or TCP_UDP * listener. .

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

[Network 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). You can’t * specify dualstack for a load balancer with a UDP or TCP_UDP * listener. .

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

[Network 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). You can’t * specify dualstack for a load balancer with a UDP or TCP_UDP * listener. .

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

[Network 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). You can’t * specify dualstack for a load balancer with a UDP or TCP_UDP * listener. .

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

[Network 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). You can’t * specify dualstack for a load balancer with a UDP or TCP_UDP * listener. .

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

[Network 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). You can’t * specify dualstack for a load balancer with a UDP or TCP_UDP * listener. .

*/ inline SetSubnetsRequest& WithIpAddressType(IpAddressType&& value) { SetIpAddressType(std::move(value)); return *this;} private: Aws::String m_loadBalancerArn; bool m_loadBalancerArnHasBeenSet = false; Aws::Vector m_subnets; bool m_subnetsHasBeenSet = false; Aws::Vector m_subnetMappings; bool m_subnetMappingsHasBeenSet = false; IpAddressType m_ipAddressType; bool m_ipAddressTypeHasBeenSet = false; }; } // namespace Model } // namespace ElasticLoadBalancingv2 } // namespace Aws