Querying the Number of Resources
Function
This API is used to query the number of resources in an account.
Calling Method
For details, see Calling APIs.
URI
GET /v1/resource-manager/domains/{domain_id}/all-resources/count
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
domain_id |
Yes |
String |
Specifies the account ID. Maximum: 36 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
id |
No |
String |
Specifies the resource ID. Maximum: 512 |
|
name |
No |
String |
Specifies the resource name. Maximum: 256 |
|
type |
No |
Array of strings |
Specifies resource types in the format of provider.type. Array Length: 1 - 100 |
|
region_id |
No |
Array of strings |
Specifies region IDs. Array Length: 1 - 10 |
|
ep_id |
No |
Array of strings |
Specifies enterprise project IDs. Array Length: 1 - 10 |
|
project_id |
No |
Array of strings |
Specifies the project ID. Array Length: 1 - 10 |
|
tags |
No |
Array of strings |
Specifies tags. The format is key or key=value. Array Length: 1 - 5 |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Security-Token |
No |
String |
Specifies a temporary security credential. This parameter is mandatory when you make an API call using a temporary security credential. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
total_count |
Integer |
Specifies the total number of resources. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Specifies the error code. |
|
error_msg |
String |
Specifies the error message. |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Specifies the error code. |
|
error_msg |
String |
Specifies the error message. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Specifies the error code. |
|
error_msg |
String |
Specifies the error message. |
Example Requests
GET https://{endpoint}/v1/resource-manager/domains/059b5c937100d3e40ff0c00a7675a0a0/all-resources/count
Example Responses
Status code: 200
Operation succeeded.
{
"total_count" : 345
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Operation succeeded. |
|
400 |
Invalid parameters. |
|
403 |
User authentication failed. |
|
500 |
Server error. |
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.