All Products
Search
Document Center

Drive and Photo Service:UpdateDrive

Last Updated:Aug 04, 2025

Modifies a drive.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

POST /v2/drive/update HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
bodyobjectNo

The request parameters.

drive_idstringYes

The drive ID.

1
drive_namestringNo

The name of the drive. The name can be up to 128 characters in length.

descriptionstringNo

The description of the drive. The description can be up to 1,024 characters in length.

statusstringNo

The state of the drive. Valid values:

enabled and disabled.

enabled
total_sizelongNo

The total size of the drive. Unit: bytes. A value of -1 specifies that the size is unlimited.

10240
ownerstringNo

The owner of the drive. Note: You can modify the owner of a personal drive only by using an AccessKey pair.

user1

Response parameters

ParameterTypeDescriptionExample
Drive

The response parameters.

Examples

Sample success responses

JSONformat

{
  "domain_id": "bj1",
  "drive_id": 1,
  "drive_name": "drv1",
  "description": "vipdrive",
  "owner": "c9b7a5aa04d14ae3867fdc886fa01da4",
  "owner_type": "user",
  "drive_type": "normal",
  "status": "enabled",
  "used_size": 20480,
  "total_size": 204800,
  "created_at": "2019-08-20T06:51:27.292Z",
  "creator": "c9b7a5aa04d14ae3867fdc886fa01da4"
}

Error codes

For a list of error codes, visit the Service error codes.