All Products
Search
Document Center

Security Center:DescribeGroupedInstances

Last Updated:Sep 17, 2026

Queries statistics information of assets based on specified aggregation dimensions.

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

yundun-sas:DescribeGroupedInstances

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Lang

string

No

The language type for the request and response messages. Default value: zh. Valid values:

  • zh: Chinese

  • en: English

zh

MachineTypes

string

No

The type of assets to query. Set the value to ecs, which indicates Elastic Compute Service (ECS) instances.

ecs

GroupField

string

Yes

The filter condition for querying assets. Valid values:

  • groupId: queries assets by asset group.

  • regionId: queries assets by region.

  • vpcInstanceId: queries assets by virtual private cloud (VPC).

groupId

FieldValue

string

No

The name of the asset group to query. Fuzzy match is supported.

test-01

NoPage

boolean

No

Settings for whether to enable paged query. Default value: true. Valid values:

  • true: Paging is enabled.

  • false: Paging is disabled.

true

PageSize

integer

No

The number of entries per page in a paged query. Default value: 20, which indicates that 20 entries of asset information are displayed per page.

20

CurrentPage

integer

No

The page number of the first page to return. Default value: 1, which indicates that results are returned starting from page 1.

1

Vendor

integer

No

The server vendor. Valid values:

  • 0: Alibaba Cloud asset

  • 1: non-cloud asset

  • 2: IDC asset

  • 3, 4, 5, 7: third-party cloud asset

  • 8: lightweight asset

0

Vendors

string

No

The server vendors. Separate multiple vendors with commas (,). Valid values:

  • 0: Alibaba Cloud asset

  • 1: non-cloud asset

  • 2: IDC asset

  • 3, 4, 5, 7: third-party cloud asset

  • 8: lightweight asset

0,8

SaleVersionCheckCode

string

No

The edition-based filter condition for querying assets. Valid values:

  • sas_gte_advanced: Advanced Edition or higher

  • sas_gte_enterprise: Enterprise Edition or higher

  • sas_gt_basic: paid edition

  • sas_eq_advanced: Advanced Edition

  • sas_gt_anti_virus: higher than Anti-virus Edition

sas_gt_basic

ResourceDirectoryAccountId

integer

No

The ID of the Alibaba Cloud account that is associated with member accounts in a resource folder.

Note

Invoke the DescribeMonitorAccounts operation to obtain this parameter.

127608589417****

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID, which is a unique identifier generated by Alibaba Cloud for the request. You can use this ID to troubleshoot issues.

52A3AEE6-114A-499D-8990-4BA9B27FE0AA

PageInfo

object

The pagination information of the query results.

CurrentPage

integer

The page number of the current page in a paged query.

5

PageSize

integer

The number of entries per page in a paged query. Default value: 20, which indicates that 20 entries of asset information are displayed per page.

20

TotalCount

integer

The total number of asset entries returned.

100

Count

integer

The number of assets displayed on the current page in a paged query.

20

Instances

array<object>

The list of asset information returned.

object

The asset information.

AsapVulInstanceCount

integer

The number of assets that have high-priority vulnerabilities.

11

UnProtectedInstanceCount

string

The number of assets that are not protected by Security Center.

32

FieldAliasName

string

The name of the server group.

testA

InstanceCount

string

The total number of assets of the specified asset type.

Note

If the MachineTypes request parameter is not set, this parameter returns the total number of assets of all types.

205

RiskInstanceCount

string

The number of assets that have security risks.

172

GroupFlag

integer

The server group type. Valid values:

  • 0: default group

  • 1: other group

1

AuthVersionCheckCount

integer

The number of assets that meet the edition-based filter condition.

205

Os

string

The operating system type of the asset. Valid values:

  • windows

  • linux
    Important This field is returned only when Lang is set to zh.

windows

InstanceCoreCount

integer

The total number of compute cores for all assets of the specified asset type.

Note

If the MachineTypes request parameter is not set, this parameter returns the total number of compute cores for assets of all types.

610

Examples

Success response

JSON format

{
  "RequestId": "52A3AEE6-114A-499D-8990-4BA9B27FE0AA",
  "PageInfo": {
    "CurrentPage": 5,
    "PageSize": 20,
    "TotalCount": 100,
    "Count": 20
  },
  "Instances": [
    {
      "AsapVulInstanceCount": 11,
      "UnProtectedInstanceCount": "32",
      "FieldAliasName": "testA",
      "InstanceCount": "205",
      "RiskInstanceCount": "172",
      "GroupFlag": 1,
      "AuthVersionCheckCount": 205,
      "Os": "windows",
      "InstanceCoreCount": 610
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 NoPermission no permission
400 RdCheckNoPermission Resource directory account verification has no permission.
500 ServerError ServerError
500 RdCheckInnerError Resource directory account service internal error.
403 NoPermission caller has no permission You are not authorized to do this operation.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.