Home >Operation and Maintenance >Linux Operation and Maintenance >How to query the execution list and status of Cloud Assistant commands in an ECS instance
This article introduces how to query the cloud assistant command execution list and status in an ECS instance, and focuses on the specific steps. The content of this article is compact, and I hope you can gain something from it.
DescribeInvocations
Request Parameters
Return parameters
Command execution record set typeInvocationSetType
Command execution typeInvocationType
Execution target instance set typeInvokeInstanceSetType
Target instance execution status typeInvokeInstanceType
Example
Request example
https://ecs.aliyuncs.com/?Action=DescribeInvocations &RegionId=cn-hangzhou &<公共请求参数>
Normal return example
XML format
<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 format
{ "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" }
Exception return example
XML format
<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 format
{ "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." }
Error code
The following are error codes unique to this interface. For more error codes, please visit the API Error Center.
The above is the detailed content of How to query the execution list and status of Cloud Assistant commands in an ECS instance. For more information, please follow other related articles on the PHP Chinese website!