Updated on 2025-11-19 GMT+08:00

Updating a Resource Pool

Function

This API is used to update the configuration and capacity of a specified resource pool. This API is used when you need to update the information about a resource pool when the resource pool capacity needs to be expanded, the configuration needs to be adjusted, or the performance needs to be optimized. Before using this API, ensure that the resource pool exists and you have the administrator permissions. After the update, the configuration and capacity of the resource pool will be updated, and the related resources and configurations will be adjusted. If the resource pool does not exist, the user does not have the permission to perform the operation, or the resource pool cannot be updated, the API will return an error message.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

PATCH /v2/{project_id}/pools/{pool_name}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition: User project ID. For details, see Obtaining a Project ID and Name.

Constraints: N/A

Range: N/A

Default Value: N/A

pool_name

Yes

String

Definition: Resource pool name generated by the system.

Constraints: N/A

Range: N/A

Default Value: N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-ModelArts-User-ID

No

String

Definition: Tenant ID. If there is a tenant ID, it will be used for workspace authentication.

Constraints: N/A

Range: N/A

Default Value: N/A

Content-Type

Yes

String

Message body type (format). Options:

  • application/merge-patch+json

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

metadata

No

PoolMetadataUpdate object

Definition: Resource pool metadata.

spec

No

PoolSpecUpdate object

Definition: Resource pool description.

Table 4 PoolMetadataUpdate

Parameter

Mandatory

Type

Description

annotations

No

annotations object

Definition: Comments of a resource pool.

Table 5 annotations

Parameter

Mandatory

Type

Description

os.modelarts/description

No

String

Definition: Description of a resource pool, specifying the application scenarios of the resource pool. The following special characters are not allowed: !<>=&"'

Constraints: N/A

Range: N/A

Default Value: N/A

os.modelarts/order.id

No

String

Definition: Order ID, which is required when you create or modify a yearly/monthly order.

Constraints: N/A

Range: N/A

Default Value: N/A

Table 6 PoolSpecUpdate

Parameter

Mandatory

Type

Description

scope

No

Array of strings

Definition: Type of the job to be updated.

Constraints: N/A

Range:

  • Train: training job

  • Infer: inference job

  • Notebook: notebook job

Default Value: N/A

resources

No

Array of resources objects

Definition: Updated resource flavors.

jobFlavors

No

Array of strings

Definition: Job flavors supported by a resource pool.

Constraints: N/A

Range: N/A

Default Value: N/A

driver

No

PoolDriver object

Definition: Resource pool driver information.

Table 7 resources

Parameter

Mandatory

Type

Description

flavor

Yes

String

Definition: Resource flavor.

Constraints: N/A

Range: N/A

Default Value: N/A

count

Yes

Integer

Definition: Number of resources of the flavor.

Constraints: N/A

Range: N/A

Default Value: N/A

azs

No

Array of PoolNodeAz objects

Definition: Updated AZs.

Table 8 PoolNodeAz

Parameter

Mandatory

Type

Description

az

Yes

String

Definition: AZ name.

Range: N/A

count

Yes

Integer

Definition: Number of AZ resource instances.

Range: N/A

Table 9 PoolDriver

Parameter

Mandatory

Type

Description

gpuVersion

No

String

Definition: Default GPU driver version of a resource pool. This parameter is only valid when the physical resource pool contains GPU specifications.

Range: N/A

npuVersion

No

String

Definition: Default NPU driver version of a resource pool. This parameter is only valid when the physical resource pool contains NPU specifications.

Range: N/A

updateStrategy

No

String

Definition: Driver upgrade policy of a resource pool.

Range:

  • force: forcible upgrade. The node drivers are upgraded immediately, which may affect jobs running on the node.

  • idle: secure upgrade. The drivers are upgraded when no job is running on the node.

Response Parameters

Status code: 200

Table 10 Response body parameters

Parameter

Type

Description

apiVersion

String

Definition: API version of the resource.

Range:

  • v2: The current resource version is v2.

kind

String

Definition: Resource type.

Range:

  • Pool: resource pool

metadata

PoolMetadata object

Definition: Metadata of the resource pool.

spec

PoolSpecModel object

Definition: Specifications of a resource pool.

status

PoolStatus object

Definition: Status of a resource pool.

Table 11 PoolMetadata

Parameter

Type

Description

name

String

Definition: Resource pool ID.

Range: N/A

creationTimestamp

String

Definition: Time when a resource pool is created. For example, 2025-11-01T03:49:41Z.

Range: N/A

labels

PoolMetaLabels object

Definition: Tags of a resource pool.

annotations

PoolMetaAnnotations object

Definition: Comments of a resource pool.

Constraints: N/A

Range: N/A

Default Value: N/A

Table 12 PoolMetaLabels

Parameter

Type

Description

os.modelarts/name

String

Definition: Displayed name of a resource pool.

Constraints: N/A

Range: N/A

Default Value: N/A

os.modelarts/workspace.id

String

Definition: Workspace ID. [For details about how to obtain the ID, see Querying the Workspace List.] (tag:hc,hk)

Constraints: N/A

Range: N/A

Default Value: 0

os.modelarts/node.prefix

String

Definition: Custom node prefix. This parameter is optional.

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

os.modelarts/tenant.project.id

String

Definition: ID of the tenant project that a resource pool belongs to.

Constraints: N/A

Range: N/A

Default Value: N/A

os.modelarts/enterprise.project.id

String

Definition: ID of the enterprise project that a resource pool belongs to.

Constraints: N/A

Range: N/A

Default Value: N/A

os.modelarts.pool/biz

String

Definition: Business type of a resource pool. The value can be public or private.

Constraints: N/A

Range: N/A

Default Value: N/A

os.modelarts/create-from

String

Definition: Source of a resource pool, for example, admin-console, indicating that the resource pool is created by the administrator on the ModelArts console.

Constraints: N/A

Range: N/A

Default Value: N/A

os.modelarts/nobilling

String

Definition: Indicates whether the resource pool is charged.

Constraints: N/A

Range: N/A

Default Value: N/A

os.modelarts/order.name

String

Definition: Last order job record associated with the resource pool.

Constraints: N/A

Range: N/A

Default Value: N/A

os.modelarts/region

String

Definition: Region where the resource pool is located.

Constraints: N/A

Range: N/A

Default Value: N/A

Table 13 PoolMetaAnnotations

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:

  • 0: pay-per-use

  • 1: yearly/monthly

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:

  • 2: monthly

  • 3: yearly

Default Value: N/A

os.modelarts/auto.renew

String

Definition: Auto-renewal status of a yearly/monthly resource pool.

Constraints: N/A

Range:

  • 0: Auto-renewal is disabled.

  • 1: Auto-renewal is enabled.

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

os.modelarts.pool/scheduler.queue.strategy

String

Definition: Policy of the resource pool scheduling queue, which is used to define task scheduling rules.

Constraints: N/A

Range: N/A

Default Value: N/A

os.modelarts.pool/subpools.count

String

Definition: Number of logical subpools in a resource pool.

Constraints: N/A

Range: N/A

Default Value: N/A

os.modelarts/tenant.domain.name

String

Definition: Tenant account of the resource pool.

Constraints: N/A

Range: N/A

Default Value: N/A

os.modelarts.pool/scope.external.dependency.train

String

Definition: External dependency ID of the training job.

Constraints: N/A

Range: N/A

Default Value: N/A

Table 14 PoolSpecModel

Parameter

Type

Description

type

String

Definition: Resource pool type.

Constraints: N/A

Range:

  • Dedicate: physical resource pool, which uses a separate network and supports network connection, custom drivers, and custom job types.

  • Logical: logical resource pool. There is no independent network and network connectivity is not supported. Logical resource pools can be created and scaled faster than physical resource pools.

Default Value: N/A

scope

Array of strings

Definition: Job types supported by a resource pool.

resources

Array of resources objects

Definition: Resource specifications in a resource pool, including resource specifications and the number of resources for each specification.

containernetwork

containernetwork object

Kubernetes container network.

network

network object

Definition: Network parameters of a resource pool.

jobFlavors

Array of strings

Definition: Job specifications supported by a resource pool. The value is the job specification name.

driver

PoolDriver object

Definition: Resource pool driver information.

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.

Range:

  • 0: not restricted

  • 1: Changing to the yearly/monthly billing is restricted.

  • 2: Modifying specifications is restricted.

  • 4: The service is restricted.

  • 8: The resource pool is frozen.

  • 16: The resource pool is frozen by the public security department (cannot be unsubscribed).

Table 15 resources

Parameter

Type

Description

flavor

String

Definition: Resource flavor ID.

Range: N/A

count

Integer

Definition: Number of resource specification instances in a resource pool.

Range: N/A

maxCount

Integer

Elastic resource amount of the resource specifications. The value must be the same as that of count in the physical pool.

azs

Array of PoolNodeAz objects

Definition: AZ distribution of the resource specification instances to be created in a resource pool.

extendParams

extendParams object

Definition: Custom parameters of a resource pool.

os

Os object

Definition: OS image information of nodes in a resource pool.

dataVolumes

dataVolumes object

List of custom cloud data disks. The list cannot be modified after being specified.

volumeGroupConfigs

volumeGroupConfigs object

Advanced disk configurations.

Table 16 extendParams

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

volumeGroup

String

Disk group name.

runtime

String

Model runtime environment.

Table 17 Os

Parameter

Type

Description

name

String

Definition: OS name.

Range: N/A

imageId

String

Definition: OS image ID.

Range: N/A

imageType

String

Definition: OS image type.

Range:

  • private: private image

Table 18 dataVolumes

Parameter

Type

Description

volumeType

String

Disk type.. Options:

  • SSD: ultra-high I/O disk

  • GPSSD: general-purpose SSD

  • SAS: high I/O disk

size

String

Disk size, in GiB.

count

String

Number of disks.

extendParams

extendParams object

Custom disk configuration.

Table 19 extendParams

Parameter

Type

Description

billing

String

Indicates whether the storage instance is billed. If this parameter is left blank, the storage instance is not billed. This field cannot be specified or modified by users.

volumeGroup

String

Name of a disk group, which is used to divide storage space. Options:

  • vgpaas: container disk.

  • default: common data disk, which is mounted in default mode.

  • vguser{num}: common data disk, which is mounted to a specified path. The group name varies depending on the path, for example, vguser1 and vguser2.

  • vg-everest-localvolume-persistent: common data disk, which is used as the persistent storage volume.

  • vg-everest-localvolume-ephemeral: common data disk, which is used as a temporary storage volume.

Table 20 volumeGroupConfigs

Parameter

Type

Description

volumeGroup

String

Disk group name. Index of the volume group in the dataVolumes.

dockerThinPool

String

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.

Table 21 lvmConfig

Parameter

Type

Description

lvType

String

LVM write mode. Options:

  • linear: linear mode.

  • striped: striped mode in which multiple disks are used to form a strip to improve disk performance.

Table 22 containernetwork

Parameter

Type

Description

mode

String

Container network model. Options:

overlay_l2: an overlay_l2 network (container tunnel network) built for containers by using OpenVSwitch (OVS).

  • vpc-router: an underlay_l2 network built for containers by using IPvlan and custom VPC routes.

  • eni: Cloud Native Network 2.0. This model deeply integrates the native ENI capability of VPC, uses the VPC CIDR block to allocate container addresses, and supports passthrough networking. You can use this model when creating a CCE Turbo cluster.

Table 23 network

Parameter

Type

Description

name

String

Definition: Network ID.

Range: N/A

Table 24 PoolDriver

Parameter

Type

Description

gpuVersion

String

Definition: Default GPU driver version of a resource pool. This parameter is only valid when the physical resource pool contains GPU specifications.

Range: N/A

npuVersion

String

Definition: Default NPU driver version of a resource pool. This parameter is only valid when the physical resource pool contains NPU specifications.

Range: N/A

updateStrategy

String

Definition: Driver upgrade policy of a resource pool.

Range:

  • force: forcible upgrade. The node drivers are upgraded immediately, which may affect jobs running on the node.

  • idle: secure upgrade. The drivers are upgraded when no job is running on the node.

Table 25 PoolStatus

Parameter

Type

Description

phase

String

Definition: Resource pool status.

Range:

  • Creating: The resource pool is being created.

  • Running: The resource pool is running.

  • Abnormal: The resource pool is abnormal.

  • Deleting: The resource pool is being deleted.

  • Error: An error occurred in the resource pool.

message

String

Definition: Prompt information about the resource pool status.

Range: N/A

resources

resources object

Definition: Resource information in different states of the resource pool.

scope

Array of scope objects

Definition: Status of the service type supported by the resource pool.

driver

driver object

Definition: Resource pool driver status.

parent

String

Definition: ID of the parent resource pool to which a resource pool belongs. The physical pool is empty.

Range: N/A

root

String

Definition: ID of the root resource pool.

Range: N/A

clusters

clusters object

Resource pool cluster information. This parameter is available only for privileged pools.

Table 26 resources

Parameter

Type

Description

creating

PoolResourceFlavorCount object

Definition: Resource information in creating states of the resource pool.

available

PoolResourceFlavorCount object

Definition: Resource information in available states of the resource pool.

abnormal

PoolResourceFlavorCount object

Definition: Resource information in abnormal states of the resource pool.

deleting

PoolResourceFlavorCount object

Definition: Resource information in deleting states of the resource pool.

Table 27 PoolResourceFlavorCount

Parameter

Type

Description

flavor

String

Definition: Resource flavor ID.

Range: N/A

count

Integer

Definition: Number of resource specification instances in a resource pool.

Range: 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.

Range: N/A

azs

Array of PoolNodeAz objects

Definition: AZ distribution of the resource specification instances to be created in a resource pool.

nodePool

String

Definition: Node pool ID.

Range: N/A

Table 28 PoolNodeAz

Parameter

Type

Description

az

String

Definition: AZ name.

Range: N/A

count

Integer

Definition: Number of AZ resource instances.

Range: N/A

Table 29 scope

Parameter

Type

Description

scopeType

String

Definition: Service type of the resource pool.

Range:

  • Train: training jobs

  • Infer: inference jobs

  • Notebook: notebook jobs

state

String

Definition: Service type status of the resource pool.

Range:

  • Enabling: The service is being enabled.

  • Enabled: The service has been enabled.

  • Disabling: The service is being disabled.

  • Disabled: The service has been disabled.

Table 30 driver

Parameter

Type

Description

gpu

PoolDriverStatus object

Definition: GPU driver status of a resource pool.

Range: N/A

npu

PoolDriverStatus object

Definition: NPU driver status of a resource pool.

Range: N/A

Table 31 PoolDriverStatus

Parameter

Type

Description

version

String

Definition: Current driver version of a resource pool.

Range: N/A

state

String

Definition: Current driver status of a resource pool.

Range:

  • Creating: The driver is being installed.

  • Upgrading: The driver is being upgraded.

  • Running: The driver is running.

  • Abnormal: The driver is abnormal.

Table 32 clusters

Parameter

Type

Description

name

String

Cluster name.

clusterFlavor

String

Cluster flavor of a standard pool.

type

String

Type of the resource pool cluster.

version

String

Cluster version.

plugins

plugins object

Name of the plugin supported by the cluster.

Table 33 plugins

Parameter

Type

Description

name

String

Name of the plugin supported by the cluster.

Status code: 400

Table 34 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Status code: 404

Table 35 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Example Requests

Expand the capacity of a resource pool.

PATCH https://{endpoint}/v2/{project_id}/pools/{pool_name}

{
  "spec" : {
    "resources" : [ {
      "flavor" : "modelarts.vm.cpu.4ud",
      "count" : 3
    } ]
  }
}

Example Responses

Status code: 200

OK

{
  "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" : 3
    } ],
    "network" : {
      "name" : "network-maos-86c13962597848eeb29c5861153a391f"
    }
  },
  "status" : {
    "phase" : "Running",
    "root" : "auto-pool-os-86c13962597848eeb29c5861153a391f",
    "scope" : [ {
      "scopeType" : "Train",
      "state" : "Enabled"
    }, {
      "scopeType" : "Infer",
      "state" : "Enabled"
    } ],
    "resources" : {
      "creating" : [ {
        "flavor" : "modelarts.vm.cpu.4ud",
        "count" : 1,
        "azs" : [ {
          "az" : "cn-north-7c",
          "count" : 1
        } ]
      } ],
      "available" : [ {
        "flavor" : "modelarts.vm.cpu.4ud",
        "count" : 2,
        "azs" : [ {
          "az" : "cn-north-7c",
          "count" : 2
        } ]
      } ]
    }
  }
}

Status code: 400

Bad request

{
  "error_code" : "ModelArts.50004000",
  "error_msg" : "Bad request"
}

Status code: 404

Not found.

{
  "error_code" : "ModelArts.50015001",
  "error_msg" : "pool not found"
}

Status Codes

Status Code

Description

200

OK

400

Bad request

404

Not found.

Error Codes

See Error Codes.