Skip to content

/AWS1/CL_EC2SPOTMARKETOPTIONS

The options for Spot Instances.

CONSTRUCTOR

IMPORTING

Optional arguments:

iv_maxprice TYPE /AWS1/EC2STRING /AWS1/EC2STRING

The maximum hourly price that you're willing to pay for a Spot Instance. 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.

If you specify a maximum price, it must be more than USD $0.001. Specifying a value below USD $0.001 will result in an InvalidParameterValue error message.

iv_spotinstancetype TYPE /AWS1/EC2SPOTINSTANCETYPE /AWS1/EC2SPOTINSTANCETYPE

The Spot Instance request type. For RunInstances, persistent Spot Instance requests are only supported when the instance interruption behavior is either hibernate or stop.

iv_blockdurationminutes TYPE /AWS1/EC2INTEGER /AWS1/EC2INTEGER

Deprecated.

iv_validuntil TYPE /AWS1/EC2DATETIME /AWS1/EC2DATETIME

The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). 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.

iv_instanceinterruptionbehav TYPE /AWS1/EC2INSTINTERRUPTIONBEHAV /AWS1/EC2INSTINTERRUPTIONBEHAV

The behavior when a Spot Instance is interrupted.

If Configured (for HibernationOptions ) is set to true, the InstanceInterruptionBehavior parameter is automatically set to hibernate. If you set it to stop or terminate, you'll get an error.

If Configured (for HibernationOptions ) is set to false or null, the InstanceInterruptionBehavior parameter is automatically set to terminate. You can also set it to stop or hibernate.

For more information, see Interruption behavior in the Amazon EC2 User Guide.


Queryable Attributes

MaxPrice

The maximum hourly price that you're willing to pay for a Spot Instance. 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.

If you specify a maximum price, it must be more than USD $0.001. Specifying a value below USD $0.001 will result in an InvalidParameterValue error message.

Accessible with the following methods

Method Description
GET_MAXPRICE() Getter for MAXPRICE, with configurable default
ASK_MAXPRICE() Getter for MAXPRICE w/ exceptions if field has no value
HAS_MAXPRICE() Determine if MAXPRICE has a value

SpotInstanceType

The Spot Instance request type. For RunInstances, persistent Spot Instance requests are only supported when the instance interruption behavior is either hibernate or stop.

Accessible with the following methods

Method Description
GET_SPOTINSTANCETYPE() Getter for SPOTINSTANCETYPE, with configurable default
ASK_SPOTINSTANCETYPE() Getter for SPOTINSTANCETYPE w/ exceptions if field has no va
HAS_SPOTINSTANCETYPE() Determine if SPOTINSTANCETYPE has a value

BlockDurationMinutes

Deprecated.

Accessible with the following methods

Method Description
GET_BLOCKDURATIONMINUTES() Getter for BLOCKDURATIONMINUTES, with configurable default
ASK_BLOCKDURATIONMINUTES() Getter for BLOCKDURATIONMINUTES w/ exceptions if field has n
HAS_BLOCKDURATIONMINUTES() Determine if BLOCKDURATIONMINUTES has a value

ValidUntil

The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). 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.

Accessible with the following methods

Method Description
GET_VALIDUNTIL() Getter for VALIDUNTIL, with configurable default
ASK_VALIDUNTIL() Getter for VALIDUNTIL w/ exceptions if field has no value
HAS_VALIDUNTIL() Determine if VALIDUNTIL has a value

InstanceInterruptionBehavior

The behavior when a Spot Instance is interrupted.

If Configured (for HibernationOptions ) is set to true, the InstanceInterruptionBehavior parameter is automatically set to hibernate. If you set it to stop or terminate, you'll get an error.

If Configured (for HibernationOptions ) is set to false or null, the InstanceInterruptionBehavior parameter is automatically set to terminate. You can also set it to stop or hibernate.

For more information, see Interruption behavior in the Amazon EC2 User Guide.

Accessible with the following methods

Method Description
GET_INSTINTERRUPTIONBEHAV() Getter for INSTANCEINTERRUPTIONBEHAVIOR, with configurable d
ASK_INSTINTERRUPTIONBEHAV() Getter for INSTANCEINTERRUPTIONBEHAVIOR w/ exceptions if fie
HAS_INSTINTERRUPTIONBEHAV() Determine if INSTANCEINTERRUPTIONBEHAVIOR has a value