CreateDrive

更新时间:
复制 MD 格式

Creates a user-level storage resource.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecd:CreateDrive

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID.

cn-hangzhou

AliUid

integer

No

The ID of your Alibaba Cloud account.

1202****

UserId

string

No

The user ID.

user01

DomainId

string

No

The ID of the storage resource.

Note

Call the DescribeDrives operation to retrieve the storage resource ID.

dom-aaaa****

ExternalDomainId

string

No

The ID of the external storage resource.

Note

Call the DescribeDrives operation to retrieve the external storage resource ID.

1234****

ResourceType

string

No

The type of the storage resource.

Valid values:

  • NAS: File Storage NAS

  • PDS: Drive and Photo Service

Valid values:

  • NAS :
  • PDS :

NAS

Type

string

No

The usage of the storage resource.

Valid values:

  • DESKTOP: data disk space

  • USER_PROFILE: space for personal data of the user

Valid values:

  • DESKTOP :
  • USER_PROFILE :

USER_PROFILE

DriveName

string

No

The name of the user-level storage resource.

test01

Description

string

No

The description of the user-level storage resource.

test01

ProfileRoaming

boolean

No

Note

This parameter is deprecated.

-

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The ID of the request.

B7AA****

Message

string

The response message.

successful

Code

string

The response code. The value 200 indicates that the request was successful.

200

Success

boolean

Indicates whether the request was successful.

true

Drive

object

The user-level storage resource.

Id

string

The ID.

1

GmtCreate

string

The time when the storage resource was created.

2025-07-02T08:42:26.000+00:00

GmtModified

string

The time when the storage resource was last modified.

2025-07-07T02:46:04.000+00:00

AliUid

string

The ID of the Alibaba Cloud account.

1202****

DomainId

string

The ID of the storage resource.

dom-aaaa****

DriveId

string

The ID of the user-level storage resource.

dri-aaaa****

ExternalDriveId

string

The ID of the external user-level storage resource.

Note

A value is returned for this parameter only if ResourceType is set to PDS.

1100****

UserId

string

The user ID.

user01

ExternalUserId

string

The ID of the external user.

user01@cn-hangzhou.120****

Name

string

The name of the storage resource.

test****

Description

string

The description of the storage resource.

test****

TotalSize

integer

The total amount of the user-level storage resource capacity.

Note

Unit: bytes.

536870912000

UsedSize

integer

The amount of user-level storage resource capacity used.

Note

Unit: bytes.

243175936

Status

string

The status of the user-level storage resource.

Valid values:

  • INIT: initializing

  • MAINTAIN: maintaining

  • DELETING

  • INVALID

  • NORMAL

  • FAIL: failed

Valid values:

  • INIT :
  • MAINTAIN :
  • DELETING :
  • INVALID :
  • NORMAL :
  • FAIL :

NORMAL

Type

string

The usage of the storage resource.

Valid values:

  • DESKTOP: data disk space

  • USER_PROFILE: space for personal data of the user

Valid values:

  • DESKTOP :
  • USER_PROFILE :

USER_PROFILE

ProfileRoaming

boolean

Note

This parameter is deprecated.

-

Examples

Success response

JSON format

{
  "RequestId": "B7AA****",
  "Message": "successful",
  "Code": "200",
  "Success": true,
  "Drive": {
    "Id": "1",
    "GmtCreate": "2025-07-02T08:42:26.000+00:00",
    "GmtModified": "2025-07-07T02:46:04.000+00:00",
    "AliUid": "1202****",
    "DomainId": "dom-aaaa****",
    "DriveId": "dri-aaaa****",
    "ExternalDriveId": "1100****",
    "UserId": "user01",
    "ExternalUserId": "user01@cn-hangzhou.120****",
    "Name": "test****",
    "Description": "test****",
    "TotalSize": 536870912000,
    "UsedSize": 243175936,
    "Status": "NORMAL",
    "Type": "USER_PROFILE",
    "ProfileRoaming": true
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.