| object | | |
RequestId | string | | 30637AD6-D977-4833-A54C-CC89483E**** |
TotalCount | integer | The total number of entries. | 10 |
PageNumber | integer | | 1 |
PageSize | integer | The number of entries per page. | 10 |
CommandInvocations | object [] | | |
InvokeId | string | The execution ID of the command. | t-hz0373jyzxt**** |
CreationTime | string | The time when the command was created. | 2023-04-27T10:11:58 |
CommandId | string | | c-hy0338xh28r**** |
InvocationStatus | string | The overall execution state of the command. Valid values:
- Pending: The command is being verified or sent.
- Invalid: The specified command type or parameter is invalid.
- Aborted: The command failed to be sent to the instances. To send a command to an instance, make sure that the instance is in the Running state and the command is sent to the instance within 1 minute.
- Running: The command is being run on the instances.
- Success: The command execution is complete, and the exit code is 0.
- Failed: The command execution is complete, and the exit code is not 0.
- Error: The command execution cannot proceed due to an exception.
- Timeout: The command execution timed out.
- Cancelled: The command execution is canceled, and the command is not started.
- Stopping: The command in the Running state is being stopped.
- Terminated: The command is terminated when it is being run.
| Success |
CommandName | string | | testCommandName |
CommandType | string | | RunShellScript |
CommandDescription | string | The description of the command. | testDescription |
Username | string | The username that is used to run the command. | root |
WorkingDir | string | The working directory of the command. | c:\wwwroot |
Timeout | long | The timeout period. Unit: seconds. | 60 |
CommandContent | string | The content of the command. | echo 123 |
Parameters | string | The custom parameters in the command. If no custom parameter exists in the command, the default value is {}. | {} |
InvokeInstances | object [] | The instances on which the command is run. | |
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:
-
Pending: The command is being verified or sent.
-
Invalid: The specified command type or parameter is invalid.
-
Aborted: The command failed to be sent to the instance. To send a command to an instance, make sure that the instance is in the Running state and the command is sent to the instance within 1 minute.
-
Running: The command is being run on the instance.
-
Success:
- Command that is set to run only once: The command execution is complete, and the exit code is 0.
- Command that is set to run on a schedule: The previous command execution is complete, the exit code is 0, and the specified cycle ends.
-
Failed:
- Command that is set to run only once: The command execution is complete, and the exit code is not 0.
- Command that is set to run on a schedule: The previous command execution is complete, the exit code is not 0, and the specified cycle is about to end.
-
Error: The command execution cannot proceed due to an exception.
-
Timeout: The command execution timed out.
-
Cancelled: The command execution is canceled, and the command is not started.
-
Stopping: The command task is being stopped.
-
Terminated: The command is terminated when it is being run.
| Running |
Output | string | | OutputMsg |
ExitCode | long | The exit code of the command.
- For Linux instances, the exit code is the exit code of the shell command.
- For Windows instances, the exit code is the exit code of the batch or PowerShell command.
| 0 |
ErrorInfo | string | The error message returned if the command failed to be sent or run. Valid values:
- null: The command is run as expected.
- the specified instance does not exists: The specified instance does not exist or is released.
- the instance has released when create task: The instance is released when the command is being run.
- the instance is not running when create task: The instance is not in the Running state when the command is being run.
- the command is not applicable: The command is not applicable to the specified instance.
- the specified account does not exists: The specified account does not exist.
- the specified directory does not exists: The specified directory does not exist.
- the cron job expression is invalid: The specified CRON expression for the execution schedule is invalid.
- the aliyun service is not running on the instance: Cloud Assistant Agent is not running.
- the aliyun service in the instance does not response: Cloud Assistant Agent does not respond to your request.
- the aliyun service in the instance is upgrading now: Cloud Assistant Agent is being updated.
- the aliyun service in the instance need upgrade: Cloud Assistant Agent needs to be updated.
- the command delivery has been timeout: The request to send the command timed out.
- the command execution has been timeout: The command execution timed out.
- the command execution got an exception: An exception occurred when the command was being run.
- the command execution has been interrupted: The command execution is interrupted.
- the command execution exit code is not zero: The command execution is complete, and the exit code is not 0.
| the specified instance does not exists |
ErrorCode | string | The error code returned if the command failed to be sent or run.
- null: The command is run as expected.
- InstanceNotExists: The specified instance does not exist or is released.
- InstanceReleased: The instance is released when the command is being run.
- InstanceNotRunning: The instance is not in the Running state when the command is being run.
- CommandNotApplicable: The command is not applicable to the specified instance.
- AccountNotExists: The specified account does not exist.
- DirectoryNotExists: The specified directory does not exist.
- BadCronExpression: The specified CRON expression for the execution schedule is invalid.
- ClientNotRunning: Cloud Assistant Agent is not running.
- ClientNotResponse: Cloud Assistant Agent does not respond to your request.
- ClientIsUpgrading: Cloud Assistant Agent is being updated.
- ClientNeedUpgrade: Cloud Assistant Agent needs to be updated.
- DeliveryTimeout: The request to send the command timed out.
- ExecutionTimeout: The command execution timed out.
- ExecutionException: An exception occurred when the command was being run.
- ExecutionInterrupted: The command execution is interrupted.
- ExitCodeNonzero: The command execution is complete, and the exit code is not 0.
| InstanceNotExists |