aws_sdk_ec2/client/create_nat_gateway.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 [`CreateNatGateway`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`availability_mode(AvailabilityMode)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::availability_mode) / [`set_availability_mode(Option<AvailabilityMode>)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::set_availability_mode):<br>required: **false**<br><p>Specifies whether to create a zonal (single-AZ) or regional (multi-AZ) NAT gateway. Defaults to <code>zonal</code>.</p> <p>A zonal NAT gateway is a NAT Gateway that provides redundancy and scalability within a single availability zone. A regional NAT gateway is a single NAT Gateway that works across multiple availability zones (AZs) in your VPC, providing redundancy, scalability and availability across all the AZs in a Region.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateways-regional.html">Regional NAT gateways for automatic multi-AZ expansion</a> in the <i>Amazon VPC User Guide</i>.</p><br>
7 /// - [`allocation_id(impl Into<String>)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::allocation_id) / [`set_allocation_id(Option<String>)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::set_allocation_id):<br>required: **false**<br><p>\[Public NAT gateways only\] The allocation ID of an Elastic IP address to associate with the NAT gateway. You cannot specify an Elastic IP address with a private NAT gateway. If the Elastic IP address is associated with another resource, you must first disassociate it.</p><br>
8 /// - [`client_token(impl Into<String>)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::set_client_token):<br>required: **false**<br><p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensuring idempotency</a>.</p> <p>Constraint: Maximum 64 ASCII characters.</p><br>
9 /// - [`dry_run(bool)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::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>
10 /// - [`subnet_id(impl Into<String>)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::subnet_id) / [`set_subnet_id(Option<String>)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::set_subnet_id):<br>required: **false**<br><p>The ID of the subnet in which to create the NAT gateway.</p><br>
11 /// - [`vpc_id(impl Into<String>)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::vpc_id) / [`set_vpc_id(Option<String>)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::set_vpc_id):<br>required: **false**<br><p>The ID of the VPC where you want to create a regional NAT gateway.</p><br>
12 /// - [`availability_zone_addresses(AvailabilityZoneAddress)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::availability_zone_addresses) / [`set_availability_zone_addresses(Option<Vec::<AvailabilityZoneAddress>>)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::set_availability_zone_addresses):<br>required: **false**<br><p>For regional NAT gateways only: Specifies which Availability Zones you want the NAT gateway to support and the Elastic IP addresses (EIPs) to use in each AZ. The regional NAT gateway uses these EIPs to handle outbound NAT traffic from their respective AZs. If not specified, the NAT gateway will automatically expand to new AZs and associate EIPs upon detection of an elastic network interface. If you specify this parameter, auto-expansion is disabled and you must manually manage AZ coverage.</p> <p>A regional NAT gateway is a single NAT Gateway that works across multiple availability zones (AZs) in your VPC, providing redundancy, scalability and availability across all the AZs in a Region.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateways-regional.html">Regional NAT gateways for automatic multi-AZ expansion</a> in the <i>Amazon VPC User Guide</i>.</p><br>
13 /// - [`tag_specifications(TagSpecification)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::tag_specifications) / [`set_tag_specifications(Option<Vec::<TagSpecification>>)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::set_tag_specifications):<br>required: **false**<br><p>The tags to assign to the NAT gateway.</p><br>
14 /// - [`connectivity_type(ConnectivityType)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::connectivity_type) / [`set_connectivity_type(Option<ConnectivityType>)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::set_connectivity_type):<br>required: **false**<br><p>Indicates whether the NAT gateway supports public or private connectivity. The default is public connectivity.</p><br>
15 /// - [`private_ip_address(impl Into<String>)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::private_ip_address) / [`set_private_ip_address(Option<String>)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::set_private_ip_address):<br>required: **false**<br><p>The private IPv4 address to assign to the NAT gateway. If you don't provide an address, a private IPv4 address will be automatically assigned.</p><br>
16 /// - [`secondary_allocation_ids(impl Into<String>)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::secondary_allocation_ids) / [`set_secondary_allocation_ids(Option<Vec::<String>>)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::set_secondary_allocation_ids):<br>required: **false**<br><p>Secondary EIP allocation IDs. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateway-working-with.html">Create a NAT gateway</a> in the <i>Amazon VPC User Guide</i>.</p><br>
17 /// - [`secondary_private_ip_addresses(impl Into<String>)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::secondary_private_ip_addresses) / [`set_secondary_private_ip_addresses(Option<Vec::<String>>)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::set_secondary_private_ip_addresses):<br>required: **false**<br><p>Secondary private IPv4 addresses. For more information about secondary addresses, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateway-working-with.html">Create a NAT gateway</a> in the <i>Amazon VPC User Guide</i>.</p><br>
18 /// - [`secondary_private_ip_address_count(i32)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::secondary_private_ip_address_count) / [`set_secondary_private_ip_address_count(Option<i32>)`](crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::set_secondary_private_ip_address_count):<br>required: **false**<br><p>\[Private NAT gateway only\] The number of secondary private IPv4 addresses you want to assign to the NAT gateway. For more information about secondary addresses, see Create a NAT gateway in the Amazon VPC User Guide.</p><br>
19 /// - On success, responds with [`CreateNatGatewayOutput`](crate::operation::create_nat_gateway::CreateNatGatewayOutput) with field(s):
20 /// - [`client_token(Option<String>)`](crate::operation::create_nat_gateway::CreateNatGatewayOutput::client_token): <p>Unique, case-sensitive identifier to ensure the idempotency of the request. Only returned if a client token was provided in the request.</p>
21 /// - [`nat_gateway(Option<NatGateway>)`](crate::operation::create_nat_gateway::CreateNatGatewayOutput::nat_gateway): <p>Information about the NAT gateway.</p>
22 /// - On failure, responds with [`SdkError<CreateNatGatewayError>`](crate::operation::create_nat_gateway::CreateNatGatewayError)
23 pub fn create_nat_gateway(&self) -> crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder {
24 crate::operation::create_nat_gateway::builders::CreateNatGatewayFluentBuilder::new(self.handle.clone())
25 }
26}