Class CfnCapacityReservation.CapacityAllocationProperty.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnCapacityReservation.CapacityAllocationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnCapacityReservation.CapacityAllocationProperty>
- Enclosing interface:
CfnCapacityReservation.CapacityAllocationProperty
@Stability(Stable)
public static final class CfnCapacityReservation.CapacityAllocationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnCapacityReservation.CapacityAllocationProperty>
A builder for
CfnCapacityReservation.CapacityAllocationProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallocationType(String allocationType) Sets the value ofCfnCapacityReservation.CapacityAllocationProperty.getAllocationType()build()Builds the configured instance.Sets the value ofCfnCapacityReservation.CapacityAllocationProperty.getCount()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
allocationType
@Stability(Stable) public CfnCapacityReservation.CapacityAllocationProperty.Builder allocationType(String allocationType) Sets the value ofCfnCapacityReservation.CapacityAllocationProperty.getAllocationType()- Parameters:
allocationType- The usage type.usedindicates that the instance capacity is in use by instances that are running in the Capacity Reservation.- Returns:
this
-
count
@Stability(Stable) public CfnCapacityReservation.CapacityAllocationProperty.Builder count(Number count) Sets the value ofCfnCapacityReservation.CapacityAllocationProperty.getCount()- Parameters:
count- The amount of instance capacity associated with the usage. For example a value of4indicates that instance capacity for 4 instances is currently in use.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnCapacityReservation.CapacityAllocationProperty>- Returns:
- a new instance of
CfnCapacityReservation.CapacityAllocationProperty - Throws:
NullPointerException- if any required attribute was not provided
-