DetachDisks
1. API Description
This API (DetachDisks) 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.Operation on boot disks are not supported.
A maximum of 10 disks can be detached from an instance in one request.
2. Input Parameters
The following request parameter list only provides API request parameters.
diskIds
Yes
Array of String
ID list of disks to be detached.
instanceCheckFlag
No
Boolean
Check instance running status.
Default value: true , meaning disk detach allowed only when instance is shut down.
Default value: true
3. Output Parameters
requestId
String
The unique request ID, which is returned for each request.
RequestId is required for locating a problem.
failedDiskIds
Array of String
Disks failed to be detached.
4. Code Example
Detach one or more disks from an instance.
5. Developer Resources
Zenlayer Cloud API 2.0 integrates SDKs,to make it easier for you to call APIs. More programming languages will be supported.
6. Error Codes
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
404
INVALID_DISK_NOT_FOUND
Disk does not exist.
400
INVALID_DISK_NOT_PORTABLE
Disk is not detachable.
404
INVALID_INSTANCE_NOT_FOUND
Instance not found.
400
OPERATION_DENIED_DISK_SYSTEM_TYPE
The operation is not supported for system disks.
400
UNSUPPORTED_OPERATION_DISK_NO_ATTACH
Disk is not attached to any instance.
400
UNSUPPORTED_OPERATION_DISK_STATUS
Operations on the disk with current status are not supported.
400
UNSUPPORTED_OPERATION_INSTANCE_STATUS
Operations on instances in current state are not supported.
Last updated