Interface SpotInstanceRequest.Builder

All Superinterfaces:
Buildable, CopyableBuilder<SpotInstanceRequest.Builder,SpotInstanceRequest>, SdkBuilder<SpotInstanceRequest.Builder,SpotInstanceRequest>, SdkPojo
Enclosing class:
SpotInstanceRequest

public static interface SpotInstanceRequest.Builder extends SdkPojo, CopyableBuilder<SpotInstanceRequest.Builder,SpotInstanceRequest>
  • Method Details

    • actualBlockHourlyPrice

      SpotInstanceRequest.Builder actualBlockHourlyPrice(String actualBlockHourlyPrice)

      Deprecated.

      Parameters:
      actualBlockHourlyPrice - Deprecated.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • availabilityZoneGroup

      SpotInstanceRequest.Builder availabilityZoneGroup(String availabilityZoneGroup)

      The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.

      Parameters:
      availabilityZoneGroup - The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • blockDurationMinutes

      SpotInstanceRequest.Builder blockDurationMinutes(Integer blockDurationMinutes)

      Deprecated.

      Parameters:
      blockDurationMinutes - Deprecated.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • createTime

      SpotInstanceRequest.Builder createTime(Instant createTime)

      The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

      Parameters:
      createTime - The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • fault

      The fault codes for the Spot Instance request, if any.

      Parameters:
      fault - The fault codes for the Spot Instance request, if any.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • fault

      The fault codes for the Spot Instance request, if any.

      This is a convenience method that creates an instance of the SpotInstanceStateFault.Builder avoiding the need to create one manually via SpotInstanceStateFault.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to fault(SpotInstanceStateFault).

      Parameters:
      fault - a consumer that will call methods on SpotInstanceStateFault.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • instanceId

      SpotInstanceRequest.Builder instanceId(String instanceId)

      The instance ID, if an instance has been launched to fulfill the Spot Instance request.

      Parameters:
      instanceId - The instance ID, if an instance has been launched to fulfill the Spot Instance request.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • launchGroup

      SpotInstanceRequest.Builder launchGroup(String launchGroup)

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

      Parameters:
      launchGroup - The instance launch group. Launch groups are Spot Instances that launch together and terminate together.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • launchSpecification

      SpotInstanceRequest.Builder launchSpecification(LaunchSpecification launchSpecification)

      Additional information for launching instances.

      Parameters:
      launchSpecification - Additional information for launching instances.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • launchSpecification

      default SpotInstanceRequest.Builder launchSpecification(Consumer<LaunchSpecification.Builder> launchSpecification)

      Additional information for launching instances.

      This is a convenience method that creates an instance of the LaunchSpecification.Builder avoiding the need to create one manually via LaunchSpecification.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to launchSpecification(LaunchSpecification).

      Parameters:
      launchSpecification - a consumer that will call methods on LaunchSpecification.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • launchedAvailabilityZone

      SpotInstanceRequest.Builder launchedAvailabilityZone(String launchedAvailabilityZone)

      The Availability Zone in which the request is launched.

      Parameters:
      launchedAvailabilityZone - The Availability Zone in which the request is launched.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • productDescription

      SpotInstanceRequest.Builder productDescription(String productDescription)

      The product description associated with the Spot Instance.

      Parameters:
      productDescription - The product description associated with the Spot Instance.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • productDescription

      SpotInstanceRequest.Builder productDescription(RIProductDescription productDescription)

      The product description associated with the Spot Instance.

      Parameters:
      productDescription - The product description associated with the Spot Instance.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • spotInstanceRequestId

      SpotInstanceRequest.Builder spotInstanceRequestId(String spotInstanceRequestId)

      The ID of the Spot Instance request.

      Parameters:
      spotInstanceRequestId - The ID of the Spot Instance request.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • spotPrice

      SpotInstanceRequest.Builder spotPrice(String spotPrice)

      The maximum price per unit hour that you are 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 instances will be interrupted more frequently than if you do not specify this parameter.

      Parameters:
      spotPrice - The maximum price per unit hour that you are 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 instances will be interrupted more frequently than if you do not specify this parameter.

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

      The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide.

      Parameters:
      state - The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • state

      The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide.

      Parameters:
      state - The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • status

      The status code and status message describing the Spot Instance request.

      Parameters:
      status - The status code and status message describing the Spot Instance request.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • status

      The status code and status message describing the Spot Instance request.

      This is a convenience method that creates an instance of the SpotInstanceStatus.Builder avoiding the need to create one manually via SpotInstanceStatus.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to status(SpotInstanceStatus).

      Parameters:
      status - a consumer that will call methods on SpotInstanceStatus.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • tags

      Any tags assigned to the resource.

      Parameters:
      tags - Any tags assigned to the resource.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • tags

      Any tags assigned to the resource.

      Parameters:
      tags - Any tags assigned to the resource.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • tags

      Any tags assigned to the resource.

      This is a convenience method that creates an instance of the Tag.Builder avoiding the need to create one manually via Tag.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to tags(List<Tag>).

      Parameters:
      tags - a consumer that will call methods on Tag.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • type

      The Spot Instance request type.

      Parameters:
      type - The Spot Instance request type.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • type

      The Spot Instance request type.

      Parameters:
      type - The Spot Instance request type.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • validFrom

      SpotInstanceRequest.Builder validFrom(Instant validFrom)

      The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The request becomes active at this date and time.

      Parameters:
      validFrom - The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The request becomes active at this date and time.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • validUntil

      SpotInstanceRequest.Builder validUntil(Instant validUntil)

      The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).

      • 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, the request remains active until all instances launch, the request is canceled, or the validUntil date and time is reached. By default, the request is valid for 7 days from the date the request was created.

      Parameters:
      validUntil - The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).

      • 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, the request remains active until all instances launch, the request is canceled, or the validUntil date and time is reached. By default, the request is valid for 7 days from the date the request was created.

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

      SpotInstanceRequest.Builder instanceInterruptionBehavior(String instanceInterruptionBehavior)

      The behavior when a Spot Instance is interrupted.

      Parameters:
      instanceInterruptionBehavior - The behavior when a Spot Instance is interrupted.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • instanceInterruptionBehavior

      SpotInstanceRequest.Builder instanceInterruptionBehavior(InstanceInterruptionBehavior instanceInterruptionBehavior)

      The behavior when a Spot Instance is interrupted.

      Parameters:
      instanceInterruptionBehavior - The behavior when a Spot Instance is interrupted.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: