aws_sdk_ec2/client/create_subnet.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`CreateSubnet`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`tag_specifications(TagSpecification)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::tag_specifications) / [`set_tag_specifications(Option<Vec::<TagSpecification>>)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::set_tag_specifications):<br>required: **false**<br><p>The tags to assign to the subnet.</p><br>
7 /// - [`availability_zone(impl Into<String>)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::availability_zone) / [`set_availability_zone(Option<String>)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::set_availability_zone):<br>required: **false**<br><p>The Availability Zone or Local Zone for the subnet.</p> <p>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.</p> <p>To create a subnet in a Local Zone, set this value to the Local Zone ID, for example <code>us-west-2-lax-1a</code>. For information about the Regions that support Local Zones, see <a href="https://docs.aws.amazon.com/local-zones/latest/ug/available-local-zones.html">Available Local Zones</a>.</p> <p>To create a subnet in an Outpost, set this value to the Availability Zone for the Outpost and specify the Outpost ARN.</p><br>
8 /// - [`availability_zone_id(impl Into<String>)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::availability_zone_id) / [`set_availability_zone_id(Option<String>)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::set_availability_zone_id):<br>required: **false**<br><p>The AZ ID or the Local Zone ID of the subnet.</p><br>
9 /// - [`cidr_block(impl Into<String>)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::cidr_block) / [`set_cidr_block(Option<String>)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::set_cidr_block):<br>required: **false**<br><p>The IPv4 network range for the subnet, in CIDR notation. For example, <code>10.0.0.0/24</code>. We modify the specified CIDR block to its canonical form; for example, if you specify <code>100.68.0.18/18</code>, we modify it to <code>100.68.0.0/18</code>.</p> <p>This parameter is not supported for an IPv6 only subnet.</p><br>
10 /// - [`ipv6_cidr_block(impl Into<String>)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::ipv6_cidr_block) / [`set_ipv6_cidr_block(Option<String>)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::set_ipv6_cidr_block):<br>required: **false**<br><p>The IPv6 network range for the subnet, in CIDR notation. This parameter is required for an IPv6 only subnet.</p><br>
11 /// - [`outpost_arn(impl Into<String>)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::outpost_arn) / [`set_outpost_arn(Option<String>)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::set_outpost_arn):<br>required: **false**<br><p>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.</p><br>
12 /// - [`vpc_id(impl Into<String>)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::vpc_id) / [`set_vpc_id(Option<String>)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::set_vpc_id):<br>required: **true**<br><p>The ID of the VPC.</p><br>
13 /// - [`ipv6_native(bool)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::ipv6_native) / [`set_ipv6_native(Option<bool>)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::set_ipv6_native):<br>required: **false**<br><p>Indicates whether to create an IPv6 only subnet.</p><br>
14 /// - [`ipv4_ipam_pool_id(impl Into<String>)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::ipv4_ipam_pool_id) / [`set_ipv4_ipam_pool_id(Option<String>)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::set_ipv4_ipam_pool_id):<br>required: **false**<br><p>An IPv4 IPAM pool ID for the subnet.</p><br>
15 /// - [`ipv4_netmask_length(i32)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::ipv4_netmask_length) / [`set_ipv4_netmask_length(Option<i32>)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::set_ipv4_netmask_length):<br>required: **false**<br><p>An IPv4 netmask length for the subnet.</p><br>
16 /// - [`ipv6_ipam_pool_id(impl Into<String>)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::ipv6_ipam_pool_id) / [`set_ipv6_ipam_pool_id(Option<String>)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::set_ipv6_ipam_pool_id):<br>required: **false**<br><p>An IPv6 IPAM pool ID for the subnet.</p><br>
17 /// - [`ipv6_netmask_length(i32)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::ipv6_netmask_length) / [`set_ipv6_netmask_length(Option<i32>)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::set_ipv6_netmask_length):<br>required: **false**<br><p>An IPv6 netmask length for the subnet.</p><br>
18 /// - [`dry_run(bool)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::set_dry_run):<br>required: **false**<br><p>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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p><br>
19 /// - On success, responds with [`CreateSubnetOutput`](crate::operation::create_subnet::CreateSubnetOutput) with field(s):
20 /// - [`subnet(Option<Subnet>)`](crate::operation::create_subnet::CreateSubnetOutput::subnet): <p>Information about the subnet.</p>
21 /// - On failure, responds with [`SdkError<CreateSubnetError>`](crate::operation::create_subnet::CreateSubnetError)
22 pub fn create_subnet(&self) -> crate::operation::create_subnet::builders::CreateSubnetFluentBuilder {
23 crate::operation::create_subnet::builders::CreateSubnetFluentBuilder::new(self.handle.clone())
24 }
25}