AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

VpcLink

Define a new VPC Link Specifies an API Gateway VPC link for a HTTP API to access resources in an Amazon Virtual Private Cloud (VPC).

Import

import { VpcLink } from 'aws-cdk-lib/aws-apigatewayv2';

Or use the module namespace:

import * as apigatewayv2 from 'aws-cdk-lib/aws-apigatewayv2';
// apigatewayv2.VpcLink

Properties

Configuration passed to the constructor as VpcLinkProps.

vpcRequired
IVpc

The VPC in which the private resources reside.

securityGroupsOptional
ISecurityGroupRef[]

A list of security groups for the VPC link.

Default: - no security groups. Use `addSecurityGroups` to add security groups

subnetsOptional
SubnetSelection

A list of subnets for the VPC link.

Default: - private subnets of the provided VPC. Use `addSubnets` to add more subnets

vpcLinkNameOptional
string

The name used to label and identify the VPC link.

Default: - automatically generated name

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter