Interface CapacityReservation.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<CapacityReservation.Builder,
,CapacityReservation> SdkBuilder<CapacityReservation.Builder,
,CapacityReservation> SdkPojo
- Enclosing class:
CapacityReservation
-
Method Summary
Modifier and TypeMethodDescriptionavailabilityZone
(String availabilityZone) The Availability Zone in which the capacity is reserved.availabilityZoneId
(String availabilityZoneId) The Availability Zone ID of the Capacity Reservation.availableInstanceCount
(Integer availableInstanceCount) The remaining capacity.capacityAllocations
(Collection<CapacityAllocation> capacityAllocations) Information about instance capacity usage.capacityAllocations
(Consumer<CapacityAllocation.Builder>... capacityAllocations) Information about instance capacity usage.capacityAllocations
(CapacityAllocation... capacityAllocations) Information about instance capacity usage.capacityReservationArn
(String capacityReservationArn) The Amazon Resource Name (ARN) of the Capacity Reservation.capacityReservationFleetId
(String capacityReservationFleetId) The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs.capacityReservationId
(String capacityReservationId) The ID of the Capacity Reservation.createDate
(Instant createDate) The date and time at which the Capacity Reservation was created.ebsOptimized
(Boolean ebsOptimized) Indicates whether the Capacity Reservation supports EBS-optimized instances.The date and time at which the Capacity Reservation expires.endDateType
(String endDateType) Indicates the way in which the Capacity Reservation ends.endDateType
(EndDateType endDateType) Indicates the way in which the Capacity Reservation ends.ephemeralStorage
(Boolean ephemeralStorage) Deprecated.instanceMatchCriteria
(String instanceMatchCriteria) Indicates the type of instance launches that the Capacity Reservation accepts.instanceMatchCriteria
(InstanceMatchCriteria instanceMatchCriteria) Indicates the type of instance launches that the Capacity Reservation accepts.instancePlatform
(String instancePlatform) The type of operating system for which the Capacity Reservation reserves capacity.instancePlatform
(CapacityReservationInstancePlatform instancePlatform) The type of operating system for which the Capacity Reservation reserves capacity.instanceType
(String instanceType) The type of instance for which the Capacity Reservation reserves capacity.outpostArn
(String outpostArn) The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.The ID of the Amazon Web Services account that owns the Capacity Reservation.placementGroupArn
(String placementGroupArn) The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created.reservationType
(String reservationType) The type of Capacity Reservation.reservationType
(CapacityReservationType reservationType) The type of Capacity Reservation.The date and time at which the Capacity Reservation was started.The current state of the Capacity Reservation.state
(CapacityReservationState state) The current state of the Capacity Reservation.tags
(Collection<Tag> tags) Any tags assigned to the Capacity Reservation.tags
(Consumer<Tag.Builder>... tags) Any tags assigned to the Capacity Reservation.Any tags assigned to the Capacity Reservation.Indicates the tenancy of the Capacity Reservation.tenancy
(CapacityReservationTenancy tenancy) Indicates the tenancy of the Capacity Reservation.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 Details
-
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
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
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
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
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
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:
-
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:
-
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
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:
-
-
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:
-
-
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
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
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
Deprecated.
- Parameters:
ephemeralStorage
- Deprecated.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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:
-
-
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:
-
-
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
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
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
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:
-
-
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
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:
-
-
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
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
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
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 totags(List<Tag>)
.- 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:
-
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
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
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
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
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 tocapacityAllocations(List<CapacityAllocation>)
.- 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:
-
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:
-
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:
-