Class CfnSubnetCidrReservationProps.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnSubnetCidrReservationProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnSubnetCidrReservationProps>
- Enclosing interface:
CfnSubnetCidrReservationProps
@Stability(Stable)
public static final class CfnSubnetCidrReservationProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnSubnetCidrReservationProps>
A builder for
CfnSubnetCidrReservationProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnSubnetCidrReservationProps.getCidr()description(String description) Sets the value ofCfnSubnetCidrReservationProps.getDescription()reservationType(String reservationType) Sets the value ofCfnSubnetCidrReservationProps.getReservationType()Sets the value ofCfnSubnetCidrReservationProps.getSubnetId()Sets the value ofCfnSubnetCidrReservationProps.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
cidr
Sets the value ofCfnSubnetCidrReservationProps.getCidr()- Parameters:
cidr- The IPv4 or IPv6 CIDR range to reserve. This parameter is required. Must lie inside the subnet's CIDR block and must not overlap an existing reservation. Supply an IPv6 range exactly as the service returns it: Amazon EC2 stores an IPv6 CIDR in RFC 5952 compressed form, and a noncanonical spelling of the same range is reported as drift because this property is create-only and read back.- Returns:
this
-
reservationType
@Stability(Stable) public CfnSubnetCidrReservationProps.Builder reservationType(String reservationType) Sets the value ofCfnSubnetCidrReservationProps.getReservationType()- Parameters:
reservationType- The type of reservation. This parameter is required. A prefix reservation is used for an IPv6 prefix delegated to a network interface; an explicit reservation is used for a range that Amazon EC2 must not assign automatically.- Returns:
this
-
subnetId
Sets the value ofCfnSubnetCidrReservationProps.getSubnetId()- Parameters:
subnetId- The identifier of the subnet the CIDR range is reserved in. This parameter is required.- Returns:
this
-
description
Sets the value ofCfnSubnetCidrReservationProps.getDescription()- Parameters:
description- The description of the subnet CIDR reservation.- Returns:
this
-
tags
Sets the value ofCfnSubnetCidrReservationProps.getTags()- Parameters:
tags- The tags assigned to the subnet CIDR reservation.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnSubnetCidrReservationProps>- Returns:
- a new instance of
CfnSubnetCidrReservationProps - Throws:
NullPointerException- if any required attribute was not provided
-