您好,登錄后才能下訂單哦!
查詢一臺ECS實(shí)例中云助手命令執(zhí)行列表及狀態(tài)的方法?這個(gè)問題可能是我們?nèi)粘W(xué)習(xí)或工作經(jīng)常見到的。希望通過這個(gè)問題能讓你收獲頗深。下面是小編給大家?guī)淼膮⒖純?nèi)容,讓我們一起來看看吧!
DescribeInvocations
請求參數(shù)
返回參數(shù)
命令執(zhí)行記錄集類型 InvocationSetType
命令執(zhí)行類型 InvocationType
執(zhí)行目標(biāo)實(shí)例集類型 InvokeInstanceSetType
目標(biāo)實(shí)例執(zhí)行狀態(tài)類型 InvokeInstanceType
示例
請求示例
https://ecs.aliyuncs.com/?Action=DescribeInvocations &RegionId=cn-hangzhou &<公共請求參數(shù)>
正常返回示例
XML 格式
<DescribeInvocationsResponse> <TotalCount>2</TotalCount> <PageNumber>1</PageNumber> <PageSize>10</PageSize> <Invocations> <Invocation> <InvokeStatus>Running</InvokeStatus> <InvokeId>t-7d2a745b412b4601b2d47f6a768d3b53</InvokeId> <CommandName>Test1</CommandName> <CommandType>RunShellScript</CommandType> <Frequency>0 */20 * * * *</Frequency> <InvokeInstances> <InvokeInstance> <InstanceId>i-uf614fhehhzmx</InstanceId> <InstanceInvokeStatus>Finished</InstanceInvokeStatus> </InvokeInstance> <InvokeInstance> <InstanceId>i-uf614fhehhzmy</InstanceId> <InstanceInvokeStatus>Running</InstanceInvokeStatus> </InvokeInstance> </InvokeInstances> <Timed>True</Timed> <CommandId>c-7d2a745b412b4601b2d47f6a768d3a14</CommandId> </Invocation> <Invocation> <InvokeStatus>Finished</InvokeStatus> <InvokeId>t-7d2a745b412b4601b2d47f6a768d3b55</InvokeId> <CommandName>Test3</CommandName> <CommandType>RunShellScript</CommandType> <Frequency> </Frequency> <InvokeInstances> <InvokeInstance> <InstanceId>i-uf614fhehhzmx</InstanceId> <InstanceInvokeStatus>Finished</InstanceInvokeStatus> </InvokeInstance> <InvokeInstance> <InstanceId>i-uf64isakb713x</InstanceId> <InstanceInvokeStatus>Finished</InstanceInvokeStatus> </InvokeInstance> </InvokeInstances> <Timed>False</Timed> <CommandId>c-7d2a745b412b4601b2d47f6a768d3a16</CommandId> </Invocation> </Invocations> <RequestId>E69EF3CC-94CD-42E7-8926-F133B86387C0</RequestId> </DescribeInvocationsResponse>
JSON 格式
{ "TotalCount": 2, "PageNumber": 1, "PageSize": 10, "Invocations": { "Invocation": [ { "InvokeStatus": "Running", "InvokeId": "t-7d2a745b412b4601b2d47f6a768d3b53", "CommandName": "Test1", "CommandType": "RunShellScript", "Frequency": "0 */20 * * * *", "InvokeInstances": { "InvokeInstance": [ { "InstanceId": "i-uf614fhehhzmx", "InstanceInvokeStatus": "Finished" }, { "InstanceId": "i-uf64isakb713x", "InstanceInvokeStatus": "Running" } ] }, "Timed": true, "CommandId": "c-7d2a745b412b4601b2d47f6a768d3a14" }, { "InvokeStatus": "Finished", "InvokeId": ">t-7d2a745b412b4601b2d47f6a768d3b55", "CommandName": "Test3", "CommandType": "RunShellScript", "InvokeInstances": { "InvokeInstance": [ { "InstanceId": "i-uf614fhehhzmx", "InstanceInvokeStatus": "Finished" }, { "InstanceId": "i-uf64isakb713x", "InstanceInvokeStatus": "Finished" } ] }, "Timed": false, "CommandId": "c-7d2a745b412b4601b2d47f6a768d3a16" } ] }, "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." }
錯(cuò)誤碼
以下為本接口特有的錯(cuò)誤碼。更多錯(cuò)誤碼,請?jiān)L問 API 錯(cuò)誤中心。
感謝各位的閱讀!看完上述內(nèi)容,你們對查詢一臺ECS實(shí)例中云助手命令執(zhí)行列表及狀態(tài)的方法大概了解了嗎?希望文章內(nèi)容對大家有所幫助。如果想了解更多相關(guān)文章內(nèi)容,歡迎關(guān)注億速云行業(yè)資訊頻道。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。