Interface CfnLaunchTemplate.SpotOptionsProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnLaunchTemplate.SpotOptionsProperty.Jsii$Proxy
- Enclosing class:
CfnLaunchTemplate
@Stability(Stable)
public static interface CfnLaunchTemplate.SpotOptionsProperty
extends software.amazon.jsii.JsiiSerializable
Specifies options for Spot Instances.
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();
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forCfnLaunchTemplate.SpotOptionsProperty
static final class
An implementation forCfnLaunchTemplate.SpotOptionsProperty
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default Number
Deprecated.default String
The behavior when a Spot Instance is interrupted.default String
The maximum hourly price you're willing to pay for the Spot Instances.default String
The Spot Instance request type.default String
The end date of the request, in UTC format ( YYYY-MM-DD T HH:MM:SS Z).Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getBlockDurationMinutes
Deprecated.- See Also:
-
getInstanceInterruptionBehavior
The behavior when a Spot Instance is interrupted.The default is
terminate
.- See Also:
-
getMaxPrice
The maximum hourly price you're willing to pay for the Spot Instances.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 Spot Instances will be interrupted more frequently than if you do not specify this parameter.
- See Also:
-
getSpotInstanceType
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.- See Also:
-
getValidUntil
The end date of the request, in UTC format ( YYYY-MM-DD T HH:MM:SS Z). Supported only for persistent requests.- 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,
ValidUntil
is not supported. The request remains active until all instances launch or you cancel the request.
Default: 7 days from the current date
- See Also:
- For a persistent request, the request remains active until the
-
builder
-