Skip to main content

Attach Volume

PUT/api/v1/block_storage/{block_id}/vm/attach/

Path parameters

  • block_idPathstringrequired

    Path parameter block_id.

Query parameters

  • project_idQuerystringoptional

    Identifier 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}}
  • apikeyQuerystringoptional

    API key used to authenticate the request

    • required
    • non-empty string
    example{{api_key}}
  • locationQuerystringoptional

    Specifies the target location for attaching the volume

    • must be a valid location identifier
    • no spaces allowed
    example{{location}}

Request body

application/json

string

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
object
codeinteger

HTTP status code indicating the result of the attach volume request

example200
  • must be an integer
  • must be a valid HTTP status code
dataobject
errorsobject
messagestring

Human-readable status message for the attach volume operation.

exampleBlock Storage is Attached to VM.
  • must be a non-empty string
  • typically under 256 characters