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. For details, see Obtaining a Project ID and Name. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| workspaceId | No | String | Workspace ID. The default value is 0. |
| labelSelector | No | String | Filter by label. |
| status | No | String | Resource pool status. The options are as follows: |
| 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: |
| items | Array of Pool objects | Resource pools. |
| 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. |
| 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 |
| os.modelarts/name | String | Resource pool name specified by the user. |
| os.modelarts/resource.id | String | Resource ID of the resource pool. |
| 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/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. |
| os.modelarts/flavor.resource.ids | String | Resource ID corresponding to each flavor. |
| os.modelarts/tms.tags | String | Resource tags specified by the user during resource pool 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 |
| os.modelarts/volcano.scheduler.cabinet-exclusive.enabled | String | Whether a resource pool that is not provisioned for an entire cabinet can deliver the job of an entire cabinet. If this annotation exists, the resource pool can deliver such a job. By default, a resource pool provisioned for an entire cabinet (that is, creatingStep resources of the rack type) supports this function. |
| os.modelarts.pool/scope.external.dependency.Train | String | External dependency ID of training. |
| os.modelarts.pool/scope.external.dependency.Infer | String | External dependency ID of inference. |
| os.modelarts.pool/scope.external.dependency.Notebook | String | External dependency ID of the development environment. |
| Parameter | Type | Description |
|---|---|---|
| type | String | Resource pool type. The options are as follows:
|
| scope | Array of strings | Job type enabled, which cannot be specified for logical pools. Options: |
| resources | Array of PoolResource objects | Resource flavor list in a resource pool, including resource flavors, the number of resources for each flavor, and node pool information. |
| network | PoolNetwork object | Network settings for a resource pool. This parameter is mandatory for physical 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. |
| clusterFlavor | String | Cluster flavor of a standard pool. |
| driver | PoolDriver object | Resource pool driver. |
| Parameter | Type | Description |
|---|---|---|
| flavor | String | Resource flavor name, for example, modelarts.vm.gpu.tnt004. |
| count | Integer | Minimum count for the flavors in a resource pool. |
| maxCount | Integer | Elastic usage of the resource flavor. 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. |
| tags | Array of UserTag objects | Resource tags. |
| extendParams | PoolResourceExtendParams object | Custom configuration, for example, setting dockerSize for the node. |
| creatingStep | CreatingStep object | Batch creation information. |
| rootVolume | RootVolume object | Custom system disk (cloud hard disk) information. |
| dataVolumes | Array of DataVolumeItem objects | List of custom data disks (cloud hard disks). |
| volumeGroupConfigs | Array of VolumeGroupConfig objects | Advanced disk configurations. This parameter is mandatory when a custom data disk exists. |
| Parameter | Type | Description |
|---|---|---|
| key | String | Key. The value cannot start with CCE- or __type_baremetal. |
| value | String | Value. |
| Parameter | Type | Description |
|---|---|---|
| dockerBaseSize | String | Size of the container image space on a node. |
| postInstall | String | Post-installation script. The entered value must be encoded using Base64. |
| Parameter | Type | Description |
|---|---|---|
| volumeType | String | Disk type. The options are as follows: |
| size | String | Disk size, in GiB. |
| Parameter | Type | Description |
|---|---|---|
| volumeType | String | Disk type. The options are as follows: |
| size | String | Disk size, in GiB. |
| count | Integer | Number of disks. |
| extendParams | VolumeExtendParams object | Custom disk configuration. |
| Parameter | Type | Description |
|---|---|---|
| volumeGroup | String | Disk group name. Index of the volume group in the dataVolumes. |
| dockerThinPool | Integer | Percentage of container disks to data disks on nodes in a resource pool. This parameter can be specified only when volumeGroup is vgpaas (container disk). |
| lvmConfig | LvmConfig object | LVM configuration management. |
| types | Array of strings | Storage type. The options are as follows: |
| Parameter | Type | Description |
|---|---|---|
| lvType | String | LVM write mode. The options are as follows: |
| path | String | Disk mount path. This parameter takes effect only in user configuration. The value is an absolute path. Digits, letters, periods (.), hyphens (-), and underscores (_) are allowed. |
| Parameter | Type | Description |
|---|---|---|
| name | String | Network name. The value is obtained from the metadata.name field in the network resource details. |
| 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 |
|---|---|---|
| phase | String | Resource pool status. Options: |
| message | String | Message indicating that the resource pool is in the current state. |
| resources | PoolResourceStatus object | Left blank for logical pools, which do not need to be created. |
| scope | Array of PoolScopeStatus objects | Service status of a resource pool. |
| driver | PoolDriverListStatus 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. |
| Parameter | Type | Description |
|---|---|---|
| creating | Array of PoolResourceFlavorCount objects | Data model for the number of resources of the specified specifications |
| available | Array of PoolResourceFlavorCount objects | Data model for the number of resources of the specified specifications |
| abnormal | Array of PoolResourceFlavorCount objects | Data model for the number of resources of the specified specifications |
| deleting | Array of PoolResourceFlavorCount objects | Data model for the number of resources of the specified specifications |
| Parameter | Type | Description |
|---|---|---|
| flavor | String | Resource flavor name, for example, modelarts.vm.gpu.tnt004. |
| 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. |
| creatingStep | CreatingStep object | Batch creation information. |
| Parameter | Type | Description |
|---|---|---|
| az | String | AZ name. |
| count | Integer | Number of nodes for expanding the capacity of a specified AZ. |
| Parameter | Type | Description |
|---|---|---|
| step | Integer | Creation step. |
| type | String | Batch creation type. |
| Parameter | Type | Description |
|---|---|---|
| scopeType | String | Enabled job types. The options are as follows: |
| state | String | Service status. The options are as follows: |
| plugins | Array of PoolScopePluginPhase objects | Plug-in status. |
| message | String | Cause of the failure to enable or disable the environment. |
| Parameter | Type | Description |
|---|---|---|
| name | String | Plug-in type. |
| phase | String | Plug-in status. The options are as follows: |
| Parameter | Type | Description |
|---|---|---|
| gpu | PoolDriverStatus object | GPU driver information. |
| npu | PoolDriverStatus object | NPU driver information. |
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/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" : "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.