Class VpcLink
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.apigatewayv2.VpcLink
- All Implemented Interfaces:
IEnvironmentAware,IResource,IVpcLink,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-20T23:37:13.915Z")
@Stability(Stable)
public class VpcLink
extends Resource
implements IVpcLink
Define a new VPC Link Specifies an API Gateway VPC link for a HTTP API to access resources in an Amazon Virtual Private Cloud (VPC).
Example:
import software.amazon.awscdk.services.ec2.*;
import software.amazon.awscdk.services.elasticloadbalancingv2.*;
import software.amazon.awscdk.aws_apigatewayv2_integrations.HttpAlbIntegration;
Vpc vpc = new Vpc(this, "VPC");
ApplicationLoadBalancer alb = ApplicationLoadBalancer.Builder.create(this, "AppLoadBalancer").vpc(vpc).build();
VpcLink vpcLink = VpcLink.Builder.create(this, "VpcLink").vpc(vpc).build();
// Creating an HTTP ALB Integration:
HttpAlbIntegration albIntegration = HttpAlbIntegration.Builder.create("ALBIntegration", alb.getListeners()[0]).build();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.apigatewayv2.IVpcLink
IVpcLink.Jsii$Default, IVpcLink.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedVpcLink(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedVpcLink(software.amazon.jsii.JsiiObjectRef objRef) VpcLink(software.constructs.Construct scope, String id, VpcLinkProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSecurityGroups(ISecurityGroupRef... groups) Adds the provided security groups to the vpc link.voidaddSubnets(ISubnetRef... subnets) Adds the provided subnets to the vpc link.static IVpcLinkfromVpcLinkAttributes(software.constructs.Construct scope, String id, VpcLinkAttributes attrs) Import a VPC Link by specifying its attributes.getVpc()The VPC to which this VPC Link is associated with.Physical ID of the VpcLink resource.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
VpcLink
protected VpcLink(software.amazon.jsii.JsiiObjectRef objRef) -
VpcLink
protected VpcLink(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
VpcLink
@Stability(Stable) public VpcLink(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull VpcLinkProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
fromVpcLinkAttributes
@Stability(Stable) @NotNull public static IVpcLink fromVpcLinkAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull VpcLinkAttributes attrs) Import a VPC Link by specifying its attributes.- Parameters:
scope- This parameter is required.id- This parameter is required.attrs- This parameter is required.
-
addSecurityGroups
Adds the provided security groups to the vpc link.- Parameters:
groups- This parameter is required.
-
addSubnets
Adds the provided subnets to the vpc link.- Parameters:
subnets- This parameter is required.
-
getVpc
The VPC to which this VPC Link is associated with. -
getVpcLinkId
Physical ID of the VpcLink resource.- Specified by:
getVpcLinkIdin interfaceIVpcLink
-