Interface PoolOptions

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

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-05T03:43:53.183Z") @Stability(Experimental) public interface PoolOptions extends software.amazon.jsii.JsiiSerializable
(experimental) Options for configuring an IPAM pool.

Example:

 Stack stack = new Stack();
 Ipam ipam = Ipam.Builder.create(this, "Ipam")
         .operatingRegion(List.of("us-west-1"))
         .build();
 IIpamPool ipamPublicPool = ipam.publicScope.addPool("PublicPoolA", PoolOptions.builder()
         .addressFamily(AddressFamily.IP_V6)
         .awsService(AwsServiceName.EC2)
         .locale("us-west-1")
         .publicIpSource(IpamPoolPublicIpSource.AMAZON)
         .build());
 ipamPublicPool.provisionCidr("PublicPoolACidrA", IpamPoolCidrProvisioningOptions.builder().netmaskLength(52).build());
 IIpamPool ipamPrivatePool = ipam.privateScope.addPool("PrivatePoolA", PoolOptions.builder()
         .addressFamily(AddressFamily.IP_V4)
         .build());
 ipamPrivatePool.provisionCidr("PrivatePoolACidrA", IpamPoolCidrProvisioningOptions.builder().netmaskLength(8).build());
 VpcV2.Builder.create(this, "Vpc")
         .primaryAddressBlock(IpAddresses.ipv4("10.0.0.0/24"))
         .secondaryAddressBlocks(List.of(IpAddresses.amazonProvidedIpv6(SecondaryAddressProps.builder().cidrBlockName("AmazonIpv6").build()), IpAddresses.ipv6Ipam(IpamOptions.builder()
                 .ipamPool(ipamPublicPool)
                 .netmaskLength(52)
                 .cidrBlockName("ipv6Ipam")
                 .build()), IpAddresses.ipv4Ipam(IpamOptions.builder()
                 .ipamPool(ipamPrivatePool)
                 .netmaskLength(8)
                 .cidrBlockName("ipv4Ipam")
                 .build())))
         .build();
 

See Also:
  • Method Details

    • getAddressFamily

      @Stability(Experimental) @NotNull AddressFamily getAddressFamily()
      (experimental) addressFamily - The address family of the pool (ipv4 or ipv6).
    • getAwsService

      @Stability(Experimental) @Nullable default AwsServiceName getAwsService()
      (experimental) Limits which service in AWS that the pool can be used in.

      "ec2", for example, allows users to use space for Elastic IP addresses and VPCs.

      Default: - required in case of an IPv6, throws an error if not provided.

      See Also:
    • getIpv4ProvisionedCidrs

      @Stability(Experimental) @Nullable default List<String> getIpv4ProvisionedCidrs()
      (experimental) Information about the CIDRs provisioned to the pool.

      Default: - No CIDRs are provisioned

    • getLocale

      @Stability(Experimental) @Nullable default String getLocale()
      (experimental) The locale (AWS Region) of the pool.

      Should be one of the IPAM operating region. Only resources in the same Region as the locale of the pool can get IP address allocations from the pool. You can only allocate a CIDR for a VPC, for example, from an IPAM pool that shares a locale with the VPC’s Region. Note that once you choose a Locale for a pool, you cannot modify it. If you choose an AWS Region for locale that has not been configured as an operating Region for the IPAM, you'll get an error.

      Default: - Current operating region of IPAM

      See Also:
    • getPublicIpSource

      @Stability(Experimental) @Nullable default IpamPoolPublicIpSource getPublicIpSource()
      (experimental) The IP address source for pools in the public scope.

      Only used for IPv6 address Only allowed values to this are 'byoip' or 'amazon'

      Default: amazon

    • builder

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