Sha256: e7e77631d6e880aca5098a4202b6be9c206371a254a06ee0363f44001bef90b2

Contents?: true

Size: 1.21 KB

Versions: 4

Compression:

Stored size: 1.21 KB

Contents

module Fog
  module Compute
    class AWS
      class Real

        require 'fog/compute/parsers/aws/cancel_spot_instance_requests'

        # 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}[http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CancelSpotInstanceRequests.html]
        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

      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
brightbox-cli-0.13.1 lib/brightbox-cli/vendor/fog/lib/fog/compute/requests/aws/cancel_spot_instance_requests.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/fog/lib/fog/compute/requests/aws/cancel_spot_instance_requests.rb
fog-0.11.0 lib/fog/compute/requests/aws/cancel_spot_instance_requests.rb
fog-0.10.0 lib/fog/compute/requests/aws/cancel_spot_instance_requests.rb