@Stability(value=Stable)
public static interface CfnLaunchTemplate.SpotOptionsProperty
extends software.amazon.jsii.JsiiSerializable
SpotOptions is a property of AWS::EC2::LaunchTemplate InstanceMarketOptions .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;
SpotOptionsProperty spotOptionsProperty = SpotOptionsProperty.builder()
.blockDurationMinutes(123)
.instanceInterruptionBehavior("instanceInterruptionBehavior")
.maxPrice("maxPrice")
.spotInstanceType("spotInstanceType")
.validUntil("validUntil")
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnLaunchTemplate.SpotOptionsProperty.Builder
A builder for
CfnLaunchTemplate.SpotOptionsProperty |
static class |
CfnLaunchTemplate.SpotOptionsProperty.Jsii$Proxy
An implementation for
CfnLaunchTemplate.SpotOptionsProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnLaunchTemplate.SpotOptionsProperty.Builder |
builder() |
default Number |
getBlockDurationMinutes()
The required duration for the Spot Instances (also known as Spot blocks), in minutes.
|
default String |
getInstanceInterruptionBehavior()
The behavior when a Spot Instance is interrupted.
|
default String |
getMaxPrice()
The maximum hourly price you're willing to pay for the Spot Instances.
|
default String |
getSpotInstanceType()
The Spot Instance request type.
|
default String |
getValidUntil()
The end date of the request.
|
@Stability(value=Stable) @Nullable default Number getBlockDurationMinutes()
This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).
@Stability(value=Stable) @Nullable default String getInstanceInterruptionBehavior()
The default is terminate .
@Stability(value=Stable) @Nullable default String getMaxPrice()
@Stability(value=Stable) @Nullable default String getSpotInstanceType()
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.
@Stability(value=Stable) @Nullable default String getValidUntil()
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. The default end date is 7 days from the current date.
@Stability(value=Stable) static CfnLaunchTemplate.SpotOptionsProperty.Builder builder()
Copyright © 2022. All rights reserved.