/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace EC2 { namespace Model { /** */ class CreateSubnetRequest : public EC2Request { public: AWS_EC2_API CreateSubnetRequest(); // 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 "CreateSubnet"; } AWS_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The tags to assign to the subnet.

*/ inline const Aws::Vector& GetTagSpecifications() const{ return m_tagSpecifications; } /** *

The tags to assign to the subnet.

*/ inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; } /** *

The tags to assign to the subnet.

*/ inline void SetTagSpecifications(const Aws::Vector& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; } /** *

The tags to assign to the subnet.

*/ inline void SetTagSpecifications(Aws::Vector&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); } /** *

The tags to assign to the subnet.

*/ inline CreateSubnetRequest& WithTagSpecifications(const Aws::Vector& value) { SetTagSpecifications(value); return *this;} /** *

The tags to assign to the subnet.

*/ inline CreateSubnetRequest& WithTagSpecifications(Aws::Vector&& value) { SetTagSpecifications(std::move(value)); return *this;} /** *

The tags to assign to the subnet.

*/ inline CreateSubnetRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; } /** *

The tags to assign to the subnet.

*/ inline CreateSubnetRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; } /** *

The Availability Zone or Local Zone for the subnet.

Default: Amazon * Web Services selects one for you. If you create more than one subnet in your * VPC, we do not necessarily select a different zone for each subnet.

To * create a subnet in a Local Zone, set this value to the Local Zone ID, for * example us-west-2-lax-1a. For information about the Regions that * support Local Zones, see Local * Zones locations.

To create a subnet in an Outpost, set this value to * the Availability Zone for the Outpost and specify the Outpost ARN.

*/ inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; } /** *

The Availability Zone or Local Zone for the subnet.

Default: Amazon * Web Services selects one for you. If you create more than one subnet in your * VPC, we do not necessarily select a different zone for each subnet.

To * create a subnet in a Local Zone, set this value to the Local Zone ID, for * example us-west-2-lax-1a. For information about the Regions that * support Local Zones, see Local * Zones locations.

To create a subnet in an Outpost, set this value to * the Availability Zone for the Outpost and specify the Outpost ARN.

*/ inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; } /** *

The Availability Zone or Local Zone for the subnet.

Default: Amazon * Web Services selects one for you. If you create more than one subnet in your * VPC, we do not necessarily select a different zone for each subnet.

To * create a subnet in a Local Zone, set this value to the Local Zone ID, for * example us-west-2-lax-1a. For information about the Regions that * support Local Zones, see Local * Zones locations.

To create a subnet in an Outpost, set this value to * the Availability Zone for the Outpost and specify the Outpost ARN.

*/ inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; } /** *

The Availability Zone or Local Zone for the subnet.

Default: Amazon * Web Services selects one for you. If you create more than one subnet in your * VPC, we do not necessarily select a different zone for each subnet.

To * create a subnet in a Local Zone, set this value to the Local Zone ID, for * example us-west-2-lax-1a. For information about the Regions that * support Local Zones, see Local * Zones locations.

To create a subnet in an Outpost, set this value to * the Availability Zone for the Outpost and specify the Outpost ARN.

*/ inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); } /** *

The Availability Zone or Local Zone for the subnet.

Default: Amazon * Web Services selects one for you. If you create more than one subnet in your * VPC, we do not necessarily select a different zone for each subnet.

To * create a subnet in a Local Zone, set this value to the Local Zone ID, for * example us-west-2-lax-1a. For information about the Regions that * support Local Zones, see Local * Zones locations.

To create a subnet in an Outpost, set this value to * the Availability Zone for the Outpost and specify the Outpost ARN.

*/ inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); } /** *

The Availability Zone or Local Zone for the subnet.

Default: Amazon * Web Services selects one for you. If you create more than one subnet in your * VPC, we do not necessarily select a different zone for each subnet.

To * create a subnet in a Local Zone, set this value to the Local Zone ID, for * example us-west-2-lax-1a. For information about the Regions that * support Local Zones, see Local * Zones locations.

To create a subnet in an Outpost, set this value to * the Availability Zone for the Outpost and specify the Outpost ARN.

*/ inline CreateSubnetRequest& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;} /** *

The Availability Zone or Local Zone for the subnet.

Default: Amazon * Web Services selects one for you. If you create more than one subnet in your * VPC, we do not necessarily select a different zone for each subnet.

To * create a subnet in a Local Zone, set this value to the Local Zone ID, for * example us-west-2-lax-1a. For information about the Regions that * support Local Zones, see Local * Zones locations.

To create a subnet in an Outpost, set this value to * the Availability Zone for the Outpost and specify the Outpost ARN.

*/ inline CreateSubnetRequest& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;} /** *

The Availability Zone or Local Zone for the subnet.

Default: Amazon * Web Services selects one for you. If you create more than one subnet in your * VPC, we do not necessarily select a different zone for each subnet.

To * create a subnet in a Local Zone, set this value to the Local Zone ID, for * example us-west-2-lax-1a. For information about the Regions that * support Local Zones, see Local * Zones locations.

To create a subnet in an Outpost, set this value to * the Availability Zone for the Outpost and specify the Outpost ARN.

*/ inline CreateSubnetRequest& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;} /** *

The AZ ID or the Local Zone ID of the subnet.

*/ inline const Aws::String& GetAvailabilityZoneId() const{ return m_availabilityZoneId; } /** *

The AZ ID or the Local Zone ID of the subnet.

*/ inline bool AvailabilityZoneIdHasBeenSet() const { return m_availabilityZoneIdHasBeenSet; } /** *

The AZ ID or the Local Zone ID of the subnet.

*/ inline void SetAvailabilityZoneId(const Aws::String& value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId = value; } /** *

The AZ ID or the Local Zone ID of the subnet.

*/ inline void SetAvailabilityZoneId(Aws::String&& value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId = std::move(value); } /** *

The AZ ID or the Local Zone ID of the subnet.

*/ inline void SetAvailabilityZoneId(const char* value) { m_availabilityZoneIdHasBeenSet = true; m_availabilityZoneId.assign(value); } /** *

The AZ ID or the Local Zone ID of the subnet.

*/ inline CreateSubnetRequest& WithAvailabilityZoneId(const Aws::String& value) { SetAvailabilityZoneId(value); return *this;} /** *

The AZ ID or the Local Zone ID of the subnet.

*/ inline CreateSubnetRequest& WithAvailabilityZoneId(Aws::String&& value) { SetAvailabilityZoneId(std::move(value)); return *this;} /** *

The AZ ID or the Local Zone ID of the subnet.

*/ inline CreateSubnetRequest& WithAvailabilityZoneId(const char* value) { SetAvailabilityZoneId(value); return *this;} /** *

The IPv4 network range for the subnet, in CIDR notation. For example, * 10.0.0.0/24. We modify the specified CIDR block to its canonical * form; for example, if you specify 100.68.0.18/18, we modify it to * 100.68.0.0/18.

This parameter is not supported for an IPv6 * only subnet.

*/ inline const Aws::String& GetCidrBlock() const{ return m_cidrBlock; } /** *

The IPv4 network range for the subnet, in CIDR notation. For example, * 10.0.0.0/24. We modify the specified CIDR block to its canonical * form; for example, if you specify 100.68.0.18/18, we modify it to * 100.68.0.0/18.

This parameter is not supported for an IPv6 * only subnet.

*/ inline bool CidrBlockHasBeenSet() const { return m_cidrBlockHasBeenSet; } /** *

The IPv4 network range for the subnet, in CIDR notation. For example, * 10.0.0.0/24. We modify the specified CIDR block to its canonical * form; for example, if you specify 100.68.0.18/18, we modify it to * 100.68.0.0/18.

This parameter is not supported for an IPv6 * only subnet.

*/ inline void SetCidrBlock(const Aws::String& value) { m_cidrBlockHasBeenSet = true; m_cidrBlock = value; } /** *

The IPv4 network range for the subnet, in CIDR notation. For example, * 10.0.0.0/24. We modify the specified CIDR block to its canonical * form; for example, if you specify 100.68.0.18/18, we modify it to * 100.68.0.0/18.

This parameter is not supported for an IPv6 * only subnet.

*/ inline void SetCidrBlock(Aws::String&& value) { m_cidrBlockHasBeenSet = true; m_cidrBlock = std::move(value); } /** *

The IPv4 network range for the subnet, in CIDR notation. For example, * 10.0.0.0/24. We modify the specified CIDR block to its canonical * form; for example, if you specify 100.68.0.18/18, we modify it to * 100.68.0.0/18.

This parameter is not supported for an IPv6 * only subnet.

*/ inline void SetCidrBlock(const char* value) { m_cidrBlockHasBeenSet = true; m_cidrBlock.assign(value); } /** *

The IPv4 network range for the subnet, in CIDR notation. For example, * 10.0.0.0/24. We modify the specified CIDR block to its canonical * form; for example, if you specify 100.68.0.18/18, we modify it to * 100.68.0.0/18.

This parameter is not supported for an IPv6 * only subnet.

*/ inline CreateSubnetRequest& WithCidrBlock(const Aws::String& value) { SetCidrBlock(value); return *this;} /** *

The IPv4 network range for the subnet, in CIDR notation. For example, * 10.0.0.0/24. We modify the specified CIDR block to its canonical * form; for example, if you specify 100.68.0.18/18, we modify it to * 100.68.0.0/18.

This parameter is not supported for an IPv6 * only subnet.

*/ inline CreateSubnetRequest& WithCidrBlock(Aws::String&& value) { SetCidrBlock(std::move(value)); return *this;} /** *

The IPv4 network range for the subnet, in CIDR notation. For example, * 10.0.0.0/24. We modify the specified CIDR block to its canonical * form; for example, if you specify 100.68.0.18/18, we modify it to * 100.68.0.0/18.

This parameter is not supported for an IPv6 * only subnet.

*/ inline CreateSubnetRequest& WithCidrBlock(const char* value) { SetCidrBlock(value); return *this;} /** *

The IPv6 network range for the subnet, in CIDR notation. The subnet size must * use a /64 prefix length.

This parameter is required for an IPv6 only * subnet.

*/ inline const Aws::String& GetIpv6CidrBlock() const{ return m_ipv6CidrBlock; } /** *

The IPv6 network range for the subnet, in CIDR notation. The subnet size must * use a /64 prefix length.

This parameter is required for an IPv6 only * subnet.

*/ inline bool Ipv6CidrBlockHasBeenSet() const { return m_ipv6CidrBlockHasBeenSet; } /** *

The IPv6 network range for the subnet, in CIDR notation. The subnet size must * use a /64 prefix length.

This parameter is required for an IPv6 only * subnet.

*/ inline void SetIpv6CidrBlock(const Aws::String& value) { m_ipv6CidrBlockHasBeenSet = true; m_ipv6CidrBlock = value; } /** *

The IPv6 network range for the subnet, in CIDR notation. The subnet size must * use a /64 prefix length.

This parameter is required for an IPv6 only * subnet.

*/ inline void SetIpv6CidrBlock(Aws::String&& value) { m_ipv6CidrBlockHasBeenSet = true; m_ipv6CidrBlock = std::move(value); } /** *

The IPv6 network range for the subnet, in CIDR notation. The subnet size must * use a /64 prefix length.

This parameter is required for an IPv6 only * subnet.

*/ inline void SetIpv6CidrBlock(const char* value) { m_ipv6CidrBlockHasBeenSet = true; m_ipv6CidrBlock.assign(value); } /** *

The IPv6 network range for the subnet, in CIDR notation. The subnet size must * use a /64 prefix length.

This parameter is required for an IPv6 only * subnet.

*/ inline CreateSubnetRequest& WithIpv6CidrBlock(const Aws::String& value) { SetIpv6CidrBlock(value); return *this;} /** *

The IPv6 network range for the subnet, in CIDR notation. The subnet size must * use a /64 prefix length.

This parameter is required for an IPv6 only * subnet.

*/ inline CreateSubnetRequest& WithIpv6CidrBlock(Aws::String&& value) { SetIpv6CidrBlock(std::move(value)); return *this;} /** *

The IPv6 network range for the subnet, in CIDR notation. The subnet size must * use a /64 prefix length.

This parameter is required for an IPv6 only * subnet.

*/ inline CreateSubnetRequest& WithIpv6CidrBlock(const char* value) { SetIpv6CidrBlock(value); return *this;} /** *

The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, * you must also specify the Availability Zone of the Outpost subnet.

*/ inline const Aws::String& GetOutpostArn() const{ return m_outpostArn; } /** *

The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, * you must also specify the Availability Zone of the Outpost subnet.

*/ inline bool OutpostArnHasBeenSet() const { return m_outpostArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, * you must also specify the Availability Zone of the Outpost subnet.

*/ inline void SetOutpostArn(const Aws::String& value) { m_outpostArnHasBeenSet = true; m_outpostArn = value; } /** *

The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, * you must also specify the Availability Zone of the Outpost subnet.

*/ inline void SetOutpostArn(Aws::String&& value) { m_outpostArnHasBeenSet = true; m_outpostArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, * you must also specify the Availability Zone of the Outpost subnet.

*/ inline void SetOutpostArn(const char* value) { m_outpostArnHasBeenSet = true; m_outpostArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, * you must also specify the Availability Zone of the Outpost subnet.

*/ inline CreateSubnetRequest& WithOutpostArn(const Aws::String& value) { SetOutpostArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, * you must also specify the Availability Zone of the Outpost subnet.

*/ inline CreateSubnetRequest& WithOutpostArn(Aws::String&& value) { SetOutpostArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, * you must also specify the Availability Zone of the Outpost subnet.

*/ inline CreateSubnetRequest& WithOutpostArn(const char* value) { SetOutpostArn(value); return *this;} /** *

The ID of the VPC.

*/ inline const Aws::String& GetVpcId() const{ return m_vpcId; } /** *

The ID of the VPC.

*/ inline bool VpcIdHasBeenSet() const { return m_vpcIdHasBeenSet; } /** *

The ID of the VPC.

*/ inline void SetVpcId(const Aws::String& value) { m_vpcIdHasBeenSet = true; m_vpcId = value; } /** *

The ID of the VPC.

*/ inline void SetVpcId(Aws::String&& value) { m_vpcIdHasBeenSet = true; m_vpcId = std::move(value); } /** *

The ID of the VPC.

*/ inline void SetVpcId(const char* value) { m_vpcIdHasBeenSet = true; m_vpcId.assign(value); } /** *

The ID of the VPC.

*/ inline CreateSubnetRequest& WithVpcId(const Aws::String& value) { SetVpcId(value); return *this;} /** *

The ID of the VPC.

*/ inline CreateSubnetRequest& WithVpcId(Aws::String&& value) { SetVpcId(std::move(value)); return *this;} /** *

The ID of the VPC.

*/ inline CreateSubnetRequest& WithVpcId(const char* value) { SetVpcId(value); return *this;} /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool GetDryRun() const{ return m_dryRun; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline CreateSubnetRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} /** *

Indicates whether to create an IPv6 only subnet.

*/ inline bool GetIpv6Native() const{ return m_ipv6Native; } /** *

Indicates whether to create an IPv6 only subnet.

*/ inline bool Ipv6NativeHasBeenSet() const { return m_ipv6NativeHasBeenSet; } /** *

Indicates whether to create an IPv6 only subnet.

*/ inline void SetIpv6Native(bool value) { m_ipv6NativeHasBeenSet = true; m_ipv6Native = value; } /** *

Indicates whether to create an IPv6 only subnet.

*/ inline CreateSubnetRequest& WithIpv6Native(bool value) { SetIpv6Native(value); return *this;} private: Aws::Vector m_tagSpecifications; bool m_tagSpecificationsHasBeenSet = false; Aws::String m_availabilityZone; bool m_availabilityZoneHasBeenSet = false; Aws::String m_availabilityZoneId; bool m_availabilityZoneIdHasBeenSet = false; Aws::String m_cidrBlock; bool m_cidrBlockHasBeenSet = false; Aws::String m_ipv6CidrBlock; bool m_ipv6CidrBlockHasBeenSet = false; Aws::String m_outpostArn; bool m_outpostArnHasBeenSet = false; Aws::String m_vpcId; bool m_vpcIdHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; bool m_ipv6Native; bool m_ipv6NativeHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws