VpcLinkProps

class aws_cdk.aws_apigatewayv2.VpcLinkProps(*, vpc, security_groups=None, subnets=None, vpc_link_name=None)

Bases: object

Properties for a VpcLink.

Parameters:
  • vpc (IVpc) – The VPC in which the private resources reside.

  • security_groups (Optional[Sequence[ISecurityGroup]]) – A list of security groups for the VPC link. Default: - no security groups. Use addSecurityGroups to add security groups

  • subnets (Union[SubnetSelection, Dict[str, Any], None]) – A list of subnets for the VPC link. Default: - private subnets of the provided VPC. Use addSubnets to add more subnets

  • vpc_link_name (Optional[str]) – The name used to label and identify the VPC link. Default: - automatically generated name

ExampleMetadata:

infused

Example:

import aws_cdk.aws_ec2 as ec2
import aws_cdk.aws_elasticloadbalancingv2 as elb
from aws_cdk.aws_apigatewayv2_integrations import HttpAlbIntegration


vpc = ec2.Vpc(self, "VPC")
alb = elb.ApplicationLoadBalancer(self, "AppLoadBalancer", vpc=vpc)

vpc_link = apigwv2.VpcLink(self, "VpcLink", vpc=vpc)

# Creating an HTTP ALB Integration:
alb_integration = HttpAlbIntegration("ALBIntegration", alb.listeners[0])

Attributes

security_groups

A list of security groups for the VPC link.

Default:
  • no security groups. Use addSecurityGroups to add security groups

subnets

A list of subnets for the VPC link.

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

vpc

The VPC in which the private resources reside.

The name used to label and identify the VPC link.

Default:
  • automatically generated name