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

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

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

/**
 * (experimental) Options to create a new Ipam in the account.
 * 

* 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();
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-11-15T10:25:09.187Z") @software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.ec2.alpha.$Module.class, fqn = "@aws-cdk/aws-ec2-alpha.IpamProps") @software.amazon.jsii.Jsii.Proxy(IpamProps.Jsii$Proxy.class) @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public interface IpamProps extends software.amazon.jsii.JsiiSerializable { /** * (experimental) Name of IPAM that can be used for tagging resource. *

* Default: - If no name provided, no tags will be added to the IPAM */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getIpamName() { return null; } /** * (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 *

* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ipam.html#cfn-ec2-ipam-operatingregions */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.util.List getOperatingRegion() { return null; } /** * @return a {@link Builder} of {@link IpamProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link IpamProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { java.lang.String ipamName; java.util.List operatingRegion; /** * Sets the value of {@link IpamProps#getIpamName} * @param ipamName Name of IPAM that can be used for tagging resource. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder ipamName(java.lang.String ipamName) { this.ipamName = ipamName; return this; } /** * Sets the value of {@link IpamProps#getOperatingRegion} * @param operatingRegion 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 . * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder operatingRegion(java.util.List operatingRegion) { this.operatingRegion = operatingRegion; return this; } /** * Builds the configured instance. * @return a new instance of {@link IpamProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public IpamProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link IpamProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements IpamProps { private final java.lang.String ipamName; private final java.util.List operatingRegion; /** * Constructor that initializes the object based on values retrieved from the JsiiObject. * @param objRef Reference to the JSII managed object. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); this.ipamName = software.amazon.jsii.Kernel.get(this, "ipamName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.operatingRegion = software.amazon.jsii.Kernel.get(this, "operatingRegion", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ protected Jsii$Proxy(final Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.ipamName = builder.ipamName; this.operatingRegion = builder.operatingRegion; } @Override public final java.lang.String getIpamName() { return this.ipamName; } @Override public final java.util.List getOperatingRegion() { return this.operatingRegion; } @Override @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); if (this.getIpamName() != null) { data.set("ipamName", om.valueToTree(this.getIpamName())); } if (this.getOperatingRegion() != null) { data.set("operatingRegion", om.valueToTree(this.getOperatingRegion())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@aws-cdk/aws-ec2-alpha.IpamProps")); struct.set("data", data); final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); obj.set("$jsii.struct", struct); return obj; } @Override public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; IpamProps.Jsii$Proxy that = (IpamProps.Jsii$Proxy) o; if (this.ipamName != null ? !this.ipamName.equals(that.ipamName) : that.ipamName != null) return false; return this.operatingRegion != null ? this.operatingRegion.equals(that.operatingRegion) : that.operatingRegion == null; } @Override public final int hashCode() { int result = this.ipamName != null ? this.ipamName.hashCode() : 0; result = 31 * result + (this.operatingRegion != null ? this.operatingRegion.hashCode() : 0); return result; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy