Deleting a Resource Pool
Function
This API is used to delete a specified resource pool.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
DELETE /v2/{project_id}/pools/{pool_name}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID and Name. |
pool_name |
Yes |
String |
Automatically generated resource pool name. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-ModelArts-User-ID |
No |
String |
Tenant ID. If there is a tenant ID, it will be used for workspace authentication. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
apiVersion |
String |
API version. Options:
|
kind |
String |
Resource type. Options:
|
metadata |
PoolMetadataDeletion object |
Metadata of a resource pool. |
spec |
PoolSpecModel 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. |
deletionTimestamp |
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 |
Specified resource pool name. |
os.modelarts/resource.id |
String |
ID of the primary resource in the resource pool, which is usually 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 |
Parameter |
Type |
Description |
---|---|---|
os.modelarts/description |
String |
Description of a resource pool. |
os.modelarts/billing.mode |
String |
Billing mode. The options are as follows:
|
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 |
Specifies the resource ID corresponding to each flavor, which is used for interaction with CBC. |
os.modelarts/tms.tags |
String |
TMS tag specified by the user during creation. |
Parameter |
Type |
Description |
---|---|---|
type |
String |
Resource pool type. The options are as follows:
|
scope |
Array of strings |
Job type supported by the resource pool. Select at least one type. You can select all physical resource pools. The options are as follows:
|
resources |
Array of resources objects |
List of resource specifications in the resource pool, including resource specifications and the number of resources of the corresponding specifications. |
network |
network object |
Specifies the network parameters of the resource pool. This parameter is mandatory for physical resource pools. |
jobFlavors |
Array of strings |
List of job specifications supported by the resource pool. The content is the job specification name. |
driver |
PoolDriver object |
Indicates the driver information of the resource pool. |
controlMode |
Integer |
Restriction status of a resource pool. The options are as follows:
|
Parameter |
Type |
Description |
---|---|---|
flavor |
String |
Resource flavor, for example, modelarts.vm.gpu.tnt004. |
count |
Integer |
Number of resources of the corresponding specifications. |
azs |
Array of PoolNodeAz objects |
Specifies the AZ list. |
Parameter |
Type |
Description |
---|---|---|
az |
String |
AZ name |
count |
Integer |
Number of nodes for expanding the capacity of a specified AZ. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Specifies the network name. When a user interface creates a network by specifying the network name, the system automatically creates a subnet. Users cannot create a subnet. By default, the system is created under the first subnet. |
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 mandatory when the physical resource pool contains ascend specifications, for example, C78. |
updateStrategy |
String |
Indicates the driver upgrade policy. The options are as follows:
|
Parameter |
Type |
Description |
---|---|---|
phase |
String |
Resource pool cluster status. The options are as follows:
|
message |
String |
Message indicating that the resource pool is in the current state. |
resources |
resources object |
Number of resources in different states in a resource pool. |
scope |
Array of scope objects |
Service status of a resource pool. |
driver |
driver object |
Resource pool driver. |
parent |
String |
Name of the parent node in the resource pool. This parameter is left blank for physical pools. |
root |
String |
Name of the root node in the resource pool. For a physical pool, set this parameter to its own name. |
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 |
---|---|---|
flavor |
String |
Resource flavor name, for example, modelarts.vm.gpu.tnt004. |
count |
Integer |
Indicates the guaranteed usage of specifications. |
maxCount |
Integer |
Elastic usage of the resource specification. The value of this parameter is the same as that of count in the physical pool. |
azs |
Array of azs objects |
Number of AZs where the resource is located. |
Parameter |
Type |
Description |
---|---|---|
scopeType |
String |
Service type. The options are as follows:
|
state |
String |
Service status. Options:
|
Parameter |
Type |
Description |
---|---|---|
gpu |
PoolDriverStatus object |
GPU driver. |
npu |
PoolDriverStatus object |
NPU driver. |
Parameter |
Type |
Description |
---|---|---|
version |
String |
Indicates the current driver version. |
state |
String |
Indicates the current driver status. Options:
|
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error codes of ModelArts. |
error_msg |
String |
Error message. |
Example Requests
Delete a resource pool.
DELETE https://{endpoint}/v2/{project_id}/pools/{pool_name} { }
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" : 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 code: 404
Not found.
{ "error_code" : "ModelArts.50015001", "error_msg" : "pool not found" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
404 |
Not found. |
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