查询一台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进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。