Show / Hide Table of Contents

Class CfnLaunchTemplate.SpotOptionsProperty

Specifies options for Spot Instances.

Inheritance
object
CfnLaunchTemplate.SpotOptionsProperty
Implements
CfnLaunchTemplate.ISpotOptionsProperty
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnLaunchTemplate.SpotOptionsProperty : CfnLaunchTemplate.ISpotOptionsProperty
Syntax (vb)
Public Class CfnLaunchTemplate.SpotOptionsProperty Implements CfnLaunchTemplate.ISpotOptionsProperty
Remarks

SpotOptions is a property of AWS::EC2::LaunchTemplate InstanceMarketOptions .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-spotoptions.html

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

Constructors

SpotOptionsProperty()

Specifies options for Spot Instances.

Properties

BlockDurationMinutes

Deprecated.

InstanceInterruptionBehavior

The behavior when a Spot Instance is interrupted.

MaxPrice

The maximum hourly price you're willing to pay for a Spot Instance.

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.

Constructors

SpotOptionsProperty()

Specifies options for Spot Instances.

public SpotOptionsProperty()
Remarks

SpotOptions is a property of AWS::EC2::LaunchTemplate InstanceMarketOptions .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-spotoptions.html

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"
             };

Properties

BlockDurationMinutes

Deprecated.

public double? BlockDurationMinutes { get; set; }
Property Value

double?

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-spotoptions.html#cfn-ec2-launchtemplate-spotoptions-blockdurationminutes

InstanceInterruptionBehavior

The behavior when a Spot Instance is interrupted.

public string? InstanceInterruptionBehavior { get; set; }
Property Value

string

Remarks

The default is terminate .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-spotoptions.html#cfn-ec2-launchtemplate-spotoptions-instanceinterruptionbehavior

MaxPrice

The maximum hourly price you're willing to pay for a Spot Instance.

public string? MaxPrice { get; set; }
Property Value

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 do specify this parameter, it must be more than USD $0.001. Specifying a value below USD $0.001 will result in an InvalidParameterValue error message when the launch template is used to launch an instance.

If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-spotoptions.html#cfn-ec2-launchtemplate-spotoptions-maxprice

SpotInstanceType

The Spot Instance request type.

public string? SpotInstanceType { get; set; }
Property Value

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.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-spotoptions.html#cfn-ec2-launchtemplate-spotoptions-spotinstancetype

ValidUntil

The end date of the request, in UTC format ( YYYY-MM-DD T HH:MM:SS Z). Supported only for persistent requests.

public string? ValidUntil { get; set; }
Property Value

string

Remarks

    Default: 7 days from the current date

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-spotoptions.html#cfn-ec2-launchtemplate-spotoptions-validuntil

    Implements

    CfnLaunchTemplate.ISpotOptionsProperty
    Back to top Generated by DocFX