All Products
Search
Document Center

Security Center:DescribeGroupedInstances

Last Updated:Jan 28, 2023

Queries the statistical information about assets based on a specified filter condition.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
LangstringNo

The language of the content within the request and response. Default value: zh. Valid values:

  • zh: Chinese
  • en: English
zh
MachineTypesstringNo

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

ecs
GroupFieldstringYes

The filter condition that you want to use to query the assets. Valid values:

  • groupId: the group to which the assets belong
  • regionId: the region in which the assets reside
  • vpcInstanceId: the virtual private cloud (VPC) in which the assets reside
groupId
FieldValuestringNo

The name of the group to which the assets belong. Fuzzy search is supported.

test-01
NoPagebooleanNo

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

  • true: yes
  • false: no
true
PageSizeintegerNo

The number of entries to return on each page. Default value: 20.

20
CurrentPageintegerNo

The number of the page to return. Default value: 1.

1
VendorintegerNo

The source of the server. Valid values:

  • 0: an asset provided by Alibaba Cloud.
  • 1: a third-party cloud server
  • 2: a server in a data center
  • 3, 4, 5, and 7: other cloud asset
  • 8: a lightweight asset
0
VendorsstringNo

The source of the server. Separate multiple sources with commas (,).Valid values:

  • 0: an asset provided by Alibaba Cloud.
  • 1: a third-party cloud server
  • 2: a server in a data center
  • 3, 4, 5, and 7: other cloud asset
  • 8: a lightweight asset
0,8

Response parameters

ParameterTypeDescriptionExample
object

The returned data.

RequestIdstring

The ID of the request, which is used to locate and troubleshoot issues.

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

The pagination information.

CurrentPageinteger

The page number of the returned page.

5
PageSizeinteger

The number of entries returned per page. Default value: 20.

20
TotalCountinteger

The total number of entries returned.

100
Countinteger

The number of entries returned on the current page.

20
Instancesarray

An array that consists of the information about the assets.

object

Consists of the information about the asset.

AsapVulInstanceCountlong

The number of assets on which high-risk vulnerabilities are detected.

11
UnProtectedInstanceCountstring

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

32
FieldAliasNamestring

The name of the server group.

testA
InstanceCountstring

The total number of assets that belong to the specified type.

NoteIf the MachineTypes request parameter is not specified, the value of the InstanceCount parameter is the total number of your assets.
205
RiskInstanceCountstring

The number of assets that are at risk.

172
GroupFlaginteger

The type of the server group. Valid values:

  • 0: the default group
  • 1: other group
1

Example

Normal return example

JSONFormat

{
  "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
    }
  ]
}

Error codes

Http codeError codeError messageDescription
400NoPermissionno permission-
403NoPermissioncaller has no permissionYou are not authorized to do this operation.
500ServerErrorServerError-

For a list of error codes, visit the API error center.

Change history

Change timeSummary of changesOperate
No change history