Class VPNGatewayV2
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.ec2.alpha.VPNGatewayV2
- All Implemented Interfaces:
IEnvironmentAware,IResource,IRouteTarget,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-13T16:10:18.046Z")
@Stability(Experimental)
public class VPNGatewayV2
extends Resource
implements IRouteTarget
(experimental) Creates a virtual private gateway.
Example:
Stack stack = new Stack();
VpcV2 myVpc = new VpcV2(this, "Vpc");
VPNGatewayV2 vpnGateway = myVpc.enableVpnGatewayV2(VPNGatewayV2Options.builder()
.vpnRoutePropagation(List.of(SubnetSelection.builder().subnetType(SubnetType.PUBLIC).build()))
.type(VpnConnectionType.IPSEC_1)
.build());
RouteTable routeTable = RouteTable.Builder.create(stack, "routeTable")
.vpc(myVpc)
.build();
Route.Builder.create(stack, "route")
.destination("172.31.0.0/24")
.target(Map.of("gateway", vpnGateway))
.routeTable(routeTable)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class(experimental) A fluent builder forVPNGatewayV2.Nested 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.ec2.alpha.IRouteTarget
IRouteTarget.Jsii$Default, IRouteTarget.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String(experimental) Uniquely identifies this class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedVPNGatewayV2(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedVPNGatewayV2(software.amazon.jsii.JsiiObjectRef objRef) VPNGatewayV2(software.constructs.Construct scope, String id, VPNGatewayV2Props props) -
Method Summary
Modifier and TypeMethodDescription(experimental) The VPN gateway CFN resource.(experimental) The ID of the route target.(experimental) The type of router used in the route.getVpcId()(experimental) The ID of the VPC for which to create the VPN gateway.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.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
(experimental) Uniquely identifies this class.
-
-
Constructor Details
-
VPNGatewayV2
protected VPNGatewayV2(software.amazon.jsii.JsiiObjectRef objRef) -
VPNGatewayV2
protected VPNGatewayV2(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
VPNGatewayV2
@Stability(Experimental) public VPNGatewayV2(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull VPNGatewayV2Props props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
getResource
(experimental) The VPN gateway CFN resource. -
getRouterTargetId
(experimental) The ID of the route target.- Specified by:
getRouterTargetIdin interfaceIRouteTarget
-
getRouterType
(experimental) The type of router used in the route.- Specified by:
getRouterTypein interfaceIRouteTarget
-
getVpcId
(experimental) The ID of the VPC for which to create the VPN gateway.
-