Help Center/ ModelArts/ API Reference/ DevServer Management/ Mounting Disks to the DevServer
Updated on 2025-11-19 GMT+08:00

Mounting Disks to the DevServer

Function

This API is used to Mounting Disks to the DevServer.

Debugging

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

URI

POST /v1/{project_id}/dev-servers/{id}/attachvolume

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

id

Yes

String

Parameter description: ID of the DevServer instance.

Restrictions: N/A.

** Value range: **:^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$.

**Default value: * *: N/A

project_id

Yes

String

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

Constraints: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed.

Range: N/A

Default Value: N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

volume_id

Yes

String

Parameter description: ID of the disk to be attached.

Constraints: N/A.

** Value range: **:^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$.

**Default value * *: N/A.

Response Parameters

Status code: 200

Table 3 Response header parameters

Parameter

Type

Description

X-Request-Id

String

LinkTrace ID

Table 4 Response body parameters

Parameter

Type

Description

operation_id

String

Parameter description: operation ID.

** Value range: **:^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$.

operation_status

String

Parameter description: operation status.

Value Range:

  • Pending to be processed

  • Running

  • failed.

-Success succeeded.

operation_type

String

Parameter description: operation type.

**Value range: node_attach_volume

Example Requests

POST https://{endpoint}/v1/{project_id}/dev-servers/{id}/attachvolume

{
  "volume_id" : "1e79eff7-c02b-4dfd-a0d6-f76c90d9b4e0"
}

Example Responses

Status code: 200

{
  "operation_id" : "b894b879-a3c0-49ee-b5cb-92202b2794e2",
  "operation_status" : "pending",
  "operation_type" : "node_attach_volume"
}

Status Codes

Status Code

Description

200

Error Codes

See Error Codes.