Try AWS Native preview for resources not in the classic version.
aws.apigateway.getVpcLink
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const myApiGatewayVpcLink = aws.apigateway.getVpcLink({
name: "my-vpc-link",
});
import pulumi
import pulumi_aws as aws
my_api_gateway_vpc_link = aws.apigateway.get_vpc_link(name="my-vpc-link")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var myApiGatewayVpcLink = Aws.ApiGateway.GetVpcLink.Invoke(new()
{
Name = "my-vpc-link",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.apigateway.ApigatewayFunctions;
import com.pulumi.aws.apigateway.inputs.GetVpcLinkArgs;
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 myApiGatewayVpcLink = ApigatewayFunctions.getVpcLink(GetVpcLinkArgs.builder()
.name("my-vpc-link")
.build());
}
}
variables:
myApiGatewayVpcLink:
fn::invoke:
Function: aws:apigateway:getVpcLink
Arguments:
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)
}
public static CompletableFuture<GetVpcLinkResult> getVpcLink(GetVpcLinkArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:apigateway/getVpcLink:getVpcLink
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- 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.
- Dictionary<string, string>
- Key-value map of resource tags
- Name string
- 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.
- map[string]string
- Key-value map of resource tags
- name String
- 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.
- Map<String,String>
- Key-value map of resource tags
- name string
- 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.
- {[key: string]: string}
- Key-value map of resource tags
- name str
- 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.
- Mapping[str, str]
- Key-value map of resource tags
- name String
- 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.
- Map<String>
- Key-value map of resource tags
getVpcLink Result
The following output properties are available:
- Description string
- Description of the VPC link.
- Id string
- Set to the ID of the found API Gateway VPC Link.
- Name string
- Status string
- Status of the VPC link.
- Status
Message string - Status message of the VPC link.
- Dictionary<string, string>
- Key-value map of resource tags
- Target
Arns List<string> - List of network load balancer arns in the VPC targeted by the VPC link. Currently AWS only supports 1 target.
- Description string
- Description of the VPC link.
- Id string
- Set to the ID of the found API Gateway VPC Link.
- Name string
- Status string
- Status of the VPC link.
- Status
Message string - Status message of the VPC link.
- map[string]string
- Key-value map of resource tags
- Target
Arns []string - List of network load balancer arns in the VPC targeted by the VPC link. Currently AWS only supports 1 target.
- description String
- Description of the VPC link.
- id String
- Set to the ID of the found API Gateway VPC Link.
- name String
- status String
- Status of the VPC link.
- status
Message String - Status message of the VPC link.
- Map<String,String>
- Key-value map of resource tags
- target
Arns List<String> - List of network load balancer arns in the VPC targeted by the VPC link. Currently AWS only supports 1 target.
- description string
- Description of the VPC link.
- id string
- Set to the ID of the found API Gateway VPC Link.
- name string
- status string
- Status of the VPC link.
- status
Message string - Status message of the VPC link.
- {[key: string]: string}
- Key-value map of resource tags
- target
Arns string[] - List of network load balancer arns in the VPC targeted by the VPC link. Currently AWS only supports 1 target.
- description str
- Description of the VPC link.
- id str
- Set to the ID of the found API Gateway VPC Link.
- name str
- status str
- Status of the VPC link.
- status_
message str - Status message of the VPC link.
- Mapping[str, str]
- Key-value map of resource tags
- target_
arns Sequence[str] - List of network load balancer arns in the VPC targeted by the VPC link. Currently AWS only supports 1 target.
- description String
- Description of the VPC link.
- id String
- Set to the ID of the found API Gateway VPC Link.
- name String
- status String
- Status of the VPC link.
- status
Message String - Status message of the VPC link.
- Map<String>
- Key-value map of resource tags
- target
Arns List<String> - List of network load balancer arns in the VPC targeted by the VPC link. Currently AWS only supports 1 target.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.