Interface InternetGatewayProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
InternetGatewayProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.121.0 (build d7af9b9)",
date="2025-12-18T18:20:21.288Z")
@Stability(Experimental)
public interface InternetGatewayProps
extends software.amazon.jsii.JsiiSerializable
(experimental) Properties to define 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
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forInternetGatewayPropsstatic final classAn implementation forInternetGatewayProps -
Method Summary
Modifier and TypeMethodDescriptionstatic InternetGatewayProps.Builderbuilder()default String(experimental) The resource name of the internet gateway.getVpc()(experimental) The ID of the VPC for which to create the internet gateway.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getVpc
(experimental) The ID of the VPC for which to create the internet gateway. -
getInternetGatewayName
(experimental) The resource name of the internet gateway.Default: - provisioned without a resource name
-
builder
- Returns:
- a
InternetGatewayProps.BuilderofInternetGatewayProps
-