Obtaining Resource Pools
Function
This API is used to obtain resource pools.
URI
GET /v2/{project_id}/pools
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
workspaceId |
No |
String |
Workspace ID. If this parameter is left blank, the default workspace is used. |
labelSelector |
No |
String |
Filter by label. |
status |
No |
String |
Status of the selected resource pool. Value created indicates that the resource pool has been created, failed indicates that creating the resource pool failed, and creating indicates that the resource pool is being created. This parameter is left blank by default, indicating that all resource pools will be returned, regardless of their statuses. |
parent |
No |
String |
Name of the parent resource pool. It is used to query the sub-pools of a specified resource pool. |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
apiVersion |
String |
API version. Options: |
kind |
String |
Resource type. Options: |
metadata |
metadata object |
Metadata of resource pools. |
items |
Array of Pool objects |
Resource pools. |
Parameter |
Type |
Description |
---|---|---|
continue |
String |
Next query location in pagination query. |
remainingItemCount |
Integer |
Number of remaining resources. |
Parameter |
Type |
Description |
---|---|---|
apiVersion |
String |
API version. Options: |
kind |
String |
Resource type. Options: |
metadata |
PoolMetadata object |
Metadata of a resource pool. |
spec |
PoolSpec object |
Description of a resource pool. |
status |
PoolStatus object |
Status of a resource pool. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Automatically generated resource pool name, which is equivalent to pool ID. Minimum: 4 Maximum: 128 |
creationTimestamp |
String |
Timestamp, for example, 2021-11-01T03:49:41Z. |
labels |
PoolMetaLabels object |
Resource pool labels. |
annotations |
PoolMetaAnnotations object |
Resource pool annotations. |
Parameter |
Type |
Description |
---|---|---|
os.modelarts/workspace.id |
String |
Workspace ID. Default: 0 |
os.modelarts/name |
String |
Specified resource pool name. Minimum: 4 Maximum: 64 |
os.modelarts/resource.id |
String |
Resource ID, which is typically provided for CBC. |
os.modelarts/tenant.domain.id |
String |
ID of the tenant corresponding to the resource pool, which records the tenant account where the resource pool is created |
os.modelarts/create-from |
String |
Source of a resource pool, for example, admin-console, indicating that the resource pool is created by the administrator on the ModelArts console |
os.modelarts.pool/biz |
String |
Business type of a resource pool. The value can be public or private. |
os.modelarts/privileged |
String |
Whether a resource pool is a privileged pool. If this parameter is specified, the resource pool is a privileged one. |
os.modelarts/sharing |
String |
Whether the resource pool can be shared. Options: |
Parameter |
Type |
Description |
---|---|---|
os.modelarts/description |
String |
Description of a resource pool. |
os.modelarts/billing.mode |
String |
Billing mode. Options: |
os.modelarts/period.num |
String |
Subscription period on a yearly/monthly basis, for example, 2. |
os.modelarts/period.type |
String |
Yearly/monthly subscription. Options: |
os.modelarts/auto.renew |
String |
Whether to automatically renew the subscription. Options: |
os.modelarts/promotion.info |
String |
Discount selected in CBC. |
os.modelarts/service.console.url |
String |
URL of the page displayed after the subscription order is paid. |
os.modelarts/order.id |
String |
Order ID, which is mandatory when creating a yearly/monthly resource pool or changing its billing mode. |
os.modelarts/flavor.resource.ids |
String |
Resource ID corresponding to each specification, which is used for interaction with the operations platform |
os.modelarts/tms.tags |
String |
Resource tags specified by the user during creation |
os.modelarts/scheduler.extension |
String |
Priority that can be set for the jobs delivered by other users to the shared resource pool |
os.modelarts.pool/subpools.count |
String |
Number of logical sub-pools in a resource pool |
Parameter |
Type |
Description |
---|---|---|
type |
object |
Resource pool type. |
scope |
Array of strings |
Job type enabled, which cannot be specified for logical pools. Options: |
resources |
Array of PoolResourceFlavorCount objects |
Resource specifications in a resource pool, including resource specifications and the number of resources for each specification. |
network |
PoolNetwork object |
Network settings for a resource pool. This parameter is mandatory for physical resource pools and is unavailable for logical resource pools. |
containerNetwork |
PoolClusterContainerNetwork object |
Kubernetes container network |
kubernetesSvcIpRange |
String |
CIDR of the Kubernetes service network segment |
masters |
Array of PoolClusterMaster objects |
Master node parameters in a resource pool. This parameter is optional for physical resource pools and is unavailable for logical resource pools. |
driver |
PoolDriver object |
Resource pool driver. |
userLogin |
PoolUserLogin object |
Node login information of a privilege pool |
clusters |
Array of PoolClusterInfo objects |
Privilege pool cluster information |
ipv6enable |
Boolean |
Whether to enable IPv6 |
controlMode |
Integer |
Restriction status of a resource pool. Options: |
Parameter |
Type |
Description |
---|---|---|
flavor |
String |
Resource specifications name, for example, modelarts.vm.gpu.t4u8 |
count |
Integer |
Minimum count for the specifications in a resource pool |
maxCount |
Integer |
Elastic usage of the resource specifications. This parameter value is the same the count value in a physical pool; It is greater than or equal to the count value in a logical pool. |
azs |
Array of PoolNodeAz objects |
AZ where resource pool nodes are deployed. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Network name. When you create a network with a specified name, the system will automatically create subnets for you. By default, the first subnet will be used. Minimum: 4 Maximum: 128 |
vpcId |
String |
VPC ID, which must be specified when a privileged pool is created and is unavailable for a non-privileged pool |
subnetId |
String |
Subnet ID, which must be specified when a privileged pool is created and is unavailable for a non-privileged pool |
Parameter |
Type |
Description |
---|---|---|
mode |
String |
Container network model |
cidr |
String |
Container network segment. This parameter is available only when the container network model is overlay_l2 or vpc-router. |
Parameter |
Type |
Description |
---|---|---|
gpuVersion |
String |
GPU driver version. This parameter is available when GPUs are used in a physical resource pool. For example, the GPU driver version is 440.33. |
npuVersion |
String |
NPU driver version. This parameter is available when Ascend chips are used in a physical resource pool. For example, the Ascend driver version is C78. |
updateStrategy |
String |
Driver upgrade policy. Options: |
Parameter |
Type |
Description |
---|---|---|
keyPairName |
String |
Key pair name |
password |
String |
Password, which must be salted, encrypted, and encoded using Base64. The default username is root. |
Parameter |
Type |
Description |
---|---|---|
phase |
String |
Resource pool status. Options: |
message |
String |
Message indicating that the resource pool is in the current state. |
resources |
resources object |
Left blank for logical pools, which do not need to be created. |
scope |
Array of scope objects |
Service status of a resource pool. |
driver |
driver object |
Resource pool driver. |
parent |
String |
Name of the parent node of a resource pool. This parameter is left blank for physical pools. |
root |
String |
Name of the root node in a resource pool. For a physical pool, the value is its name. |
clusters |
Array of PoolClusterInfo objects |
Resource pool cluster information. This parameter is available only for privileged pools. |
Parameter |
Type |
Description |
---|---|---|
creating |
PoolResourceFlavorCount object |
Number of resources that are being created. |
available |
PoolResourceFlavorCount object |
Number of available resources. |
abnormal |
PoolResourceFlavorCount object |
Number of unavailable resources. |
deleting |
PoolResourceFlavorCount object |
Number of resources that are being deleted. |
Parameter |
Type |
Description |
---|---|---|
az |
String |
AZ name. |
count |
Integer |
Number of nodes for expanding the capacity of a specified AZ. Minimum: 1 Maximum: 2000 |
Parameter |
Type |
Description |
---|---|---|
scopeType |
String |
Job type enabled, which cannot be specified for logical pools. Options: |
state |
String |
Service status. Options: |
Parameter |
Type |
Description |
---|---|---|
gpu |
PoolDriverStatus object |
GPU driver. |
npu |
PoolDriverStatus object |
NPU driver. |
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", "os.modelarts/external-access" : "elb" } }, "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" : "xxxxxx-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.