VpcLinkProps
- class aws_cdk.aws_apigatewayv2.VpcLinkProps(*, vpc, security_groups=None, subnets=None, vpc_link_name=None)
Bases:
objectProperties for a VpcLink.
- Parameters:
vpc (
IVpc) – The VPC in which the private resources reside.security_groups (
Optional[Sequence[ISecurityGroupRef]]) – A list of security groups for the VPC link. Default: - no security groups. UseaddSecurityGroupsto add security groupssubnets (
Union[SubnetSelection,Dict[str,Any],None]) – A list of subnets for the VPC link. Default: - private subnets of the provided VPC. UseaddSubnetsto add more subnetsvpc_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
addSecurityGroupsto add security groups
- subnets
A list of subnets for the VPC link.
- Default:
private subnets of the provided VPC. Use
addSubnetsto add more subnets
- vpc
The VPC in which the private resources reside.
- vpc_link_name
The name used to label and identify the VPC link.
- Default:
automatically generated name