Enum SpotRequestType

java.lang.Object
java.lang.Enum<SpotRequestType>
software.amazon.awscdk.services.ec2.SpotRequestType
All Implemented Interfaces:
Serializable, Comparable<SpotRequestType>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:39.530Z") @Stability(Stable) public enum SpotRequestType extends Enum<SpotRequestType>
The Spot Instance request type.

See Also:
  • Enum Constant Details

    • ONE_TIME

      @Stability(Stable) public static final SpotRequestType ONE_TIME
      A one-time Spot Instance request remains active until Amazon EC2 launches the Spot Instance, the request expires, or you cancel the request.

      If the Spot price exceeds your maximum price or capacity is not available, your Spot Instance is terminated and the Spot Instance request is closed.

    • PERSISTENT

      @Stability(Stable) public static final SpotRequestType PERSISTENT
      A persistent Spot Instance request remains active until it expires or you cancel it, even if the request is fulfilled.

      If the Spot price exceeds your maximum price or capacity is not available, your Spot Instance is interrupted. After your instance is interrupted, when your maximum price exceeds the Spot price or capacity becomes available again, the Spot Instance is started if stopped or resumed if hibernated.

  • Method Details

    • values

      public static SpotRequestType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static SpotRequestType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null