You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
Volumes
DetachVolume - Unmount volume
Copy page
Download PDF
DetachVolume - Unmount volume
Call the DetachVolume API to unmount the volume from an ECS instance.​
Debugging​
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
​
request parameters​
Only request-specific parameters and some common parameters for this API are listed below. For more information, see Common Parameters.​
Action string required Example: DetachVolume​
Action to be performed: DetachVolume​
​
Version string required Example value: 2020-04-01​
The version of the API is: 2020-04-01.​
​
VolumeIdstringrequiredExample value: vol-3tir92lne23vj0x1****​
ID of the volume to be detached.​
​
InstanceId string required Example: i-3tiefmkskq3vj0x0****​
The ECS instance ID where the volume is mounted.​
​
​
​
Response parameters​
This API does not have unique response parameters. For more information, see Response Structure.​
Request example​
​
GET /?Action=DetachVolume&Version=2020-04-01&InstanceId=i-3tir90q84q3vj0x1****&VolumeId=vol-3tir92lne23vj0x1**** HTTP/1.1​
Host: open.volcengineapi.com​
Region: cn-beijing​
ServiceName: storage_ebs​
​
Back to example​
​
{​
"ResponseMetadata": {​
"RequestId": "86f352ba-e528-46db-bd4c-1ca786b5****",​
"Action": "DetachVolume",​
"Version": "2020-04-01",​
"Service": "storage_ebs",​
"Region": "cn-beijing"​
},​
"Result": {}​
}​
​
error code​
The following table lists error codes related to this API and business logic. For common error codes, refer to the public error codes documentation.​
​
Status code​
error code​
error message​
Create Volume​
400​
MissingInstanceID​
Missing instance ID.​
Instance ID is missing.​
400​
MissingVolumeID​
The specified parameter VolumeId is missing.​
Volume ID is missing.​
400​
ErrorInstanceNotMatched​
The attached volume does not match the instance parameters.​
The cloud host attached to the volume does not match the cloud host parameters.​
400​
ErrorMissingVolumeID​
Missing volume ID.​
Missing volume ID.​
400​
ErrorMissingInstanceID​
Missing instance ID.​
Instance ID is missing.​
400​
ErrorSystemVolumeCannotDetach​
System volume cannot be directly detached.​
System volume cannot be directly detached.​
404​
VolumeNotFound​
The specified volume does not exist.​
Volume does not exist.​
404​
ErrorInvalidInstanceStatus​
Instance status exception.​
Abnormal cloud server status.​
412​
SystemVolumeCannotDetach​
System volume cannot be directly detached.​
The system disk cannot be detached directly.​
412​
ErrorPrepaidVolumeCannotDetach​
Postpaid volumes cannot be detached.​
Subscription volumes cannot be detached.​
412​
ErrorVolumeStatusInMigration​
Volume is undergoing data migration.​
The volume is migrating data.​
412​
ErrorVolumeStatusInChanging​
Volume type is being changed.​
The volume is being reconfigured.​
412​
VolumeStatusCannotDetach​
Volumes in this state cannot be detached.​
The volume cannot be detached in this status.​
412​
VolumeCannotDetach​
Detach is not supported for this type of volume.​
This type of volume does not support detachment.​
412​
AlreadyExitOrder​
Order in progress, cannot perform operation.​
The order is in progress and cannot be processed.​
​
​
Last updated: 2026.01.09 18:19:56