Modifying a Single Disk Attached to an ECS
Function
This API is used to modify the information about a single disk attached to an ECS.
Currently, only the delete_on_termination parameter can be modified.
Constraints
- Yearly/monthly-billed disks cannot be modified.
- Shared disks cannot be modified.
- System disks cannot be modified.
URI
PUT /v1/{project_id}/cloudservers/{server_id}/block_device/{volume_id}
Table 1 lists the parameters.
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. |
server_id |
Yes |
Specifies the ECS ID. |
volume_id |
Yes |
Specifies the disk ID. |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
block_device |
Yes |
Object |
Updates the information about a disk attached to the ECS. For details, see Table 3. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
delete_on_termination |
Yes |
Boolean |
Specifies whether the disk attached to the ECS is deleted when the ECS is deleted.
NOTE:
|
Response
None
Example Request
Set a disk to be deleted together with the ECS when the attached ECS is deleted.
PUT https://{endpoint}/v1/{project_id}/cloudservers/{server_id}/block_device/{volume_id} { "block_device": { "delete_on_termination": true } }
Example Response
None
Returned Values
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot