DetachDisks
Last updated
Last updated
This API is used to detach one or more disks from an instance.
Note
Disks to be detached should be attached to the same instance. If any of the disks is undetachable, the operation will not be performed.
Only operations on disks with the status of IN_USE
are supported.
Only operations on disks that are detachable (portable
= true
) are supported.
Only operations on data disks are supported.
A maximum of 10 disks can be detached from an instance in one request.
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 IN_USE
to AVAILABLE
, it means that the disk is detached successfully.
The following request parameter list only provides API request parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Parameter Name | Type | Description |
---|---|---|
Detach one or more disks from 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 to be detached.
requestId
String
The unique request ID, which is returned for each request. RequestId is required for locating a problem.
400
INVALID_DISK_NOT_PORTABLE
Disk does not detachable.
400
UNSUPPORTED_OPERATION_DISK_STATUS
Operations on the disk with current status are not supported.
400
UNSUPPORTED_OPERATION_INSTANCE_STATUS
Operations on the instance with current status are not supported.
400
UNSUPPORTED_OPERATION_DISK_SYSTEM_TYPE
Only operations on data disks are supported.
400
UNSUPPORTED_OPERATION_DISK_NO_ATTACH
Disk is not attached to any instance.
400
UNSUPPORTED_OPERATION_DISK_BELONG_MULTIPLE_INSTANCE
Disks are attached to different instances.