Sha256: 13ed69b6a0d9a5f619720e2e347b5056f9238891ae58c89f94183a52b07be7f1
Contents?: true
Size: 974 Bytes
Versions: 29
Compression:
Stored size: 974 Bytes
Contents
module Fog module AWS module EC2 class Real # Delete a key pair that you own # # ==== Parameters # * key_name<~String> - Name of the key pair. # # ==== Returns # * response<~Excon::Response>: # * body<~Hash>: # * 'requestId'<~String> id of request # * 'return'<~Boolean> - success? def delete_key_pair(key_name) request( 'Action' => 'DeleteKeyPair', 'KeyName' => key_name, :parser => Fog::Parsers::AWS::EC2::Basic.new ) end end class Mock def delete_key_pair(key_name) response = Excon::Response.new @data[:key_pairs].delete(key_name) response.status = 200 response.body = { 'requestId' => Fog::AWS::Mock.request_id, 'return' => true } response end end end end end
Version data entries
29 entries across 29 versions & 1 rubygems