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/v4/go/aws/apigateway"
	"github.com/pulumi/pulumi/sdk/v3/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",
}));

Using getVpcLink

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 getVpcLink(args: GetVpcLinkArgs, opts?: InvokeOptions): Promise<GetVpcLinkResult>
function getVpcLinkOutput(args: GetVpcLinkOutputArgs, opts?: InvokeOptions): Output<GetVpcLinkResult>
def get_vpc_link(name: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None,
                 opts: Optional[InvokeOptions] = None) -> GetVpcLinkResult
def get_vpc_link_output(name: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetVpcLinkResult]
func LookupVpcLink(ctx *Context, args *LookupVpcLinkArgs, opts ...InvokeOption) (*LookupVpcLinkResult, error)
func LookupVpcLinkOutput(ctx *Context, args *LookupVpcLinkOutputArgs, opts ...InvokeOption) LookupVpcLinkResultOutput

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

public static class GetVpcLink 
{
    public static Task<GetVpcLinkResult> InvokeAsync(GetVpcLinkArgs args, InvokeOptions? opts = null)
    public static Output<GetVpcLinkResult> Invoke(GetVpcLinkInvokeArgs 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 Mapping[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 Mapping[str, str]
Key-value map of resource tags
target_arns Sequence[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.