Querying the Total Number of Resources Aggregated in the Cross-Account Resource View of CloudCMDB
Function
After a view is created, you can query and filter the number of aggregated resources in the CloudCMDB cross-account resource view to obtain the total number of resources.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
coc:resourceView:countResources
Read
-
-
-
-
URI
GET /v1/resource/views/resources/count
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| view_id | Yes | String | Definition View ID. Constraints N/A Range The value is a string. It contains 1 to 32 characters. Default value N/A |
| provider | No | String | Definition Cloud service name. Constraints N/A Range The value is a string. The value can be ecs, cce, or rds. Default value N/A |
| type | No | String | Definition Resource type. Constraints N/A Range There are many resource types. Select a resource type based on the actual service. The common resource types are as follows: Default value N/A |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| data | Long | Definition Number of cloud resources. Range The value range is 0 to 65,535. |
Example Requests
Query the total number of resources aggregated in the cross-account resource view of CloudCMDB.
GET https://{Endpoint}/v1/resource/views/resources/count Example Responses
Status code: 200
{
"data" : 3
} Status Codes
| Status Code | Description |
|---|---|
| 200 | The view resource is queried. |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot