Memanggil DeleteKeyPairs untuk menghapus pasangan kunci SSH.
Deskripsi operasi
Jika Anda berhasil menghapus pasangan kunci, Anda tidak dapat mengkueri pasangan kunci tersebut dengan memanggil DescribeKeyPairs.
Jika instans ENS Anda sudah terikat pada pasangan kunci, setelah pasangan kunci dihapus, Alibaba Cloud ENS tidak lagi menyimpan pasangan kunci SSH untuk Anda, tetapi instans masih dapat menggunakan pasangan kunci SSH tersebut secara normal. Saat Anda memanggil DescribeInstances untuk mengkueri informasi instans, nama pasangan kunci (KeyPairName) akan ditampilkan, tetapi informasi terkait lainnya tidak lagi ditampilkan.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ens:DeleteKeyPairs |
delete |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| KeyPairName |
string |
No |
Nama pasangan kunci. Aturan penamaan adalah sebagai berikut:
Sebelum menghapus pasangan kunci, Anda dapat memanggil DescribeKeyPairs untuk mengkueri pasangan kunci yang ada. |
TestKeyPairName |
| KeyPairId |
string |
No |
ID pasangan kunci SSH. |
ssh-5lywanlkih1zo9yl8eg**** |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
Contoh
Respons sukses
JSONformat
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E\t"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | MissingParameter | The input parameter that is mandatory for processing this request is not supplied. | |
| 400 | NoPermission | Permission denied. | |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. | |
| 400 | InvalidParameter | The errorMessage is %s. Please check it again. | |
| 400 | ens.interface.error | An error occurred while calling the API. | |
| 400 | PubKeyNameExisted | Public Key Pair Name Existed. | |
| 400 | PubKeyAttachedWithInstance | Public Key Attached With Instance. | |
| 400 | InvalidPubKeyBody | Invalid Public Key Body. | |
| 400 | PubKeyNameNotExist | Public Key Pair Name Not Exist. | |
| 400 | CallInterface | Call Interface Happen Error. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.