com.amazonaws.services.ec2.model

## クラス RequestSpotInstancesRequest

- java.lang.Object
- - com.amazonaws.AmazonWebServiceRequest
  - - com.amazonaws.services.ec2.model.RequestSpotInstancesRequest

- すべての実装されたインタフェース:
    java.io.Serializable

      public class RequestSpotInstancesRequest
      extends AmazonWebServiceRequest
      implements java.io.Serializable

  Container for the parameters to the `RequestSpotInstances operation`.

  Creates a Spot Instance request.

  Spot Instances are instances that Amazon EC2 starts on your behalf when the maximum price that you specify exceeds the current Spot Price. Amazon EC2 periodically sets the Spot Price based on available Spot Instance capacity and current spot instance requests.

  For conceptual information about Spot Instances, refer to the Amazon Elastic Compute Cloud Developer Guide or Amazon Elastic Compute Cloud User Guide.

  関連項目:
    `AmazonEC2.requestSpotInstances(RequestSpotInstancesRequest)`, 直列化された形式

- - ### コンストラクタの概要

    コンストラクタ
    コンストラクタと説明
    `RequestSpotInstancesRequest()` Default constructor for a new RequestSpotInstancesRequest object.
    `RequestSpotInstancesRequest(java.lang.String spotPrice)` Constructs a new RequestSpotInstancesRequest object.

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `boolean` | `equals(java.lang.Object obj)`
    `java.lang.String` | `getAvailabilityZoneGroup()` Specifies the Availability Zone group.
    `java.lang.Integer` | `getInstanceCount()` Specifies the maximum number of Spot Instances to launch.
    `java.lang.String` | `getLaunchGroup()` Specifies the instance launch group.
    `LaunchSpecification` | `getLaunchSpecification()` Specifies additional launch instance information.
    `java.lang.String` | `getSpotPrice()` Specifies the maximum hourly price for any Spot Instance launched to fulfill the request.
    `java.lang.String` | `getType()` Specifies the Spot Instance type.
    `java.util.Date` | `getValidFrom()` Defines the start date of the request.
    `java.util.Date` | `getValidUntil()` End date of the request.
    `int` | `hashCode()`
    `void` | `setAvailabilityZoneGroup(java.lang.String availabilityZoneGroup)` Specifies the Availability Zone group.
    `void` | `setInstanceCount(java.lang.Integer instanceCount)` Specifies the maximum number of Spot Instances to launch.
    `void` | `setLaunchGroup(java.lang.String launchGroup)` Specifies the instance launch group.
    `void` | `setLaunchSpecification(LaunchSpecification launchSpecification)` Specifies additional launch instance information.
    `void` | `setSpotPrice(java.lang.String spotPrice)` Specifies the maximum hourly price for any Spot Instance launched to fulfill the request.
    `void` | `setType(SpotInstanceType type)` Specifies the Spot Instance type.
    `void` | `setType(java.lang.String type)` Specifies the Spot Instance type.
    `void` | `setValidFrom(java.util.Date validFrom)` Defines the start date of the request.
    `void` | `setValidUntil(java.util.Date validUntil)` End date of the request.
    `java.lang.String` | `toString()` Returns a string representation of this object; useful for testing and debugging.
    `RequestSpotInstancesRequest` | `withAvailabilityZoneGroup(java.lang.String availabilityZoneGroup)` Specifies the Availability Zone group.
    `RequestSpotInstancesRequest` | `withInstanceCount(java.lang.Integer instanceCount)` Specifies the maximum number of Spot Instances to launch.
    `RequestSpotInstancesRequest` | `withLaunchGroup(java.lang.String launchGroup)` Specifies the instance launch group.
    `RequestSpotInstancesRequest` | `withLaunchSpecification(LaunchSpecification launchSpecification)` Specifies additional launch instance information.
    `RequestSpotInstancesRequest` | `withSpotPrice(java.lang.String spotPrice)` Specifies the maximum hourly price for any Spot Instance launched to fulfill the request.
    `RequestSpotInstancesRequest` | `withType(SpotInstanceType type)` Specifies the Spot Instance type.
    `RequestSpotInstancesRequest` | `withType(java.lang.String type)` Specifies the Spot Instance type.
    `RequestSpotInstancesRequest` | `withValidFrom(java.util.Date validFrom)` Defines the start date of the request.
    `RequestSpotInstancesRequest` | `withValidUntil(java.util.Date validUntil)` End date of the request.

    - ### クラスから継承されたメソッド com.amazonaws.AmazonWebServiceRequest

      `copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials`

    - ### クラスから継承されたメソッド java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### コンストラクタの詳細

    - #### RequestSpotInstancesRequest

          public RequestSpotInstancesRequest()

      Default constructor for a new RequestSpotInstancesRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.

    - #### RequestSpotInstancesRequest

          public RequestSpotInstancesRequest(java.lang.String spotPrice)

      Constructs a new RequestSpotInstancesRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
      パラメータ:
        `spotPrice` - Specifies the maximum hourly price for any Spot Instance launched to fulfill the request.

  - ### メソッドの詳細

    - #### getSpotPrice

          public java.lang.String getSpotPrice()

      Specifies the maximum hourly price for any Spot Instance launched to fulfill the request.
      戻り値:
        Specifies the maximum hourly price for any Spot Instance launched to fulfill the request.

    - #### setSpotPrice

          public void setSpotPrice(java.lang.String spotPrice)

      Specifies the maximum hourly price for any Spot Instance launched to fulfill the request.
      パラメータ:
        `spotPrice` - Specifies the maximum hourly price for any Spot Instance launched to fulfill the request.

    - #### withSpotPrice

          public RequestSpotInstancesRequest withSpotPrice(java.lang.String spotPrice)

      Specifies the maximum hourly price for any Spot Instance launched to fulfill the request.

      Returns a reference to this object so that method calls can be chained together.

      パラメータ:
        `spotPrice` - Specifies the maximum hourly price for any Spot Instance launched to fulfill the request.

    - #### getInstanceCount

          public java.lang.Integer getInstanceCount()

      Specifies the maximum number of Spot Instances to launch.
      戻り値:
        Specifies the maximum number of Spot Instances to launch.

    - #### setInstanceCount

          public void setInstanceCount(java.lang.Integer instanceCount)

      Specifies the maximum number of Spot Instances to launch.
      パラメータ:
        `instanceCount` - Specifies the maximum number of Spot Instances to launch.

    - #### withInstanceCount

          public RequestSpotInstancesRequest withInstanceCount(java.lang.Integer instanceCount)

      Specifies the maximum number of Spot Instances to launch.

      Returns a reference to this object so that method calls can be chained together.

      パラメータ:
        `instanceCount` - Specifies the maximum number of Spot Instances to launch.

    - #### getType

          public java.lang.String getType()

      Specifies the Spot Instance type.

      Constraints:
      Allowed Values: one-time, persistent

      戻り値:
        Specifies the Spot Instance type.
      関連項目:
        `SpotInstanceType`

    - #### setType

          public void setType(java.lang.String type)

      Specifies the Spot Instance type.

      Constraints:
      Allowed Values: one-time, persistent

      パラメータ:
        `type` - Specifies the Spot Instance type.
      関連項目:
        `SpotInstanceType`

    - #### withType

          public RequestSpotInstancesRequest withType(java.lang.String type)

      Specifies the Spot Instance type.

      Returns a reference to this object so that method calls can be chained together.

      Constraints:
      Allowed Values: one-time, persistent

      パラメータ:
        `type` - Specifies the Spot Instance type.
      関連項目:
        `SpotInstanceType`

    - #### setType

          public void setType(SpotInstanceType type)

      Specifies the Spot Instance type.

      Constraints:
      Allowed Values: one-time, persistent

      パラメータ:
        `type` - Specifies the Spot Instance type.
      関連項目:
        `SpotInstanceType`

    - #### withType

          public RequestSpotInstancesRequest withType(SpotInstanceType type)

      Specifies the Spot Instance type.

      Returns a reference to this object so that method calls can be chained together.

      Constraints:
      Allowed Values: one-time, persistent

      パラメータ:
        `type` - Specifies the Spot Instance type.
      関連項目:
        `SpotInstanceType`

    - #### getValidFrom

          public java.util.Date getValidFrom()

      Defines the start date of the request.

      If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.

      戻り値:
        Defines the start date of the request.

        If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.

    - #### setValidFrom

          public void setValidFrom(java.util.Date validFrom)

      Defines the start date of the request.

      If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.

      パラメータ:
        `validFrom` - Defines the start date of the request.

        If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.

    - #### withValidFrom

          public RequestSpotInstancesRequest withValidFrom(java.util.Date validFrom)

      Defines the start date of the request.

      If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.

      Returns a reference to this object so that method calls can be chained together.

      パラメータ:
        `validFrom` - Defines the start date of the request.

        If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.

    - #### getValidUntil

          public java.util.Date getValidUntil()

      End date of the request.

      If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.

      戻り値:
        End date of the request.

        If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.

    - #### setValidUntil

          public void setValidUntil(java.util.Date validUntil)

      End date of the request.

      If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.

      パラメータ:
        `validUntil` - End date of the request.

        If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.

    - #### withValidUntil

          public RequestSpotInstancesRequest withValidUntil(java.util.Date validUntil)

      End date of the request.

      If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.

      Returns a reference to this object so that method calls can be chained together.

      パラメータ:
        `validUntil` - End date of the request.

        If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.

    - #### getLaunchGroup

          public java.lang.String getLaunchGroup()

      Specifies the instance launch group. Launch groups are Spot Instances that launch and terminate together.
      戻り値:
        Specifies the instance launch group. Launch groups are Spot Instances that launch and terminate together.

    - #### setLaunchGroup

          public void setLaunchGroup(java.lang.String launchGroup)

      Specifies the instance launch group. Launch groups are Spot Instances that launch and terminate together.
      パラメータ:
        `launchGroup` - Specifies the instance launch group. Launch groups are Spot Instances that launch and terminate together.

    - #### withLaunchGroup

          public RequestSpotInstancesRequest withLaunchGroup(java.lang.String launchGroup)

      Specifies the instance launch group. Launch groups are Spot Instances that launch and terminate together.

      Returns a reference to this object so that method calls can be chained together.

      パラメータ:
        `launchGroup` - Specifies the instance launch group. Launch groups are Spot Instances that launch and terminate together.

    - #### getAvailabilityZoneGroup

          public java.lang.String getAvailabilityZoneGroup()

      Specifies the Availability Zone group.

      When specifying the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.

      戻り値:
        Specifies the Availability Zone group.

        When specifying the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.

    - #### setAvailabilityZoneGroup

          public void setAvailabilityZoneGroup(java.lang.String availabilityZoneGroup)

      Specifies the Availability Zone group.

      When specifying the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.

      パラメータ:
        `availabilityZoneGroup` - Specifies the Availability Zone group.

        When specifying the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.

    - #### withAvailabilityZoneGroup

          public RequestSpotInstancesRequest withAvailabilityZoneGroup(java.lang.String availabilityZoneGroup)

      Specifies the Availability Zone group.

      When specifying the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.

      Returns a reference to this object so that method calls can be chained together.

      パラメータ:
        `availabilityZoneGroup` - Specifies the Availability Zone group.

        When specifying the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.

    - #### getLaunchSpecification

          public LaunchSpecification getLaunchSpecification()

      Specifies additional launch instance information.
      戻り値:
        Specifies additional launch instance information.

    - #### setLaunchSpecification

          public void setLaunchSpecification(LaunchSpecification launchSpecification)

      Specifies additional launch instance information.
      パラメータ:
        `launchSpecification` - Specifies additional launch instance information.

    - #### withLaunchSpecification

          public RequestSpotInstancesRequest withLaunchSpecification(LaunchSpecification launchSpecification)

      Specifies additional launch instance information.

      Returns a reference to this object so that method calls can be chained together.

      パラメータ:
        `launchSpecification` - Specifies additional launch instance information.

    - #### toString

          public java.lang.String toString()

      Returns a string representation of this object; useful for testing and debugging.
      オーバーライド:
        `toString` クラス内 `java.lang.Object`
      戻り値:
        A string representation of this object.
      関連項目:
        `Object.toString()`

    - #### hashCode

          public int hashCode()

      オーバーライド:
        `hashCode` クラス内 `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object obj)

      オーバーライド:
        `equals` クラス内 `java.lang.Object`