All Products
Search
Document Center

Security Center:DescribeGroupedInstances

Last Updated:Feb 20, 2024

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

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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
yundun-sas:DescribeGroupedInstancesRead
  • All Resources
    *
    none
none

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
SaleVersionCheckCodestringNo

The edition of Security Center that protects the asset. Valid values:

  • sas_gte_advanced: the Advanced edition or higher
  • sas_gte_enterprise: the Enterprise edition or higher
  • sas_gt_basic: a paid edition
  • sas_eq_advanced: the Advanced edition
  • sas_gt_anti_virus: an edition higher than the Anti-virus edition
sas_gt_basic

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
Instancesobject []

An array that consists of the information about the assets.

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.

Note If 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
AuthVersionCheckCountinteger

The number of assets that are protected by the specified edition.

205
Osstring

The operating system type of the asset. Valid values:

  • windows
  • linux
Note This parameter is returned only when Lang is set to zh.
windows

Examples

Sample success responses

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,
      "AuthVersionCheckCount": 205,
      "Os": "windows"
    }
  ]
}

Error codes

HTTP status 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 Service error codes.

Change history

Change timeSummary of changesOperation
2023-07-06The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
Output ParametersThe response structure of the API has changed.
2023-04-07The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: SaleVersionCheckCode
Output ParametersThe response structure of the API has changed.