@Generated(value="software.amazon.awssdk:codegen") public final class CreateFleetRequest extends Ec2Request implements ToCopyableBuilder<CreateFleetRequest.Builder,CreateFleetRequest>
| Modifier and Type | Class and Description |
|---|---|
static interface |
CreateFleetRequest.Builder |
| Modifier and Type | Method and Description |
|---|---|
static CreateFleetRequest.Builder |
builder() |
String |
clientToken()
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
FleetExcessCapacityTerminationPolicy |
excessCapacityTerminationPolicy()
Indicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is
decreased below the current size of the EC2 Fleet.
|
String |
excessCapacityTerminationPolicyAsString()
Indicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is
decreased below the current size of the EC2 Fleet.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
boolean |
hasLaunchTemplateConfigs()
Returns true if the LaunchTemplateConfigs property was specified by the sender (it may be empty), or false if the
sender did not specify the value (it will be empty).
|
boolean |
hasTagSpecifications()
Returns true if the TagSpecifications property was specified by the sender (it may be empty), or false if the
sender did not specify the value (it will be empty).
|
List<FleetLaunchTemplateConfigRequest> |
launchTemplateConfigs()
The configuration for the EC2 Fleet.
|
OnDemandOptionsRequest |
onDemandOptions()
Describes the configuration of On-Demand Instances in an EC2 Fleet.
|
Boolean |
replaceUnhealthyInstances()
Indicates whether EC2 Fleet should replace unhealthy instances.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends CreateFleetRequest.Builder> |
serializableBuilderClass() |
SpotOptionsRequest |
spotOptions()
Describes the configuration of Spot Instances in an EC2 Fleet.
|
List<TagSpecification> |
tagSpecifications()
The key-value pair for tagging the EC2 Fleet request on creation.
|
TargetCapacitySpecificationRequest |
targetCapacitySpecification()
The number of units to request.
|
Boolean |
terminateInstancesWithExpiration()
Indicates whether running instances should be terminated when the EC2 Fleet expires.
|
CreateFleetRequest.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
FleetType |
type()
The type of request.
|
String |
typeAsString()
The type of request.
|
Instant |
validFrom()
The start date and time of the request, in UTC format (for example,
YYYY-MM-DDTHH:MM:SSZ).
|
Instant |
validUntil()
The end date and time of the request, in UTC format (for example,
YYYY-MM-DDTHH:MM:SSZ).
|
overrideConfigurationclone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final String clientToken()
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
public final SpotOptionsRequest spotOptions()
Describes the configuration of Spot Instances in an EC2 Fleet.
public final OnDemandOptionsRequest onDemandOptions()
Describes the configuration of On-Demand Instances in an EC2 Fleet.
public final FleetExcessCapacityTerminationPolicy excessCapacityTerminationPolicy()
Indicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.
If the service returns an enum value that is not available in the current SDK version,
excessCapacityTerminationPolicy will return
FleetExcessCapacityTerminationPolicy.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is
available from excessCapacityTerminationPolicyAsString().
FleetExcessCapacityTerminationPolicypublic final String excessCapacityTerminationPolicyAsString()
Indicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.
If the service returns an enum value that is not available in the current SDK version,
excessCapacityTerminationPolicy will return
FleetExcessCapacityTerminationPolicy.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is
available from excessCapacityTerminationPolicyAsString().
FleetExcessCapacityTerminationPolicypublic final boolean hasLaunchTemplateConfigs()
public final List<FleetLaunchTemplateConfigRequest> launchTemplateConfigs()
The configuration for the EC2 Fleet.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasLaunchTemplateConfigs() to see if a value was sent in this field.
public final TargetCapacitySpecificationRequest targetCapacitySpecification()
The number of units to request.
public final Boolean terminateInstancesWithExpiration()
Indicates whether running instances should be terminated when the EC2 Fleet expires.
public final FleetType type()
The type of request. The default value is maintain.
maintain - The EC2 Fleet plaees an asynchronous request for your desired capacity, and continues to
maintain your desired Spot capacity by replenishing interrupted Spot Instances.
request - The EC2 Fleet places an asynchronous one-time request for your desired capacity, but does
submit Spot requests in alternative capacity pools if Spot capacity is unavailable, and does not maintain Spot
capacity if Spot Instances are interrupted.
instant - The EC2 Fleet places a synchronous one-time request for your desired capacity, and returns
errors for any instances that could not be launched.
For more information, see EC2 Fleet request types in the Amazon Elastic Compute Cloud User Guide.
If the service returns an enum value that is not available in the current SDK version, type will return
FleetType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from
typeAsString().
maintain.
maintain - The EC2 Fleet plaees an asynchronous request for your desired capacity, and
continues to maintain your desired Spot capacity by replenishing interrupted Spot Instances.
request - The EC2 Fleet places an asynchronous one-time request for your desired capacity,
but does submit Spot requests in alternative capacity pools if Spot capacity is unavailable, and does not
maintain Spot capacity if Spot Instances are interrupted.
instant - The EC2 Fleet places a synchronous one-time request for your desired capacity, and
returns errors for any instances that could not be launched.
For more information, see EC2 Fleet request types in the Amazon Elastic Compute Cloud User Guide.
FleetTypepublic final String typeAsString()
The type of request. The default value is maintain.
maintain - The EC2 Fleet plaees an asynchronous request for your desired capacity, and continues to
maintain your desired Spot capacity by replenishing interrupted Spot Instances.
request - The EC2 Fleet places an asynchronous one-time request for your desired capacity, but does
submit Spot requests in alternative capacity pools if Spot capacity is unavailable, and does not maintain Spot
capacity if Spot Instances are interrupted.
instant - The EC2 Fleet places a synchronous one-time request for your desired capacity, and returns
errors for any instances that could not be launched.
For more information, see EC2 Fleet request types in the Amazon Elastic Compute Cloud User Guide.
If the service returns an enum value that is not available in the current SDK version, type will return
FleetType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from
typeAsString().
maintain.
maintain - The EC2 Fleet plaees an asynchronous request for your desired capacity, and
continues to maintain your desired Spot capacity by replenishing interrupted Spot Instances.
request - The EC2 Fleet places an asynchronous one-time request for your desired capacity,
but does submit Spot requests in alternative capacity pools if Spot capacity is unavailable, and does not
maintain Spot capacity if Spot Instances are interrupted.
instant - The EC2 Fleet places a synchronous one-time request for your desired capacity, and
returns errors for any instances that could not be launched.
For more information, see EC2 Fleet request types in the Amazon Elastic Compute Cloud User Guide.
FleetTypepublic final 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.
public final 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 EC2 Fleet requests are placed or able to fulfill the request. If no value is specified, the request remains until you cancel it.
public final Boolean replaceUnhealthyInstances()
Indicates whether EC2 Fleet should replace unhealthy instances.
public final boolean hasTagSpecifications()
public final List<TagSpecification> tagSpecifications()
The key-value pair for tagging the EC2 Fleet request on creation. The value for ResourceType must be
fleet, otherwise the fleet request fails. To tag instances at launch, specify the tags in the launch
template. For information about tagging after launch, see Tagging your
resources.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasTagSpecifications() to see if a value was sent in this field.
ResourceType
must be fleet, otherwise the fleet request fails. To tag instances at launch, specify the
tags in the launch template. For information about tagging after launch, see Tagging your
resources.public CreateFleetRequest.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<CreateFleetRequest.Builder,CreateFleetRequest>toBuilder in class Ec2Requestpublic static CreateFleetRequest.Builder builder()
public static Class<? extends CreateFleetRequest.Builder> serializableBuilderClass()
public final int hashCode()
hashCode in class AwsRequestpublic final boolean equals(Object obj)
equals in class AwsRequestpublic final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
getValueForField in class SdkRequestCopyright © 2021. All rights reserved.