Querying the Total Number of Resources Aggregated in the CloudCMDB Cross-Account Resource View
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 Value 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 Value 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 Value 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. Value range: The value ranges from 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
Response to the request for querying view resources.
{
"data" : 3
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Response to the request for querying view resources. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank 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