Interface CapacityReservationSpecification.Builder
- All Superinterfaces:
 Buildable,CopyableBuilder<CapacityReservationSpecification.Builder,,CapacityReservationSpecification> SdkBuilder<CapacityReservationSpecification.Builder,,CapacityReservationSpecification> SdkPojo
- Enclosing class:
 CapacityReservationSpecification
- 
Method Summary
Modifier and TypeMethodDescriptioncapacityReservationPreference(String capacityReservationPreference) Indicates the instance's Capacity Reservation preferences.capacityReservationPreference(CapacityReservationPreference capacityReservationPreference) Indicates the instance's Capacity Reservation preferences.capacityReservationTarget(Consumer<CapacityReservationTarget.Builder> capacityReservationTarget) Information about the target Capacity Reservation or Capacity Reservation group.capacityReservationTarget(CapacityReservationTarget capacityReservationTarget) Information about the target Capacity Reservation or Capacity Reservation group.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields 
- 
Method Details
- 
capacityReservationPreference
CapacityReservationSpecification.Builder capacityReservationPreference(String capacityReservationPreference) Indicates the instance's Capacity Reservation preferences. Possible preferences include:
- 
 
capacity-reservations-only- The instance will only run in a Capacity Reservation or Capacity Reservation group. If capacity isn't available, the instance will fail to launch. - 
 
open- The instance can run in anyopenCapacity Reservation that has matching attributes (instance type, platform, Availability Zone, and tenancy). If capacity isn't available, the instance runs as an On-Demand Instance. - 
 
none- The instance doesn't run in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance. 
- Parameters:
 capacityReservationPreference- Indicates the instance's Capacity Reservation preferences. Possible preferences include:- 
        
capacity-reservations-only- The instance will only run in a Capacity Reservation or Capacity Reservation group. If capacity isn't available, the instance will fail to launch. - 
        
open- The instance can run in anyopenCapacity Reservation that has matching attributes (instance type, platform, Availability Zone, and tenancy). If capacity isn't available, the instance runs as an On-Demand Instance. - 
        
none- The instance doesn't run in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance. 
- 
        
 - Returns:
 - Returns a reference to this object so that method calls can be chained together.
 - See Also:
 
 - 
 
 - 
capacityReservationPreference
CapacityReservationSpecification.Builder capacityReservationPreference(CapacityReservationPreference capacityReservationPreference) Indicates the instance's Capacity Reservation preferences. Possible preferences include:
- 
 
capacity-reservations-only- The instance will only run in a Capacity Reservation or Capacity Reservation group. If capacity isn't available, the instance will fail to launch. - 
 
open- The instance can run in anyopenCapacity Reservation that has matching attributes (instance type, platform, Availability Zone, and tenancy). If capacity isn't available, the instance runs as an On-Demand Instance. - 
 
none- The instance doesn't run in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance. 
- Parameters:
 capacityReservationPreference- Indicates the instance's Capacity Reservation preferences. Possible preferences include:- 
        
capacity-reservations-only- The instance will only run in a Capacity Reservation or Capacity Reservation group. If capacity isn't available, the instance will fail to launch. - 
        
open- The instance can run in anyopenCapacity Reservation that has matching attributes (instance type, platform, Availability Zone, and tenancy). If capacity isn't available, the instance runs as an On-Demand Instance. - 
        
none- The instance doesn't run in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance. 
- 
        
 - Returns:
 - Returns a reference to this object so that method calls can be chained together.
 - See Also:
 
 - 
 
 - 
capacityReservationTarget
CapacityReservationSpecification.Builder capacityReservationTarget(CapacityReservationTarget capacityReservationTarget) Information about the target Capacity Reservation or Capacity Reservation group.
- Parameters:
 capacityReservationTarget- Information about the target Capacity Reservation or Capacity Reservation group.- Returns:
 - Returns a reference to this object so that method calls can be chained together.
 
 - 
capacityReservationTarget
default CapacityReservationSpecification.Builder capacityReservationTarget(Consumer<CapacityReservationTarget.Builder> capacityReservationTarget) Information about the target Capacity Reservation or Capacity Reservation group.
This is a convenience method that creates an instance of theCapacityReservationTarget.Builderavoiding the need to create one manually viaCapacityReservationTarget.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tocapacityReservationTarget(CapacityReservationTarget).- Parameters:
 capacityReservationTarget- a consumer that will call methods onCapacityReservationTarget.Builder- Returns:
 - Returns a reference to this object so that method calls can be chained together.
 - See Also:
 
 
 -