Skip to content

Cancels one or more Spot Instance requests

Description

Cancels one or more Spot Instance requests.

Canceling a Spot Instance request does not terminate running Spot Instances associated with the request.

Usage

ec2_cancel_spot_instance_requests(DryRun, SpotInstanceRequestIds)

Arguments

  • DryRun

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • SpotInstanceRequestIds

    [required] The IDs of the Spot Instance requests.

Value

A list with the following syntax:

list(
  CancelledSpotInstanceRequests = list(
    list(
      SpotInstanceRequestId = "string",
      State = "active"|"open"|"closed"|"cancelled"|"completed"
    )
  )
)

Request syntax

svc$cancel_spot_instance_requests(
  DryRun = TRUE|FALSE,
  SpotInstanceRequestIds = list(
    "string"
  )
)

Examples

# This example cancels a Spot Instance request.
svc$cancel_spot_instance_requests(
  SpotInstanceRequestIds = list(
    "sir-08b93456"
  )
)