Mengikat pasangan kunci ke server aplikasi sederhana.
Deskripsi operasi
You can bind only one key pair to a simple application server in the Simple Application Server console. If a simple application server has a key pair bound, the new key pair overwrites the original key pair.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
swas-open:AttachKeyPair |
update |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID Wilayah server aplikasi sederhana. Anda dapat memanggil operasi ListRegions untuk mengkueri daftar Wilayah terbaru. |
cn-hangzhou |
| ClientToken |
string |
No |
Token Klien yang digunakan untuk memastikan idempotensi permintaan. Anda dapat menggunakan Klien untuk menghasilkan token, tetapi Anda harus memastikan bahwa token tersebut unik di antara permintaan yang berbeda. token hanya dapat berisi karakter ASCII dan tidak boleh melebihi 64 karakter. Untuk informasi lebih lanjut, lihat Cara memastikan idempotensi. |
123e4567-e89b-12d3-a456-426655440000 |
| InstanceIds |
array |
Yes |
ID server aplikasi sederhana. Anda dapat menentukan maksimum 50 ID server aplikasi sederhana. |
|
|
string |
No |
The ID of the simple application server to which you want to bind the SSH key pair. You can specify a maximum of 50 IDs of simple application servers. |
2ad1ae67295445f598017499dc**** |
|
| KeyPairName |
string |
Yes |
Nama pasangan kunci yang ingin Anda ikat ke server aplikasi sederhana. Nama harus terdiri dari 2 hingga 64 karakter dan dapat berisi huruf, angka, titik dua (:), garis bawah (_), dan tanda hubung (-). Nama harus diawali dengan huruf tetapi tidak boleh diawali dengan http:// atau https://. |
test |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
30637AD6-D977-4833-A54C-CC89483E**** |
| TotalCount |
integer |
The total number of simple application servers to which the key pair is bound. |
2 |
| FailCount |
integer |
The total number of simple application servers to which the key pair failed to be bound. |
2 |
| Results |
array<object> |
The request results. |
|
|
object |
The operation results. |
||
| Code |
string |
The HTTP status code. |
200 |
| Message |
string |
The response message. |
success |
| Success |
string |
Indicates whether the key pair is bound to the simple application server successfully. Valid values:
|
true |
| InstanceId |
string |
The simple application server ID. |
aa6e71ddb35c46679bc4753d6219d604 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "30637AD6-D977-4833-A54C-CC89483E****",
"TotalCount": 2,
"FailCount": 2,
"Results": [
{
"Code": "200",
"Message": "success",
"Success": "true",
"InstanceId": "aa6e71ddb35c46679bc4753d6219d604"
}
]
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 404 | InvalidInstanceId.NotFound | The specified Instance Id does not exist. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.