ListPluginStatus

更新时间:
复制 MD 格式

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

Operation description

  • 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

  • During a paged query, when you call the ListPluginStatus operation to retrieve the first page of results, set MaxResults to specify the maximum number of entries to return in the call. The return value of NextToken is a pagination token that can be used in the next call 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 set MaxResults to specify the maximum number of entries to return in this call.

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 of the instance. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou

InstanceId

array

No

The ID of the instance.

string

No

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****

RegionId

string

Yes

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

cn-hangzhou

Name

string

No

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

PageNumber

integer

No

Note

This parameter will be removed in the future. We recommend that you use NextToken and MaxResults for a paged query.

1

PageSize

integer

No

Note

This parameter will be removed in the future. We recommend that you use NextToken and MaxResults for a paged query.

10

MaxResults

integer

No

The maximum number of entries per page.

Valid values: 1 to 50.

Default value: 10.

10

NextToken

string

No

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 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.

1

TotalCount

integer

The total number of entries returned.

1

NextToken

string

The returned value of NextToken is a pagination token, which can be used in the next request to retrieve a new page of results.

AAAAAdDWBF2

InstancePluginStatusSet

object

InstancePluginStatus

array<object>

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

array<object>

InstanceId

string

The ID of the instance.

i-xxxxx

PluginStatusSet

object

PluginStatus

array<object>

The queried Cloud Assistant plug-ins.

object

PluginStatus

string

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

PluginVersion

string

The version of the plug-in.

1.1

PluginName

string

The name of the plug-in.

testName

FirstHeartbeatTime

string

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

2020-01-19T09:15:46Z

LastHeartbeatTime

string

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

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 Operation.Forbidden The operation is not permitted. The operation is not supported.
404 InvalidInstance.NotFound 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.