Interface InternetGatewayProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
InternetGatewayProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-12-17T21:37:41.269Z") @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();
 
  • Method Details

    • getVpc

      @Stability(Experimental) @NotNull IVpcV2 getVpc()
      (experimental) The ID of the VPC for which to create the internet gateway.
    • getInternetGatewayName

      @Stability(Experimental) @Nullable default String getInternetGatewayName()
      (experimental) The resource name of the internet gateway.

      Default: - provisioned without a resource name

    • builder

      @Stability(Experimental) static InternetGatewayProps.Builder builder()
      Returns:
      a InternetGatewayProps.Builder of InternetGatewayProps