All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awscdk.services.ec2.alpha.Ipam Maven / Gradle / Ivy

There is a newer version: 2.167.2-alpha.0
Show newest version
package software.amazon.awscdk.services.ec2.alpha;

/**
 * (experimental) Creates new IPAM with default public and private scope.
 * 

* 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 https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipamscope.html */ @javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-11-15T10:25:09.185Z") @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.ec2.alpha.$Module.class, fqn = "@aws-cdk/aws-ec2-alpha.Ipam") public class Ipam extends software.amazon.awscdk.Resource { protected Ipam(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected Ipam(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { super(initializationMode); } /** * @param scope This parameter is required. * @param id This parameter is required. * @param props */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Ipam(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.alpha.IpamProps props) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), props }); } /** * @param scope This parameter is required. * @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Ipam(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required") }); } /** * (experimental) Function to add custom scope to an existing IPAM Custom scopes can only be private. *

* @param scope This parameter is required. * @param id This parameter is required. * @param options This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.alpha.IIpamScopeBase addScope(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.alpha.IpamScopeOptions options) { return software.amazon.jsii.Kernel.call(this, "addScope", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.alpha.IIpamScopeBase.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(options, "options is required") }); } /** * (experimental) Access to Ipam resource id that can be used later to add a custom private scope to this IPAM. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.lang.String getIpamId() { return software.amazon.jsii.Kernel.get(this, "ipamId", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * (experimental) List of operating regions for IPAM. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.util.List getOperatingRegions() { return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "operatingRegions", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); } /** * (experimental) Provides access to default private IPAM scope through add pool method. *

* Usage: To add an Ipam Pool to a default private scope *

* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipamscope.html */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.alpha.IIpamScopeBase getPrivateScope() { return software.amazon.jsii.Kernel.get(this, "privateScope", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.alpha.IIpamScopeBase.class)); } /** * (experimental) Provides access to default public IPAM scope through add pool method. *

* Usage: To add an Ipam Pool to a default public scope *

* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipamscope.html */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.alpha.IIpamScopeBase getPublicScope() { return software.amazon.jsii.Kernel.get(this, "publicScope", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.alpha.IIpamScopeBase.class)); } /** * (experimental) List of scopes created under this IPAM. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public @org.jetbrains.annotations.NotNull java.util.List getScopes() { return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "scopes", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.alpha.IIpamScopeBase.class)))); } /** * (experimental) A fluent builder for {@link software.amazon.awscdk.services.ec2.alpha.Ipam}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { /** * @return a new instance of {@link Builder}. * @param scope This parameter is required. * @param id This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static Builder create(final software.constructs.Construct scope, final java.lang.String id) { return new Builder(scope, id); } private final software.constructs.Construct scope; private final java.lang.String id; private software.amazon.awscdk.services.ec2.alpha.IpamProps.Builder props; private Builder(final software.constructs.Construct scope, final java.lang.String id) { this.scope = scope; this.id = id; } /** * (experimental) Name of IPAM that can be used for tagging resource. *

* Default: - If no name provided, no tags will be added to the IPAM *

* @return {@code this} * @param ipamName Name of IPAM that can be used for tagging resource. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder ipamName(final java.lang.String ipamName) { this.props().ipamName(ipamName); return this; } /** * (experimental) The operating Regions for an IPAM. *

* Operating Regions are AWS Regions where the IPAM is allowed to manage IP address CIDRs * For more information about operating Regions, see Create an IPAM in the Amazon VPC IPAM User Guide . *

* Default: - Stack.region if defined in the stack *

* @return {@code this} * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipam.html#cfn-ec2-ipam-operatingregions * @param operatingRegion The operating Regions for an IPAM. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder operatingRegion(final java.util.List operatingRegion) { this.props().operatingRegion(operatingRegion); return this; } /** * @return a newly built instance of {@link software.amazon.awscdk.services.ec2.alpha.Ipam}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public software.amazon.awscdk.services.ec2.alpha.Ipam build() { return new software.amazon.awscdk.services.ec2.alpha.Ipam( this.scope, this.id, this.props != null ? this.props.build() : null ); } private software.amazon.awscdk.services.ec2.alpha.IpamProps.Builder props() { if (this.props == null) { this.props = new software.amazon.awscdk.services.ec2.alpha.IpamProps.Builder(); } return this.props; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy