AttachDisks
Last updated
Last updated
This API is used to attach disks to instance.
Note
A maximum of 10 disks can be attached to an instance in one request.
Quantity of attached disks cannot exceed available disk numbers of an instance, that is usually 15 disks.
The disk and the instance to which you want to attach the disk reside in the same zone.
You can only attach disks to the available instance. Please note that status of DEPLOYING
or PENDING
is not available.
Disks must be detachable (portable
= true
) .
This API is an async API. A request ID is returned after the creation request is sent. However, it does not mean the operation has been completed. You can use DescribeDisks
to query the status of the disk. If the status changes from AVAILABLE
to IN_USE
, it means that the disk is attached successfully.
The following request parameter list only provides API request parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Parameter Name | Type | Description |
---|---|---|
Attach disks to an instance.
Zenlayer Cloud API 2.0 integrates SDKs to make it easier for you to call APIs. More programming languages will be supported.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
HTTP Status Code | Error Code | Description |
---|---|---|
diskIds
Yes
Array of String
ID list of disks.
instanceId
Yes
String
ID of instance to which the disks to be attached.
requestId
String
The unique request ID, which is returned for each request. RequestId is required for locating a problem.
400
INVALID_DISK_NOT_PORTABLE
Operations on undetachable disks are not supported.
400
UNSUPPORTED_OPERATION_INSTANCE_STATUS
Operations on the instance with current status are not supported.
400
UNSUPPORTED_OPERATION_DISK_ATTACHED
The current disk is already attached to other instance.
400
INVALID_DISK_AND_INSTANCE_ZONE_MISMATCHED
The disk and the instance to which you want to attach the disk should reside in the same zone.
400
LIMIT_EXCEEDED_INSTANCE_CAN_ATTACH
Quantity of attached disks exceed available disk numbers of an instance.