Queries the information about assets based on a specified filter condition.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeGroupedInstances |
The operation that you want to perform. Set the value to DescribeGroupedInstances. |
Lang | String | No | zh |
The language of the content within the request and response. Default value: zh. Valid values:
|
MachineTypes | String | No | ecs |
The type of the assets whose information you want to query. Set the value to ecs, which indicates Elastic Compute Service (ECS) instances. |
GroupField | String | Yes | groupId |
The filter condition that you use to query assets. Valid values:
|
FieldValue | String | No | test-01 |
The name of the group to which the assets belong. Fuzzy search is supported. |
NoPage | Boolean | No | true |
Specifies whether to enable paged query. Default value: true. Valid values:
|
PageSize | Integer | No | 20 |
The number of entries to return on each page. Default value: 20. |
CurrentPage | Integer | No | 1 |
The number of the page to return. Default value: 1. |
All Alibaba Cloud API operations must include common request parameters. For more information about common request parameters, see Common parameters.
For more information about sample requests, see the "Examples" section of this topic.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 52A3AEE6-114A-499D-8990-4BA9B27FE0AA |
The ID of the request, which is used to locate and troubleshoot issues. |
PageInfo | Object |
The pagination information. |
|
CurrentPage | Integer | 5 |
The page number of the returned page. |
PageSize | Integer | 20 |
The number of entries returned per page. Default value: 20. |
TotalCount | Integer | 100 |
The total number of entries returned. |
Count | Integer | 20 |
The total number of entries returned on the current page. |
Instances | Array of Instance |
The information about the assets. |
|
AsapVulInstanceCount | Long | 11 |
The number of assets on which high-risk vulnerabilities are detected. |
UnProtectedInstanceCount | String | 32 |
The number of assets that are not protected by Security Center. |
FieldAliasName | String | testA |
The name of the server group. |
InstanceCount | String | 205 |
The total number of assets that are of the specified type. Note If the MachineTypes request parameter is not specified, the InstanceCount parameter is the total number
of your assets.
|
RiskInstanceCount | String | 172 |
The number of assets that are at risk. |
GroupFlag | Integer | 1 |
The type of the server group. Valid values:
|
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeGroupedInstances
&Lang=zh
&MachineTypes=ecs
&GroupField=groupId
&FieldValue=test-01
&NoPage=true
&PageSize=20
&CurrentPage=1
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeGroupedInstancesResponse>
<RequestId>52A3AEE6-114A-499D-8990-4BA9B27FE0AA</RequestId>
<PageInfo>
<CurrentPage>5</CurrentPage>
<PageSize>20</PageSize>
<TotalCount>100</TotalCount>
<Count>20</Count>
</PageInfo>
<Instances>
<AsapVulInstanceCount>11</AsapVulInstanceCount>
<UnProtectedInstanceCount>32</UnProtectedInstanceCount>
<FieldAliasName>testA</FieldAliasName>
<InstanceCount>205</InstanceCount>
<RiskInstanceCount>172</RiskInstanceCount>
<GroupFlag>1</GroupFlag>
</Instances>
</DescribeGroupedInstancesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"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 status code | Error code | Error message | Description |
---|---|---|---|
400 | NoPermission | no permission | The error message returned because you do not have access permissions on the service. |
500 | ServerError | ServerError | The error message returned because a server error occurred. |
For a list of error codes, visit the API Error Center.