java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.ec2.alpha.IpCidr
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-10-31T19:13:07.745Z") @Stability(Experimental) public class IpCidr extends software.amazon.jsii.JsiiObject
(experimental) IPv4 or IPv6 CIDR range for the subnet.

Example:

 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();
 NatGateway natgw = NatGateway.Builder.create(this, "NatGW")
         .subnet(subnet)
         .vpc(myVpc)
         .connectivityType(NatConnectivityType.PRIVATE)
         .privateIpAddress("10.0.0.42")
         .build();
 Route.Builder.create(this, "NatGwRoute")
         .routeTable(routeTable)
         .destination("0.0.0.0/0")
         .target(Map.of("gateway", natgw))
         .build();
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    IpCidr(String props)
     
    protected
    IpCidr(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    IpCidr(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (experimental) IPv6 CIDR range for the subnet Allowed only if IPv6 is enabled on VPc.

    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, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • IpCidr

      protected IpCidr(software.amazon.jsii.JsiiObjectRef objRef)
    • IpCidr

      protected IpCidr(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • IpCidr

      @Stability(Experimental) public IpCidr(@NotNull String props)
      Parameters:
      props - This parameter is required.
  • Method Details

    • getCidr

      @Stability(Experimental) @NotNull public String getCidr()
      (experimental) IPv6 CIDR range for the subnet Allowed only if IPv6 is enabled on VPc.