getNatGateway

Provides details about a specific VPC NAT Gateway.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetNatGatewayArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var default = Ec2Functions.getNatGateway(GetNatGatewayArgs.builder()
.subnetId(aws_subnet.public().id())
.build());
}
}

With tags

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetNatGatewayArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var default = Ec2Functions.getNatGateway(GetNatGatewayArgs.builder()
.subnetId(aws_subnet.public().id())
.tags(Map.of("Name", "gw NAT"))
.build());
}
}

Return

A collection of values returned by getNatGateway.

Parameters

argument

A collection of arguments for invoking getNatGateway.


suspend fun getNatGateway(filters: List<GetNatGatewayFilter>? = null, id: String? = null, state: String? = null, subnetId: String? = null, tags: Map<String, String>? = null, vpcId: String? = null): GetNatGatewayResult

Return

A collection of values returned by getNatGateway.

See also

Parameters

filters

Custom filter block as described below. More complex filters can be expressed using one or more filter sub-blocks, which take the following arguments:

id

ID of the specific NAT Gateway to retrieve.

state

State of the NAT Gateway (pending | failed | available | deleting | deleted ).

subnetId

ID of subnet that the NAT Gateway resides in.

tags

Map of tags, each pair of which must exactly match a pair on the desired NAT Gateway.

vpcId

ID of the VPC that the NAT Gateway resides in.


Return

A collection of values returned by getNatGateway.

See also

Parameters

argument

Builder for com.pulumi.aws.ec2.kotlin.inputs.GetNatGatewayPlainArgs.