Meng-query eksekusi dan status eksekusi dari perintah Cloud Assistant.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
swas-open:DescribeCommandInvocations |
get |
*All Resource
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID region. Anda dapat memanggil operasi ListRegions untuk meng-query daftar region terbaru. |
cn-hangzhou |
| InstanceId |
string |
No |
ID dari simple application server. |
ace0706b2ac4454d984295a94213**** |
| CommandId |
string |
No |
ID perintah. Anda dapat memanggil operasi DescribeCommands untuk meng-query semua ID perintah yang tersedia. |
c-sh02yh0932w**** |
| InvokeId |
string |
No |
ID eksekusi dari perintah. |
t-hz02p9545t6**** |
| CommandName |
string |
No |
Nama perintah. Jika baik CommandName maupun InstanceId ditentukan, CommandName tidak berlaku. |
testName |
| InvocationStatus |
string |
No |
Status eksekusi keseluruhan dari perintah. Nilai parameter ini bergantung pada status eksekusi perintah pada semua instance yang terlibat. Nilai yang valid:
Catatan
Nilai parameter respons |
Success |
| CommandType |
string |
No |
Jenis perintah. Nilai yang valid:
|
RunPowerShellScript |
| PageNumber |
string |
No |
Nomor halaman. Halaman dimulai dari 1. Nilai default: 1. |
1 |
| PageSize |
string |
No |
Jumlah entri per halaman. Nilai maksimum: 50. Nilai default: 10. |
10 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Skema Respons |
||
| RequestId |
string |
ID request. |
30637AD6-D977-4833-A54C-CC89483E**** |
| TotalCount |
integer |
Total jumlah entri. |
10 |
| PageNumber |
integer |
Nomor halaman. |
1 |
| PageSize |
integer |
Jumlah entri per halaman. |
10 |
| CommandInvocations |
array<object> |
Eksekusi perintah. |
|
|
array<object> |
|||
| InvokeId |
string |
ID eksekusi dari perintah. |
t-hz0373jyzxt**** |
| CreationTime |
string |
Waktu saat perintah dibuat. |
2023-04-27T10:11:58 |
| CommandId |
string |
ID perintah. |
c-hy0338xh28r**** |
| InvocationStatus |
string |
Status eksekusi keseluruhan dari perintah. Nilai yang valid:
|
Success |
| CommandName |
string |
Nama perintah. |
testCommandName |
| CommandType |
string |
Jenis perintah. |
RunShellScript |
| CommandDescription |
string |
Deskripsi dari perintah. |
testDescription |
| Username |
string |
Nama pengguna yang digunakan untuk menjalankan perintah. |
root |
| WorkingDir |
string |
Direktori kerja dari perintah. |
c:\wwwroot |
| Timeout |
integer |
Periode timeout. Satuan: detik. |
60 |
| CommandContent |
string |
Isi dari perintah. |
echo 123 |
| Parameters |
string |
Parameter kustom dalam perintah. Jika tidak ada parameter kustom dalam perintah, nilai defaultnya adalah {}. |
{} |
| InvokeInstances |
array<object> |
Instance tempat perintah dijalankan. |
|
|
object |
|||
| InstanceId |
string |
The ID of the simple application server. |
2445f4aecdac4b71ba2c7e3a7ccf**** |
| StartTime |
string |
The beginning of the time range during which the command is run on the instance. |
2023-05-09T03:32:24Z |
| FinishTime |
string |
The end of the time range during which the command is run on the instance. |
2023-04-03T02:42:29Z |
| InvocationStatus |
string |
The execution state of the command on a single instance. Valid values:
|
Running |
| Output |
string |
The command output. |
OutputMsg |
| ExitCode |
integer |
The exit code of the command.
|
0 |
| ErrorInfo |
string |
The error message returned if the command failed to be sent or run. Valid values:
|
the specified instance does not exists |
| ErrorCode |
string |
The error code returned if the command failed to be sent or run.
|
InstanceNotExists |
Contoh
Respons sukses
JSONformat
{
"RequestId": "30637AD6-D977-4833-A54C-CC89483E****",
"TotalCount": 10,
"PageNumber": 1,
"PageSize": 10,
"CommandInvocations": [
{
"InvokeId": "t-hz0373jyzxt****",
"CreationTime": "2023-04-27T10:11:58",
"CommandId": "c-hy0338xh28r****",
"InvocationStatus": "Success",
"CommandName": "testCommandName",
"CommandType": "RunShellScript",
"CommandDescription": "testDescription",
"Username": "root",
"WorkingDir": "c:\\wwwroot",
"Timeout": 60,
"CommandContent": "echo 123",
"Parameters": "{}",
"InvokeInstances": [
{
"InstanceId": "2445f4aecdac4b71ba2c7e3a7ccf****",
"StartTime": "2023-05-09T03:32:24Z",
"FinishTime": "2023-04-03T02:42:29Z",
"InvocationStatus": "Running",
"Output": "OutputMsg",
"ExitCode": 0,
"ErrorInfo": "the specified instance does not exists",
"ErrorCode": "InstanceNotExists"
}
]
}
]
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.