Memanggil ImportKeyPair untuk mengimpor bagian kunci publik dari pasangan kunci RSA yang dihasilkan oleh alat lain.
Deskripsi operasi
Setelah Anda mengimpor pasangan kunci, Alibaba Cloud ENS menyimpan bagian kunci publik untuk Anda. Anda perlu menyimpan bagian kunci privat dari pasangan kunci dengan baik secara mandiri.
Saat ini, hanya format ssh-rsa yang didukung.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ens:ImportKeyPair |
create |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| KeyPairName |
string |
Yes |
Nama pasangan kunci. Aturan penamaannya adalah sebagai berikut:
Hanya satu pasangan kunci yang dapat diteruskan. |
TestKeyPairName |
| PublicKeyBody |
string |
Yes |
Konten kunci publik dari pasangan kunci. Hanya satu konten yang dapat diteruskan. |
ssh-rsa AAAAB**** |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| KeyPairFingerPrint |
string |
Sidik jari pasangan kunci. Format sidik jari kunci publik yang ditentukan dalam RFC 4716 digunakan, dan algoritma message-digest MD5 diterapkan. |
fdaf8ff7a756ef843814fc**** |
| KeyPairName |
string |
Nama pasangan kunci. |
TestKeyPairName |
| RequestId |
string |
ID permintaan. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
Contoh
Respons sukses
JSONformat
{
"KeyPairFingerPrint": "fdaf8ff7a756ef843814fc****",
"KeyPairName": "TestKeyPairName",
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
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 | InvalidSecurityGroupId.NotFound | The specified SecurityGroupId does not exist. | |
| 400 | SecurityGroupRuleConflict.Duplicated | The SecurityGroup rule already exists. | |
| 400 | AuthorizationLimitExceed | The limit of authorization records in the security group reaches. | |
| 400 | ens.interface.error | An error occurred while calling the API. | |
| 400 | CallInterface | Call Interface Happen Error. | |
| 400 | InvalidPublicKeyBody.Malformed | The PublicKeyBody format is not supported. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.