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 System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.ApiGatewayV2.VpcLink("example", new()
    {
        SecurityGroupIds = new[]
        {
            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/v5/go/aws/apigatewayv2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

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

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.apigatewayv2.VpcLink;
import com.pulumi.aws.apigatewayv2.VpcLinkArgs;
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) {
        var example = new VpcLink("example", VpcLinkArgs.builder()        
            .securityGroupIds(data.aws_security_group().example().id())
            .subnetIds(data.aws_subnet_ids().example().ids())
            .tags(Map.of("Usage", "example"))
            .build());

    }
}
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",
    },
});
resources:
  example:
    type: aws:apigatewayv2:VpcLink
    properties:
      securityGroupIds:
        - ${data.aws_security_group.example.id}
      subnetIds: ${data.aws_subnet_ids.example.ids}
      tags:
        Usage: example

Create VpcLink Resource

new VpcLink(name: string, args: VpcLinkArgs, opts?: CustomResourceOptions);
@overload
def VpcLink(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            security_group_ids: Optional[Sequence[str]] = None,
            subnet_ids: Optional[Sequence[str]] = None,
            tags: Optional[Mapping[str, str]] = None)
@overload
def VpcLink(resource_name: str,
            args: VpcLinkArgs,
            opts: Optional[ResourceOptions] = None)
func NewVpcLink(ctx *Context, name string, args VpcLinkArgs, opts ...ResourceOption) (*VpcLink, error)
public VpcLink(string name, VpcLinkArgs args, CustomResourceOptions? opts = null)
public VpcLink(String name, VpcLinkArgs args)
public VpcLink(String name, VpcLinkArgs args, CustomResourceOptions options)
type: aws:apigatewayv2:VpcLink
properties: # The arguments to resource properties.
options: # 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.
resource_name str
The unique name of the resource.
args VpcLinkArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control 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.
name String
The unique name of the resource.
args VpcLinkArgs
The arguments to resource properties.
options 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 Architecture and Concepts 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

Name of the VPC Link. Must be between 1 and 128 characters in length.

Tags Dictionary<string, string>

Map of tags to assign to the VPC Link. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

SecurityGroupIds []string

Security group IDs for the VPC Link.

SubnetIds []string

Subnet IDs for the VPC Link.

Name string

Name of the VPC Link. Must be between 1 and 128 characters in length.

Tags map[string]string

Map of tags to assign to the VPC Link. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

securityGroupIds List<String>

Security group IDs for the VPC Link.

subnetIds List<String>

Subnet IDs for the VPC Link.

name String

Name of the VPC Link. Must be between 1 and 128 characters in length.

tags Map<String,String>

Map of tags to assign to the VPC Link. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

securityGroupIds string[]

Security group IDs for the VPC Link.

subnetIds string[]

Subnet IDs for the VPC Link.

name string

Name of the VPC Link. Must be between 1 and 128 characters in length.

tags {[key: string]: string}

Map of tags to assign to the VPC Link. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

security_group_ids Sequence[str]

Security group IDs for the VPC Link.

subnet_ids Sequence[str]

Subnet IDs for the VPC Link.

name str

Name of the VPC Link. Must be between 1 and 128 characters in length.

tags Mapping[str, str]

Map of tags to assign to the VPC Link. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

securityGroupIds List<String>

Security group IDs for the VPC Link.

subnetIds List<String>

Subnet IDs for the VPC Link.

name String

Name of the VPC Link. Must be between 1 and 128 characters in length.

tags Map<String>

Map of tags to assign to the VPC Link. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Outputs

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

Arn string

VPC Link ARN.

Id string

The provider-assigned unique ID for this managed resource.

TagsAll Dictionary<string, string>

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Arn string

VPC Link ARN.

Id string

The provider-assigned unique ID for this managed resource.

TagsAll map[string]string

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

VPC Link ARN.

id String

The provider-assigned unique ID for this managed resource.

tagsAll Map<String,String>

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn string

VPC Link ARN.

id string

The provider-assigned unique ID for this managed resource.

tagsAll {[key: string]: string}

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn str

VPC Link ARN.

id str

The provider-assigned unique ID for this managed resource.

tags_all Mapping[str, str]

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

VPC Link ARN.

id String

The provider-assigned unique ID for this managed resource.

tagsAll Map<String>

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Look up 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
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        name: Optional[str] = None,
        security_group_ids: Optional[Sequence[str]] = None,
        subnet_ids: Optional[Sequence[str]] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None) -> VpcLink
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)
public static VpcLink get(String name, Output<String> id, VpcLinkState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
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

VPC Link ARN.

Name string

Name of the VPC Link. Must be between 1 and 128 characters in length.

SecurityGroupIds List<string>

Security group IDs for the VPC Link.

SubnetIds List<string>

Subnet IDs for the VPC Link.

Tags Dictionary<string, string>

Map of tags to assign to the VPC Link. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

TagsAll Dictionary<string, string>

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Arn string

VPC Link ARN.

Name string

Name of the VPC Link. Must be between 1 and 128 characters in length.

SecurityGroupIds []string

Security group IDs for the VPC Link.

SubnetIds []string

Subnet IDs for the VPC Link.

Tags map[string]string

Map of tags to assign to the VPC Link. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

TagsAll map[string]string

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

VPC Link ARN.

name String

Name of the VPC Link. Must be between 1 and 128 characters in length.

securityGroupIds List<String>

Security group IDs for the VPC Link.

subnetIds List<String>

Subnet IDs for the VPC Link.

tags Map<String,String>

Map of tags to assign to the VPC Link. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll Map<String,String>

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn string

VPC Link ARN.

name string

Name of the VPC Link. Must be between 1 and 128 characters in length.

securityGroupIds string[]

Security group IDs for the VPC Link.

subnetIds string[]

Subnet IDs for the VPC Link.

tags {[key: string]: string}

Map of tags to assign to the VPC Link. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll {[key: string]: string}

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn str

VPC Link ARN.

name str

Name of the VPC Link. Must be between 1 and 128 characters in length.

security_group_ids Sequence[str]

Security group IDs for the VPC Link.

subnet_ids Sequence[str]

Subnet IDs for the VPC Link.

tags Mapping[str, str]

Map of tags to assign to the VPC Link. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tags_all Mapping[str, str]

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

VPC Link ARN.

name String

Name of the VPC Link. Must be between 1 and 128 characters in length.

securityGroupIds List<String>

Security group IDs for the VPC Link.

subnetIds List<String>

Subnet IDs for the VPC Link.

tags Map<String>

Map of tags to assign to the VPC Link. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll Map<String>

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Import

aws_apigatewayv2_vpc_link can be imported by using the VPC Link identifier, e.g.,

 $ pulumi import aws:apigatewayv2/vpcLink:VpcLink example aabbccddee

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.