GetNatGateway

Provides details about a specific Nat Gateway.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var config = new Config();
        var subnetId = config.RequireObject<dynamic>("subnetId");
        var @default = Output.Create(Aws.Ec2.GetNatGateway.InvokeAsync(new Aws.Ec2.GetNatGatewayArgs
        {
            SubnetId = aws_subnet.Public.Id,
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        opt0 := aws_subnet.Public.Id
        _, err := ec2.LookupNatGateway(ctx, &ec2.LookupNatGatewayArgs{
            SubnetId: &opt0,
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

config = pulumi.Config()
subnet_id = config.require_object("subnetId")
default = aws.ec2.get_nat_gateway(subnet_id=aws_subnet["public"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const config = new pulumi.Config();
const subnetId = config.require("subnetId");

const defaultNatGateway = aws_subnet_public.id.apply(id => aws.ec2.getNatGateway({
    subnetId: id,
}, { async: true }));

Using GetNatGateway

function getNatGateway(args: GetNatGatewayArgs, opts?: InvokeOptions): Promise<GetNatGatewayResult>
function  get_nat_gateway(filters=None, id=None, state=None, subnet_id=None, tags=None, vpc_id=None, opts=None)
func LookupNatGateway(ctx *Context, args *LookupNatGatewayArgs, opts ...InvokeOption) (*LookupNatGatewayResult, error)

Note: This function is named LookupNatGateway in the Go SDK.

public static class GetNatGateway {
    public static Task<GetNatGatewayResult> InvokeAsync(GetNatGatewayArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Filters List<GetNatGatewayFilterArgs>

Custom filter block as described below.

Id string

The id of the specific Nat Gateway to retrieve.

State string

The state of the NAT gateway (pending | failed | available | deleting | deleted ).

SubnetId string

The id of subnet that the Nat Gateway resides in.

Tags Dictionary<string, string>

A map of tags, each pair of which must exactly match a pair on the desired Nat Gateway.

VpcId string

The id of the VPC that the Nat Gateway resides in.

Filters []GetNatGatewayFilter

Custom filter block as described below.

Id string

The id of the specific Nat Gateway to retrieve.

State string

The state of the NAT gateway (pending | failed | available | deleting | deleted ).

SubnetId string

The id of subnet that the Nat Gateway resides in.

Tags map[string]string

A map of tags, each pair of which must exactly match a pair on the desired Nat Gateway.

VpcId string

The id of the VPC that the Nat Gateway resides in.

filters GetNatGatewayFilter[]

Custom filter block as described below.

id string

The id of the specific Nat Gateway to retrieve.

state string

The state of the NAT gateway (pending | failed | available | deleting | deleted ).

subnetId string

The id of subnet that the Nat Gateway resides in.

tags {[key: string]: string}

A map of tags, each pair of which must exactly match a pair on the desired Nat Gateway.

vpcId string

The id of the VPC that the Nat Gateway resides in.

filters List[GetNatGatewayFilter]

Custom filter block as described below.

id str

The id of the specific Nat Gateway to retrieve.

state str

The state of the NAT gateway (pending | failed | available | deleting | deleted ).

subnet_id str

The id of subnet that the Nat Gateway resides in.

tags Dict[str, str]

A map of tags, each pair of which must exactly match a pair on the desired Nat Gateway.

vpc_id str

The id of the VPC that the Nat Gateway resides in.

GetNatGateway Result

The following output properties are available:

AllocationId string

The Id of the EIP allocated to the selected Nat Gateway.

Id string
NetworkInterfaceId string

The Id of the ENI allocated to the selected Nat Gateway.

PrivateIp string

The private Ip address of the selected Nat Gateway.

PublicIp string

The public Ip (EIP) address of the selected Nat Gateway.

State string
SubnetId string
Tags Dictionary<string, string>
VpcId string
Filters List<GetNatGatewayFilter>
AllocationId string

The Id of the EIP allocated to the selected Nat Gateway.

Id string
NetworkInterfaceId string

The Id of the ENI allocated to the selected Nat Gateway.

PrivateIp string

The private Ip address of the selected Nat Gateway.

PublicIp string

The public Ip (EIP) address of the selected Nat Gateway.

State string
SubnetId string
Tags map[string]string
VpcId string
Filters []GetNatGatewayFilter
allocationId string

The Id of the EIP allocated to the selected Nat Gateway.

id string
networkInterfaceId string

The Id of the ENI allocated to the selected Nat Gateway.

privateIp string

The private Ip address of the selected Nat Gateway.

publicIp string

The public Ip (EIP) address of the selected Nat Gateway.

state string
subnetId string
tags {[key: string]: string}
vpcId string
filters GetNatGatewayFilter[]
allocation_id str

The Id of the EIP allocated to the selected Nat Gateway.

id str
network_interface_id str

The Id of the ENI allocated to the selected Nat Gateway.

private_ip str

The private Ip address of the selected Nat Gateway.

public_ip str

The public Ip (EIP) address of the selected Nat Gateway.

state str
subnet_id str
tags Dict[str, str]
vpc_id str
filters List[GetNatGatewayFilter]

Supporting Types

GetNatGatewayFilter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

The name of the field to filter by, as defined by the underlying AWS API.

Values List<string>

Set of values that are accepted for the given field. An Nat Gateway will be selected if any one of the given values matches.

Name string

The name of the field to filter by, as defined by the underlying AWS API.

Values []string

Set of values that are accepted for the given field. An Nat Gateway will be selected if any one of the given values matches.

name string

The name of the field to filter by, as defined by the underlying AWS API.

values string[]

Set of values that are accepted for the given field. An Nat Gateway will be selected if any one of the given values matches.

name str

The name of the field to filter by, as defined by the underlying AWS API.

values List[str]

Set of values that are accepted for the given field. An Nat Gateway will be selected if any one of the given values matches.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.