GetVpcLink

Use this data source to get the id of a VPC Link in API Gateway. To fetch the VPC Link you must provide a name to match against. As there is no unique name constraint on API Gateway VPC Links this data source will error if there is more than one match.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var myApiGatewayVpcLink = Output.Create(Aws.ApiGateway.GetVpcLink.InvokeAsync(new Aws.ApiGateway.GetVpcLinkArgs
        {
            Name = "my-vpc-link",
        }));
    }

}
package main

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

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := apigateway.LookupVpcLink(ctx, &apigateway.LookupVpcLinkArgs{
            Name: "my-vpc-link",
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

my_api_gateway_vpc_link = aws.apigateway.get_vpc_link(name="my-vpc-link")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const myApiGatewayVpcLink = pulumi.output(aws.apigateway.getVpcLink({
    name: "my-vpc-link",
}, { async: true }));

Using GetVpcLink

function getVpcLink(args: GetVpcLinkArgs, opts?: InvokeOptions): Promise<GetVpcLinkResult>
function  get_vpc_link(name=None, tags=None, opts=None)
func LookupVpcLink(ctx *Context, args *LookupVpcLinkArgs, opts ...InvokeOption) (*LookupVpcLinkResult, error)

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

public static class GetVpcLink {
    public static Task<GetVpcLinkResult> InvokeAsync(GetVpcLinkArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The name of the API Gateway VPC Link to look up. If no API Gateway VPC Link is found with this name, an error will be returned. If multiple API Gateway VPC Links are found with this name, an error will be returned.

Tags Dictionary<string, string>

Key-value map of resource tags

Name string

The name of the API Gateway VPC Link to look up. If no API Gateway VPC Link is found with this name, an error will be returned. If multiple API Gateway VPC Links are found with this name, an error will be returned.

Tags map[string]string

Key-value map of resource tags

name string

The name of the API Gateway VPC Link to look up. If no API Gateway VPC Link is found with this name, an error will be returned. If multiple API Gateway VPC Links are found with this name, an error will be returned.

tags {[key: string]: string}

Key-value map of resource tags

name str

The name of the API Gateway VPC Link to look up. If no API Gateway VPC Link is found with this name, an error will be returned. If multiple API Gateway VPC Links are found with this name, an error will be returned.

tags Dict[str, str]

Key-value map of resource tags

GetVpcLink Result

The following output properties are available:

Description string

The description of the VPC link.

Id string

Set to the ID of the found API Gateway VPC Link.

Name string
Status string

The status of the VPC link.

StatusMessage string

The status message of the VPC link.

Tags Dictionary<string, string>

Key-value map of resource tags

TargetArns List<string>

The list of network load balancer arns in the VPC targeted by the VPC link. Currently AWS only supports 1 target.

Description string

The description of the VPC link.

Id string

Set to the ID of the found API Gateway VPC Link.

Name string
Status string

The status of the VPC link.

StatusMessage string

The status message of the VPC link.

Tags map[string]string

Key-value map of resource tags

TargetArns []string

The list of network load balancer arns in the VPC targeted by the VPC link. Currently AWS only supports 1 target.

description string

The description of the VPC link.

id string

Set to the ID of the found API Gateway VPC Link.

name string
status string

The status of the VPC link.

statusMessage string

The status message of the VPC link.

tags {[key: string]: string}

Key-value map of resource tags

targetArns string[]

The list of network load balancer arns in the VPC targeted by the VPC link. Currently AWS only supports 1 target.

description str

The description of the VPC link.

id str

Set to the ID of the found API Gateway VPC Link.

name str
status str

The status of the VPC link.

status_message str

The status message of the VPC link.

tags Dict[str, str]

Key-value map of resource tags

target_arns List[str]

The list of network load balancer arns in the VPC targeted by the VPC link. Currently AWS only supports 1 target.

Package Details

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