paws.compute (version 0.1.0)

ec2_create_nat_gateway: Creates a NAT gateway in the specified public subnet

Description

Creates a NAT gateway in the specified public subnet. This action creates a network interface in the specified subnet with a private IP address from the IP address range of the subnet. Internet-bound traffic from a private subnet can be routed to the NAT gateway, therefore enabling instances in the private subnet to connect to the internet. For more information, see NAT Gateways in the Amazon Virtual Private Cloud User Guide.

Usage

ec2_create_nat_gateway(AllocationId, ClientToken, SubnetId)

Arguments

AllocationId

[required] The allocation ID of an Elastic IP address to associate with the NAT gateway. If the Elastic IP address is associated with another resource, you must first disassociate it.

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.

SubnetId

[required] The subnet in which to create the NAT gateway.

Request syntax

svc$create_nat_gateway(
  AllocationId = "string",
  ClientToken = "string",
  SubnetId = "string"
)

Examples

Run this code
# NOT RUN {
# This example creates a NAT gateway in subnet subnet-1a2b3c4d and
# associates an Elastic IP address with the allocation ID
# eipalloc-37fc1a52 with the NAT gateway.
# }
# NOT RUN {
svc$create_nat_gateway(
  AllocationId = "eipalloc-37fc1a52",
  SubnetId = "subnet-1a2b3c4d"
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace