Queries resource statistics by region.
Operation description
This topic provides an example on how to query resource statistics by region. The response shows that the total number of resources in the cn-hangzhou region is 10.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
config:GetDiscoveredResourceCountsGroupByRegion |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceType |
string |
No |
The resource type. For information about how to obtain the resource type, see ListDiscoveredResources. |
ACS::ECS::Instance |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
399BD94C-D20C-4D27-88D4-89E8D75C0595 |
| DiscoveredResourceCountsSummary |
array<object> |
The resource statistics. |
|
|
object |
The resource count statistics information by region. |
||
| ResourceCount |
integer |
The total number of resources. |
10 |
| GroupName |
string |
The name of the group statistics. Note
This parameter is generally not used. Use |
cn-hangzhou |
| Region |
string |
The region used for group statistics. |
cn-hangzhou |
Examples
Success response
JSON format
{
"RequestId": "399BD94C-D20C-4D27-88D4-89E8D75C0595",
"DiscoveredResourceCountsSummary": [
{
"ResourceCount": 10,
"GroupName": "cn-hangzhou",
"Region": "cn-hangzhou"
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | NoPermission | You are not authorized to perform this operation. | 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. | 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.