AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.5.0 published on Wednesday, May 25, 2022 by Pulumi

getInternetGateway

aws.ec2.InternetGateway provides details about a specific Internet Gateway.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var config = new Config();
        var vpcId = config.RequireObject<dynamic>("vpcId");
        var @default = Output.Create(Aws.Ec2.GetInternetGateway.InvokeAsync(new Aws.Ec2.GetInternetGatewayArgs
        {
            Filters = 
            {
                new Aws.Ec2.Inputs.GetInternetGatewayFilterArgs
                {
                    Name = "attachment.vpc-id",
                    Values = 
                    {
                        vpcId,
                    },
                },
            },
        }));
    }

}

Coming soon!

package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

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 = Output.of(Ec2Functions.getInternetGateway(GetInternetGatewayArgs.builder()
            .filters(GetInternetGatewayFilterArgs.builder()
                .name("attachment.vpc-id")
                .values(vpcId)
                .build())
            .build()));

    }
}
import pulumi
import pulumi_aws as aws

config = pulumi.Config()
vpc_id = config.require_object("vpcId")
default = aws.ec2.get_internet_gateway(filters=[aws.ec2.GetInternetGatewayFilterArgs(
    name="attachment.vpc-id",
    values=[vpc_id],
)])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const config = new pulumi.Config();
const vpcId = config.requireObject("vpcId");
const default = aws.ec2.getInternetGateway({
    filters: [{
        name: "attachment.vpc-id",
        values: [vpcId],
    }],
});
configuration:
  vpcId:
    type: dynamic
variables:
  default:
    Fn::Invoke:
      Function: aws:ec2:getInternetGateway
      Arguments:
        filters:
          - name: attachment.vpc-id
            values:
              - ${vpcId}

Using getInternetGateway

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getInternetGateway(args: GetInternetGatewayArgs, opts?: InvokeOptions): Promise<GetInternetGatewayResult>
function getInternetGatewayOutput(args: GetInternetGatewayOutputArgs, opts?: InvokeOptions): Output<GetInternetGatewayResult>
def get_internet_gateway(filters: Optional[Sequence[GetInternetGatewayFilter]] = None,
                         internet_gateway_id: Optional[str] = None,
                         tags: Optional[Mapping[str, str]] = None,
                         opts: Optional[InvokeOptions] = None) -> GetInternetGatewayResult
def get_internet_gateway_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetInternetGatewayFilterArgs]]]] = None,
                         internet_gateway_id: Optional[pulumi.Input[str]] = None,
                         tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetInternetGatewayResult]
func LookupInternetGateway(ctx *Context, args *LookupInternetGatewayArgs, opts ...InvokeOption) (*LookupInternetGatewayResult, error)
func LookupInternetGatewayOutput(ctx *Context, args *LookupInternetGatewayOutputArgs, opts ...InvokeOption) LookupInternetGatewayResultOutput

> Note: This function is named LookupInternetGateway in the Go SDK.

public static class GetInternetGateway 
{
    public static Task<GetInternetGatewayResult> InvokeAsync(GetInternetGatewayArgs args, InvokeOptions? opts = null)
    public static Output<GetInternetGatewayResult> Invoke(GetInternetGatewayInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetInternetGatewayResult> getInternetGateway(GetInternetGatewayArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: aws:ec2/getInternetGateway:getInternetGateway
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Filters List<Pulumi.Aws.Ec2.Inputs.GetInternetGatewayFilter>

Custom filter block as described below.

InternetGatewayId string

The id of the specific Internet Gateway to retrieve.

Tags Dictionary<string, string>

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

Filters []GetInternetGatewayFilter

Custom filter block as described below.

InternetGatewayId string

The id of the specific Internet Gateway to retrieve.

Tags map[string]string

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

filters List<GetInternetGatewayFilter>

Custom filter block as described below.

internetGatewayId String

The id of the specific Internet Gateway to retrieve.

tags Map<String,String>

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

filters GetInternetGatewayFilter[]

Custom filter block as described below.

internetGatewayId string

The id of the specific Internet Gateway to retrieve.

tags {[key: string]: string}

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

filters Sequence[GetInternetGatewayFilter]

Custom filter block as described below.

internet_gateway_id str

The id of the specific Internet Gateway to retrieve.

tags Mapping[str, str]

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

filters List<Property Map>

Custom filter block as described below.

internetGatewayId String

The id of the specific Internet Gateway to retrieve.

tags Map<String>

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

getInternetGateway Result

The following output properties are available:

Arn string

The ARN of the Internet Gateway.

Attachments List<Pulumi.Aws.Ec2.Outputs.GetInternetGatewayAttachment>
Id string

The provider-assigned unique ID for this managed resource.

InternetGatewayId string
OwnerId string

The ID of the AWS account that owns the internet gateway.

Tags Dictionary<string, string>
Filters List<Pulumi.Aws.Ec2.Outputs.GetInternetGatewayFilter>
Arn string

The ARN of the Internet Gateway.

Attachments []GetInternetGatewayAttachmentType
Id string

The provider-assigned unique ID for this managed resource.

InternetGatewayId string
OwnerId string

The ID of the AWS account that owns the internet gateway.

Tags map[string]string
Filters []GetInternetGatewayFilter
arn String

The ARN of the Internet Gateway.

attachments List<GetInternetGatewayAttachment>
id String

The provider-assigned unique ID for this managed resource.

internetGatewayId String
ownerId String

The ID of the AWS account that owns the internet gateway.

tags Map<String,String>
filters List<GetInternetGatewayFilter>
arn string

The ARN of the Internet Gateway.

attachments GetInternetGatewayAttachment[]
id string

The provider-assigned unique ID for this managed resource.

internetGatewayId string
ownerId string

The ID of the AWS account that owns the internet gateway.

tags {[key: string]: string}
filters GetInternetGatewayFilter[]
arn str

The ARN of the Internet Gateway.

attachments Sequence[GetInternetGatewayAttachment]
id str

The provider-assigned unique ID for this managed resource.

internet_gateway_id str
owner_id str

The ID of the AWS account that owns the internet gateway.

tags Mapping[str, str]
filters Sequence[GetInternetGatewayFilter]
arn String

The ARN of the Internet Gateway.

attachments List<Property Map>
id String

The provider-assigned unique ID for this managed resource.

internetGatewayId String
ownerId String

The ID of the AWS account that owns the internet gateway.

tags Map<String>
filters List<Property Map>

Supporting Types

GetInternetGatewayAttachment

State string

The current state of the attachment between the gateway and the VPC. Present only if a VPC is attached

VpcId string

The ID of an attached VPC.

State string

The current state of the attachment between the gateway and the VPC. Present only if a VPC is attached

VpcId string

The ID of an attached VPC.

state String

The current state of the attachment between the gateway and the VPC. Present only if a VPC is attached

vpcId String

The ID of an attached VPC.

state string

The current state of the attachment between the gateway and the VPC. Present only if a VPC is attached

vpcId string

The ID of an attached VPC.

state str

The current state of the attachment between the gateway and the VPC. Present only if a VPC is attached

vpc_id str

The ID of an attached VPC.

state String

The current state of the attachment between the gateway and the VPC. Present only if a VPC is attached

vpcId String

The ID of an attached VPC.

GetInternetGatewayFilter

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 Internet 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 Internet 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 List<String>

Set of values that are accepted for the given field. An Internet 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 Internet 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 Sequence[str]

Set of values that are accepted for the given field. An Internet 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 List<String>

Set of values that are accepted for the given field. An Internet 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.