Class FleetData
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<FleetData.Builder,
FleetData>
Describes an EC2 Fleet.
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal FleetActivityStatus
The progress of the EC2 Fleet.final String
The progress of the EC2 Fleet.static FleetData.Builder
builder()
final String
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.final String
context()
Reserved.final Instant
The creation date and time of the EC2 Fleet.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final List
<DescribeFleetError> errors()
Information about the instances that could not be launched by the fleet.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.final String
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.final String
fleetId()
The ID of the EC2 Fleet.final FleetStateCode
The state of the EC2 Fleet.final String
The state of the EC2 Fleet.final Double
The number of units fulfilled by this request compared to the set target capacity.final Double
The number of units fulfilled by this request compared to the set target On-Demand capacity.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final boolean
For responses, this returns true if the service returned a value for the Errors property.final int
hashCode()
final boolean
For responses, this returns true if the service returned a value for the Instances property.final boolean
For responses, this returns true if the service returned a value for the LaunchTemplateConfigs property.final boolean
hasTags()
For responses, this returns true if the service returned a value for the Tags property.final List
<DescribeFleetsInstances> Information about the instances that were launched by the fleet.final List
<FleetLaunchTemplateConfig> The launch template and overrides.final OnDemandOptions
The allocation strategy of On-Demand Instances in an EC2 Fleet.final Boolean
Indicates whether EC2 Fleet should replace unhealthy Spot Instances.static Class
<? extends FleetData.Builder> final SpotOptions
The configuration of Spot Instances in an EC2 Fleet.tags()
The tags for an EC2 Fleet resource.The number of units to request.final Boolean
Indicates whether running instances should be terminated when the EC2 Fleet expires.Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.final FleetType
type()
The type of request.final String
The type of request.final Instant
The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).final Instant
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.ToCopyableBuilder
copy
-
Method Details
-
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.If the service returns an enum value that is not available in the current SDK version,
activityStatus
will returnFleetActivityStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromactivityStatusAsString()
.- Returns:
- 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. - See Also:
-
activityStatusAsString
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.If the service returns an enum value that is not available in the current SDK version,
activityStatus
will returnFleetActivityStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromactivityStatusAsString()
.- Returns:
- 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. - See Also:
-
createTime
The creation date and time of the EC2 Fleet.
- Returns:
- The creation date and time of the EC2 Fleet.
-
fleetId
The ID of the EC2 Fleet.
- Returns:
- The ID of the EC2 Fleet.
-
fleetState
The state of the EC2 Fleet.
If the service returns an enum value that is not available in the current SDK version,
fleetState
will returnFleetStateCode.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromfleetStateAsString()
.- Returns:
- The state of the EC2 Fleet.
- See Also:
-
fleetStateAsString
The state of the EC2 Fleet.
If the service returns an enum value that is not available in the current SDK version,
fleetState
will returnFleetStateCode.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromfleetStateAsString()
.- Returns:
- The state of the EC2 Fleet.
- See Also:
-
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:
- 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
-
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
.If the service returns an enum value that is not available in the current SDK version,
excessCapacityTerminationPolicy
will returnFleetExcessCapacityTerminationPolicy.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromexcessCapacityTerminationPolicyAsString()
.- Returns:
- 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
. - See Also:
-
excessCapacityTerminationPolicyAsString
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
.If the service returns an enum value that is not available in the current SDK version,
excessCapacityTerminationPolicy
will returnFleetExcessCapacityTerminationPolicy.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromexcessCapacityTerminationPolicyAsString()
.- Returns:
- 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
. - See Also:
-
fulfilledCapacity
The number of units fulfilled by this request compared to the set target capacity.
- Returns:
- The number of units fulfilled by this request compared to the set target capacity.
-
fulfilledOnDemandCapacity
The number of units fulfilled by this request compared to the set target On-Demand capacity.
- Returns:
- The number of units fulfilled by this request compared to the set target On-Demand capacity.
-
hasLaunchTemplateConfigs
public final boolean hasLaunchTemplateConfigs()For responses, this returns true if the service returned a value for the LaunchTemplateConfigs property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
launchTemplateConfigs
The launch template and overrides.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasLaunchTemplateConfigs()
method.- Returns:
- The launch template and overrides.
-
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.- Returns:
- 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.
-
terminateInstancesWithExpiration
Indicates whether running instances should be terminated when the EC2 Fleet expires.
- Returns:
- Indicates whether running instances should be terminated when the EC2 Fleet expires.
-
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
.If the service returns an enum value that is not available in the current SDK version,
type
will returnFleetType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromtypeAsString()
.- Returns:
- 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
. - See Also:
-
typeAsString
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
.If the service returns an enum value that is not available in the current SDK version,
type
will returnFleetType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromtypeAsString()
.- Returns:
- 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
. - See Also:
-
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:
- 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.
-
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:
- 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.
-
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.- Returns:
- 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.
-
spotOptions
The configuration of Spot Instances in an EC2 Fleet.
- Returns:
- The configuration of Spot Instances in an EC2 Fleet.
-
onDemandOptions
The allocation strategy of On-Demand Instances in an EC2 Fleet.
- Returns:
- The allocation strategy of On-Demand Instances in an EC2 Fleet.
-
hasTags
public final boolean hasTags()For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
tags
The tags for an EC2 Fleet resource.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTags()
method.- Returns:
- The tags for an EC2 Fleet resource.
-
hasErrors
public final boolean hasErrors()For responses, this returns true if the service returned a value for the Errors property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
errors
Information about the instances that could not be launched by the fleet. Valid only when Type is set to
instant
.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasErrors()
method.- Returns:
- Information about the instances that could not be launched by the fleet. Valid only when Type is
set to
instant
.
-
hasInstances
public final boolean hasInstances()For responses, this returns true if the service returned a value for the Instances property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
instances
Information about the instances that were launched by the fleet. Valid only when Type is set to
instant
.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasInstances()
method.- Returns:
- Information about the instances that were launched by the fleet. Valid only when Type is set to
instant
.
-
context
Reserved.
- Returns:
- Reserved.
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<FleetData.Builder,
FleetData> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value. -
getValueForField
-
sdkFields
-