Interface FleetData.Builder
-
- All Superinterfaces:
Buildable
,CopyableBuilder<FleetData.Builder,FleetData>
,SdkBuilder<FleetData.Builder,FleetData>
,SdkPojo
- Enclosing class:
- FleetData
public static interface FleetData.Builder extends SdkPojo, CopyableBuilder<FleetData.Builder,FleetData>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description FleetData.Builder
activityStatus(String activityStatus)
The progress of the EC2 Fleet.FleetData.Builder
activityStatus(FleetActivityStatus activityStatus)
The progress of the EC2 Fleet.FleetData.Builder
clientToken(String clientToken)
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.FleetData.Builder
context(String context)
Reserved.FleetData.Builder
createTime(Instant createTime)
The creation date and time of the EC2 Fleet.FleetData.Builder
errors(Collection<DescribeFleetError> errors)
Information about the instances that could not be launched by the fleet.FleetData.Builder
errors(Consumer<DescribeFleetError.Builder>... errors)
Information about the instances that could not be launched by the fleet.FleetData.Builder
errors(DescribeFleetError... errors)
Information about the instances that could not be launched by the fleet.FleetData.Builder
excessCapacityTerminationPolicy(String excessCapacityTerminationPolicy)
Indicates whether running instances should be terminated if the target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.FleetData.Builder
excessCapacityTerminationPolicy(FleetExcessCapacityTerminationPolicy excessCapacityTerminationPolicy)
Indicates whether running instances should be terminated if the target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.FleetData.Builder
fleetId(String fleetId)
The ID of the EC2 Fleet.FleetData.Builder
fleetState(String fleetState)
The state of the EC2 Fleet.FleetData.Builder
fleetState(FleetStateCode fleetState)
The state of the EC2 Fleet.FleetData.Builder
fulfilledCapacity(Double fulfilledCapacity)
The number of units fulfilled by this request compared to the set target capacity.FleetData.Builder
fulfilledOnDemandCapacity(Double fulfilledOnDemandCapacity)
The number of units fulfilled by this request compared to the set target On-Demand capacity.FleetData.Builder
instances(Collection<DescribeFleetsInstances> instances)
Information about the instances that were launched by the fleet.FleetData.Builder
instances(Consumer<DescribeFleetsInstances.Builder>... instances)
Information about the instances that were launched by the fleet.FleetData.Builder
instances(DescribeFleetsInstances... instances)
Information about the instances that were launched by the fleet.FleetData.Builder
launchTemplateConfigs(Collection<FleetLaunchTemplateConfig> launchTemplateConfigs)
The launch template and overrides.FleetData.Builder
launchTemplateConfigs(Consumer<FleetLaunchTemplateConfig.Builder>... launchTemplateConfigs)
The launch template and overrides.FleetData.Builder
launchTemplateConfigs(FleetLaunchTemplateConfig... launchTemplateConfigs)
The launch template and overrides.default FleetData.Builder
onDemandOptions(Consumer<OnDemandOptions.Builder> onDemandOptions)
The allocation strategy of On-Demand Instances in an EC2 Fleet.FleetData.Builder
onDemandOptions(OnDemandOptions onDemandOptions)
The allocation strategy of On-Demand Instances in an EC2 Fleet.FleetData.Builder
replaceUnhealthyInstances(Boolean replaceUnhealthyInstances)
Indicates whether EC2 Fleet should replace unhealthy Spot Instances.default FleetData.Builder
spotOptions(Consumer<SpotOptions.Builder> spotOptions)
The configuration of Spot Instances in an EC2 Fleet.FleetData.Builder
spotOptions(SpotOptions spotOptions)
The configuration of Spot Instances in an EC2 Fleet.FleetData.Builder
tags(Collection<Tag> tags)
The tags for an EC2 Fleet resource.FleetData.Builder
tags(Consumer<Tag.Builder>... tags)
The tags for an EC2 Fleet resource.FleetData.Builder
tags(Tag... tags)
The tags for an EC2 Fleet resource.default FleetData.Builder
targetCapacitySpecification(Consumer<TargetCapacitySpecification.Builder> targetCapacitySpecification)
The number of units to request.FleetData.Builder
targetCapacitySpecification(TargetCapacitySpecification targetCapacitySpecification)
The number of units to request.FleetData.Builder
terminateInstancesWithExpiration(Boolean terminateInstancesWithExpiration)
Indicates whether running instances should be terminated when the EC2 Fleet expires.FleetData.Builder
type(String type)
The type of request.FleetData.Builder
type(FleetType type)
The type of request.FleetData.Builder
validFrom(Instant validFrom)
The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).FleetData.Builder
validUntil(Instant validUntil)
The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).-
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
-
activityStatus
FleetData.Builder activityStatus(String activityStatus)
The progress of the EC2 Fleet. If there is an error, the status is
error
. After all requests are placed, the status ispending_fulfillment
. If the size of the EC2 Fleet is equal to or greater than its target capacity, the status isfulfilled
. If the size of the EC2 Fleet is decreased, the status ispending_termination
while instances are terminating.- Parameters:
activityStatus
- The progress of the EC2 Fleet. If there is an error, the status iserror
. After all requests are placed, the status ispending_fulfillment
. If the size of the EC2 Fleet is equal to or greater than its target capacity, the status isfulfilled
. If the size of the EC2 Fleet is decreased, the status ispending_termination
while instances are terminating.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
FleetActivityStatus
,FleetActivityStatus
-
activityStatus
FleetData.Builder activityStatus(FleetActivityStatus activityStatus)
The progress of the EC2 Fleet. If there is an error, the status is
error
. After all requests are placed, the status ispending_fulfillment
. If the size of the EC2 Fleet is equal to or greater than its target capacity, the status isfulfilled
. If the size of the EC2 Fleet is decreased, the status ispending_termination
while instances are terminating.- Parameters:
activityStatus
- The progress of the EC2 Fleet. If there is an error, the status iserror
. After all requests are placed, the status ispending_fulfillment
. If the size of the EC2 Fleet is equal to or greater than its target capacity, the status isfulfilled
. If the size of the EC2 Fleet is decreased, the status ispending_termination
while instances are terminating.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
FleetActivityStatus
,FleetActivityStatus
-
createTime
FleetData.Builder createTime(Instant createTime)
The creation date and time of the EC2 Fleet.
- Parameters:
createTime
- The creation date and time of the EC2 Fleet.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
fleetId
FleetData.Builder fleetId(String fleetId)
The ID of the EC2 Fleet.
- Parameters:
fleetId
- The ID of the EC2 Fleet.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
fleetState
FleetData.Builder fleetState(String fleetState)
The state of the EC2 Fleet.
- Parameters:
fleetState
- The state of the EC2 Fleet.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
FleetStateCode
,FleetStateCode
-
fleetState
FleetData.Builder fleetState(FleetStateCode fleetState)
The state of the EC2 Fleet.
- Parameters:
fleetState
- The state of the EC2 Fleet.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
FleetStateCode
,FleetStateCode
-
clientToken
FleetData.Builder clientToken(String clientToken)
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.
Constraints: Maximum 64 ASCII characters
- Parameters:
clientToken
- Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.Constraints: Maximum 64 ASCII characters
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
excessCapacityTerminationPolicy
FleetData.Builder excessCapacityTerminationPolicy(String excessCapacityTerminationPolicy)
Indicates whether running instances should be terminated if the target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.
Supported only for fleets of type
maintain
.- Parameters:
excessCapacityTerminationPolicy
- Indicates whether running instances should be terminated if the target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.Supported only for fleets of type
maintain
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
FleetExcessCapacityTerminationPolicy
,FleetExcessCapacityTerminationPolicy
-
excessCapacityTerminationPolicy
FleetData.Builder excessCapacityTerminationPolicy(FleetExcessCapacityTerminationPolicy excessCapacityTerminationPolicy)
Indicates whether running instances should be terminated if the target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.
Supported only for fleets of type
maintain
.- Parameters:
excessCapacityTerminationPolicy
- Indicates whether running instances should be terminated if the target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.Supported only for fleets of type
maintain
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
FleetExcessCapacityTerminationPolicy
,FleetExcessCapacityTerminationPolicy
-
fulfilledCapacity
FleetData.Builder fulfilledCapacity(Double fulfilledCapacity)
The number of units fulfilled by this request compared to the set target capacity.
- Parameters:
fulfilledCapacity
- The number of units fulfilled by this request compared to the set target capacity.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
fulfilledOnDemandCapacity
FleetData.Builder fulfilledOnDemandCapacity(Double fulfilledOnDemandCapacity)
The number of units fulfilled by this request compared to the set target On-Demand capacity.
- Parameters:
fulfilledOnDemandCapacity
- The number of units fulfilled by this request compared to the set target On-Demand capacity.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
launchTemplateConfigs
FleetData.Builder launchTemplateConfigs(Collection<FleetLaunchTemplateConfig> launchTemplateConfigs)
The launch template and overrides.
- Parameters:
launchTemplateConfigs
- The launch template and overrides.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
launchTemplateConfigs
FleetData.Builder launchTemplateConfigs(FleetLaunchTemplateConfig... launchTemplateConfigs)
The launch template and overrides.
- Parameters:
launchTemplateConfigs
- The launch template and overrides.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
launchTemplateConfigs
FleetData.Builder launchTemplateConfigs(Consumer<FleetLaunchTemplateConfig.Builder>... launchTemplateConfigs)
The launch template and overrides.
This is a convenience method that creates an instance of theFleetLaunchTemplateConfig.Builder
avoiding the need to create one manually viaFleetLaunchTemplateConfig.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed to#launchTemplateConfigs(List
.) - Parameters:
launchTemplateConfigs
- a consumer that will call methods onFleetLaunchTemplateConfig.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#launchTemplateConfigs(java.util.Collection
)
-
targetCapacitySpecification
FleetData.Builder targetCapacitySpecification(TargetCapacitySpecification targetCapacitySpecification)
The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is
maintain
, you can specify a target capacity of 0 and add capacity later.- Parameters:
targetCapacitySpecification
- The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type ismaintain
, you can specify a target capacity of 0 and add capacity later.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
targetCapacitySpecification
default FleetData.Builder targetCapacitySpecification(Consumer<TargetCapacitySpecification.Builder> targetCapacitySpecification)
The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is
This is a convenience method that creates an instance of themaintain
, you can specify a target capacity of 0 and add capacity later.TargetCapacitySpecification.Builder
avoiding the need to create one manually viaTargetCapacitySpecification.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed totargetCapacitySpecification(TargetCapacitySpecification)
.- Parameters:
targetCapacitySpecification
- a consumer that will call methods onTargetCapacitySpecification.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
targetCapacitySpecification(TargetCapacitySpecification)
-
terminateInstancesWithExpiration
FleetData.Builder terminateInstancesWithExpiration(Boolean terminateInstancesWithExpiration)
Indicates whether running instances should be terminated when the EC2 Fleet expires.
- Parameters:
terminateInstancesWithExpiration
- Indicates whether running instances should be terminated when the EC2 Fleet expires.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
type
FleetData.Builder type(String type)
The type of request. Indicates whether the EC2 Fleet only
requests
the target capacity, or also attempts tomaintain
it. If you request a certain target capacity, EC2 Fleet only places the required requests; it does not attempt to replenish instances if capacity is diminished, and it does not submit requests in alternative capacity pools if capacity is unavailable. To maintain a certain target capacity, EC2 Fleet places the required requests to meet this target capacity. It also automatically replenishes any interrupted Spot Instances. Default:maintain
.- Parameters:
type
- The type of request. Indicates whether the EC2 Fleet onlyrequests
the target capacity, or also attempts tomaintain
it. If you request a certain target capacity, EC2 Fleet only places the required requests; it does not attempt to replenish instances if capacity is diminished, and it does not submit requests in alternative capacity pools if capacity is unavailable. To maintain a certain target capacity, EC2 Fleet places the required requests to meet this target capacity. It also automatically replenishes any interrupted Spot Instances. Default:maintain
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
FleetType
,FleetType
-
type
FleetData.Builder type(FleetType type)
The type of request. Indicates whether the EC2 Fleet only
requests
the target capacity, or also attempts tomaintain
it. If you request a certain target capacity, EC2 Fleet only places the required requests; it does not attempt to replenish instances if capacity is diminished, and it does not submit requests in alternative capacity pools if capacity is unavailable. To maintain a certain target capacity, EC2 Fleet places the required requests to meet this target capacity. It also automatically replenishes any interrupted Spot Instances. Default:maintain
.- Parameters:
type
- The type of request. Indicates whether the EC2 Fleet onlyrequests
the target capacity, or also attempts tomaintain
it. If you request a certain target capacity, EC2 Fleet only places the required requests; it does not attempt to replenish instances if capacity is diminished, and it does not submit requests in alternative capacity pools if capacity is unavailable. To maintain a certain target capacity, EC2 Fleet places the required requests to meet this target capacity. It also automatically replenishes any interrupted Spot Instances. Default:maintain
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
FleetType
,FleetType
-
validFrom
FleetData.Builder validFrom(Instant validFrom)
The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.
- Parameters:
validFrom
- The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request immediately.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
validUntil
FleetData.Builder validUntil(Instant validUntil)
The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new instance requests are placed or able to fulfill the request. The default end date is 7 days from the current date.
- Parameters:
validUntil
- The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). At this point, no new instance requests are placed or able to fulfill the request. The default end date is 7 days from the current date.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
replaceUnhealthyInstances
FleetData.Builder replaceUnhealthyInstances(Boolean replaceUnhealthyInstances)
Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of type
maintain
. For more information, see EC2 Fleet health checks in the Amazon EC2 User Guide.- Parameters:
replaceUnhealthyInstances
- Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of typemaintain
. For more information, see EC2 Fleet health checks in the Amazon EC2 User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
spotOptions
FleetData.Builder spotOptions(SpotOptions spotOptions)
The configuration of Spot Instances in an EC2 Fleet.
- Parameters:
spotOptions
- The configuration of Spot Instances in an EC2 Fleet.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
spotOptions
default FleetData.Builder spotOptions(Consumer<SpotOptions.Builder> spotOptions)
The configuration of Spot Instances in an EC2 Fleet.
This is a convenience method that creates an instance of theSpotOptions.Builder
avoiding the need to create one manually viaSpotOptions.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tospotOptions(SpotOptions)
.- Parameters:
spotOptions
- a consumer that will call methods onSpotOptions.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
spotOptions(SpotOptions)
-
onDemandOptions
FleetData.Builder onDemandOptions(OnDemandOptions onDemandOptions)
The allocation strategy of On-Demand Instances in an EC2 Fleet.
- Parameters:
onDemandOptions
- The allocation strategy of On-Demand Instances in an EC2 Fleet.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
onDemandOptions
default FleetData.Builder onDemandOptions(Consumer<OnDemandOptions.Builder> onDemandOptions)
The allocation strategy of On-Demand Instances in an EC2 Fleet.
This is a convenience method that creates an instance of theOnDemandOptions.Builder
avoiding the need to create one manually viaOnDemandOptions.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toonDemandOptions(OnDemandOptions)
.- Parameters:
onDemandOptions
- a consumer that will call methods onOnDemandOptions.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
onDemandOptions(OnDemandOptions)
-
tags
FleetData.Builder tags(Collection<Tag> tags)
The tags for an EC2 Fleet resource.
- Parameters:
tags
- The tags for an EC2 Fleet resource.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
FleetData.Builder tags(Tag... tags)
The tags for an EC2 Fleet resource.
- Parameters:
tags
- The tags for an EC2 Fleet resource.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
FleetData.Builder tags(Consumer<Tag.Builder>... tags)
The tags for an EC2 Fleet resource.
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
)
-
errors
FleetData.Builder errors(Collection<DescribeFleetError> errors)
Information about the instances that could not be launched by the fleet. Valid only when Type is set to
instant
.- Parameters:
errors
- Information about the instances that could not be launched by the fleet. Valid only when Type is set toinstant
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
errors
FleetData.Builder errors(DescribeFleetError... errors)
Information about the instances that could not be launched by the fleet. Valid only when Type is set to
instant
.- Parameters:
errors
- Information about the instances that could not be launched by the fleet. Valid only when Type is set toinstant
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
errors
FleetData.Builder errors(Consumer<DescribeFleetError.Builder>... errors)
Information about the instances that could not be launched by the fleet. Valid only when Type is set to
This is a convenience method that creates an instance of theinstant
.DescribeFleetError.Builder
avoiding the need to create one manually viaDescribeFleetError.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed to#errors(List
.) - Parameters:
errors
- a consumer that will call methods onDescribeFleetError.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#errors(java.util.Collection
)
-
instances
FleetData.Builder instances(Collection<DescribeFleetsInstances> instances)
Information about the instances that were launched by the fleet. Valid only when Type is set to
instant
.- Parameters:
instances
- Information about the instances that were launched by the fleet. Valid only when Type is set toinstant
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
instances
FleetData.Builder instances(DescribeFleetsInstances... instances)
Information about the instances that were launched by the fleet. Valid only when Type is set to
instant
.- Parameters:
instances
- Information about the instances that were launched by the fleet. Valid only when Type is set toinstant
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
instances
FleetData.Builder instances(Consumer<DescribeFleetsInstances.Builder>... instances)
Information about the instances that were launched by the fleet. Valid only when Type is set to
This is a convenience method that creates an instance of theinstant
.DescribeFleetsInstances.Builder
avoiding the need to create one manually viaDescribeFleetsInstances.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed to#instances(List
.) - Parameters:
instances
- a consumer that will call methods onDescribeFleetsInstances.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#instances(java.util.Collection
)
-
context
FleetData.Builder context(String context)
Reserved.
- Parameters:
context
- Reserved.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-