Method: Fog::Compute::AWS::Real#delete_key_pair

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

#delete_key_pair(key_name) ⇒ Object

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?

Amazon API Reference



20
21
22
23
24
25
26
27
# File 'lib/fog/compute/requests/aws/delete_key_pair.rb', line 20

def delete_key_pair(key_name)
  request(
    'Action'    => 'DeleteKeyPair',
    'KeyName'   => key_name,
    :idempotent => true,
    :parser     => Fog::Parsers::Compute::AWS::Basic.new
  )
end