Amazon Elastic Compute Cloud
API Reference (API Version 2011-12-15)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

DeleteKeyPair

Description

Deletes the specified key pair, by removing the public key from Amazon EC2. You must own the key pair.

Request Parameters

NameDescriptionRequired

KeyName

Name of the key pair to delete.

Type: String

Default: None

Yes

Response Elements

The elements in the following table are wrapped in a DeleteKeyPairResponse structure.

NameDescription

requestId

The ID of the request.

Type: xsd:string

return

Returns true if the request succeeds. Otherwise, returns an error.

Type: xsd:boolean

Examples

Example Request

This example deletes the gsg-keypair key pair.

https://ec2.amazonaws.com/?Action=DeleteKeyPair
&KeyName=gsg-keypair
&AUTHPARAMS

Example Response

<DeleteKeyPairResponse xmlns="http://ec2.amazonaws.com/doc/2011-12-15/">
  <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> 
  <return>true</return>
</DeleteKeyPairResponse>