@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class RequestSpotInstancesRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest<RequestSpotInstancesRequest>
Contains the parameters for RequestSpotInstances.
NOOP
Constructor and Description |
---|
RequestSpotInstancesRequest()
Default constructor for RequestSpotInstancesRequest object.
|
RequestSpotInstancesRequest(String spotPrice)
Constructs a new RequestSpotInstancesRequest object.
|
Modifier and Type | Method and Description |
---|---|
RequestSpotInstancesRequest |
clone()
Creates a shallow clone of this object for all fields except the handler context.
|
boolean |
equals(Object obj) |
String |
getAvailabilityZoneGroup()
The user-specified name for a logical grouping of requests.
|
Integer |
getBlockDurationMinutes()
Deprecated.
|
String |
getClientToken()
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
|
Request<RequestSpotInstancesRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
Integer |
getInstanceCount()
The maximum number of Spot Instances to launch.
|
String |
getInstanceInterruptionBehavior()
The behavior when a Spot Instance is interrupted.
|
String |
getLaunchGroup()
The instance launch group.
|
LaunchSpecification |
getLaunchSpecification()
The launch specification.
|
String |
getSpotPrice()
The maximum price per unit hour that you are willing to pay for a Spot Instance.
|
List<TagSpecification> |
getTagSpecifications()
The key-value pair for tagging the Spot Instance request on creation.
|
String |
getType()
The Spot Instance request type.
|
Date |
getValidFrom()
The start date of the request.
|
Date |
getValidUntil()
The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).
|
int |
hashCode() |
void |
setAvailabilityZoneGroup(String availabilityZoneGroup)
The user-specified name for a logical grouping of requests.
|
void |
setBlockDurationMinutes(Integer blockDurationMinutes)
Deprecated.
|
void |
setClientToken(String clientToken)
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
|
void |
setInstanceCount(Integer instanceCount)
The maximum number of Spot Instances to launch.
|
void |
setInstanceInterruptionBehavior(InstanceInterruptionBehavior instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted.
|
void |
setInstanceInterruptionBehavior(String instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted.
|
void |
setLaunchGroup(String launchGroup)
The instance launch group.
|
void |
setLaunchSpecification(LaunchSpecification launchSpecification)
The launch specification.
|
void |
setSpotPrice(String spotPrice)
The maximum price per unit hour that you are willing to pay for a Spot Instance.
|
void |
setTagSpecifications(Collection<TagSpecification> tagSpecifications)
The key-value pair for tagging the Spot Instance request on creation.
|
void |
setType(SpotInstanceType type)
The Spot Instance request type.
|
void |
setType(String type)
The Spot Instance request type.
|
void |
setValidFrom(Date validFrom)
The start date of the request.
|
void |
setValidUntil(Date validUntil)
The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).
|
String |
toString()
Returns a string representation of this object.
|
RequestSpotInstancesRequest |
withAvailabilityZoneGroup(String availabilityZoneGroup)
The user-specified name for a logical grouping of requests.
|
RequestSpotInstancesRequest |
withBlockDurationMinutes(Integer blockDurationMinutes)
Deprecated.
|
RequestSpotInstancesRequest |
withClientToken(String clientToken)
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
|
RequestSpotInstancesRequest |
withInstanceCount(Integer instanceCount)
The maximum number of Spot Instances to launch.
|
RequestSpotInstancesRequest |
withInstanceInterruptionBehavior(InstanceInterruptionBehavior instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted.
|
RequestSpotInstancesRequest |
withInstanceInterruptionBehavior(String instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted.
|
RequestSpotInstancesRequest |
withLaunchGroup(String launchGroup)
The instance launch group.
|
RequestSpotInstancesRequest |
withLaunchSpecification(LaunchSpecification launchSpecification)
The launch specification.
|
RequestSpotInstancesRequest |
withSpotPrice(String spotPrice)
The maximum price per unit hour that you are willing to pay for a Spot Instance.
|
RequestSpotInstancesRequest |
withTagSpecifications(Collection<TagSpecification> tagSpecifications)
The key-value pair for tagging the Spot Instance request on creation.
|
RequestSpotInstancesRequest |
withTagSpecifications(TagSpecification... tagSpecifications)
The key-value pair for tagging the Spot Instance request on creation.
|
RequestSpotInstancesRequest |
withType(SpotInstanceType type)
The Spot Instance request type.
|
RequestSpotInstancesRequest |
withType(String type)
The Spot Instance request type.
|
RequestSpotInstancesRequest |
withValidFrom(Date validFrom)
The start date of the request.
|
RequestSpotInstancesRequest |
withValidUntil(Date validUntil)
The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).
|
addHandlerContext, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getHandlerContext, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestCredentialsProvider, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
public RequestSpotInstancesRequest()
public RequestSpotInstancesRequest(String spotPrice)
spotPrice
- The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using
this parameter because it can lead to increased interruptions. If you do not specify this parameter, you
will pay the current Spot price. If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
public void setAvailabilityZoneGroup(String availabilityZoneGroup)
The user-specified name for a logical grouping of requests.
When you specify an Availability Zone group in a Spot Instance request, all Spot Instances in the request are launched in the same Availability Zone. Instance proximity is maintained with this parameter, but the choice of Availability Zone is not. The group applies only to requests for Spot Instances of the same instance type. Any additional Spot Instance requests that are specified with the same Availability Zone group name are launched in that same Availability Zone, as long as at least one instance from the group is still active.
If there is no active instance running in the Availability Zone group that you specify for a new Spot Instance request (all instances are terminated, the request is expired, or the maximum price you specified falls below current Spot price), then Amazon EC2 launches the instance in any Availability Zone where the constraint can be met. Consequently, the subsequent set of Spot Instances could be placed in a different zone from the original request, even if you specified the same Availability Zone group.
Default: Instances are launched in any available Availability Zone.
availabilityZoneGroup
- The user-specified name for a logical grouping of requests.
When you specify an Availability Zone group in a Spot Instance request, all Spot Instances in the request are launched in the same Availability Zone. Instance proximity is maintained with this parameter, but the choice of Availability Zone is not. The group applies only to requests for Spot Instances of the same instance type. Any additional Spot Instance requests that are specified with the same Availability Zone group name are launched in that same Availability Zone, as long as at least one instance from the group is still active.
If there is no active instance running in the Availability Zone group that you specify for a new Spot Instance request (all instances are terminated, the request is expired, or the maximum price you specified falls below current Spot price), then Amazon EC2 launches the instance in any Availability Zone where the constraint can be met. Consequently, the subsequent set of Spot Instances could be placed in a different zone from the original request, even if you specified the same Availability Zone group.
Default: Instances are launched in any available Availability Zone.
public String getAvailabilityZoneGroup()
The user-specified name for a logical grouping of requests.
When you specify an Availability Zone group in a Spot Instance request, all Spot Instances in the request are launched in the same Availability Zone. Instance proximity is maintained with this parameter, but the choice of Availability Zone is not. The group applies only to requests for Spot Instances of the same instance type. Any additional Spot Instance requests that are specified with the same Availability Zone group name are launched in that same Availability Zone, as long as at least one instance from the group is still active.
If there is no active instance running in the Availability Zone group that you specify for a new Spot Instance request (all instances are terminated, the request is expired, or the maximum price you specified falls below current Spot price), then Amazon EC2 launches the instance in any Availability Zone where the constraint can be met. Consequently, the subsequent set of Spot Instances could be placed in a different zone from the original request, even if you specified the same Availability Zone group.
Default: Instances are launched in any available Availability Zone.
When you specify an Availability Zone group in a Spot Instance request, all Spot Instances in the request are launched in the same Availability Zone. Instance proximity is maintained with this parameter, but the choice of Availability Zone is not. The group applies only to requests for Spot Instances of the same instance type. Any additional Spot Instance requests that are specified with the same Availability Zone group name are launched in that same Availability Zone, as long as at least one instance from the group is still active.
If there is no active instance running in the Availability Zone group that you specify for a new Spot Instance request (all instances are terminated, the request is expired, or the maximum price you specified falls below current Spot price), then Amazon EC2 launches the instance in any Availability Zone where the constraint can be met. Consequently, the subsequent set of Spot Instances could be placed in a different zone from the original request, even if you specified the same Availability Zone group.
Default: Instances are launched in any available Availability Zone.
public RequestSpotInstancesRequest withAvailabilityZoneGroup(String availabilityZoneGroup)
The user-specified name for a logical grouping of requests.
When you specify an Availability Zone group in a Spot Instance request, all Spot Instances in the request are launched in the same Availability Zone. Instance proximity is maintained with this parameter, but the choice of Availability Zone is not. The group applies only to requests for Spot Instances of the same instance type. Any additional Spot Instance requests that are specified with the same Availability Zone group name are launched in that same Availability Zone, as long as at least one instance from the group is still active.
If there is no active instance running in the Availability Zone group that you specify for a new Spot Instance request (all instances are terminated, the request is expired, or the maximum price you specified falls below current Spot price), then Amazon EC2 launches the instance in any Availability Zone where the constraint can be met. Consequently, the subsequent set of Spot Instances could be placed in a different zone from the original request, even if you specified the same Availability Zone group.
Default: Instances are launched in any available Availability Zone.
availabilityZoneGroup
- The user-specified name for a logical grouping of requests.
When you specify an Availability Zone group in a Spot Instance request, all Spot Instances in the request are launched in the same Availability Zone. Instance proximity is maintained with this parameter, but the choice of Availability Zone is not. The group applies only to requests for Spot Instances of the same instance type. Any additional Spot Instance requests that are specified with the same Availability Zone group name are launched in that same Availability Zone, as long as at least one instance from the group is still active.
If there is no active instance running in the Availability Zone group that you specify for a new Spot Instance request (all instances are terminated, the request is expired, or the maximum price you specified falls below current Spot price), then Amazon EC2 launches the instance in any Availability Zone where the constraint can be met. Consequently, the subsequent set of Spot Instances could be placed in a different zone from the original request, even if you specified the same Availability Zone group.
Default: Instances are launched in any available Availability Zone.
public void setBlockDurationMinutes(Integer blockDurationMinutes)
Deprecated.
blockDurationMinutes
- Deprecated.public Integer getBlockDurationMinutes()
Deprecated.
public RequestSpotInstancesRequest withBlockDurationMinutes(Integer blockDurationMinutes)
Deprecated.
blockDurationMinutes
- Deprecated.public void setClientToken(String clientToken)
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency in Amazon EC2 API requests in the Amazon EC2 User Guide.
clientToken
- Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more
information, see Ensuring
idempotency in Amazon EC2 API requests in the Amazon EC2 User Guide.public String getClientToken()
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency in Amazon EC2 API requests in the Amazon EC2 User Guide.
public RequestSpotInstancesRequest withClientToken(String clientToken)
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency in Amazon EC2 API requests in the Amazon EC2 User Guide.
clientToken
- Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more
information, see Ensuring
idempotency in Amazon EC2 API requests in the Amazon EC2 User Guide.public void setInstanceCount(Integer instanceCount)
The maximum number of Spot Instances to launch.
Default: 1
instanceCount
- The maximum number of Spot Instances to launch.
Default: 1
public Integer getInstanceCount()
The maximum number of Spot Instances to launch.
Default: 1
Default: 1
public RequestSpotInstancesRequest withInstanceCount(Integer instanceCount)
The maximum number of Spot Instances to launch.
Default: 1
instanceCount
- The maximum number of Spot Instances to launch.
Default: 1
public void setLaunchGroup(String launchGroup)
The instance launch group. Launch groups are Spot Instances that launch together and terminate together.
Default: Instances are launched and terminated individually
launchGroup
- The instance launch group. Launch groups are Spot Instances that launch together and terminate
together.
Default: Instances are launched and terminated individually
public String getLaunchGroup()
The instance launch group. Launch groups are Spot Instances that launch together and terminate together.
Default: Instances are launched and terminated individually
Default: Instances are launched and terminated individually
public RequestSpotInstancesRequest withLaunchGroup(String launchGroup)
The instance launch group. Launch groups are Spot Instances that launch together and terminate together.
Default: Instances are launched and terminated individually
launchGroup
- The instance launch group. Launch groups are Spot Instances that launch together and terminate
together.
Default: Instances are launched and terminated individually
public void setLaunchSpecification(LaunchSpecification launchSpecification)
The launch specification.
launchSpecification
- The launch specification.public LaunchSpecification getLaunchSpecification()
The launch specification.
public RequestSpotInstancesRequest withLaunchSpecification(LaunchSpecification launchSpecification)
The launch specification.
launchSpecification
- The launch specification.public void setSpotPrice(String spotPrice)
The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.
If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
spotPrice
- The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using
this parameter because it can lead to increased interruptions. If you do not specify this parameter, you
will pay the current Spot price. If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
public String getSpotPrice()
The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.
If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
public RequestSpotInstancesRequest withSpotPrice(String spotPrice)
The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.
If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
spotPrice
- The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using
this parameter because it can lead to increased interruptions. If you do not specify this parameter, you
will pay the current Spot price. If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
public void setType(String type)
The Spot Instance request type.
Default: one-time
type
- The Spot Instance request type.
Default: one-time
SpotInstanceType
public String getType()
The Spot Instance request type.
Default: one-time
Default: one-time
SpotInstanceType
public RequestSpotInstancesRequest withType(String type)
The Spot Instance request type.
Default: one-time
type
- The Spot Instance request type.
Default: one-time
SpotInstanceType
public void setType(SpotInstanceType type)
The Spot Instance request type.
Default: one-time
type
- The Spot Instance request type.
Default: one-time
SpotInstanceType
public RequestSpotInstancesRequest withType(SpotInstanceType type)
The Spot Instance request type.
Default: one-time
type
- The Spot Instance request type.
Default: one-time
SpotInstanceType
public void setValidFrom(Date validFrom)
The start date of the request. If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.
The specified start date and time cannot be equal to the current date and time. You must specify a start date and time that occurs after the current date and time.
validFrom
- The start date of the request. If this is a one-time request, the request becomes active at this date and
time and remains active until all instances launch, the request expires, or the request is canceled. If
the request is persistent, the request becomes active at this date and time and remains active until it
expires or is canceled.
The specified start date and time cannot be equal to the current date and time. You must specify a start date and time that occurs after the current date and time.
public Date getValidFrom()
The start date of the request. If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.
The specified start date and time cannot be equal to the current date and time. You must specify a start date and time that occurs after the current date and time.
The specified start date and time cannot be equal to the current date and time. You must specify a start date and time that occurs after the current date and time.
public RequestSpotInstancesRequest withValidFrom(Date validFrom)
The start date of the request. If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.
The specified start date and time cannot be equal to the current date and time. You must specify a start date and time that occurs after the current date and time.
validFrom
- The start date of the request. If this is a one-time request, the request becomes active at this date and
time and remains active until all instances launch, the request expires, or the request is canceled. If
the request is persistent, the request becomes active at this date and time and remains active until it
expires or is canceled.
The specified start date and time cannot be equal to the current date and time. You must specify a start date and time that occurs after the current date and time.
public void setValidUntil(Date validUntil)
The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).
For a persistent request, the request remains active until the ValidUntil
date and time is reached.
Otherwise, the request remains active until you cancel it.
For a one-time request, the request remains active until all instances launch, the request is canceled, or the
ValidUntil
date and time is reached. By default, the request is valid for 7 days from the date the
request was created.
validUntil
- The end date of the request, in UTC format
(YYYY-MM-DDTHH:MM:SSZ).
For a persistent request, the request remains active until the ValidUntil
date and time is
reached. Otherwise, the request remains active until you cancel it.
For a one-time request, the request remains active until all instances launch, the request is canceled, or
the ValidUntil
date and time is reached. By default, the request is valid for 7 days from the
date the request was created.
public Date getValidUntil()
The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).
For a persistent request, the request remains active until the ValidUntil
date and time is reached.
Otherwise, the request remains active until you cancel it.
For a one-time request, the request remains active until all instances launch, the request is canceled, or the
ValidUntil
date and time is reached. By default, the request is valid for 7 days from the date the
request was created.
For a persistent request, the request remains active until the ValidUntil
date and time is
reached. Otherwise, the request remains active until you cancel it.
For a one-time request, the request remains active until all instances launch, the request is canceled,
or the ValidUntil
date and time is reached. By default, the request is valid for 7 days from
the date the request was created.
public RequestSpotInstancesRequest withValidUntil(Date validUntil)
The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).
For a persistent request, the request remains active until the ValidUntil
date and time is reached.
Otherwise, the request remains active until you cancel it.
For a one-time request, the request remains active until all instances launch, the request is canceled, or the
ValidUntil
date and time is reached. By default, the request is valid for 7 days from the date the
request was created.
validUntil
- The end date of the request, in UTC format
(YYYY-MM-DDTHH:MM:SSZ).
For a persistent request, the request remains active until the ValidUntil
date and time is
reached. Otherwise, the request remains active until you cancel it.
For a one-time request, the request remains active until all instances launch, the request is canceled, or
the ValidUntil
date and time is reached. By default, the request is valid for 7 days from the
date the request was created.
public List<TagSpecification> getTagSpecifications()
The key-value pair for tagging the Spot Instance request on creation. The value for ResourceType
must be spot-instances-request
, otherwise the Spot Instance request fails. To tag the Spot Instance
request after it has been created, see CreateTags.
ResourceType
must be spot-instances-request
, otherwise the Spot Instance
request fails. To tag the Spot Instance request after it has been created, see CreateTags.public void setTagSpecifications(Collection<TagSpecification> tagSpecifications)
The key-value pair for tagging the Spot Instance request on creation. The value for ResourceType
must be spot-instances-request
, otherwise the Spot Instance request fails. To tag the Spot Instance
request after it has been created, see CreateTags.
tagSpecifications
- The key-value pair for tagging the Spot Instance request on creation. The value for
ResourceType
must be spot-instances-request
, otherwise the Spot Instance request
fails. To tag the Spot Instance request after it has been created, see CreateTags.public RequestSpotInstancesRequest withTagSpecifications(TagSpecification... tagSpecifications)
The key-value pair for tagging the Spot Instance request on creation. The value for ResourceType
must be spot-instances-request
, otherwise the Spot Instance request fails. To tag the Spot Instance
request after it has been created, see CreateTags.
NOTE: This method appends the values to the existing list (if any). Use
setTagSpecifications(java.util.Collection)
or withTagSpecifications(java.util.Collection)
if
you want to override the existing values.
tagSpecifications
- The key-value pair for tagging the Spot Instance request on creation. The value for
ResourceType
must be spot-instances-request
, otherwise the Spot Instance request
fails. To tag the Spot Instance request after it has been created, see CreateTags.public RequestSpotInstancesRequest withTagSpecifications(Collection<TagSpecification> tagSpecifications)
The key-value pair for tagging the Spot Instance request on creation. The value for ResourceType
must be spot-instances-request
, otherwise the Spot Instance request fails. To tag the Spot Instance
request after it has been created, see CreateTags.
tagSpecifications
- The key-value pair for tagging the Spot Instance request on creation. The value for
ResourceType
must be spot-instances-request
, otherwise the Spot Instance request
fails. To tag the Spot Instance request after it has been created, see CreateTags.public void setInstanceInterruptionBehavior(String instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted. The default is terminate
.
instanceInterruptionBehavior
- The behavior when a Spot Instance is interrupted. The default is terminate
.InstanceInterruptionBehavior
public String getInstanceInterruptionBehavior()
The behavior when a Spot Instance is interrupted. The default is terminate
.
terminate
.InstanceInterruptionBehavior
public RequestSpotInstancesRequest withInstanceInterruptionBehavior(String instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted. The default is terminate
.
instanceInterruptionBehavior
- The behavior when a Spot Instance is interrupted. The default is terminate
.InstanceInterruptionBehavior
public void setInstanceInterruptionBehavior(InstanceInterruptionBehavior instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted. The default is terminate
.
instanceInterruptionBehavior
- The behavior when a Spot Instance is interrupted. The default is terminate
.InstanceInterruptionBehavior
public RequestSpotInstancesRequest withInstanceInterruptionBehavior(InstanceInterruptionBehavior instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted. The default is terminate
.
instanceInterruptionBehavior
- The behavior when a Spot Instance is interrupted. The default is terminate
.InstanceInterruptionBehavior
public Request<RequestSpotInstancesRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<RequestSpotInstancesRequest>
public String toString()
toString
in class Object
Object.toString()
public RequestSpotInstancesRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()