Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Creates a NAT gateway in the specified subnet. This action creates a network interface in the specified subnet with a private IP address from the IP address range of the subnet. You can create either a public NAT gateway or a private NAT gateway.
With a public NAT gateway, internet-bound traffic from a private subnet can be routed to the NAT gateway, so that instances in a private subnet can connect to the internet.
With a private NAT gateway, private communication is routed across VPCs and on-premises networks through a transit gateway or virtual private gateway. Common use cases include running large workloads behind a small pool of allowlisted IPv4 addresses, preserving private IPv4 addresses, and communicating between overlapping networks.
For more information, see NAT gateways in the Amazon Virtual Private Cloud User Guide.
Synopsis
- data CreateNatGateway = CreateNatGateway' {}
- newCreateNatGateway :: Text -> CreateNatGateway
- createNatGateway_allocationId :: Lens' CreateNatGateway (Maybe Text)
- createNatGateway_clientToken :: Lens' CreateNatGateway (Maybe Text)
- createNatGateway_connectivityType :: Lens' CreateNatGateway (Maybe ConnectivityType)
- createNatGateway_dryRun :: Lens' CreateNatGateway (Maybe Bool)
- createNatGateway_privateIpAddress :: Lens' CreateNatGateway (Maybe Text)
- createNatGateway_tagSpecifications :: Lens' CreateNatGateway (Maybe [TagSpecification])
- createNatGateway_subnetId :: Lens' CreateNatGateway Text
- data CreateNatGatewayResponse = CreateNatGatewayResponse' {}
- newCreateNatGatewayResponse :: Int -> CreateNatGatewayResponse
- createNatGatewayResponse_clientToken :: Lens' CreateNatGatewayResponse (Maybe Text)
- createNatGatewayResponse_natGateway :: Lens' CreateNatGatewayResponse (Maybe NatGateway)
- createNatGatewayResponse_httpStatus :: Lens' CreateNatGatewayResponse Int
Creating a Request
data CreateNatGateway Source #
See: newCreateNatGateway
smart constructor.
CreateNatGateway' | |
|
Instances
Create a value of CreateNatGateway
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
CreateNatGateway
, createNatGateway_allocationId
- [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.
CreateNatGateway
, createNatGateway_clientToken
- Unique, case-sensitive identifier that you provide to ensure the
idempotency of the request. For more information, see
How to ensure idempotency.
Constraint: Maximum 64 ASCII characters.
CreateNatGateway
, createNatGateway_connectivityType
- Indicates whether the NAT gateway supports public or private
connectivity. The default is public connectivity.
$sel:dryRun:CreateNatGateway'
, createNatGateway_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
.
CreateNatGateway
, createNatGateway_privateIpAddress
- 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.
CreateNatGateway
, createNatGateway_tagSpecifications
- The tags to assign to the NAT gateway.
CreateNatGateway
, createNatGateway_subnetId
- The subnet in which to create the NAT gateway.
Request Lenses
createNatGateway_allocationId :: Lens' CreateNatGateway (Maybe Text) Source #
- 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.
createNatGateway_clientToken :: Lens' CreateNatGateway (Maybe Text) Source #
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
Constraint: Maximum 64 ASCII characters.
createNatGateway_connectivityType :: Lens' CreateNatGateway (Maybe ConnectivityType) Source #
Indicates whether the NAT gateway supports public or private connectivity. The default is public connectivity.
createNatGateway_dryRun :: Lens' CreateNatGateway (Maybe Bool) Source #
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
.
createNatGateway_privateIpAddress :: Lens' CreateNatGateway (Maybe Text) Source #
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.
createNatGateway_tagSpecifications :: Lens' CreateNatGateway (Maybe [TagSpecification]) Source #
The tags to assign to the NAT gateway.
createNatGateway_subnetId :: Lens' CreateNatGateway Text Source #
The subnet in which to create the NAT gateway.
Destructuring the Response
data CreateNatGatewayResponse Source #
See: newCreateNatGatewayResponse
smart constructor.
CreateNatGatewayResponse' | |
|
Instances
newCreateNatGatewayResponse Source #
Create a value of CreateNatGatewayResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
CreateNatGateway
, createNatGatewayResponse_clientToken
- Unique, case-sensitive identifier to ensure the idempotency of the
request. Only returned if a client token was provided in the request.
CreateNatGatewayResponse
, createNatGatewayResponse_natGateway
- Information about the NAT gateway.
$sel:httpStatus:CreateNatGatewayResponse'
, createNatGatewayResponse_httpStatus
- The response's http status code.
Response Lenses
createNatGatewayResponse_clientToken :: Lens' CreateNatGatewayResponse (Maybe Text) Source #
Unique, case-sensitive identifier to ensure the idempotency of the request. Only returned if a client token was provided in the request.
createNatGatewayResponse_natGateway :: Lens' CreateNatGatewayResponse (Maybe NatGateway) Source #
Information about the NAT gateway.
createNatGatewayResponse_httpStatus :: Lens' CreateNatGatewayResponse Int Source #
The response's http status code.