All Products
Search
Document Center

Elastic Compute Service:ListPluginStatus

Last Updated:Nov 14, 2024

Queries the states of Cloud Assistant plug-ins on Elastic Compute Service (ECS) instances.

Operation description

Usage notes

  • Before you call this operation to query the status of Cloud Assistant plug-ins on ECS instances, make sure that the versions of Cloud Assistant Agent on the instances are not earlier than the following ones:

    • 2.2.3.344 for Linux instances
    • 2.1.3.344 for Windows instances
  • You can use one of the following methods to check the responses:

    • Method 1: When you call the ListPluginStatus operation to retrieve the first page of results during a paged query, use MaxResults to specify the maximum number of entries to return in the call. The return value of NextToken is a pagination token, which you can use in the next request to retrieve a new page of results. When you call the ListPluginStatus operation to retrieve a new page of results, set NextToken to the NextToken value returned in the previous call and use MaxResults to specify the maximum number of entries to return in this call.
    • Method 2: Use PageSize to specify the number of entries to return on each page, and then use PageNumber to specify the number of the page to return. You can use only one of the preceding methods. If you specify MaxResults or NextToken, the PageSize and PageNumber request parameters do not take effect and the TotalCount response parameter is invalid.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ecs:ListPluginStatusget
*Instance
acs:ecs:{#regionId}:{#accountId}:instance/{#InstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
InstanceIdarrayNo

The ID of the instance.

stringNo

The ID of instance N. You can specify up to 50 instance IDs in each request. Valid values of N: 1 to 50.

i-bp1iudwa5b1tqa****
NamestringNo

The name of the Cloud Assistant plug-in. The name supports all character sets and must be 1 to 255 characters in length.

  • If this parameter is not specified, the status of all Cloud Assistant plug-ins that are installed on the specified instances are queried.

    **

    Note If this parameter is not specified, only a single instance ID can be specified.

  • If this parameter is specified, the status of the specified Cloud Assistant plug-in is queried.

testPluginName
PageNumberlongNo

The page number.

  • Pages start from page 1.
  • Default value: 1.
1
PageSizelongNo

The number of entries per page.

  • Valid values: 1 to 50.
  • Default value: 10.
10
MaxResultsintegerNo

The maximum number of entries per page.

Valid values: 1 to 50.

Default value: 10.

10
NextTokenstringNo

The pagination token that is used in the next request to retrieve a new page of results. You must specify the token that is obtained from the previous query as the value of NextToken.

AAAAAdDWBF2

Response parameters

ParameterTypeDescriptionExample
object
PageSizelong

The number of entries per page.

10
RequestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3****
PageNumberlong

The page number.

1
TotalCountlong

The total number of entries returned.

1
NextTokenstring

A pagination token. It can be used in the next request to retrieve a new page of results.

AAAAAdDWBF2
InstancePluginStatusSetarray<object>

The states of Cloud Assistant plug-ins on the instances.

InstancePluginStatusobject
InstanceIdstring

The ID of the instance.

i-xxxxx
PluginStatusSetarray<object>

The queried Cloud Assistant plug-ins.

PluginStatusobject
PluginVersionstring

The version of the plug-in.

1.1
PluginNamestring

The name of the plug-in.

testName
FirstHeartbeatTimestring

The first time when Cloud Assistant reported the state of the plug-in.

2020-01-19T09:15:46Z
LastHeartbeatTimestring

The last time when Cloud Assistant reported the state of the plug-in.

2020-01-19T09:15:46Z
PluginStatusstring

The state of the Cloud Assistant plug-in. Valid values:

  • NotInstalled: The plug-in is not installed.
  • Installed: The one-time plug-in is installed.
  • Running: The long-running plug-in is running.
  • Stopped: The long-running plug-in is not running.
  • Crashed: The plug-in is abnormal.
  • Removed: The plug-in is uninstalled.
  • Unknown: The state of the plug-in is unknown.
Running

Examples

Sample success responses

JSONformat

{
  "PageSize": 10,
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
  "PageNumber": 1,
  "TotalCount": 1,
  "NextToken": "AAAAAdDWBF2",
  "InstancePluginStatusSet": {
    "InstancePluginStatus": [
      {
        "InstanceId": "i-xxxxx",
        "PluginStatusSet": {
          "PluginStatus": [
            {
              "PluginVersion": "1.1",
              "PluginName": "testName",
              "FirstHeartbeatTime": "2020-01-19T09:15:46Z",
              "LastHeartbeatTime": "2020-01-19T09:15:46Z",
              "PluginStatus": "Running"
            }
          ]
        }
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParam.PageNumberThe specified parameter PageNumber is invalid.The specified PageNumber parameter is invalid.
400InvalidParam.PageSizeThe specified parameter PageSize is invalid.The specified PageSize parameter is invalid.
400PluginName.MissingValueThe plugin name must be specified when the number of InstanceIds is not 1.The plug-in name must be specified when no or multiple instance IDs are specified.
400InstanceIds.ExceedLimitThe number of instance IDs exceeds the upper limit.The number of specified instance IDs exceeds the upper limit.
400InvalidParameter.NextTokenThe specified parameter NextToken is not valid.The specified parameter NextToken is illegal.
400InvalidParameter.MaxResultsThe specified parameter MaxResults is not valid.The specified parameter MaxResults is illegal.
404InvalidInstance.NotFoundThe specified instance does not exist.-
404InvalidPluginName.NotFoundThe specified plugin name does not exist.The specified plug-in name does not exist.
500InternalError.DispatchAn error occurred when you dispatched the request.An error occurred while the request is being sent. Try again later.

For a list of error codes, visit the Service error codes.