Class RequestSpotInstancesRequest
- All Implemented Interfaces:
ReadLimitInfo
,DryRunSupportedRequest<RequestSpotInstancesRequest>
,Serializable
,Cloneable
Contains the parameters for RequestSpotInstances.
- See Also:
-
Field Summary
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for RequestSpotInstancesRequest object.RequestSpotInstancesRequest
(String spotPrice) Constructs a new RequestSpotInstancesRequest object. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates a shallow clone of this request.boolean
The user-specified name for a logical grouping of bids.The required duration for the Spot instances (also known as Spot blocks), in minutes.Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.This method is intended for internal use only.The maximum number of Spot instances to launch.The instance launch group.The maximum hourly price (bid) for any Spot instance launched to fulfill the request.getType()
The Spot instance request type.The start date of the request.The end date of the request.int
hashCode()
void
setAvailabilityZoneGroup
(String availabilityZoneGroup) The user-specified name for a logical grouping of bids.void
setBlockDurationMinutes
(Integer blockDurationMinutes) The required duration for the Spot instances (also known as Spot blocks), in minutes.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
setLaunchGroup
(String launchGroup) The instance launch group.void
setLaunchSpecification
(LaunchSpecification launchSpecification) void
setSpotPrice
(String spotPrice) The maximum hourly price (bid) for any Spot instance launched to fulfill the request.void
setType
(SpotInstanceType type) The Spot instance request type.void
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.toString()
Returns a string representation of this object; useful for testing and debugging.withAvailabilityZoneGroup
(String availabilityZoneGroup) The user-specified name for a logical grouping of bids.withBlockDurationMinutes
(Integer blockDurationMinutes) The required duration for the Spot instances (also known as Spot blocks), in minutes.withClientToken
(String clientToken) Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.withInstanceCount
(Integer instanceCount) The maximum number of Spot instances to launch.withLaunchGroup
(String launchGroup) The instance launch group.withLaunchSpecification
(LaunchSpecification launchSpecification) withSpotPrice
(String spotPrice) The maximum hourly price (bid) for any Spot instance launched to fulfill the request.withType
(SpotInstanceType type) The Spot instance request type.The Spot instance request type.withValidFrom
(Date validFrom) The start date of the request.withValidUntil
(Date validUntil) The end date of the request.Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
-
Constructor Details
-
RequestSpotInstancesRequest
public RequestSpotInstancesRequest()Default constructor for RequestSpotInstancesRequest object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it. -
RequestSpotInstancesRequest
Constructs a new RequestSpotInstancesRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- Parameters:
spotPrice
- The maximum hourly price (bid) for any Spot instance launched to fulfill the request.
-
-
Method Details
-
setSpotPrice
The maximum hourly price (bid) for any Spot instance launched to fulfill the request.
- Parameters:
spotPrice
- The maximum hourly price (bid) for any Spot instance launched to fulfill the request.
-
getSpotPrice
The maximum hourly price (bid) for any Spot instance launched to fulfill the request.
- Returns:
- The maximum hourly price (bid) for any Spot instance launched to fulfill the request.
-
withSpotPrice
The maximum hourly price (bid) for any Spot instance launched to fulfill the request.
- Parameters:
spotPrice
- The maximum hourly price (bid) for any Spot instance launched to fulfill the request.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setClientToken
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.
- Parameters:
clientToken
- Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.
-
getClientToken
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.
- Returns:
- Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.
-
withClientToken
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.
- Parameters:
clientToken
- Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setInstanceCount
The maximum number of Spot instances to launch.
Default: 1
- Parameters:
instanceCount
- The maximum number of Spot instances to launch.Default: 1
-
getInstanceCount
The maximum number of Spot instances to launch.
Default: 1
- Returns:
- The maximum number of Spot instances to launch.
Default: 1
-
withInstanceCount
The maximum number of Spot instances to launch.
Default: 1
- Parameters:
instanceCount
- The maximum number of Spot instances to launch.Default: 1
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setType
The Spot instance request type.
Default:
one-time
- Parameters:
type
- The Spot instance request type.Default:
one-time
- See Also:
-
getType
The Spot instance request type.
Default:
one-time
- Returns:
- The Spot instance request type.
Default:
one-time
- See Also:
-
withType
The Spot instance request type.
Default:
one-time
- Parameters:
type
- The Spot instance request type.Default:
one-time
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setType
The Spot instance request type.
Default:
one-time
- Parameters:
type
- The Spot instance request type.Default:
one-time
- See Also:
-
withType
The Spot instance request type.
Default:
one-time
- Parameters:
type
- The Spot instance request type.Default:
one-time
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setValidFrom
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.
Default: The request is effective indefinitely.
- Parameters:
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.Default: The request is effective indefinitely.
-
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.
Default: The request is effective indefinitely.
- Returns:
- 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.
Default: The request is effective indefinitely.
-
withValidFrom
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.
Default: The request is effective indefinitely.
- Parameters:
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.Default: The request is effective indefinitely.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setValidUntil
The end date of the request. If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.
Default: The request is effective indefinitely.
- Parameters:
validUntil
- The end date of the request. If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.Default: The request is effective indefinitely.
-
getValidUntil
The end date of the request. If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.
Default: The request is effective indefinitely.
- Returns:
- The end date of the request. If this is a one-time request, the
request remains active until all instances launch, the request is
canceled, or this date is reached. If the request is persistent,
it remains active until it is canceled or this date and time is
reached.
Default: The request is effective indefinitely.
-
withValidUntil
The end date of the request. If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.
Default: The request is effective indefinitely.
- Parameters:
validUntil
- The end date of the request. If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.Default: The request is effective indefinitely.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setLaunchGroup
The instance launch group. Launch groups are Spot instances that launch together and terminate together.
Default: Instances are launched and terminated individually
- Parameters:
launchGroup
- The instance launch group. Launch groups are Spot instances that launch together and terminate together.Default: Instances are launched and terminated individually
-
getLaunchGroup
The instance launch group. Launch groups are Spot instances that launch together and terminate together.
Default: Instances are launched and terminated individually
- Returns:
- The instance launch group. Launch groups are Spot instances that
launch together and terminate together.
Default: Instances are launched and terminated individually
-
withLaunchGroup
The instance launch group. Launch groups are Spot instances that launch together and terminate together.
Default: Instances are launched and terminated individually
- Parameters:
launchGroup
- The instance launch group. Launch groups are Spot instances that launch together and terminate together.Default: Instances are launched and terminated individually
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAvailabilityZoneGroup
The user-specified name for a logical grouping of bids.
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 bids 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 bid is expired, or the bid falls below current market), 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.
- Parameters:
availabilityZoneGroup
- The user-specified name for a logical grouping of bids.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 bids 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 bid is expired, or the bid falls below current market), 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.
-
getAvailabilityZoneGroup
The user-specified name for a logical grouping of bids.
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 bids 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 bid is expired, or the bid falls below current market), 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.
- Returns:
- The user-specified name for a logical grouping of bids.
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 bids 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 bid is expired, or the bid falls below current market), 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.
-
withAvailabilityZoneGroup
The user-specified name for a logical grouping of bids.
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 bids 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 bid is expired, or the bid falls below current market), 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.
- Parameters:
availabilityZoneGroup
- The user-specified name for a logical grouping of bids.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 bids 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 bid is expired, or the bid falls below current market), 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.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setBlockDurationMinutes
The required duration for the Spot instances (also known as Spot blocks), in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).
The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
- Parameters:
blockDurationMinutes
- The required duration for the Spot instances (also known as Spot blocks), in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
-
getBlockDurationMinutes
The required duration for the Spot instances (also known as Spot blocks), in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).
The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
- Returns:
- The required duration for the Spot instances (also known as Spot
blocks), in minutes. This value must be a multiple of 60 (60,
120, 180, 240, 300, or 360).
The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
-
withBlockDurationMinutes
The required duration for the Spot instances (also known as Spot blocks), in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).
The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
- Parameters:
blockDurationMinutes
- The required duration for the Spot instances (also known as Spot blocks), in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
Note that you can't specify an Availability Zone group or a launch group if you specify a duration.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setLaunchSpecification
- Parameters:
launchSpecification
-
-
getLaunchSpecification
- Returns:
-
withLaunchSpecification
- Parameters:
launchSpecification
-- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getDryRunRequest
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.- Specified by:
getDryRunRequest
in interfaceDryRunSupportedRequest<RequestSpotInstancesRequest>
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
Description copied from class:AmazonWebServiceRequest
Creates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.- Overrides:
clone
in classAmazonWebServiceRequest
- See Also:
-