@Stability(value=Stable) public static final class LaunchTemplateSpotOptions.Builder extends Object implements software.amazon.jsii.Builder<LaunchTemplateSpotOptions>
LaunchTemplateSpotOptions| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
LaunchTemplateSpotOptions.Builder |
blockDuration(Duration blockDuration)
Sets the value of
LaunchTemplateSpotOptions.getBlockDuration() |
LaunchTemplateSpotOptions |
build()
Builds the configured instance.
|
LaunchTemplateSpotOptions.Builder |
interruptionBehavior(SpotInstanceInterruption interruptionBehavior)
Sets the value of
LaunchTemplateSpotOptions.getInterruptionBehavior() |
LaunchTemplateSpotOptions.Builder |
maxPrice(Number maxPrice)
Sets the value of
LaunchTemplateSpotOptions.getMaxPrice() |
LaunchTemplateSpotOptions.Builder |
requestType(SpotRequestType requestType)
Sets the value of
LaunchTemplateSpotOptions.getRequestType() |
LaunchTemplateSpotOptions.Builder |
validUntil(Expiration validUntil)
Sets the value of
LaunchTemplateSpotOptions.getValidUntil() |
@Stability(value=Stable) public LaunchTemplateSpotOptions.Builder blockDuration(Duration blockDuration)
LaunchTemplateSpotOptions.getBlockDuration()blockDuration - Spot Instances with a defined duration (also known as Spot blocks) are designed not to be interrupted and will run continuously for the duration you select.
You can use a duration of 1, 2, 3, 4, 5, or 6 hours.this@Stability(value=Stable) public LaunchTemplateSpotOptions.Builder interruptionBehavior(SpotInstanceInterruption interruptionBehavior)
LaunchTemplateSpotOptions.getInterruptionBehavior()interruptionBehavior - The behavior when a Spot Instance is interrupted.this@Stability(value=Stable) public LaunchTemplateSpotOptions.Builder maxPrice(Number maxPrice)
LaunchTemplateSpotOptions.getMaxPrice()maxPrice - Maximum hourly price you're willing to pay for each Spot instance.
The value is given
in dollars. ex: 0.01 for 1 cent per hour, or 0.001 for one-tenth of a cent per hour.this@Stability(value=Stable) public LaunchTemplateSpotOptions.Builder requestType(SpotRequestType requestType)
LaunchTemplateSpotOptions.getRequestType()requestType - The Spot Instance request type.
If you are using Spot Instances with an Auto Scaling group, use one-time requests, as the
Amazon EC2 Auto Scaling service handles requesting new Spot Instances whenever the group is
below its desired capacity.this@Stability(value=Stable) public LaunchTemplateSpotOptions.Builder validUntil(Expiration validUntil)
LaunchTemplateSpotOptions.getValidUntil()validUntil - The end date of the request.
For 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.this@Stability(value=Stable) public LaunchTemplateSpotOptions build()
build in interface software.amazon.jsii.Builder<LaunchTemplateSpotOptions>LaunchTemplateSpotOptionsNullPointerException - if any required attribute was not providedCopyright © 2022. All rights reserved.