Queries resource statistics grouped by resource type.
Operation description
In this example, resource statistics are queried by resource type. The response shows that a total of 10 resources exist for the ACS::ECS::Instance resource type.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
config:GetDiscoveredResourceCountsGroupByResourceType |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Region |
string |
No |
The region ID. |
cn-hangzhou |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
None. |
||
| RequestId |
string |
The request ID. |
AC9BD94C-D20C-4D27-88D4-89E8D75C051B |
| DiscoveredResourceCountsSummary |
array<object> |
The statistics on the resources. |
|
|
object |
|||
| ResourceCount |
integer |
The total number of resources. |
10 |
| GroupName |
string |
The resource type by which the statistics are collected. Note
We recommend that you use the |
ACS::ECS::Instance |
| ResourceType |
string |
The resource type by which the statistics are collected. |
ACS::ECS::Instance |
Examples
Success response
JSON format
{
"RequestId": "AC9BD94C-D20C-4D27-88D4-89E8D75C051B",
"DiscoveredResourceCountsSummary": [
{
"ResourceCount": 10,
"GroupName": "ACS::ECS::Instance",
"ResourceType": "ACS::ECS::Instance"
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | NoPermission | You are not authorized to perform this operation. | |
| 400 | MemberNotBelongToMaster | The specified member does not belong to your organization. | |
| 404 | AccountNotExisted | Your account does not exist. | |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.