This API is used to query dedicated resource pools.
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. The default value is 1000. The recommended value ranges from 10 to 50. |
sort_by |
No |
String |
Sorting field. The options are as follows:
|
order |
No |
String |
Sorting mode. The options are as follows:
|
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 |
Object |
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 |
order_id |
String |
Order ID |
period_type |
String |
Subscription period type |
period_num |
integer |
Number of subscription periods |
Parameter |
Type |
Description |
|---|---|---|
specification |
String |
Node specifications |
count |
integer |
Number of nodes |
available_count |
integer |
Number of available nodes |
GET https://endpoint/v1/{project_id}/clusters
{
"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
}
]
}
For details about the status code, see Table 1.
See Error Codes.