Attach Volume
PUT
/api/v1/block_storage/{block_id}/vm/attach/Path parameters
block_idPathstringrequiredPath parameter
block_id.
Query parameters
project_idQuerystringoptionalIdentifier of the project to scope the request to. Optional; if omitted, the account's default project is used.
- optional
- if omitted, the request is applied to the default project
example{{project_id}}apikeyQuerystringoptionalAPI key used to authenticate the request
- required
- non-empty string
example{{api_key}}locationQuerystringoptionalSpecifies the target location for attaching the volume
- must be a valid location identifier
- no spaces allowed
example{{location}}
Request body
application/json
JSON-formatted string specifying the VM ID for the volume attachment
example
{
"vm_id": {{vm_id}}
}- must be a valid JSON string
- must contain a "vm_id" field
Responses
200Successful response
HTTP status code indicating the result of the attach volume request
example
200- must be an integer
- must be a valid HTTP status code
Human-readable status message for the attach volume operation.
example
Block Storage is Attached to VM.- must be a non-empty string
- typically under 256 characters