deleteKeyPair
abstract suspend fun deleteKeyPair(input: DeleteKeyPairRequest = DeleteKeyPairRequest { }): DeleteKeyPairResponse
Deletes the specified key pair, by removing the public key from Amazon EC2.
Samples
fun main() {
//sampleStart
// This example deletes the specified key pair.
ec2Client.deleteKeyPair {
keyName = "my-key-pair"
}
//sampleEnd
}