Interface CfnLaunchTemplate.ISpotOptionsProperty
Specifies options for Spot Instances.
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public interface ISpotOptionsProperty
Syntax (vb)
Public Interface ISpotOptionsProperty
Remarks
SpotOptions
is a property of AWS::EC2::LaunchTemplate InstanceMarketOptions .
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
var spotOptionsProperty = new SpotOptionsProperty {
BlockDurationMinutes = 123,
InstanceInterruptionBehavior = "instanceInterruptionBehavior",
MaxPrice = "maxPrice",
SpotInstanceType = "spotInstanceType",
ValidUntil = "validUntil"
};
Synopsis
Properties
BlockDurationMinutes | Deprecated. |
InstanceInterruptionBehavior | The behavior when a Spot Instance is interrupted. |
MaxPrice | The maximum hourly price you're willing to pay for the Spot Instances. |
SpotInstanceType | The Spot Instance request type. |
ValidUntil | The end date of the request, in UTC format ( YYYY-MM-DD T HH:MM:SS Z). Supported only for persistent requests. |
Properties
BlockDurationMinutes
Deprecated.
virtual Nullable<double> BlockDurationMinutes { get; }
Property Value
System.Nullable<System.Double>
Remarks
InstanceInterruptionBehavior
The behavior when a Spot Instance is interrupted.
virtual string InstanceInterruptionBehavior { get; }
Property Value
System.String
Remarks
MaxPrice
The maximum hourly price you're willing to pay for the Spot Instances.
virtual string MaxPrice { get; }
Property Value
System.String
Remarks
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.
SpotInstanceType
The Spot Instance request type.
virtual string SpotInstanceType { get; }
Property Value
System.String
Remarks
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.
ValidUntil
The end date of the request, in UTC format ( YYYY-MM-DD T HH:MM:SS Z). Supported only for persistent requests.
virtual string ValidUntil { get; }
Property Value
System.String