Method: Fog::Compute::AWS::Real#cancel_spot_instance_requests

Defined in:
lib/fog/aws/requests/compute/cancel_spot_instance_requests.rb

#cancel_spot_instance_requests(spot_instance_request_id) ⇒ Object

Terminate specified spot instance requests

Parameters

  • spot_instance_request_id<~Array> - Ids of instances to terminates

Returns

  • response<~Excon::Response>:

    • body<~Hash>:

      • ‘requestId’<~String> id of request

      • ‘spotInstanceRequestSet’<~Array>:

        • ‘spotInstanceRequestId’<~String> - id of cancelled spot instance

        • ‘state’<~String> - state of cancelled spot instance

Amazon API Reference

[View source]

22
23
24
25
26
27
28
29
# File 'lib/fog/aws/requests/compute/cancel_spot_instance_requests.rb', line 22

def cancel_spot_instance_requests(spot_instance_request_id)
  params = Fog::AWS.indexed_param('SpotInstanceRequestId', spot_instance_request_id)
  request({
    'Action'    => 'CancelSpotInstanceRequests',
    :idempotent => true,
    :parser     => Fog::Parsers::Compute::AWS::CancelSpotInstanceRequests.new
  }.merge!(params))
end