Interface SpotInstanceRequest.Builder
-
- All Superinterfaces:
Buildable
,CopyableBuilder<SpotInstanceRequest.Builder,SpotInstanceRequest>
,SdkBuilder<SpotInstanceRequest.Builder,SpotInstanceRequest>
,SdkPojo
- Enclosing class:
- SpotInstanceRequest
public static interface SpotInstanceRequest.Builder extends SdkPojo, CopyableBuilder<SpotInstanceRequest.Builder,SpotInstanceRequest>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description SpotInstanceRequest.Builder
actualBlockHourlyPrice(String actualBlockHourlyPrice)
Deprecated.SpotInstanceRequest.Builder
availabilityZoneGroup(String availabilityZoneGroup)
The Availability Zone group.SpotInstanceRequest.Builder
blockDurationMinutes(Integer blockDurationMinutes)
Deprecated.SpotInstanceRequest.Builder
createTime(Instant createTime)
The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).default SpotInstanceRequest.Builder
fault(Consumer<SpotInstanceStateFault.Builder> fault)
The fault codes for the Spot Instance request, if any.SpotInstanceRequest.Builder
fault(SpotInstanceStateFault fault)
The fault codes for the Spot Instance request, if any.SpotInstanceRequest.Builder
instanceId(String instanceId)
The instance ID, if an instance has been launched to fulfill the Spot Instance request.SpotInstanceRequest.Builder
instanceInterruptionBehavior(String instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted.SpotInstanceRequest.Builder
instanceInterruptionBehavior(InstanceInterruptionBehavior instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted.SpotInstanceRequest.Builder
launchedAvailabilityZone(String launchedAvailabilityZone)
The Availability Zone in which the request is launched.SpotInstanceRequest.Builder
launchGroup(String launchGroup)
The instance launch group.default SpotInstanceRequest.Builder
launchSpecification(Consumer<LaunchSpecification.Builder> launchSpecification)
Additional information for launching instances.SpotInstanceRequest.Builder
launchSpecification(LaunchSpecification launchSpecification)
Additional information for launching instances.SpotInstanceRequest.Builder
productDescription(String productDescription)
The product description associated with the Spot Instance.SpotInstanceRequest.Builder
productDescription(RIProductDescription productDescription)
The product description associated with the Spot Instance.SpotInstanceRequest.Builder
spotInstanceRequestId(String spotInstanceRequestId)
The ID of the Spot Instance request.SpotInstanceRequest.Builder
spotPrice(String spotPrice)
The maximum price per unit hour that you are willing to pay for a Spot Instance.SpotInstanceRequest.Builder
state(String state)
The state of the Spot Instance request.SpotInstanceRequest.Builder
state(SpotInstanceState state)
The state of the Spot Instance request.default SpotInstanceRequest.Builder
status(Consumer<SpotInstanceStatus.Builder> status)
The status code and status message describing the Spot Instance request.SpotInstanceRequest.Builder
status(SpotInstanceStatus status)
The status code and status message describing the Spot Instance request.SpotInstanceRequest.Builder
tags(Collection<Tag> tags)
Any tags assigned to the resource.SpotInstanceRequest.Builder
tags(Consumer<Tag.Builder>... tags)
Any tags assigned to the resource.SpotInstanceRequest.Builder
tags(Tag... tags)
Any tags assigned to the resource.SpotInstanceRequest.Builder
type(String type)
The Spot Instance request type.SpotInstanceRequest.Builder
type(SpotInstanceType type)
The Spot Instance request type.SpotInstanceRequest.Builder
validFrom(Instant validFrom)
The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).SpotInstanceRequest.Builder
validUntil(Instant validUntil)
The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
-
-
-
Method Detail
-
actualBlockHourlyPrice
SpotInstanceRequest.Builder actualBlockHourlyPrice(String actualBlockHourlyPrice)
Deprecated.
- Parameters:
actualBlockHourlyPrice
- Deprecated.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
availabilityZoneGroup
SpotInstanceRequest.Builder availabilityZoneGroup(String availabilityZoneGroup)
The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.
- Parameters:
availabilityZoneGroup
- The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
blockDurationMinutes
SpotInstanceRequest.Builder blockDurationMinutes(Integer blockDurationMinutes)
Deprecated.
- Parameters:
blockDurationMinutes
- Deprecated.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
createTime
SpotInstanceRequest.Builder createTime(Instant createTime)
The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
- Parameters:
createTime
- The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
fault
SpotInstanceRequest.Builder fault(SpotInstanceStateFault fault)
The fault codes for the Spot Instance request, if any.
- Parameters:
fault
- The fault codes for the Spot Instance request, if any.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
fault
default SpotInstanceRequest.Builder fault(Consumer<SpotInstanceStateFault.Builder> fault)
The fault codes for the Spot Instance request, if any.
This is a convenience method that creates an instance of theSpotInstanceStateFault.Builder
avoiding the need to create one manually viaSpotInstanceStateFault.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tofault(SpotInstanceStateFault)
.- Parameters:
fault
- a consumer that will call methods onSpotInstanceStateFault.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
fault(SpotInstanceStateFault)
-
instanceId
SpotInstanceRequest.Builder instanceId(String instanceId)
The instance ID, if an instance has been launched to fulfill the Spot Instance request.
- Parameters:
instanceId
- The instance ID, if an instance has been launched to fulfill the Spot Instance request.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
launchGroup
SpotInstanceRequest.Builder launchGroup(String launchGroup)
The instance launch group. Launch groups are Spot Instances that launch together and terminate together.
- Parameters:
launchGroup
- The instance launch group. Launch groups are Spot Instances that launch together and terminate together.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
launchSpecification
SpotInstanceRequest.Builder launchSpecification(LaunchSpecification launchSpecification)
Additional information for launching instances.
- Parameters:
launchSpecification
- Additional information for launching instances.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
launchSpecification
default SpotInstanceRequest.Builder launchSpecification(Consumer<LaunchSpecification.Builder> launchSpecification)
Additional information for launching instances.
This is a convenience method that creates an instance of theLaunchSpecification.Builder
avoiding the need to create one manually viaLaunchSpecification.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tolaunchSpecification(LaunchSpecification)
.- Parameters:
launchSpecification
- a consumer that will call methods onLaunchSpecification.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
launchSpecification(LaunchSpecification)
-
launchedAvailabilityZone
SpotInstanceRequest.Builder launchedAvailabilityZone(String launchedAvailabilityZone)
The Availability Zone in which the request is launched.
- Parameters:
launchedAvailabilityZone
- The Availability Zone in which the request is launched.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
productDescription
SpotInstanceRequest.Builder productDescription(String productDescription)
The product description associated with the Spot Instance.
- Parameters:
productDescription
- The product description associated with the Spot Instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
RIProductDescription
,RIProductDescription
-
productDescription
SpotInstanceRequest.Builder productDescription(RIProductDescription productDescription)
The product description associated with the Spot Instance.
- Parameters:
productDescription
- The product description associated with the Spot Instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
RIProductDescription
,RIProductDescription
-
spotInstanceRequestId
SpotInstanceRequest.Builder spotInstanceRequestId(String spotInstanceRequestId)
The ID of the Spot Instance request.
- Parameters:
spotInstanceRequestId
- The ID of the Spot Instance request.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
spotPrice
SpotInstanceRequest.Builder spotPrice(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.
- Parameters:
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.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
state
SpotInstanceRequest.Builder state(String state)
The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide for Linux Instances.
- Parameters:
state
- The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide for Linux Instances.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
SpotInstanceState
,SpotInstanceState
-
state
SpotInstanceRequest.Builder state(SpotInstanceState state)
The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide for Linux Instances.
- Parameters:
state
- The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide for Linux Instances.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
SpotInstanceState
,SpotInstanceState
-
status
SpotInstanceRequest.Builder status(SpotInstanceStatus status)
The status code and status message describing the Spot Instance request.
- Parameters:
status
- The status code and status message describing the Spot Instance request.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
status
default SpotInstanceRequest.Builder status(Consumer<SpotInstanceStatus.Builder> status)
The status code and status message describing the Spot Instance request.
This is a convenience method that creates an instance of theSpotInstanceStatus.Builder
avoiding the need to create one manually viaSpotInstanceStatus.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tostatus(SpotInstanceStatus)
.- Parameters:
status
- a consumer that will call methods onSpotInstanceStatus.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
status(SpotInstanceStatus)
-
tags
SpotInstanceRequest.Builder tags(Collection<Tag> tags)
Any tags assigned to the resource.
- Parameters:
tags
- Any tags assigned to the resource.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
SpotInstanceRequest.Builder tags(Tag... tags)
Any tags assigned to the resource.
- Parameters:
tags
- Any tags assigned to the resource.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
SpotInstanceRequest.Builder tags(Consumer<Tag.Builder>... tags)
Any tags assigned to the resource.
This is a convenience method that creates an instance of theTag.Builder
avoiding the need to create one manually viaTag.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed to#tags(List
.) - Parameters:
tags
- a consumer that will call methods onTag.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#tags(java.util.Collection
)
-
type
SpotInstanceRequest.Builder type(String type)
The Spot Instance request type.
- Parameters:
type
- The Spot Instance request type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
SpotInstanceType
,SpotInstanceType
-
type
SpotInstanceRequest.Builder type(SpotInstanceType type)
The Spot Instance request type.
- Parameters:
type
- The Spot Instance request type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
SpotInstanceType
,SpotInstanceType
-
validFrom
SpotInstanceRequest.Builder validFrom(Instant validFrom)
The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The request becomes active at this date and time.
- Parameters:
validFrom
- The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The request becomes active at this date and time.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
validUntil
SpotInstanceRequest.Builder validUntil(Instant 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.
- Parameters:
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.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
instanceInterruptionBehavior
SpotInstanceRequest.Builder instanceInterruptionBehavior(String instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted.
- Parameters:
instanceInterruptionBehavior
- The behavior when a Spot Instance is interrupted.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
InstanceInterruptionBehavior
,InstanceInterruptionBehavior
-
instanceInterruptionBehavior
SpotInstanceRequest.Builder instanceInterruptionBehavior(InstanceInterruptionBehavior instanceInterruptionBehavior)
The behavior when a Spot Instance is interrupted.
- Parameters:
instanceInterruptionBehavior
- The behavior when a Spot Instance is interrupted.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
InstanceInterruptionBehavior
,InstanceInterruptionBehavior
-
-