Creates a pay-as-you-go data disk.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

ParameterTypeRequiredExampleDescription
ActionStringYesCreateDisk

The operation that you want to perform. Set the value to CreateDisk.

InstanceChargeTypeStringYesPostPaid

The billing method of the instance. Valid values:

  • PrePaid: subscription (not supported)
  • PostPaid: pay-as-you-go
EnsRegionIdStringYescn-chengdu-telecom

The ID of the edge node.

CategoryStringYescloud_efficiency

The category of the disk. Valid values:

  • cloud_efficiency: ultra disk
  • cloud_ssd: all-flash disk
  • local_hdd: local HDD
  • local_ssd: local SSD
SizeStringYes20

The size of the disk. Unit: GB.

Response parameters

ParameterTypeExampleDescription
RequestIdString7030AB96-57CF-1C68-9FEE-D60E547FD79C

The ID of the request.

OrderIdString21127020370****

The ID of the order. Multiple IDs are separated by commas (,).

Note This parameter is not returned for the pay-as-you-go billing method.
InstanceIdsArray of Stringd-5rpvziragkacvop665m3h****

The IDs of the instances.

Examples

Sample requests

http(s)://ens.aliyuncs.com/?Action=CreateDisk
&InstanceChargeType=PostPaid
&EnsRegionId=cn-chengdu-telecom
&Category=cloud_efficiency
&Size=20
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateDiskResponse>
    <RequestId>7030AB96-57CF-1C68-9FEE-D60E547FD79C</RequestId>
    <OrderId>21127020370****</OrderId>
    <InstanceIds>d-5rpvziragkacvop665m3h****</InstanceIds>
</CreateDiskResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "7030AB96-57CF-1C68-9FEE-D60E547FD79C",
  "OrderId" : "21127020370****",
  "InstanceIds" : [ "d-5rpvziragkacvop665m3h****" ]
}

Error codes

HTTP status codeError codeError messageDescription
400Invalid%sThe specified parameter %s is invalid.The error message returned because the value of the specified parameter is invalid.
400Missing%sYou must specify the parameter %s.The error message returned because a required parameter is left empty.
400NoPermissionPermission denied.The error message returned because you do not have the required permissions. Ask the administrator to grant you the permissions.

For a list of error codes, see Service error codes.