Retrieve Details of a Storage Attachment



Retrieves details of the specified storage attachment.

Required Role: To complete this task, you must have the Compute_Monitor or Compute_Operations role. If this role isn't assigned to you or you're not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud My Services. See Modifying User Roles in Managing and Monitoring Oracle Cloud.


Supported Media Types
Path Parameters
Header Parameters


Supported Media Types

200 Response

OK. See Status Codes for information about other possible HTTP status codes.
Body ()
Root Schema : StorageAttachment-response
Type: object
Show Source
  • Shows the default account for your identity domain.
  • Hypervisor type to which this volume was attached to.
  • Index number for the volume. The allowed range is 1-10. The index determines the device name by which the volume is exposed to the instance. Index 0 is allocated to the temporary boot disk, /dev/xvda. An attachment with index 1 is exposed to the instance as /dev/xvdb, an attachment with index 2 is exposed as /dev/xvdc, and so on.

  • Multipart name of the instance attached to the storage volume.
  • Name of this attachment, generated by the server.
  • When set to true, it indicates that the volume is a read-only storage volume.
  • Specify one of the following states of the storage attachment:

    attaching: The storage attachment is in the process of attaching to the instance.

    attached: The storage attachment is attached to the instance.

    detaching: The storage attachment is in the process of detaching from the instance.

    unavailable: The storage attachment is unavailable.

    unknown: The state of the storage attachment is not known.

  • Three part name (/Compute-identity_domain/user/object_name) of the storage volume that is attached to the instance.
  • Uniform Resource Identifier


cURL Command

The following example shows how to view details of a storage attachment by submitting a GET request on the REST resource using cURL. For more information about cURL, see Use cURL.

Enter the command on a single line. Line breaks are used in this example for readability.

curl -X GET 
     -H "Cookie: $COMPUTE_COOKIE"
     -H "Accept: application/oracle-compute-v3+json"
  • COMPUTE_COOKIE is the name of the variable in which you stored the authentication cookie earlier. For information about retrieving the authentication cookie and storing it in a variable, see Authentication.

  • is an example REST endpoint URL. Change this value to the REST endpoint URL of your Compute Classic site. For information about finding out REST endpoint URL for your site, see Send Requests.

  • acme and are example values. Replace acme with the identity domain ID of your Compute Classic account, and with your user name.

Example of Response Body

The following example shows the response body in JSON format.

Some lines may be truncated with ellipses (...) for readability.

  "index": 1,
  "account": null,
  "storage_volume_name": "/Compute-acme/",
  "hypervisor": null,
  "uri": "",
  "instance_name": "/Compute-acme/",
  "state": "attached",
  "readonly": false,
  "name": "/Compute-acme/"