Try AWS Native preview for resources not in the classic version.
aws.apigatewayv2.VpcLink
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.apigatewayv2.VpcLink("example", {
name: "example",
securityGroupIds: [exampleAwsSecurityGroup.id],
subnetIds: exampleAwsSubnets.ids,
tags: {
Usage: "example",
},
});
import pulumi
import pulumi_aws as aws
example = aws.apigatewayv2.VpcLink("example",
name="example",
security_group_ids=[example_aws_security_group["id"]],
subnet_ids=example_aws_subnets["ids"],
tags={
"Usage": "example",
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/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{
Name: pulumi.String("example"),
SecurityGroupIds: pulumi.StringArray{
exampleAwsSecurityGroup.Id,
},
SubnetIds: pulumi.Any(exampleAwsSubnets.Ids),
Tags: pulumi.StringMap{
"Usage": pulumi.String("example"),
},
})
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 example = new Aws.ApiGatewayV2.VpcLink("example", new()
{
Name = "example",
SecurityGroupIds = new[]
{
exampleAwsSecurityGroup.Id,
},
SubnetIds = exampleAwsSubnets.Ids,
Tags =
{
{ "Usage", "example" },
},
});
});
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()
.name("example")
.securityGroupIds(exampleAwsSecurityGroup.id())
.subnetIds(exampleAwsSubnets.ids())
.tags(Map.of("Usage", "example"))
.build());
}
}
resources:
example:
type: aws:apigatewayv2:VpcLink
properties:
name: example
securityGroupIds:
- ${exampleAwsSecurityGroup.id}
subnetIds: ${exampleAwsSubnets.ids}
tags:
Usage: example
Create VpcLink Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VpcLink(name: string, args: VpcLinkArgs, opts?: CustomResourceOptions);
@overload
def VpcLink(resource_name: str,
args: VpcLinkArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VpcLink(resource_name: str,
opts: Optional[ResourceOptions] = None,
security_group_ids: Optional[Sequence[str]] = None,
subnet_ids: Optional[Sequence[str]] = None,
name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var awsVpcLinkResource = new Aws.ApiGatewayV2.VpcLink("awsVpcLinkResource", new()
{
SecurityGroupIds = new[]
{
"string",
},
SubnetIds = new[]
{
"string",
},
Name = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := apigatewayv2.NewVpcLink(ctx, "awsVpcLinkResource", &apigatewayv2.VpcLinkArgs{
SecurityGroupIds: pulumi.StringArray{
pulumi.String("string"),
},
SubnetIds: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var awsVpcLinkResource = new VpcLink("awsVpcLinkResource", VpcLinkArgs.builder()
.securityGroupIds("string")
.subnetIds("string")
.name("string")
.tags(Map.of("string", "string"))
.build());
aws_vpc_link_resource = aws.apigatewayv2.VpcLink("awsVpcLinkResource",
security_group_ids=["string"],
subnet_ids=["string"],
name="string",
tags={
"string": "string",
})
const awsVpcLinkResource = new aws.apigatewayv2.VpcLink("awsVpcLinkResource", {
securityGroupIds: ["string"],
subnetIds: ["string"],
name: "string",
tags: {
string: "string",
},
});
type: aws:apigatewayv2:VpcLink
properties:
name: string
securityGroupIds:
- string
subnetIds:
- string
tags:
string: string
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:
- Security
Group List<string>Ids - Security group IDs for the VPC Link.
- Subnet
Ids List<string> - Subnet IDs for the VPC Link.
- Name string
- Name of the VPC Link. Must be between 1 and 128 characters in length.
- 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.
- Security
Group []stringIds - Security group IDs for the VPC Link.
- Subnet
Ids []string - Subnet IDs for the VPC Link.
- Name string
- Name of the VPC Link. Must be between 1 and 128 characters in length.
- 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.
- security
Group List<String>Ids - Security group IDs for the VPC Link.
- subnet
Ids List<String> - Subnet IDs for the VPC Link.
- name String
- Name of the VPC Link. Must be between 1 and 128 characters in length.
- 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.
- security
Group string[]Ids - Security group IDs for the VPC Link.
- subnet
Ids string[] - Subnet IDs for the VPC Link.
- name string
- Name of the VPC Link. Must be between 1 and 128 characters in length.
- {[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_ Sequence[str]ids - 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.
- 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.
- security
Group List<String>Ids - Security group IDs for the VPC Link.
- subnet
Ids List<String> - Subnet IDs for the VPC Link.
- name String
- Name of the VPC Link. Must be between 1 and 128 characters in length.
- 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:
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.
- Arn string
- VPC Link ARN.
- Name string
- Name of the VPC Link. Must be between 1 and 128 characters in length.
- Security
Group List<string>Ids - Security group IDs for the VPC Link.
- Subnet
Ids List<string> - Subnet IDs for the VPC Link.
- 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. - 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.
- Security
Group []stringIds - Security group IDs for the VPC Link.
- Subnet
Ids []string - Subnet IDs for the VPC Link.
- 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. - 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.
- security
Group List<String>Ids - Security group IDs for the VPC Link.
- subnet
Ids List<String> - Subnet IDs for the VPC Link.
- 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. - 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.
- security
Group string[]Ids - Security group IDs for the VPC Link.
- subnet
Ids string[] - Subnet IDs for the VPC Link.
- {[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. - {[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_ Sequence[str]ids - Security group IDs for the VPC Link.
- subnet_
ids Sequence[str] - Subnet IDs for the VPC Link.
- 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. - 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.
- security
Group List<String>Ids - Security group IDs for the VPC Link.
- subnet
Ids List<String> - Subnet IDs for the VPC Link.
- 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. - Map<String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Import
Using pulumi import
, import aws_apigatewayv2_vpc_link
using the VPC Link identifier. For example:
$ pulumi import aws:apigatewayv2/vpcLink:VpcLink example aabbccddee
To learn more about importing existing cloud resources, see Importing resources.
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.