Mengimpor pasangan kunci yang sudah ada.
Deskripsi operasi
You can import an existing key pair to the console to log on to your Simple Application Server instances. The key pair must use a supported encryption method. For more information, see Q2: What encryption methods are supported for importing an existing key pair?.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
swas-open:ImportKeyPair |
create |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID wilayah tempat instans Simple Application Server berada. Panggil ListRegions untuk Tampilan daftar wilayah Alibaba Cloud yang didukung. |
cn-hangzhou |
| ClientToken |
string |
No |
Token klien yang digunakan untuk memastikan idempotensi permintaan. Buat nilai unik untuk parameter ini dari klien Anda. ClientToken hanya boleh berisi karakter ASCII dan tidak boleh lebih dari 64 karakter. Untuk informasi lebih lanjut, lihat Cara memastikan idempotensi. |
123e4567-e89b-12d3-a456-426655440000 |
| KeyPairName |
string |
Yes |
Nama pasangan kunci. Nama harus terdiri dari 2 hingga 64 karakter. Harus diawali dengan huruf atau karakter China. Tidak boleh diawali dengan http:// atau https://. Nama dapat berisi angka, titik dua (:), garis bawah (_), dan tanda hubung (-). |
KeyPairName |
| PublicKeyBody |
string |
Yes |
Konten kunci publik dari pasangan kunci. |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCbO5Govwhb0iHzoMYKkIQxjlHyHH8nxFsW6KF5saxgYhOwdeIpWngpi+/NDWQKvuOnXFFDh/o3eJJkh3rqP+RlMggt4HLQWOd9TS0f4/cgbAzud1caW9PnankCr**** |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
20758A-585D-4A41-A9B2-28DA8F4F534F |
| KeyPairName |
string |
The name of the key pair. The name must be 2 to 64 characters in length. It must start with a letter or a Chinese character. It cannot start with http:// or https://. The name can contain digits, colons (:), underscores (_), and hyphens (-). |
KeyPairName |
Contoh
Respons sukses
JSONformat
{
"RequestId": "20758A-585D-4A41-A9B2-28DA8F4F534F",
"KeyPairName": "KeyPairName"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | KeyPairNameAlreadyExist | The keyPair name already exist. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.