Class CfnIPAMAllocationProps.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnIPAMAllocationProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnIPAMAllocationProps>
- Enclosing interface:
CfnIPAMAllocationProps
@Stability(Stable)
public static final class CfnIPAMAllocationProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnIPAMAllocationProps>
A builder for
CfnIPAMAllocationProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnIPAMAllocationProps.getCidr()
description
(String description) Sets the value ofCfnIPAMAllocationProps.getDescription()
ipamPoolId
(String ipamPoolId) Sets the value ofCfnIPAMAllocationProps.getIpamPoolId()
netmaskLength
(Number netmaskLength) Sets the value ofCfnIPAMAllocationProps.getNetmaskLength()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
ipamPoolId
Sets the value ofCfnIPAMAllocationProps.getIpamPoolId()
- Parameters:
ipamPoolId
- The ID of the IPAM pool from which you would like to allocate a CIDR. This parameter is required.- Returns:
this
-
cidr
Sets the value ofCfnIPAMAllocationProps.getCidr()
- Parameters:
cidr
- The CIDR you would like to allocate from the IPAM pool. Note the following:.- If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the NetmaskLength or the CIDR.
- If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength or the CIDR and the DefaultNetmaskLength allocation rule will be ignored.
Possible values: Any available IPv4 or IPv6 CIDR.
- Returns:
this
-
description
Sets the value ofCfnIPAMAllocationProps.getDescription()
- Parameters:
description
- A description for the allocation.- Returns:
this
-
netmaskLength
Sets the value ofCfnIPAMAllocationProps.getNetmaskLength()
- Parameters:
netmaskLength
- The netmask length of the CIDR you would like to allocate from the IPAM pool. Note the following:.- If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the NetmaskLength or the CIDR.
- If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength or the CIDR and the DefaultNetmaskLength allocation rule will be ignored.
Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnIPAMAllocationProps>
- Returns:
- a new instance of
CfnIPAMAllocationProps
- Throws:
NullPointerException
- if any required attribute was not provided
-