Class VpcLink
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.apigateway.VpcLink
- All Implemented Interfaces:
IVpcLinkRef,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.764Z")
@Stability(Stable)
public class VpcLink
extends Resource
implements IVpcLink
Define a new VPC Link Specifies an API Gateway VPC link for a RestApi to access resources in an Amazon Virtual Private Cloud (VPC).
Example:
import software.amazon.awscdk.services.elasticloadbalancingv2.*;
Vpc vpc = new Vpc(this, "VPC");
NetworkLoadBalancer nlb = NetworkLoadBalancer.Builder.create(this, "NLB")
.vpc(vpc)
.build();
VpcLink link = VpcLink.Builder.create(this, "link")
.targets(List.of(nlb))
.build();
Integration integration = Integration.Builder.create()
.type(IntegrationType.HTTP_PROXY)
.integrationHttpMethod("ANY")
.options(IntegrationOptions.builder()
.connectionType(ConnectionType.VPC_LINK)
.vpcLink(link)
.build())
.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.apigateway.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 TypeMethodDescriptionvoidaddTargets(INetworkLoadBalancer... targets) static IVpcLinkfromVpcLinkId(software.constructs.Construct scope, String id, String vpcLinkId) Import a VPC Link by its Id.Physical ID of the VpcLink resource.A reference to a 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.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.awscdk.services.apigateway.IVpcLink
getEnv, getNodeMethods 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, @Nullable VpcLinkProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
VpcLink
- Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Details
-
fromVpcLinkId
@Stability(Stable) @NotNull public static IVpcLink fromVpcLinkId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String vpcLinkId) Import a VPC Link by its Id.- Parameters:
scope- This parameter is required.id- This parameter is required.vpcLinkId- This parameter is required.
-
addTargets
- Parameters:
targets- This parameter is required.
-
getVpcLinkId
Physical ID of the VpcLink resource.- Specified by:
getVpcLinkIdin interfaceIVpcLink
-
getVpcLinkRef
A reference to a VpcLink resource.- Specified by:
getVpcLinkRefin interfaceIVpcLinkRef
-