AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

VpcLink

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

Import

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

Or use the module namespace:

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

Properties

Configuration passed to the constructor as VpcLinkProps.

descriptionOptional
string

The description of the VPC link.

Default: no description

targetsOptional
INetworkLoadBalancer[]

The network load balancers of the VPC targeted by the VPC link. The network load balancers must be owned by the same AWS account of the API owner.

Default: - no targets. Use `addTargets` to add targets

vpcLinkNameOptional
string

The name used to label and identify the VPC link.

Default: - automatically generated name

Get the Amazon API Gateway Cheat Sheet

Everything you need to know about Amazon API Gateway on one page. HD quality, print-friendly.

Download Free Infographic