Amazon Elastic Compute Cloud
API Reference (API Version 2013-02-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did 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

KeyName

The name of the key pair.

Type: String

Default: None

Required: Yes

Response Elements

The following elements are returned in a DeleteKeyPairResponse element.

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/2013-02-01/">
  <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> 
  <return>true</return>
</DeleteKeyPairResponse>