Class NatGateway
Provides a resource to create a VPC NAT Gateway.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var gw = new Aws.Ec2.NatGateway("gw", new Aws.Ec2.NatGatewayArgs
{
AllocationId = aws_eip.Nat.Id,
SubnetId = aws_subnet.Example.Id,
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Ec2
Assembly: Pulumi.Aws.dll
Syntax
public class NatGateway : CustomResource
Constructors
View SourceNatGateway(String, NatGatewayArgs, CustomResourceOptions)
Create a NatGateway resource with the given unique name, arguments, and options.
Declaration
public NatGateway(string name, NatGatewayArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| NatGatewayArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAllocationId
The Allocation ID of the Elastic IP address for the gateway.
Declaration
public Output<string> AllocationId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NetworkInterfaceId
The ENI ID of the network interface created by the NAT gateway.
Declaration
public Output<string> NetworkInterfaceId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PrivateIp
The private IP address of the NAT Gateway.
Declaration
public Output<string> PrivateIp { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PublicIp
The public IP address of the NAT Gateway.
Declaration
public Output<string> PublicIp { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SubnetId
The Subnet ID of the subnet in which to place the gateway.
Declaration
public Output<string> SubnetId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
A map of tags to assign to the resource.
Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
Methods
View SourceGet(String, Input<String>, NatGatewayState, CustomResourceOptions)
Get an existing NatGateway resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static NatGateway Get(string name, Input<string> id, NatGatewayState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| NatGatewayState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| NatGateway |