All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awscdk.services.ec2.alpha.VPNGatewayV2 Maven / Gradle / Ivy

There is a newer version: 2.167.2-alpha.0
Show newest version
package software.amazon.awscdk.services.ec2.alpha;

/**
 * (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();
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-11-15T10:25:09.197Z") @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.ec2.alpha.$Module.class, fqn = "@aws-cdk/aws-ec2-alpha.VPNGatewayV2") public class VPNGatewayV2 extends software.amazon.awscdk.Resource implements software.amazon.awscdk.services.ec2.alpha.IRouteTarget { protected VPNGatewayV2(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected VPNGatewayV2(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { super(initializationMode); } /** * @param scope This parameter is required. * @param id This parameter is required. * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public VPNGatewayV2(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.alpha.VPNGatewayV2Props props) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") }); } /** * (experimental) The VPN gateway CFN resource. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.CfnVPNGateway getResource() { return software.amazon.jsii.Kernel.get(this, "resource", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.CfnVPNGateway.class)); } /** * (experimental) The ID of the route target. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getRouterTargetId() { return software.amazon.jsii.Kernel.get(this, "routerTargetId", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * (experimental) The type of router used in the route. */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.RouterType getRouterType() { return software.amazon.jsii.Kernel.get(this, "routerType", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.RouterType.class)); } /** * (experimental) The ID of the VPC for which to create the VPN gateway. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getVpcId() { return software.amazon.jsii.Kernel.get(this, "vpcId", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * (experimental) A fluent builder for {@link software.amazon.awscdk.services.ec2.alpha.VPNGatewayV2}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { /** * @return a new instance of {@link Builder}. * @param scope This parameter is required. * @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static Builder create(final software.constructs.Construct scope, final java.lang.String id) { return new Builder(scope, id); } private final software.constructs.Construct scope; private final java.lang.String id; private final software.amazon.awscdk.services.ec2.alpha.VPNGatewayV2Props.Builder props; private Builder(final software.constructs.Construct scope, final java.lang.String id) { this.scope = scope; this.id = id; this.props = new software.amazon.awscdk.services.ec2.alpha.VPNGatewayV2Props.Builder(); } /** * (experimental) The type of VPN connection the virtual private gateway supports. *

* @return {@code this} * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpngateway.html#cfn-ec2-vpngateway-type * @param type The type of VPN connection the virtual private gateway supports. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder type(final software.amazon.awscdk.services.ec2.VpnConnectionType type) { this.props.type(type); return this; } /** * (experimental) The private Autonomous System Number (ASN) for the Amazon side of a BGP session. *

* Default: - no ASN set for BGP session *

* @return {@code this} * @param amazonSideAsn The private Autonomous System Number (ASN) for the Amazon side of a BGP session. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder amazonSideAsn(final java.lang.Number amazonSideAsn) { this.props.amazonSideAsn(amazonSideAsn); return this; } /** * (experimental) The resource name of the VPN gateway. *

* Default: - resource provisioned without any name *

* @return {@code this} * @param vpnGatewayName The resource name of the VPN gateway. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder vpnGatewayName(final java.lang.String vpnGatewayName) { this.props.vpnGatewayName(vpnGatewayName); return this; } /** * (experimental) Subnets where the route propagation should be added. *

* Default: - no propogation for routes *

* @return {@code this} * @param vpnRoutePropagation Subnets where the route propagation should be added. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder vpnRoutePropagation(final java.util.List vpnRoutePropagation) { this.props.vpnRoutePropagation(vpnRoutePropagation); return this; } /** * (experimental) The ID of the VPC for which to create the VPN gateway. *

* @return {@code this} * @param vpc The ID of the VPC for which to create the VPN gateway. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder vpc(final software.amazon.awscdk.services.ec2.alpha.IVpcV2 vpc) { this.props.vpc(vpc); return this; } /** * @return a newly built instance of {@link software.amazon.awscdk.services.ec2.alpha.VPNGatewayV2}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public software.amazon.awscdk.services.ec2.alpha.VPNGatewayV2 build() { return new software.amazon.awscdk.services.ec2.alpha.VPNGatewayV2( this.scope, this.id, this.props.build() ); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy