You need to enable JavaScript to run this app.
文档中心
云服务器

云服务器

复制全文
下载 pdf
云助手
DescribeInvocationResults - 查看命令执行结果
复制全文
下载 pdf
DescribeInvocationResults - 查看命令执行结果
调用DescribeInvocationResults接口,查看一条或多条任务的执行结果。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:DescribeInvocationResults​
要执行的操作,取值:DescribeInvocationResults。​
​
Version string 必选 示例值:2020-04-01​
API的版本,取值:2020-04-01。​
​
InvocationId string 必选 示例值:ivk-hz0jdfwd9f****​
作业ID,您可以调用DescribeInvocations接口查询获取。​
​
InstanceId string 可选 示例值:i-bp1i7m****​
实例ID。​
​
CommandId string 可选 示例值:cmd-hz0jdfwcsr****​
命令ID。​
​
InvocationResultStatus string 可选 示例值:Running​
单台实例执行命令的状态,取值:​
  • Pending:初始状态,命令正在等待调度执行。​
  • Running:命令运行中。​
  • Success:命令执行完成,执行成功。​
  • Failed:命令执行完成,执行失败。​
  • Timeout:命令执行超时。​
​
PageNumber integer 可选 示例值:1​
当前页码。​
  • 起始值:1。​
  • 默认值:1。​
​
PageSize integer 可选 示例值:10​
分页查询时设置的每页行数。​
  • 取值范围:1~100。​
  • 默认值:10。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
PageNumber integer 示例值:1​
当前页码。​
​
PageSize integer 示例值:10​
分页查询时设置的每页行数。​
​
TotalCount integer 示例值:100​
执行结果总个数。​
​
InvocationResults object[] 示例值:--​
符合条件的命令执行结果信息。​
ErrorMessage string 示例值:Task execution timeout​
命令执行失败的错误信息。​
​
InvocationResultId string 示例值:ivr-ycidmmvbm****​
任务执行结果ID。​
​
InvocationId string 示例值:ivk-ycidmmvbm9l8j****​
任务执行ID。​
​
CommandId string 示例值:cmd-ybtvqkikdih96z8****​
命令ID。​
​
InstanceId string 示例值:i-ychq95dknz5pk****​
实例ID。​
​
InvocationResultStatus string 示例值:Running​
单台实例的命令进度状态。​
​
Username string 示例值:root​
在实例中执行命令的用户名称。​
​
Output string 示例值:success​
经过Base64编码的命令执行后输出信息。​
说明​
返回的Base64编码命令执行信息,最大不超过16KB。​
​
ExitCode integer 示例值:0​
脚本执行后的退出状态码。​
说明​
Linux实例为Shell命令的退出码。​
​
ErrorCode string 示例值:TaskExecutionTimeout​
命令执行失败的错误码。取值:​
  • TaskDeliveryTimeout:表示命令下发超时。​
  • TaskExecutionTimeout:表示命令执行超时。​
  • TaskExecutionFailed:表示命令执行失败。​
​
StartTime string 示例值:2023-06-30T09:00:45Z​
命令在实例中开始执行的时间。​
​
EndTime string 示例值:2023-07-01T09:00:45Z​
命令执行的完成时间。​
​
​
​
​
请求示例​
​
GET /?Version=2020-04-01&Action=DescribeInvocationResults&InvocationId=ivk-ycmpp**** HTTP/1.1​
Host: ecs.cn-beijing.volcengineapi.com​
Region: cn-beijing​
ServiceName: ecs​
​
​
返回示例​
​
​
{​
"ResponseMetadata": {​
"RequestId": "2023083016*****",​
"Action": "DescribeInvocationResults",​
"Version": "2020-04-01",​
"Service": "ecs",​
"Region": "cn-beijing"​
},​
"Result": {​
"PageSize": 10,​
"PageNumber": 1,​
"TotalCount": 1,​
"InvocationResults": [​
{​
"InvocationResultId": "ivr-ycmppwq****",​
"InvocationId": "ivk-ycmpp*****",​
"CommandId": "cmd-ycmpnj****",​
"InstanceId": "i-ycmd005****",​
"InvocationResultStatus": "Success",​
"Username": "root",​
"Output": "aGVsbG8gd29ybGQh",​
"ExitCode": 0,​
"StartTime": "2022-08-29T09:10:16Z",​
"EndTime": "2022-08-29T09:10:16Z",​
"ErrorCode": "",​
"ErrorMessage": ""​
}​
]​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
MissingParameter.AccountId​
The required parameter AccountId is not supplied.​
用户ID不能为空。​
400​
MissingParameter.InvocationId​
The required InvocationId is not supplied.​
作业 ID 不能为空。​
400​
InvalidInvocationResultStatus.Malformed​
The specified InvocationResultStatus is malformed.​
指定的作业执行结果状态不合法。​
500​
InternalError​
An internal error has occurred.​
内部错误,请重试。如果多次尝试失败,请提交工单。​
​
​
最近更新时间:2026.03.30 20:41:29
这个页面对您有帮助吗?
有用
有用
无用
无用