Querying Dedicated Resource Pools
Function
This API is used to query dedicated resource pools.
URI
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
| cluster_name | No | String | Cluster name. By default, the cluster name is not filtered. |
| status | No | String | Cluster status. By default, the status is not filtered. |
| offset | No | integer | Start page of the paging list. Default value: 0 |
| limit | No | integer | Maximum number of records returned on each page. Default value: 1000 |
| sort_by | No | String | Sorting field. Possible values are as follows:
|
| order | No | String | Sorting mode. Possible values are as follows:
|
Response Body
| Parameter | Type | Description |
|---|---|---|
| total_count | integer | Total number of clusters that meet the search criteria when no paging is implemented |
| count | integer | Number of clusters in the query result. If offset and limit are not set, the values of count and total are the same. |
| clusters | cluster array | List of queried clusters. For details, see Table 3. |
| Parameter | Type | Description |
|---|---|---|
| cluster_id | String | Cluster ID |
| cluster_name | String | Cluster name |
| description | String | Cluster remarks |
| tenant | String | Tenant to which a cluster belongs |
| project | String | Project to which a cluster belongs |
| owner | String | User to which a cluster belongs |
| created_at | integer | Time when a cluster is created, in milliseconds calculated from 1970.1.1 0:0:0 UTC |
| status | String | Cluster status. The value can be deploying, running, concerning, or abnormal. |
| nodes | node array | Node configuration. For details, see Table 4. |
| allocatable_cpu_cores | float | Number of available CPU cores |
| allocatable_memory | integer | Number of available memory resources |
| allocatable_gpus | float | Number of available GPU cores |
| product_id | String | Product ID. This parameter is returned only when the cluster is billed on a yearly/monthly basis. |
| order_id | String | Order ID. This parameter is returned only when the cluster is billed on a yearly/monthly basis. |
| period_type | String | Subscription period type. The value can be year or month. This parameter is returned only when the cluster is billed on a yearly/monthly basis. |
| period_num | integer | Number of subscription periods. This parameter is returned only when the cluster is billed on a yearly/monthly basis. |
| Parameter | Type | Description |
|---|---|---|
| specification | String | Node specifications |
| count | integer | Number of nodes |
| available_count | integer | Number of available nodes |
Samples
- Sample request
GET https://endpoint/v1/{project_id}/clusters
- Sample response
{ "total_count": 1, "count": 1, "clusters": [ { "cluster_id": "ff808081673fbb3d01673fbb824d0000", "cluster_name": "my-cluster", "description": "", "tenant": "tenant_id", "project": "project_id", "owner": "owner_id", "created_at": 1574923077927, "status": "running", "nodes": { "specification": "modelarts.vm.cpu.8ud", "count": 1, "available_count": 1 }, "allocatable_cpu_cores": 5.5, "allocatable_memory": 4096, "allocatable_gpus": 0.5 } ] }
Status Code
For details about the status code, see Table 1.
Last Article: Querying Supported Service Deployment Specifications
Next Article: Workspace Management
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.