這篇文章帶給大家的內容是關於如何查看雲助手指令的執行結果並且在指定ECS實例中的實際執行結果,有一定的參考價值,有需要的朋友可以參考一下,希望對你有所幫助。
DescribeInvocationResults
描述
當您執行指令後,不代表指令一定成功運行,且一定有預期的命令效果。您需要透過DescribeInvocationResults查看實際的具體執行結果,以實際輸出結果為準。
請求參數
# 傳回參數
#指令執行結果集InvocationResultSetType
實例執行結果類型InvocationResultType
範例
#請求範例
https://ecs.aliyuncs.com/?Action=DescribeInvocationResults &RegionId=cn-hangzhou &InvokeId=t-7d2a745b412b4601b2d47f6a768d3a14 &<公共请求参数>
正常返回範例
XML格式
<DescribeInvocationResultsResponse> <TotalCount>5</TotalCount> <PageNumber>1</PageNumber> <PageSize>5</PageSize> <InvocationResults> <InvocationResult> <FinishedTime>2018-01-05 15:45:02</FinishedTime> <InstanceId>i-uf614fhehhzmxdqw</InstanceId> <Output>MTU6NDU6MDEK</Output> <InvokeRecordStatus> Finished<InvokeRecordStatus> <ExitCode>0</ExitCode> </InvocationResult> <InvocationResult> <FinishedTime>2018-01-05 15:40:02</FinishedTime> <InstanceId>i-uf614fhehhzmxdqw</InstanceId> <Output> </Output> <InvokeRecordStatus> Finished<InvokeRecordStatus> <ExitCode>0</ExitCode> </InvocationResult> <InvocationResult> <FinishedTime>2018-01-05 15:30:02</FinishedTime> <InstanceId>i-uf614fhehhzmxdqw</InstanceId> <Output>MTU6MzA6MDEK</Output> <ExitCode>0</ExitCode> </InvocationResult> <InvocationResult> <FinishedTime>2018-01-05 15:20:02</FinishedTime> <InstanceId>i-uf614fhehhzmxdqw</InstanceId> <Output> </Output> <ExitCode>0</ExitCode> </InvocationResult> <InvocationResult> <FinishedTime>2018-01-05 15:15:02</FinishedTime> <InstanceId>i-uf614fhehhzmxdqw</InstanceId> <Output>MTU6MTU6MDEK</Output> <ExitCode>0</ExitCode> </InvocationResult> </InvocationResults> <RequestId>"E69EF3CC-94CD-42E7-8926-F133B86387C0</RequestId> </DescribeInvocationResultsResponse>
JSON格式
{ "Invocation": { "TotalCount": 5, "PageNumber": 1, "InvocationResults": { "InvocationResult": [ { "FinishedTime": "2018-01-05 15:45:02", "InstanceId": "i-uf614fhehhzmxdqw", "Output": "MTU6NDU6MDEK", “InvokeRecordStatus”:“Finished”, "ExitCode": 0 }, { "FinishedTime": "2018-01-05 15:40:02", "InstanceId": "i-uf614fhehhzmxdqw", “InvokeRecordStatus”:“Finished”, "Output": "", "ExitCode": 0 }, { "FinishedTime": "2018-01-05 15:30:02", "InstanceId": "i-uf614fhehhzmxdqw", "Output": "MTU6MzA6MDEK", "ExitCode": 0 }, { "FinishedTime": "2018-01-05 15:20:02", "InstanceId": "i-uf614fhehhzmd3zj4k74", "Output": "", "ExitCode": 0 }, { "FinishedTime": "2018-01-05 15:15:02", "InstanceId": "i-uf614fhehhzmd3zj4k74", “InvokeRecordStatus”:“Finished”, "Output": "MTU6MTU6MDEK", "ExitCode": 0 } ] }, "PageSize": 5 }, "RequestId": ""E69EF3CC-94CD-42E7-8926-F133B86387C0" }
異常返回範例
XML格式
<Error> <RequestId>E69EF3CC-94CD-42E7-8926-F133B86387C0</RequestId> <HostId>ecs.aliyuncs.com</HostId> <Code>MissingParameter.RegionId</Code> <Message>The input parameter “RegionId” that is mandatory for processing this request is not supplied.</Message> </Error>
#JSON格式
{ "RequestId": "E69EF3CC-94CD-42E7-8926-F133B86387C0", "HostId": "ecs.aliyuncs.com" "Code": "MissingParameter.RegionId" "Message": "The input parameter “RegionId” that is mandatory for processing this request is not supplied." }
錯誤碼
以下為本介面特有的錯誤碼。更多錯誤碼,請造訪 API錯誤中心。
#以上是如何查看雲端助手命令的執行結果並且在指定ECS實例中的實際執行結果的詳細內容。更多資訊請關注PHP中文網其他相關文章!