Resource Pool Statistics
Function
This API is used to obtain the statistics of a specified resource pool. This API is used when you need to obtain the resource usage, allocation, or usage of a resource pool. Before using this API, ensure that the resource pool exists and you have the administrator permissions. After the API is called, the system returns the statistics of the resource pool, including the total resource usage, allocated resources, usage, and resource allocation trend. If the resource pool does not exist, the user does not have the permission to perform the operation, or the resource pool is unavailable, the API will return an error message.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
GET /v2/{project_id}/statistics/pools
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition: User project ID. For details, see Obtaining a Project ID and Name. Constraints: N/A Range: N/A Default Value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
workspaceId |
No |
String |
Definition: Workspace. The default value is 0. Constraints: N/A Range: N/A Default Value: N/A |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
statistics |
statistics object |
Definition: Resource pool statistics. |
|
operationTime |
String |
Definition: Time when the statistics are collected. Range: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
status |
status object |
Definition: Statistics about resource pools in different statuses. |
|
Parameter |
Type |
Description |
|---|---|---|
|
creating |
Integer |
Definition: Statistics about resource pools that are being created. Range: N/A |
|
created |
Integer |
Definition: Number of resource pools that are successfully created. Range: N/A |
|
failed |
Integer |
Definition: Number of resource pools that failed to be created in the last three days. The maximum value is 500. Range: N/A |
|
pending |
Integer |
Definition: Number of resource pools in the waiting status, usually yearly/monthly pools that have not been paid. Range: N/A |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Range: N/A |
|
error_msg |
String |
Definition: Error message. Range: N/A |
Example Requests
This interface is used to query resource pool monitoring information.
GET https://{endpoint}/v2/{project_id}/pools
{ }
Example Responses
Status code: 200
OK.
{
"statistics" : {
"status" : {
"created" : 3,
"creating" : 0,
"failed" : 1,
"pending" : 0
}
},
"operationTime" : "2022-12-05 11:15:59.329633162 +0000 UTC"
}
Status code: 500
Internal error
{
"error_code" : "ModelArts.50005000",
"error_msg" : "internal error"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK. |
|
500 |
Internal 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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot