Class InternetGateway
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.ec2.alpha.InternetGateway
- All Implemented Interfaces:
IResource
,IRouteTarget
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-12-17T21:37:41.268Z")
@Stability(Experimental)
public class InternetGateway
extends Resource
implements IRouteTarget
(experimental) Creates an internet gateway.
Example:
Stack stack = new Stack(); VpcV2 myVpc = new VpcV2(this, "Vpc"); RouteTable routeTable = RouteTable.Builder.create(this, "RouteTable") .vpc(myVpc) .build(); SubnetV2 subnet = SubnetV2.Builder.create(this, "Subnet") .vpc(myVpc) .availabilityZone("eu-west-2a") .ipv4CidrBlock(new IpCidr("10.0.0.0/24")) .subnetType(SubnetType.PRIVATE_ISOLATED) .build(); InternetGateway igw = InternetGateway.Builder.create(this, "IGW") .vpc(myVpc) .build(); Route.Builder.create(this, "IgwRoute") .routeTable(routeTable) .destination("0.0.0.0/0") .target(Map.of("gateway", igw)) .build();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
(experimental) A fluent builder forInternetGateway
.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.ec2.alpha.IRouteTarget
IRouteTarget.Jsii$Default, IRouteTarget.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionprotected
InternetGateway
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
InternetGateway
(software.amazon.jsii.JsiiObjectRef objRef) InternetGateway
(software.constructs.Construct scope, String id, InternetGatewayProps props) -
Method Summary
Modifier and TypeMethodDescription(experimental) The internet 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 internet gateway.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
InternetGateway
protected InternetGateway(software.amazon.jsii.JsiiObjectRef objRef) -
InternetGateway
protected InternetGateway(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
InternetGateway
@Stability(Experimental) public InternetGateway(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull InternetGatewayProps props) - Parameters:
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.
-
-
Method Details
-
getResource
(experimental) The internet gateway CFN resource. -
getRouterTargetId
(experimental) The ID of the route target.- Specified by:
getRouterTargetId
in interfaceIRouteTarget
-
getRouterType
(experimental) The type of router used in the route.- Specified by:
getRouterType
in interfaceIRouteTarget
-
getVpcId
(experimental) The ID of the VPC for which to create the internet gateway.
-