Interface SpotInstanceRequest.Builder

    • Method Detail

      • 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

        SpotInstanceRequest.Builder fault​(SpotInstanceStateFault 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.
      • 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.
      • 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:
        RIProductDescription, RIProductDescription
      • 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

        SpotInstanceRequest.Builder state​(String 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 for Linux Instances.

        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 for Linux Instances.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        SpotInstanceState, SpotInstanceState
      • state

        SpotInstanceRequest.Builder state​(SpotInstanceState 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 for Linux Instances.

        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 for Linux Instances.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        SpotInstanceState, SpotInstanceState
      • status

        SpotInstanceRequest.Builder status​(SpotInstanceStatus 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.
      • tags

        SpotInstanceRequest.Builder tags​(Collection<Tag> 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

        SpotInstanceRequest.Builder tags​(Tag... 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

        SpotInstanceRequest.Builder tags​(Consumer<Tag.Builder>... 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).

        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:
        #tags(java.util.Collection)
      • 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.