您好,登錄后才能下訂單哦!
查詢一臺ECS實例中云助手命令執行列表及狀態的方法?這個問題可能是我們日常學習或工作經常見到的。希望通過這個問題能讓你收獲頗深。下面是小編給大家帶來的參考內容,讓我們一起來看看吧!
DescribeInvocations
請求參數
返回參數
命令執行記錄集類型 InvocationSetType
命令執行類型 InvocationType
執行目標實例集類型 InvokeInstanceSetType
目標實例執行狀態類型 InvokeInstanceType
示例
請求示例
https://ecs.aliyuncs.com/?Action=DescribeInvocations &RegionId=cn-hangzhou &<公共請求參數>
正常返回示例
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." }
錯誤碼
以下為本接口特有的錯誤碼。更多錯誤碼,請訪問 API 錯誤中心。
感謝各位的閱讀!看完上述內容,你們對查詢一臺ECS實例中云助手命令執行列表及狀態的方法大概了解了嗎?希望文章內容對大家有所幫助。如果想了解更多相關文章內容,歡迎關注億速云行業資訊頻道。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。