ListPluginStatus

Updated at:

Queries the status of Cloud Assistant plugins on instances.

Operation description

  • You can query the status of Cloud Assistant plugins on an instance only if the Cloud Assistant Agent version on the instance is not earlier than the following versions:
    • Linux: 2.2.3.344.

    • Windows: 2.1.3.344.

  • When performing a paged query, for the first page of paging, you only need to specify the Settings of MaxResults to limit the number of returned entries. The NextToken value in the response serves as the token for querying the next page. When querying subsequent pages, set the NextToken parameter to the NextToken obtained from the previous response as the query token, and specify the Settings of MaxResults to limit the number of returned entries.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecs:ListPluginStatus

get

*Instance

acs:ecs:{#regionId}:{#accountId}:instance/{#InstanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

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

cn-hangzhou

InstanceId

array

No

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

string

No

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

i-bp1iudwa5b1tqa****

Name

string

No

The plugin name. The name supports all character sets and can be up to 255 characters in length.

  • If you do not specify this parameter, the status of installed plugins on the instance is queried.

    Note

    If you do not specify this parameter, you can specify only one instance ID.

  • If you specify this parameter, the status of the specified plugin on the instance is queried.

testPluginName

PageNumber

integer

No

Note

This parameter will soon be offline. We recommend that you use NextToken and MaxResults to perform paged query and paging operations.

1

PageSize

integer

No

Note

This parameter will soon be offline. We recommend that you use NextToken and MaxResults to perform paged query and paging operations.

10

MaxResults

integer

No

The maximum number of entries to return on each page during a paged query or paging.

Maximum value: 50.

Default value: 10.

10

NextToken

string

No

The pagination token. Set the value to the NextToken value returned in the previous request.

AAAAAdDWBF2

Response elements

Element

Type

Description

Example

object

PageSize

integer

The number of entries per page.

10

RequestId

string

The request ID.

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

PageNumber

integer

The page number of the returned result.

1

TotalCount

integer

The total number of entries that meet the query conditions.

1

NextToken

string

The pagination token returned in the current response.

AAAAAdDWBF2

InstancePluginStatusSet

object

InstancePluginStatus

array<object>

The list of plugin statuses for the instances.

array<object>

The list of plugin statuses for the instances.

InstanceId

string

The instance ID.

i-xxxxx

PluginStatusSet

object

PluginStatus

array<object>

The list of plugin statuses.

object

The list of plugin statuses.

PluginStatus

string

The plugin status. Valid values:

  • NotInstalled: The plugin is not installed.

  • Installed: The one-time plugin is installed.

  • Running: The resident plugin is running.

  • Stopped: The resident plugin is not running.

  • Crashed: The plugin status is abnormal.

  • Removed: The plugin is uninstalled.

  • UnKnown: The status is unknown.

Running

PluginVersion

string

The plugin version.

1.1

PluginName

string

The plugin name.

testName

FirstHeartbeatTime

string

The time when Cloud Assistant first reported the plugin status. The time follows the ISO 8601 standard and is in the UTC time zone.

2020-01-19T09:15:46Z

LastHeartbeatTime

string

The time when Cloud Assistant last reported the plugin status. The time follows the ISO 8601 standard and is in the UTC time zone.

2020-01-19T09:15:46Z

Examples

Success response

JSON format

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

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 InvalidParam.PageNumber The specified parameter PageNumber is invalid. The specified PageNumber parameter is invalid.
400 InvalidParam.PageSize The specified parameter PageSize is invalid. The specified PageSize parameter is invalid.
400 PluginName.MissingValue The 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.
400 InstanceIds.ExceedLimit The number of instance IDs exceeds the upper limit.
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.
403 InvalidParameterCharacter The specified parameter %s contains illegal characters.
403 Operation.Forbidden The operation is not permitted. The operation is not supported.
404 InvalidInstance.NotFound The specified instance does not exist. The specified instance does not exist.
404 InvalidPluginName.NotFound The specified plugin name does not exist. The specified plug-in name does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.