delete_key_pair
(**kwargs)¶Deletes the specified key pair, by removing the public key from Amazon EC2.
See also: AWS API Documentation
Request Syntax
response = client.delete_key_pair(
KeyName='string',
KeyPairId='string',
DryRun=True|False
)
DryRunOperation
. Otherwise, it is UnauthorizedOperation
.None
Examples
This example deletes the specified key pair.
response = client.delete_key_pair(
KeyName='my-key-pair',
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}