get Internet Gateway
aws.ec2.InternetGateway
provides details about a specific Internet 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.GetInternetGatewayArgs;
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 config = ctx.config();
final var vpcId = config.get("vpcId");
final var default = Ec2Functions.getInternetGateway(GetInternetGatewayArgs.builder()
.filters(GetInternetGatewayFilterArgs.builder()
.name("attachment.vpc-id")
.values(vpcId)
.build())
.build());
}
}
Content copied to clipboard
Return
A collection of values returned by getInternetGateway.
Parameters
argument
A collection of arguments for invoking getInternetGateway.
suspend fun getInternetGateway(filters: List<GetInternetGatewayFilter>? = null, internetGatewayId: String? = null, tags: Map<String, String>? = null): GetInternetGatewayResult
Return
A collection of values returned by getInternetGateway.
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:
internet Gateway Id
ID of the specific Internet Gateway to retrieve.
tags
Map of tags, each pair of which must exactly match a pair on the desired Internet Gateway.
See also
suspend fun getInternetGateway(argument: suspend GetInternetGatewayPlainArgsBuilder.() -> Unit): GetInternetGatewayResult
Return
A collection of values returned by getInternetGateway.
Parameters
argument
Builder for com.pulumi.aws.ec2.kotlin.inputs.GetInternetGatewayPlainArgs.