Queries the statistical information about assets based on a specified filter condition.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
yundun-sas:DescribeGroupedInstances | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Lang | string | No | The language of the content within the request and response. Default value: zh. Valid values:
| zh |
MachineTypes | string | No | The type of the assets that you want to query. Set the value to ecs, which indicates Elastic Compute Service (ECS) instances. | ecs |
GroupField | string | Yes | The filter condition that you want to use to query the assets. Valid values:
| groupId |
FieldValue | string | No | The name of the group to which the assets belong. Fuzzy search is supported. | test-01 |
NoPage | boolean | No | Specifies whether to enable paged query. Default value: true. Valid values:
| true |
PageSize | integer | No | The number of entries to return on each page. Default value: 20. | 20 |
CurrentPage | integer | No | The number of the page to return. Default value: 1. | 1 |
Vendor | integer | No | The source of the server. Valid values:
| 0 |
Vendors | string | No | The source of the server. Separate multiple sources with commas (,).Valid values:
| 0,8 |
SaleVersionCheckCode | string | No | The edition of Security Center that protects the asset. Valid values:
| sas_gt_basic |
Response parameters
Examples
Sample success responses
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 | - |
403 | NoPermission | caller has no permission | You are not authorized to do this operation. |
500 | ServerError | ServerError | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-06-07 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-07-06 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-04-07 | The Error code has changed. The request parameters of the API has changed. The response structure of the API has changed | View Change Details |