VpcLink

Manages an Amazon API Gateway Version 2 VPC Link.

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

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.ApiGatewayV2.VpcLink("example", new Aws.ApiGatewayV2.VpcLinkArgs
        {
            SecurityGroupIds = 
            {
                data.Aws_security_group.Example.Id,
            },
            SubnetIds = data.Aws_subnet_ids.Example.Ids,
            Tags = 
            {
                { "Usage", "example" },
            },
        });
    }

}
package main

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

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := apigatewayv2.NewVpcLink(ctx, "example", &apigatewayv2.VpcLinkArgs{
            SecurityGroupIds: pulumi.StringArray{
                pulumi.String(data.Aws_security_group.Example.Id),
            },
            SubnetIds: data.Aws_subnet_ids.Example.Ids,
            Tags: pulumi.StringMap{
                "Usage": pulumi.String("example"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.apigatewayv2.VpcLink("example",
    security_group_ids=[data["aws_security_group"]["example"]["id"]],
    subnet_ids=data["aws_subnet_ids"]["example"]["ids"],
    tags={
        "Usage": "example",
    })
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.apigatewayv2.VpcLink("example", {
    securityGroupIds: [data.aws_security_group.example.id],
    subnetIds: data.aws_subnet_ids.example.ids,
    tags: {
        Usage: "example",
    },
});

Create a VpcLink Resource

new VpcLink(name: string, args: VpcLinkArgs, opts?: CustomResourceOptions);
def VpcLink(resource_name, opts=None, name=None, security_group_ids=None, subnet_ids=None, tags=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:

SecurityGroupIds List<string>

Security group IDs for the VPC Link.

SubnetIds List<string>

Subnet IDs for the VPC Link.

Name string

The name of the VPC Link.

Tags Dictionary<string, string>

A map of tags to assign to the VPC Link.

SecurityGroupIds []string

Security group IDs for the VPC Link.

SubnetIds []string

Subnet IDs for the VPC Link.

Name string

The name of the VPC Link.

Tags map[string]string

A map of tags to assign to the VPC Link.

securityGroupIds string[]

Security group IDs for the VPC Link.

subnetIds string[]

Subnet IDs for the VPC Link.

name string

The name of the VPC Link.

tags {[key: string]: string}

A map of tags to assign to the VPC Link.

security_group_ids List[str]

Security group IDs for the VPC Link.

subnet_ids List[str]

Subnet IDs for the VPC Link.

name str

The name of the VPC Link.

tags Dict[str, str]

A map of tags to assign to the VPC Link.

Outputs

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

Arn string

The VPC Link ARN.

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

The VPC Link ARN.

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

The VPC Link ARN.

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

The VPC Link ARN.

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, name=None, security_group_ids=None, subnet_ids=None, tags=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

The VPC Link ARN.

Name string

The name of the VPC Link.

SecurityGroupIds List<string>

Security group IDs for the VPC Link.

SubnetIds List<string>

Subnet IDs for the VPC Link.

Tags Dictionary<string, string>

A map of tags to assign to the VPC Link.

Arn string

The VPC Link ARN.

Name string

The name of the VPC Link.

SecurityGroupIds []string

Security group IDs for the VPC Link.

SubnetIds []string

Subnet IDs for the VPC Link.

Tags map[string]string

A map of tags to assign to the VPC Link.

arn string

The VPC Link ARN.

name string

The name of the VPC Link.

securityGroupIds string[]

Security group IDs for the VPC Link.

subnetIds string[]

Subnet IDs for the VPC Link.

tags {[key: string]: string}

A map of tags to assign to the VPC Link.

arn str

The VPC Link ARN.

name str

The name of the VPC Link.

security_group_ids List[str]

Security group IDs for the VPC Link.

subnet_ids List[str]

Subnet IDs for the VPC Link.

tags Dict[str, str]

A map of tags to assign to the VPC Link.

Package Details

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