Queries the counts of discovered resources in the current account.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
config:GetDiscoveredResourceCounts |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| GroupByKey |
string |
No |
The dimension by which the resource count is grouped. Valid values:
|
ResourceType |
| MultiAccount |
boolean |
No |
This parameter is scheduled to be deprecated before 00:00:00 on June 30, 2021. The API for the account group feature that will replace this parameter will be available before 00:00:00 on May 30, 2021. If you are using this parameter, we recommend that you switch to the API for the account group feature after 00:00:00 on May 30, 2021. For more information about account groups, see Account group. |
true |
| MemberId |
integer |
No |
This parameter is scheduled to be deprecated before 00:00:00 on June 30, 2021. The API for the account group feature that will replace this parameter will be available before 00:00:00 on May 30, 2021. If you are using this parameter, we recommend that you switch to the API for the account group feature after 00:00:00 on May 30, 2021. For more information about account groups, see Account group. |
120886317861**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
None. |
||
| GroupedResourceCounts |
object |
The results of the resource count query. |
|
| GroupByKey |
string |
The dimension by which resources are grouped. |
ResourceType |
| GroupedResourceCountList |
array<object> |
The list of resource counts. |
|
|
object |
None. |
||
| GroupName |
string |
The name of the group by which resources are grouped. |
ACS::ECS::SecurityGroup |
| ResourceCount |
integer |
The number of resources in the group. |
10 |
| RequestId |
string |
The request ID. |
54BFA4FB-6E08-4D58-9E83-1A8A3EC80247 |
Examples
Success response
JSON format
{
"GroupedResourceCounts": {
"GroupByKey": "ResourceType",
"GroupedResourceCountList": [
{
"GroupName": "ACS::ECS::SecurityGroup",
"ResourceCount": 10
}
]
},
"RequestId": "54BFA4FB-6E08-4D58-9E83-1A8A3EC80247"
}
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.