2024-03-11 23:02:01 +08:00

9.4 KiB

OBS Storage Mounting

Function

This API is used to mount OBS storage to a running notebook instance so that the application layer can operate OBS parallel file system in the container.

Constraints

None

URI

POST /v1/{project_id}/notebooks/{instance_id}/storage

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

instance_id

Yes

String

Notebook instance ID.

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

category

No

String

Storage category. Options: - OBS

mount_path

No

String

Path where OBS storage is mounted, which must be in a subdirectory of /data/ of the notebook instance.

uri

No

String

OBS parallel file system path, for example, obs://modelarts/notebook/.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

category

String

Storage category. Options: - OBS

id

String

ID of the instance with OBS storage mounted.

mount_path

String

Path where OBS storage is mounted to a notebook instance.

status

String

Status of OBS storage to be mounted. Options: \r\n-MOUNTING: OBS storage is being mounted. \r\n-MOUNT_FAILED: OBS storage fails to be mounted. \r\n-MOUNTED: OBS storage is mounted. \r\n-UNMOUNTING: OBS storage is being unmounted.\r\n-UNMOUNT_FAILED: OBS storage fails to be unmounted.\r\n-UNMOUNTED: OBS is unmounted.

uri

String

OBS parallel file system path.

Example Requests

{
  "category" : "OBS",
  "mount_path" : "/data/wang/",
  "uri" : "obs://authoring-test/wang/"
}

Example Responses

Status code: 200

OK

{
  "id" : "91dd2d3f-2d92-475f-a375-04636af26cc9",
  "category" : "OBSFS",
  "mount_path" : "/data/wang/",
  "uri" : "obs://authoring-test/wang/",
  "status" : "MOUNTING"
}

Status Codes

Status Code

Description

200

OK

201

Created

401

Unauthorized

403

Forbidden

404

Not Found

Error Codes

See Error Codes.