Obtaining Resource Pools
Function
This API is used to obtain resource pools.
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}/pools
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition: 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 ID. If no workspaces are available, the default value is 0. If a workspace is created and used, use the actual value. For details about how to obtain the ID, see Querying the Workspace List. Constraints: N/A Range: N/A Default Value: 0 |
labelSelector |
No |
String |
Definition: Resource pool tag filtering Constraints: N/A Range: N/A Default Value: N/A |
status |
No |
String |
Definition: Resource pool status Constraints: N/A Range: The options are as follows: Default Value: N/A |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
apiVersion |
String |
Definition: API version of a resource. Constraints: N/A Range: Default Value: N/A |
kind |
String |
Definition: Resource type. Constraints: N/A Range: Default Value: N/A |
items |
Array of PoolModel objects |
Constraints: N/A Range: N/A Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
apiVersion |
String |
Definition: API version of a resource. Constraints: N/A Range: Default Value: N/A |
kind |
String |
Definition: Resource type. Constraints: N/A Range: Default Value: N/A |
metadata |
PoolMetadata object |
Definition: Metadata of the resource pool. Constraints: N/A Range: N/A Default Value: N/A |
spec |
PoolSpecModel object |
Definition: Specifications of a resource pool. Constraints: N/A Range: N/A Default Value: N/A |
status |
PoolStatus object |
Definition: Status of a resource pool. Constraints: N/A Range: N/A Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Definition: Resource pool ID. Constraints: N/A Range: N/A Default Value: N/A |
creationTimestamp |
String |
Definition: Time when a resource pool is created. For example, 2025-11-01T03:49:41Z. Constraints: N/A Range: N/A Default Value: N/A |
labels |
PoolMetaLabels object |
Definition: Tags of a resource pool. Constraints: N/A Range: N/A Default Value: N/A |
annotations |
PoolMetaAnnotations object |
Definition: Comments of a resource pool. Constraints: N/A Range: N/A Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
os.modelarts/workspace.id |
String |
Definition: Workspace ID. For details about how to obtain the ID, see Querying the Workspace List. Constraints: N/A Range: N/A Default Value: 0 |
os.modelarts/name |
String |
Definition: Displayed name of a resource pool. Constraints: N/A Range: N/A Default Value: N/A |
os.modelarts/resource.id |
String |
Definition: Resource ID used for resource pool billing. Constraints: N/A Range: N/A Default Value: N/A |
os.modelarts/tenant.domain.id |
String |
Definition: ID of the tenant to which a resource pool belongs. Constraints: N/A Range: N/A Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
os.modelarts/description |
String |
Definition: Resource pool description. Constraints: N/A Range: N/A Default Value: N/A |
os.modelarts/billing.mode |
String |
Definition: Billing mode. Constraints: N/A Range: Default Value: N/A |
os.modelarts/period.num |
String |
Definition: Subscription period of a yearly/monthly resource pool. Constraints: This parameter is used together with the os.modelarts/period.type field. Range: N/A Default Value: N/A |
os.modelarts/period.type |
String |
Definition: Subscription type of a yearly/monthly resource pool. Constraints: This parameter is used together with the os.modelarts/period.num field. Range: Default Value: N/A |
os.modelarts/auto.renew |
String |
Definition: Auto-renewal status of a yearly/monthly resource pool. Constraints: N/A Range: Default Value: 0 |
os.modelarts/promotion.info |
String |
Definition: Discount information selected when a yearly/monthly resource pool is purchased. Constraints: N/A Range: N/A Default Value: N/A |
os.modelarts/service.console.url |
String |
Definition: URL to which you are redirected after the order of a yearly/monthly resource pool is paid. Constraints: N/A Range: N/A Default Value: N/A |
os.modelarts/order.id |
String |
Definition: Order ID transferred when a yearly/monthly resource pool is purchased. Constraints: N/A Range: N/A Default Value: N/A |
os.modelarts/flavor.resource.ids |
String |
Definition: Resource ID of the resource specifications in a yearly/monthly resource pool. Constraints: N/A Range: N/A Default Value: N/A |
os.modelarts/tms.tags |
String |
Definition: Resource tags of a resource pool. Constraints: N/A Range: N/A Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
type |
String |
Definition: Resource pool type. Constraints: N/A Range:
Default Value: N/A |
scope |
Array of strings |
Definition: Job types supported by a resource pool. Constraints: N/A Range: Default Value: N/A |
resources |
Array of resources objects |
Definition: Resource specifications in a resource pool, including resource specifications and the number of resources for each specification. Constraints: At least one resource must be contained. Range: N/A Default Value: N/A |
network |
network object |
Definition: Network parameters of a resource pool. Constraints: This parameter is mandatory for physical resource pools. Range: N/A Default Value: N/A |
jobFlavors |
Array of strings |
Definition: Job specifications supported by a resource pool. The value is the job specification name. Constraints: N/A Range: N/A Default Value: N/A |
driver |
PoolDriver object |
Definition: Resource pool driver information. Constraints: N/A Range: N/A Default Value: N/A |
controlMode |
Integer |
Definition: Restriction status of a resource pool. Multiple statuses are allowed. For example, 9 indicates that it is frozen and changing its billing mode to yearly/monthly is restricted. Constraints: N/A Range: Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
flavor |
String |
Definition: Resource flavor ID. Constraints: N/A Range: N/A Default Value: N/A |
count |
Integer |
Definition: Number of resource specification instances in a resource pool. Constraints: N/A Range: N/A Default Value: N/A |
azs |
Array of PoolNodeAz objects |
Definition: AZ distribution of the resource specification instances to be created in the resource pool. Constraints: N/A Range: N/A Default Value: N/A |
extendParams |
extendParams object |
Definition: Custom parameters of a resource pool. Constraints: N/A Range: N/A Default Value: N/A |
os |
Os object |
Definition: OS image information of nodes in a resource pool. Constraints: N/A Range: N/A Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
dockerBaseSize |
String |
Definition: Container engine space of a node created in a resource pool. The value 0 indicates that the size is not limited. Constraints: N/A Range: N/A Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Definition: OS name. Constraints: N/A Range: N/A Default Value: N/A |
imageId |
String |
Definition: OS image ID. Constraints: N/A Range: N/A Default Value: N/A |
imageType |
String |
Definition: OS image type. Constraints: N/A Range: Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Definition: Network ID. Constraints: N/A Range: N/A Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
phase |
String |
Definition: Resource pool status. Constraints: N/A Range: Default Value: N/A |
message |
String |
Definition: Prompt information about the resource pool status. Constraints: N/A Range: N/A Default Value: N/A |
resources |
resources object |
Definition: Resource information in different states of the resource pool. Constraints: N/A Range: N/A Default Value: N/A |
scope |
Array of scope objects |
Definition: Status of the service type supported by the resource pool. Constraints: N/A Range: N/A Default Value: N/A |
driver |
driver object |
Definition: Resource pool driver status. Constraints: N/A Range: N/A Default Value: N/A |
parent |
String |
Definition: ID of the parent resource pool to which a resource pool belongs. The physical pool is empty. Constraints: N/A Range: N/A Default Value: N/A |
root |
String |
Definition: ID of the root resource pool. Constraints: N/A Range: N/A Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
creating |
PoolResourceFlavorCount object |
Definition: Resource information in creating states of the resource pool. Constraints: N/A Range: N/A Default Value: N/A |
available |
PoolResourceFlavorCount object |
Definition: Resource information in available states of the resource pool. Constraints: N/A Range: N/A Default Value: N/A |
abnormal |
PoolResourceFlavorCount object |
Definition: Resource information in abnormal states of the resource pool. Constraints: N/A Range: N/A Default Value: N/A |
deleting |
PoolResourceFlavorCount object |
Definition: Resource information in deleting states of the resource pool. Constraints: N/A Range: N/A Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
flavor |
String |
Definition: Resource flavor ID. Constraints: N/A Range: N/A Default Value: N/A |
count |
Integer |
Definition: Number of resource specification instances in a resource pool. Constraints: N/A Range: N/A Default Value: N/A |
maxCount |
Integer |
Definition: Number of elastic resource specification instances in a resource pool. The value of this parameter in a physical pool is the same as that of count. Constraints: N/A Range: N/A Default Value: N/A |
azs |
Array of PoolNodeAz objects |
Definition: AZ distribution of the resource specification instances to be created in a resource pool. Constraints: N/A Range: N/A Default Value: N/A |
nodePool |
String |
Definition: Node pool ID. Constraints: N/A Range: N/A Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
az |
String |
Constraints: N/A Range: N/A Default Value: N/A |
count |
Integer |
Definition: Number of AZ resource instances. Constraints: N/A Range: N/A Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
scopeType |
String |
Definition: Service type of the resource pool. Constraints: N/A Range: Default Value: N/A |
state |
String |
Definition: Service type status of the resource pool. Constraints: N/A Range: Default Value: N/A |
Parameter |
Type |
Description |
---|---|---|
gpu |
PoolDriverStatus object |
Definition: GPU driver status of a resource pool. Constraints: N/A Range: N/A Default Value: N/A |
npu |
PoolDriverStatus object |
Definition: NPU driver status of a resource pool. Constraints: N/A Range: N/A Default Value: N/A |
Example Requests
Obtain resource pools.
GET https://{endpoint}/v2/{project_id}/pools { }
Example Responses
Status code: 200
OK
{ "kind" : "PoolList", "apiVersion" : "v2", "items" : [ { "kind" : "Pool", "apiVersion" : "v2", "metadata" : { "name" : "auto-pool-os-86c13962597848eeb29c5861153a391f", "creationTimestamp" : "2022-09-16T03:10:40Z", "labels" : { "os.modelarts/name" : "auto-pool-os", "os.modelarts/workspace.id" : "0", "os.modelarts/resource.id" : "maos-auto-pool-os-72w8d" }, "annotations" : { "os.modelarts/description" : "", "os.modelarts/billing.mode" : "0" } }, "spec" : { "type" : "Dedicate", "scope" : [ "Train", "Infer" ], "resources" : [ { "flavor" : "modelarts.vm.cpu.4ud", "count" : 2 } ], "network" : { "name" : "network-maos-86c13962597848eeb29c5861153a391f" } }, "status" : { "phase" : "Running", "root" : "auto-pool-os-86c13962597848eeb29c5861153a391f", "scope" : [ { "scopeType" : "Train", "state" : "Enabled" }, { "scopeType" : "Infer", "state" : "Enabled" } ], "resources" : { "available" : [ { "flavor" : "modelarts.vm.cpu.4ud", "count" : 2, "azs" : [ { "az" : "cn-north-7c", "count" : 2 } ] } ] } } } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
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