Obtaining Dedicated Resource Pools
Function
This API is used to obtain dedicated resource pools.
URI
GET /v1/{project_id}/clusters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID and Name. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
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 for pagination display. The default value is 0. |
limit |
No |
Integer |
Maximum number of records returned on each page. Default value: 1000 |
sort_by |
No |
String |
Sorting field. Options:
|
order |
No |
String |
Sorting mode. Options:
|
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API that is used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total_count |
Integer |
Total number of clusters that meet the search criteria when no paging is performed |
count |
Integer |
Number of clusters in the query result. If offset and limit are not configured, the values of count and total are the same. |
clusters |
Array of Cluster objects |
Obtained clusters |
Parameter |
Type |
Description |
---|---|---|
owner |
String |
User to which a cluster belongs |
cluster_name |
String |
Cluster name |
period_num |
Integer |
Number of subscription periods. This parameter is returned only when the cluster is billed on a yearly/monthly basis. |
created_at |
Integer |
Time when a cluster is created, in milliseconds calculated from 1970.1.1 0:0:0 UTC. |
description |
String |
Cluster description |
project |
String |
Project to which a cluster belongs |
allocatable_memory |
Integer |
Number of available memory resources |
cluster_id |
String |
Cluster ID |
nodes |
ClusterNode object |
Cluster node configurations |
allocatable_cpu_cores |
Float |
Number of available CPU cores |
product_id |
String |
Product ID. This parameter is returned only when the cluster is billed on a yearly/monthly basis. |
allocatable_gpus |
Float |
Number of available GPUs |
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, which can be year or month. This parameter is returned only when the cluster is billed on a yearly/monthly basis. |
tenant |
String |
Tenant to which a cluster belongs |
status |
String |
Cluster status. Options:
|
Example Requests
GET https://{endpoint}/v1/{project_id}/clusters
Example Responses
Status code: 200
Service deployment flavors
{ "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 Codes
Status Code |
Description |
---|---|
200 |
Service deployment flavors |
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.