Menginstal Agen pada instans tertentu.
Deskripsi operasi
Memanggil operasi ini untuk menginstal Agen bersifat asinkron. Setelah Anda memanggil operasi ini, task_id akan dikembalikan. Anda dapat menggunakan ID ini untuk memanggil operasi GetAgentTask guna mengkueri status eksekusi Tugas.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
sysom:InstallAgent |
none |
*Semua sumber daya.
|
None | None |
Sintaks permintaan
POST /api/v1/am/agent/install_agent HTTP/1.1
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
Badan permintaan. |
|
| agent_id |
string |
Yes |
ID Komponen yang akan diinstal. |
74a86327-3170-412c-8e67-da3389ec56a9 |
| agent_version |
string |
Yes |
Versi Komponen yang akan diinstal. |
3.4.0-1 |
| install_type |
string |
Yes |
Tipe instalasi. Nilai valid:
|
InstallAndUpgrade |
| instances |
array<object> |
Yes |
Daftar Instans tempat menginstal Komponen. |
|
|
object |
Yes |
Informasi Instans. |
||
| instance |
string |
Yes |
ID Instans. |
i-wz9b9vucz1iubsz8sjqo |
| region |
string |
Yes |
ID Wilayah. |
cn-hangzhou |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Skema Tanggapan. |
||
| RequestId |
string |
ID permintaan, yang dapat digunakan untuk diagnostik end-to-end. |
1D8887FC-4BDB-5A1C-AB19-135C29A9E481 |
| code |
string |
Kode status.
|
Success |
| data |
object |
Data tanggapan. |
|
| task_id |
string |
ID Tugas. Anda dapat menggunakan ID Tugas ini untuk memanggil operasi GetAgentTask guna mengkueri status eksekusi Tugas. |
26b3cd97389c43dcad6bc4901c36fcec |
| message |
string |
Paket error.
|
"" |
Contoh
Respons sukses
JSONformat
{
"RequestId": "1D8887FC-4BDB-5A1C-AB19-135C29A9E481",
"code": "Success",
"data": {
"task_id": "26b3cd97389c43dcad6bc4901c36fcec"
},
"message": "\"\""
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | SysomOpenAPI.AgentNotExists | Agent not exists. | |
| 400 | SysomOpenAPI.AgentTaskNotFound | Agent task not found. | |
| 400 | SysomOpenAPI.AgentVersionNotExists | Agent version not exists. | |
| 400 | SysomOpenAPI.InstanceNotExists | Instance not exists. | |
| 400 | SysomOpenAPI.InvalidParameter | Invalid parameters passed when calling the interface. | |
| 400 | SysomOpenAPI.MissingParameter | Missing parameters. | |
| 400 | SysomOpenAPI.NoAgentInstalled | No SysOM Agent version available. | |
| 400 | SysomOpenAPI.NotAuthorizedInstance | Instance not authorized. | |
| 400 | SysomOpenAPI.NotOwnInstance | Not own current instance. | |
| 400 | SysomOpenAPI.NotOwnTask | Diagnosis result does not belong to the current account. | |
| 400 | SysomOpenAPI.NotSupportedAgentVersion | Unsupported sysom agent version. | |
| 400 | SysomOpenAPI.ServerError | Server error, please correct the code according to the error message. | |
| 400 | SysomOpenAPI.ServiceRoleNotExists | Service role does not exist, please init the sysom service first. | |
| 400 | SysomOpenAPI.RegionNotSupport | Region not supported. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.