VpcLink

Provides an API Gateway VPC Link.

Note: Amazon API Gateway Version 1 VPC Links enable private integrations that connect REST APIs to private resources in a VPC. To enable private integration for HTTP APIs, use the Amazon API Gateway Version 2 VPC Link resource.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleLoadBalancer = new Aws.LB.LoadBalancer("exampleLoadBalancer", new Aws.LB.LoadBalancerArgs
        {
            Internal = true,
            LoadBalancerType = "network",
            SubnetMappings = 
            {
                new Aws.LB.Inputs.LoadBalancerSubnetMappingArgs
                {
                    SubnetId = "12345",
                },
            },
        });
        var exampleVpcLink = new Aws.ApiGateway.VpcLink("exampleVpcLink", new Aws.ApiGateway.VpcLinkArgs
        {
            Description = "example description",
            TargetArn = exampleLoadBalancer.Arn,
        });
    }

}
package main

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

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        exampleLoadBalancer, err := lb.NewLoadBalancer(ctx, "exampleLoadBalancer", &lb.LoadBalancerArgs{
            Internal:         pulumi.Bool(true),
            LoadBalancerType: pulumi.String("network"),
            SubnetMappings: lb.LoadBalancerSubnetMappingArray{
                &lb.LoadBalancerSubnetMappingArgs{
                    SubnetId: pulumi.String("12345"),
                },
            },
        })
        if err != nil {
            return err
        }
        _, err = apigateway.NewVpcLink(ctx, "exampleVpcLink", &apigateway.VpcLinkArgs{
            Description: pulumi.String("example description"),
            TargetArn:   exampleLoadBalancer.Arn,
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example_load_balancer = aws.lb.LoadBalancer("exampleLoadBalancer",
    internal=True,
    load_balancer_type="network",
    subnet_mappings=[{
        "subnet_id": "12345",
    }])
example_vpc_link = aws.apigateway.VpcLink("exampleVpcLink",
    description="example description",
    target_arn=example_load_balancer.arn)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const exampleLoadBalancer = new aws.lb.LoadBalancer("example", {
    internal: true,
    loadBalancerType: "network",
    subnetMappings: [{
        subnetId: "12345",
    }],
});
const exampleVpcLink = new aws.apigateway.VpcLink("example", {
    description: "example description",
    targetArn: exampleLoadBalancer.arn,
});

Create a VpcLink Resource

new VpcLink(name: string, args: VpcLinkArgs, opts?: CustomResourceOptions);
def VpcLink(resource_name, opts=None, description=None, name=None, tags=None, target_arn=None, __props__=None);
func NewVpcLink(ctx *Context, name string, args VpcLinkArgs, opts ...ResourceOption) (*VpcLink, error)
public VpcLink(string name, VpcLinkArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args VpcLinkArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args VpcLinkArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args VpcLinkArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

VpcLink Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The VpcLink resource accepts the following input properties:

TargetArn 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.

Name string

The name used to label and identify the VPC link.

Tags Dictionary<string, string>

Key-value map of resource tags

TargetArn 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.

Name string

The name used to label and identify the VPC link.

Tags map[string]string

Key-value map of resource tags

targetArn 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.

name string

The name used to label and identify the VPC link.

tags {[key: string]: string}

Key-value map of resource tags

target_arn str

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.

name str

The name used to label and identify the VPC link.

tags Dict[str, str]

Key-value map of resource tags

Outputs

All input properties are implicitly available as output properties. Additionally, the VpcLink resource produces the following output properties:

Arn string
Id string
The provider-assigned unique ID for this managed resource.
Arn string
Id string
The provider-assigned unique ID for this managed resource.
arn string
id string
The provider-assigned unique ID for this managed resource.
arn str
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing VpcLink Resource

Get an existing VpcLink resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: VpcLinkState, opts?: CustomResourceOptions): VpcLink
static get(resource_name, id, opts=None, arn=None, description=None, name=None, tags=None, target_arn=None, __props__=None);
func GetVpcLink(ctx *Context, name string, id IDInput, state *VpcLinkState, opts ...ResourceOption) (*VpcLink, error)
public static VpcLink Get(string name, Input<string> id, VpcLinkState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Arn string
Description string

The description of the VPC link.

Name string

The name used to label and identify the VPC link.

Tags Dictionary<string, string>

Key-value map of resource tags

TargetArn string

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

Arn string
Description string

The description of the VPC link.

Name string

The name used to label and identify the VPC link.

Tags map[string]string

Key-value map of resource tags

TargetArn string

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

arn string
description string

The description of the VPC link.

name string

The name used to label and identify the VPC link.

tags {[key: string]: string}

Key-value map of resource tags

targetArn string

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

arn str
description str

The description of the VPC link.

name str

The name used to label and identify the VPC link.

tags Dict[str, str]

Key-value map of resource tags

target_arn 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.