DescribeCloudAssistantStatus
Calls DescribeCloudAssistantStatus to query whether Cloud Assistant Agent is installed on one or more instances. If Cloud Assistant is installed, the operation also returns the total number of command executions, the number of ongoing executions, and the time of the most recent command execution.
Operation description
Operation description
Call this operation to query the Cloud Assistant status of an instance. When CloudAssistantStatus is true, run commands or send files. This is especially important for newly created instances.
When paged query the first page, set only
MaxResultsto limit the number of entries to return. TheNextTokenvalue in the response is used as the credential to query subsequent pages. When paged query subsequent pages, setNextTokento the value obtained from the previous response and setMaxResultsto limit the number of entries to return.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DescribeCloudAssistantStatus |
get |
*Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the instance. You can call DescribeRegions to query the most recent region list. |
cn-hangzhou |
| OSType |
string |
No |
The operating system type of the instance. Valid values:
|
Windows |
| PageNumber |
integer |
No |
Note
This parameter is about to be deprecated. Use NextToken and MaxResults to perform paging operations. |
1 |
| PageSize |
integer |
No |
Note
This parameter is about to be deprecated. Use NextToken and MaxResults to perform paging operations. |
10 |
| MaxResults |
integer |
No |
The maximum number of entries per page for a paged query. If InstanceId is set, this parameter is ignored. Maximum value: 50. Default value: 10. |
10 |
| NextToken |
string |
No |
The pagination token. Set this parameter to the NextToken value returned in the previous API call. |
AAAAAdDWBF2 |
| InstanceId |
array |
No |
The list of instance IDs. |
i-bp1iudwa5b1tqa**** |
|
string |
No |
The list of instance IDs, which can include ECS instance IDs and managed instance IDs. You can specify up to 100 instance IDs. |
i-bp1iudwa5b1tqa**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| InstanceCloudAssistantStatusSet |
object |
||
| InstanceCloudAssistantStatus |
array<object> |
The collection of Cloud Assistant installation status results for instances. |
|
|
object |
|||
| ActiveTaskCount |
integer |
The number of running Cloud Assistant tasks on the instance. |
0 |
| CloudAssistantStatus |
string |
Indicates whether Cloud Assistant is running on the instance. Valid values:
|
true |
| CloudAssistantVersion |
string |
The version number of Cloud Assistant Agent. This value is empty if Cloud Assistant Agent is not installed or not running. |
2.2.0.106 |
| InstanceId |
string |
The instance ID. |
i-bp1iudwa5b1tqa**** |
| InvocationCount |
integer |
The number of completed Cloud Assistant tasks on the instance. |
2 |
| LastHeartbeatTime |
string |
The time of the most recent heartbeat from Cloud Assistant. This value is updated approximately every minute with a random fluctuation of up to 5 seconds (minimum 55 seconds, maximum 65 seconds). The time follows the ISO 8601 standard in UTC. |
2021-03-15T09:00:00Z |
| LastInvokedTime |
string |
The time of the most recent command execution. The time follows the ISO 8601 standard in UTC. |
2021-03-15T08:00:00Z |
| OSType |
string |
The operating system type of the instance. Valid values:
|
Linux |
| SupportSessionManager |
boolean |
Indicates whether Cloud Assistant on the instance supports the session management feature. If not supported, the Cloud Assistant version is outdated. Update the client to the latest version. The minimum Cloud Assistant versions that support session management are as follows:
|
true |
| NextToken |
string |
The pagination token returned in this call. |
AAAAAdDWBF2 |
| PageNumber |
integer |
The current page number. |
1 |
| PageSize |
integer |
The number of entries per page. |
1 |
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| TotalCount |
integer |
The total number of instances. |
1 |
Examples
Success response
JSON format
{
"InstanceCloudAssistantStatusSet": {
"InstanceCloudAssistantStatus": [
{
"ActiveTaskCount": 0,
"CloudAssistantStatus": "true",
"CloudAssistantVersion": "2.2.0.106",
"InstanceId": "i-bp1iudwa5b1tqa****",
"InvocationCount": 2,
"LastHeartbeatTime": "2021-03-15T09:00:00Z",
"LastInvokedTime": "2021-03-15T08:00:00Z",
"OSType": "Linux",
"SupportSessionManager": true
}
]
},
"NextToken": "AAAAAdDWBF2",
"PageNumber": 1,
"PageSize": 1,
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"TotalCount": 1
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | RegionId.ApiNotSupported | The api is not supported in this region. | The API operation cannot be called in the specified region. Check whether the specified RegionId parameter is valid. |
| 400 | MissingParam.InstanceId | The parameter instanceId is missing or empty. | The instance ID is empty. |
| 400 | InvalidParam.PageSize | The specified parameter is invalid. | |
| 400 | InvalidParam.PageNumber | The specified parameter is invalid. | |
| 400 | InvalidParameter.NextToken | The specified parameter NextToken is not valid. | The specified parameter NextToken is illegal. |
| 400 | InvalidParameter.MaxResults | The specified parameter MaxResults is not valid. | The specified parameter MaxResults is illegal. |
| 500 | InternalError.Dispatch | An error occurred when you dispatched the request. | An error occurred while the request is being sent. Try again later. |
| 500 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | |
| 403 | InvalidParameterCharacter | The specified parameter %s contains illegal characters. | |
| 403 | InstanceIds.ExceedLimit | The number of instance IDs exceeds the upper limit. | The number of specified instance IDs exceeds the upper limit. |
| 403 | Operation.Forbidden | The operation is not permitted. | The operation is not supported. |
| 404 | InvalidRegionId.NotFound | The RegionId provided does not exist in our records. | Region information error |
| 404 | InvalidInstance.NotFound | The specified instance does not exist. | The specified instance does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.