aws-cdk-lib.aws_apigateway.VpcLinkProps

interface VpcLinkProps

LanguageType name
.NETAmazon.CDK.AWS.APIGateway.VpcLinkProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsapigateway#VpcLinkProps
Javasoftware.amazon.awscdk.services.apigateway.VpcLinkProps
Pythonaws_cdk.aws_apigateway.VpcLinkProps
TypeScript (source)aws-cdk-lib » aws_apigateway » VpcLinkProps

Properties for a VpcLink.

Example

import * as elbv2 from 'aws-cdk-lib/aws-elasticloadbalancingv2';

const vpc = new ec2.Vpc(this, 'VPC');
const nlb = new elbv2.NetworkLoadBalancer(this, 'NLB', {
  vpc,
});
const link = new apigateway.VpcLink(this, 'link', {
  targets: [nlb],
});

const integration = new apigateway.Integration({
  type: apigateway.IntegrationType.HTTP_PROXY,
  options: {
    connectionType: apigateway.ConnectionType.VPC_LINK,
    vpcLink: link,
  },
});

Properties

NameTypeDescription
description?stringThe description of the VPC link.
targets?INetworkLoadBalancer[]The network load balancers of the VPC targeted by the VPC link.
vpcLinkName?stringThe name used to label and identify the VPC link.

description?

Type: string (optional, default: no description)

The description of the VPC link.


targets?

Type: INetworkLoadBalancer[] (optional, default: no targets. Use addTargets to add targets)

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.


vpcLinkName?

Type: string (optional, default: automatically generated name)

The name used to label and identify the VPC link.