@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 you provide to ensure the idempotency of the request.
|
boolean |
equals(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)
Used to retrieve the value of a field from any class that extends
SdkRequest . |
int |
hashCode() |
List<FleetLaunchTemplateConfigRequest> |
launchTemplateConfigs()
The configuration for the EC2 Fleet.
|
OnDemandOptionsRequest |
onDemandOptions()
The allocation strategy 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
TotalTargetCapacity , OnDemandTargetCapacity , SpotTargetCapacity , and
DefaultCapacityType structure. |
Boolean |
terminateInstancesWithExpiration()
Indicates whether running instances should be terminated when the EC2 Fleet expires.
|
CreateFleetRequest.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
FleetType |
type()
The type of the request.
|
String |
typeAsString()
The type of the 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).
|
overrideConfiguration
copy
public String clientToken()
Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
public SpotOptionsRequest spotOptions()
Describes the configuration of Spot Instances in an EC2 Fleet.
public OnDemandOptionsRequest onDemandOptions()
The allocation strategy of On-Demand Instances in an EC2 Fleet.
public 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()
.
FleetExcessCapacityTerminationPolicy
public 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()
.
FleetExcessCapacityTerminationPolicy
public List<FleetLaunchTemplateConfigRequest> launchTemplateConfigs()
The configuration for the EC2 Fleet.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public TargetCapacitySpecificationRequest targetCapacitySpecification()
The TotalTargetCapacity
, OnDemandTargetCapacity
, SpotTargetCapacity
, and
DefaultCapacityType
structure.
TotalTargetCapacity
, OnDemandTargetCapacity
,
SpotTargetCapacity
, and DefaultCapacityType
structure.public Boolean terminateInstancesWithExpiration()
Indicates whether running instances should be terminated when the EC2 Fleet expires.
public FleetType type()
The type of the request. By default, the EC2 Fleet places an asynchronous request for your desired capacity, and
maintains it by replenishing interrupted Spot Instances (maintain
). A value of instant
places a synchronous one-time request, and returns errors for any instances that could not be launched. A value
of request
places an asynchronous one-time request without maintaining capacity or submitting
requests in alternative capacity pools if capacity is unavailable. 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
). A value of
instant
places a synchronous one-time request, and returns errors for any instances that
could not be launched. A value of request
places an asynchronous one-time request without
maintaining capacity or submitting requests in alternative capacity pools if capacity is unavailable. For
more information, see EC2 Fleet Request Types in the Amazon Elastic Compute Cloud User Guide.FleetType
public String typeAsString()
The type of the request. By default, the EC2 Fleet places an asynchronous request for your desired capacity, and
maintains it by replenishing interrupted Spot Instances (maintain
). A value of instant
places a synchronous one-time request, and returns errors for any instances that could not be launched. A value
of request
places an asynchronous one-time request without maintaining capacity or submitting
requests in alternative capacity pools if capacity is unavailable. 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
). A value of
instant
places a synchronous one-time request, and returns errors for any instances that
could not be launched. A value of request
places an asynchronous one-time request without
maintaining capacity or submitting requests in alternative capacity pools if capacity is unavailable. For
more information, see EC2 Fleet Request Types in the Amazon Elastic Compute Cloud User Guide.FleetType
public 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 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. The default end date is 7 days from the current date.
public Boolean replaceUnhealthyInstances()
Indicates whether EC2 Fleet should replace unhealthy instances.
public 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.
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()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<CreateFleetRequest.Builder,CreateFleetRequest>
toBuilder
in class Ec2Request
public static CreateFleetRequest.Builder builder()
public static Class<? extends CreateFleetRequest.Builder> serializableBuilderClass()
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
SdkRequest
SdkRequest
. 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, the SdkRequest.getValueForField(String, Class)
method will
again be available.getValueForField
in class SdkRequest
fieldName
- The name of the member to be retrieved.clazz
- The class to cast the returned object to.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.