CreateDrive

Updated at: 2025-03-21 11:00

Creates 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/create HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
ParameterTypeRequiredDescriptionExample
bodyobjectNo

The request parameters.

drive_namestringYes

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

test_drive
ownerstringYes

The owner of the drive.

3b3d7245c159488da17d081ad6c64687
owner_typestringYes

The type of the owner. Valid values:

user and group.

user
descriptionstringNo

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

drive for test
drive_typestringNo

The type of the drive. Set the value to normal.

normal
statusstringNo

The state of the drive. Valid values:

enabled and disabled.

Default value: enabled.

enabled
total_sizelongNo

The total size of the drive. Unit: bytes. By default, the size is unlimited.

1024
defaultbooleanNo

Specifies whether the drive is the default drive. Default value: false.

true

Response parameters

ParameterTypeDescriptionExample
ParameterTypeDescriptionExample
object

The response parameters.

domain_idstring

The domain ID.

bj1
drive_idstring

The drive ID.

1

Examples

Sample success responses

JSONformat

{
  "domain_id": "bj1",
  "drive_id": "1"
}

Error codes

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

  • On this page (1)
  • Debugging
  • Authorization information
  • Request syntax
  • Request parameters
  • Response parameters
  • Examples
  • Error codes
Feedback
phone Contact Us

Chat now with Alibaba Cloud Customer Service to assist you in finding the right products and services to meet your needs.

alicare alicarealicarealicare