public function deleteKeyPair($keyName)
{
$result = false;
$options['KeyName'] = (string) $keyName;
$response = $this->client->call(ucfirst(__FUNCTION__), $options);
if ($response->getError() === false) {
$sxml = simplexml_load_string($response->getRawContent());
if ((string) $sxml->return != 'true') {
throw new Ec2Exception(sprintf('Amazon Ec2 could not delete key pair "%s". It returned "%s"', $options['KeyName'], $sxml->return));
}
$result = true;
}
return $result;
}