Interface CapacityReservation.Builder
-
- All Superinterfaces:
Buildable
,CopyableBuilder<CapacityReservation.Builder,CapacityReservation>
,SdkBuilder<CapacityReservation.Builder,CapacityReservation>
,SdkPojo
- Enclosing class:
- CapacityReservation
public static interface CapacityReservation.Builder extends SdkPojo, CopyableBuilder<CapacityReservation.Builder,CapacityReservation>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CapacityReservation.Builder
availabilityZone(String availabilityZone)
The Availability Zone in which the capacity is reserved.CapacityReservation.Builder
availabilityZoneId(String availabilityZoneId)
The Availability Zone ID of the Capacity Reservation.CapacityReservation.Builder
availableInstanceCount(Integer availableInstanceCount)
The remaining capacity.CapacityReservation.Builder
capacityAllocations(Collection<CapacityAllocation> capacityAllocations)
Information about instance capacity usage.CapacityReservation.Builder
capacityAllocations(Consumer<CapacityAllocation.Builder>... capacityAllocations)
Information about instance capacity usage.CapacityReservation.Builder
capacityAllocations(CapacityAllocation... capacityAllocations)
Information about instance capacity usage.CapacityReservation.Builder
capacityReservationArn(String capacityReservationArn)
The Amazon Resource Name (ARN) of the Capacity Reservation.CapacityReservation.Builder
capacityReservationFleetId(String capacityReservationFleetId)
The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs.CapacityReservation.Builder
capacityReservationId(String capacityReservationId)
The ID of the Capacity Reservation.CapacityReservation.Builder
createDate(Instant createDate)
The date and time at which the Capacity Reservation was created.CapacityReservation.Builder
ebsOptimized(Boolean ebsOptimized)
Indicates whether the Capacity Reservation supports EBS-optimized instances.CapacityReservation.Builder
endDate(Instant endDate)
The date and time at which the Capacity Reservation expires.CapacityReservation.Builder
endDateType(String endDateType)
Indicates the way in which the Capacity Reservation ends.CapacityReservation.Builder
endDateType(EndDateType endDateType)
Indicates the way in which the Capacity Reservation ends.CapacityReservation.Builder
ephemeralStorage(Boolean ephemeralStorage)
Deprecated.CapacityReservation.Builder
instanceMatchCriteria(String instanceMatchCriteria)
Indicates the type of instance launches that the Capacity Reservation accepts.CapacityReservation.Builder
instanceMatchCriteria(InstanceMatchCriteria instanceMatchCriteria)
Indicates the type of instance launches that the Capacity Reservation accepts.CapacityReservation.Builder
instancePlatform(String instancePlatform)
The type of operating system for which the Capacity Reservation reserves capacity.CapacityReservation.Builder
instancePlatform(CapacityReservationInstancePlatform instancePlatform)
The type of operating system for which the Capacity Reservation reserves capacity.CapacityReservation.Builder
instanceType(String instanceType)
The type of instance for which the Capacity Reservation reserves capacity.CapacityReservation.Builder
outpostArn(String outpostArn)
The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.CapacityReservation.Builder
ownerId(String ownerId)
The ID of the Amazon Web Services account that owns the Capacity Reservation.CapacityReservation.Builder
placementGroupArn(String placementGroupArn)
The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created.CapacityReservation.Builder
reservationType(String reservationType)
The type of Capacity Reservation.CapacityReservation.Builder
reservationType(CapacityReservationType reservationType)
The type of Capacity Reservation.CapacityReservation.Builder
startDate(Instant startDate)
The date and time at which the Capacity Reservation was started.CapacityReservation.Builder
state(String state)
The current state of the Capacity Reservation.CapacityReservation.Builder
state(CapacityReservationState state)
The current state of the Capacity Reservation.CapacityReservation.Builder
tags(Collection<Tag> tags)
Any tags assigned to the Capacity Reservation.CapacityReservation.Builder
tags(Consumer<Tag.Builder>... tags)
Any tags assigned to the Capacity Reservation.CapacityReservation.Builder
tags(Tag... tags)
Any tags assigned to the Capacity Reservation.CapacityReservation.Builder
tenancy(String tenancy)
Indicates the tenancy of the Capacity Reservation.CapacityReservation.Builder
tenancy(CapacityReservationTenancy tenancy)
Indicates the tenancy of the Capacity Reservation.CapacityReservation.Builder
totalInstanceCount(Integer totalInstanceCount)
The total number of instances for which the Capacity Reservation reserves capacity.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
-
-
-
Method Detail
-
capacityReservationId
CapacityReservation.Builder capacityReservationId(String capacityReservationId)
The ID of the Capacity Reservation.
- Parameters:
capacityReservationId
- The ID of the Capacity Reservation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ownerId
CapacityReservation.Builder ownerId(String ownerId)
The ID of the Amazon Web Services account that owns the Capacity Reservation.
- Parameters:
ownerId
- The ID of the Amazon Web Services account that owns the Capacity Reservation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
capacityReservationArn
CapacityReservation.Builder capacityReservationArn(String capacityReservationArn)
The Amazon Resource Name (ARN) of the Capacity Reservation.
- Parameters:
capacityReservationArn
- The Amazon Resource Name (ARN) of the Capacity Reservation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
availabilityZoneId
CapacityReservation.Builder availabilityZoneId(String availabilityZoneId)
The Availability Zone ID of the Capacity Reservation.
- Parameters:
availabilityZoneId
- The Availability Zone ID of the Capacity Reservation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
instanceType
CapacityReservation.Builder instanceType(String instanceType)
The type of instance for which the Capacity Reservation reserves capacity.
- Parameters:
instanceType
- The type of instance for which the Capacity Reservation reserves capacity.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
instancePlatform
CapacityReservation.Builder instancePlatform(String instancePlatform)
The type of operating system for which the Capacity Reservation reserves capacity.
- Parameters:
instancePlatform
- The type of operating system for which the Capacity Reservation reserves capacity.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
CapacityReservationInstancePlatform
,CapacityReservationInstancePlatform
-
instancePlatform
CapacityReservation.Builder instancePlatform(CapacityReservationInstancePlatform instancePlatform)
The type of operating system for which the Capacity Reservation reserves capacity.
- Parameters:
instancePlatform
- The type of operating system for which the Capacity Reservation reserves capacity.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
CapacityReservationInstancePlatform
,CapacityReservationInstancePlatform
-
availabilityZone
CapacityReservation.Builder availabilityZone(String availabilityZone)
The Availability Zone in which the capacity is reserved.
- Parameters:
availabilityZone
- The Availability Zone in which the capacity is reserved.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tenancy
CapacityReservation.Builder tenancy(String tenancy)
Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:
-
default
- The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts. -
dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.
- Parameters:
tenancy
- Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:-
default
- The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts. -
dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
CapacityReservationTenancy
,CapacityReservationTenancy
-
-
tenancy
CapacityReservation.Builder tenancy(CapacityReservationTenancy tenancy)
Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:
-
default
- The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts. -
dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.
- Parameters:
tenancy
- Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:-
default
- The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts. -
dedicated
- The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
CapacityReservationTenancy
,CapacityReservationTenancy
-
-
totalInstanceCount
CapacityReservation.Builder totalInstanceCount(Integer totalInstanceCount)
The total number of instances for which the Capacity Reservation reserves capacity.
- Parameters:
totalInstanceCount
- The total number of instances for which the Capacity Reservation reserves capacity.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
availableInstanceCount
CapacityReservation.Builder availableInstanceCount(Integer availableInstanceCount)
The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.
- Parameters:
availableInstanceCount
- The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ebsOptimized
CapacityReservation.Builder ebsOptimized(Boolean ebsOptimized)
Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized instance.
- Parameters:
ebsOptimized
- Indicates whether the Capacity Reservation supports EBS-optimized instances. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ephemeralStorage
CapacityReservation.Builder ephemeralStorage(Boolean ephemeralStorage)
Deprecated.
- Parameters:
ephemeralStorage
- Deprecated.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
state
CapacityReservation.Builder state(String state)
The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:
-
active
- The Capacity Reservation is active and the capacity is available for your use. -
expired
- The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use. -
cancelled
- The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use. -
pending
- The Capacity Reservation request was successful but the capacity provisioning is still pending. -
failed
- The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.
- Parameters:
state
- The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:-
active
- The Capacity Reservation is active and the capacity is available for your use. -
expired
- The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use. -
cancelled
- The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use. -
pending
- The Capacity Reservation request was successful but the capacity provisioning is still pending. -
failed
- The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
CapacityReservationState
,CapacityReservationState
-
-
state
CapacityReservation.Builder state(CapacityReservationState state)
The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:
-
active
- The Capacity Reservation is active and the capacity is available for your use. -
expired
- The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use. -
cancelled
- The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use. -
pending
- The Capacity Reservation request was successful but the capacity provisioning is still pending. -
failed
- The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.
- Parameters:
state
- The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:-
active
- The Capacity Reservation is active and the capacity is available for your use. -
expired
- The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use. -
cancelled
- The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use. -
pending
- The Capacity Reservation request was successful but the capacity provisioning is still pending. -
failed
- The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
CapacityReservationState
,CapacityReservationState
-
-
startDate
CapacityReservation.Builder startDate(Instant startDate)
The date and time at which the Capacity Reservation was started.
- Parameters:
startDate
- The date and time at which the Capacity Reservation was started.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
endDate
CapacityReservation.Builder endDate(Instant endDate)
The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to
expired
when it reaches its end date and time.- Parameters:
endDate
- The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes toexpired
when it reaches its end date and time.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
endDateType
CapacityReservation.Builder endDateType(String endDateType)
Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:
-
unlimited
- The Capacity Reservation remains active until you explicitly cancel it. -
limited
- The Capacity Reservation expires automatically at a specified date and time.
- Parameters:
endDateType
- Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:-
unlimited
- The Capacity Reservation remains active until you explicitly cancel it. -
limited
- The Capacity Reservation expires automatically at a specified date and time.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
EndDateType
,EndDateType
-
-
endDateType
CapacityReservation.Builder endDateType(EndDateType endDateType)
Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:
-
unlimited
- The Capacity Reservation remains active until you explicitly cancel it. -
limited
- The Capacity Reservation expires automatically at a specified date and time.
- Parameters:
endDateType
- Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:-
unlimited
- The Capacity Reservation remains active until you explicitly cancel it. -
limited
- The Capacity Reservation expires automatically at a specified date and time.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
EndDateType
,EndDateType
-
-
instanceMatchCriteria
CapacityReservation.Builder instanceMatchCriteria(String instanceMatchCriteria)
Indicates the type of instance launches that the Capacity Reservation accepts. The options include:
-
open
- The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters. -
targeted
- The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.
- Parameters:
instanceMatchCriteria
- Indicates the type of instance launches that the Capacity Reservation accepts. The options include:-
open
- The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters. -
targeted
- The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
InstanceMatchCriteria
,InstanceMatchCriteria
-
-
instanceMatchCriteria
CapacityReservation.Builder instanceMatchCriteria(InstanceMatchCriteria instanceMatchCriteria)
Indicates the type of instance launches that the Capacity Reservation accepts. The options include:
-
open
- The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters. -
targeted
- The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.
- Parameters:
instanceMatchCriteria
- Indicates the type of instance launches that the Capacity Reservation accepts. The options include:-
open
- The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters. -
targeted
- The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
InstanceMatchCriteria
,InstanceMatchCriteria
-
-
createDate
CapacityReservation.Builder createDate(Instant createDate)
The date and time at which the Capacity Reservation was created.
- Parameters:
createDate
- The date and time at which the Capacity Reservation was created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
CapacityReservation.Builder tags(Collection<Tag> tags)
Any tags assigned to the Capacity Reservation.
- Parameters:
tags
- Any tags assigned to the Capacity Reservation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
CapacityReservation.Builder tags(Tag... tags)
Any tags assigned to the Capacity Reservation.
- Parameters:
tags
- Any tags assigned to the Capacity Reservation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
CapacityReservation.Builder tags(Consumer<Tag.Builder>... tags)
Any tags assigned to the Capacity Reservation.
This is a convenience method that creates an instance of theTag.Builder
avoiding the need to create one manually viaTag.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed to#tags(List
.) - Parameters:
tags
- a consumer that will call methods onTag.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#tags(java.util.Collection
)
-
outpostArn
CapacityReservation.Builder outpostArn(String outpostArn)
The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.
- Parameters:
outpostArn
- The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
capacityReservationFleetId
CapacityReservation.Builder capacityReservationFleetId(String capacityReservationFleetId)
The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity Reservations that were created by a Capacity Reservation Fleet.
- Parameters:
capacityReservationFleetId
- The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity Reservations that were created by a Capacity Reservation Fleet.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
placementGroupArn
CapacityReservation.Builder placementGroupArn(String placementGroupArn)
The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide.
- Parameters:
placementGroupArn
- The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
capacityAllocations
CapacityReservation.Builder capacityAllocations(Collection<CapacityAllocation> capacityAllocations)
Information about instance capacity usage.
- Parameters:
capacityAllocations
- Information about instance capacity usage.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
capacityAllocations
CapacityReservation.Builder capacityAllocations(CapacityAllocation... capacityAllocations)
Information about instance capacity usage.
- Parameters:
capacityAllocations
- Information about instance capacity usage.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
capacityAllocations
CapacityReservation.Builder capacityAllocations(Consumer<CapacityAllocation.Builder>... capacityAllocations)
Information about instance capacity usage.
This is a convenience method that creates an instance of theCapacityAllocation.Builder
avoiding the need to create one manually viaCapacityAllocation.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed to#capacityAllocations(List
.) - Parameters:
capacityAllocations
- a consumer that will call methods onCapacityAllocation.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#capacityAllocations(java.util.Collection
)
-
reservationType
CapacityReservation.Builder reservationType(String reservationType)
The type of Capacity Reservation.
- Parameters:
reservationType
- The type of Capacity Reservation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
CapacityReservationType
,CapacityReservationType
-
reservationType
CapacityReservation.Builder reservationType(CapacityReservationType reservationType)
The type of Capacity Reservation.
- Parameters:
reservationType
- The type of Capacity Reservation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
CapacityReservationType
,CapacityReservationType
-
-