Class CreateFleetRequest
- All Implemented Interfaces:
SdkPojo
,ToCopyableBuilder<CreateFleetRequest.Builder,
CreateFleetRequest>
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic CreateFleetRequest.Builder
builder()
final String
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.final String
context()
Reserved.final Boolean
dryRun()
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.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.final String
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.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) Used to retrieve the value of a field from any class that extendsSdkRequest
.final int
hashCode()
final boolean
For responses, this returns true if the service returned a value for the LaunchTemplateConfigs property.final boolean
For responses, this returns true if the service returned a value for the TagSpecifications property.The configuration for the EC2 Fleet.final OnDemandOptionsRequest
Describes the configuration of On-Demand Instances in an EC2 Fleet.final Boolean
Indicates whether EC2 Fleet should replace unhealthy Spot Instances.static Class
<? extends CreateFleetRequest.Builder> final SpotOptionsRequest
Describes the configuration of Spot Instances in an EC2 Fleet.final List
<TagSpecification> The key-value pair for tagging the EC2 Fleet request on creation.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 fleet type.final String
The fleet type.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 class software.amazon.awssdk.awscore.AwsRequest
overrideConfiguration
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
dryRun
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
.- Returns:
- Checks whether you have the required permissions for the action, without actually making the request, and
provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
.
-
clientToken
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency.
For more information, see Ensuring idempotency.
- Returns:
- Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you do
not specify a client token, a randomly generated token is used for the request to ensure idempotency.
For more information, see Ensuring idempotency.
-
spotOptions
Describes the configuration of Spot Instances in an EC2 Fleet.
- Returns:
- Describes the configuration of Spot Instances in an EC2 Fleet.
-
onDemandOptions
Describes the configuration of On-Demand Instances in an EC2 Fleet.
- Returns:
- Describes the configuration of On-Demand Instances in an EC2 Fleet.
-
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.
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 total 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 total 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 total 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:
-
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 configuration for the EC2 Fleet.
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 configuration for the EC2 Fleet.
-
targetCapacitySpecification
The number of units to request.
- Returns:
- The number of units to request.
-
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 fleet type. The default value is
maintain
.-
maintain
- The EC2 Fleet places 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 EC2 User Guide.
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 fleet type. The default value is
maintain
.-
maintain
- The EC2 Fleet places 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 EC2 User Guide.
-
- See Also:
-
-
typeAsString
The fleet type. The default value is
maintain
.-
maintain
- The EC2 Fleet places 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 EC2 User Guide.
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 fleet type. The default value is
maintain
.-
maintain
- The EC2 Fleet places 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 EC2 User Guide.
-
- 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 EC2 Fleet requests are placed or able to fulfill the request. If no value is specified, the request remains until you cancel it.
- Returns:
- 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.
-
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.
-
hasTagSpecifications
public final boolean hasTagSpecifications()For responses, this returns true if the service returned a value for the TagSpecifications 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. -
tagSpecifications
The key-value pair for tagging the EC2 Fleet request on creation. For more information, see Tag your resources.
If the fleet type is
instant
, specify a resource type offleet
to tag the fleet orinstance
to tag the instances at launch.If the fleet type is
maintain
orrequest
, specify a resource type offleet
to tag the fleet. You cannot specify a resource type ofinstance
. To tag instances at launch, specify the tags in a launch template.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
hasTagSpecifications()
method.- Returns:
- The key-value pair for tagging the EC2 Fleet request on creation. For more information, see Tag your
resources.
If the fleet type is
instant
, specify a resource type offleet
to tag the fleet orinstance
to tag the instances at launch.If the fleet type is
maintain
orrequest
, specify a resource type offleet
to tag the fleet. You cannot specify a resource type ofinstance
. To tag instances at launch, specify the tags in a launch template.
-
context
-
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<CreateFleetRequest.Builder,
CreateFleetRequest> - Specified by:
toBuilder
in classEc2Request
- Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode()- Overrides:
hashCode
in classAwsRequest
-
equals
- Overrides:
equals
in classAwsRequest
-
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
-
getValueForField
Description copied from class:SdkRequest
Used to retrieve the value of a field from any class that extendsSdkRequest
. The field name specified should match the member name from the corresponding service-2.json model specified in the codegen-resources folder for a given service. The class specifies what class to cast the returned value to. If the returned value is also a modeled class, theSdkRequest.getValueForField(String, Class)
method will again be available.- Overrides:
getValueForField
in classSdkRequest
- Parameters:
fieldName
- The name of the member to be retrieved.clazz
- The class to cast the returned object to.- Returns:
- Optional containing the casted return value
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToField
in interfaceSdkPojo
- Returns:
- The mapping between the field name and its corresponding field.
-