get Nat Gateway
Provides details about a specific 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());
}
}
Content copied to clipboard
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.
id
ID of the specific Nat Gateway to retrieve.
state
State of the NAT gateway (pending | failed | available | deleting | deleted ).
subnet Id
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.
vpc Id
ID of the VPC that the Nat Gateway resides in.
suspend fun getNatGateway(argument: suspend GetNatGatewayPlainArgsBuilder.() -> Unit): GetNatGatewayResult
Return
A collection of values returned by getNatGateway.
See also
Parameters
argument
Builder for com.pulumi.aws.ec2.kotlin.inputs.GetNatGatewayPlainArgs.