VpcLinkProps

class aws_cdk.aws_apigateway.VpcLinkProps(*, description=None, targets=None, vpc_link_name=None)

Bases: object

Properties for a VpcLink.

Parameters:
  • description (Optional[str]) – The description of the VPC link. Default: no description

  • targets (Optional[Sequence[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

  • 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_elasticloadbalancingv2 as elbv2


vpc = ec2.Vpc(self, "VPC")
nlb = elbv2.NetworkLoadBalancer(self, "NLB",
    vpc=vpc
)
link = apigateway.VpcLink(self, "link",
    targets=[nlb]
)

integration = apigateway.Integration(
    type=apigateway.IntegrationType.HTTP_PROXY,
    integration_http_method="ANY",
    options=apigateway.IntegrationOptions(
        connection_type=apigateway.ConnectionType.VPC_LINK,
        vpc_link=link
    )
)

Attributes

description

The description of the VPC link.

Default:

no description

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.

Default:
  • no targets. Use addTargets to add targets

The name used to label and identify the VPC link.

Default:
  • automatically generated name