Retrieve Details of a Storage Attachment

get

/storage/attachment/{name}

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.

Request

Supported Media Types
Path Parameters
Header Parameters
Back to Top

Response

Supported Media Types

200 Response

OK. See Status Codes for information about other possible HTTP status codes.
Headers
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
Back to Top

Examples

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"
     https://api-z999.compute.us0.oraclecloud.com/storage/attachment/Compute-acme/jack.jones@example.com/a6462ba5-5933-41a1-b853-fcfcb421cb07/5fd18f4a-2ac2-4548-a0cf-57774c024742/a7fb4550-df19-497c-a19f-44fc176e1fc2
  • 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.

  • api-z999.compute.us0.oraclecloud.com 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 jack.jones@example.com are example values. Replace acme with the identity domain ID of your Compute Classic account, and jack.jones@example.com 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/jack.jones@example.com/vol1",
  "hypervisor": null,
  "uri": "https://api-z999.compute.us0.oraclecloud.com/storage/attachment/Compute-acme/jack.jones@example.com/a6462b...cb07/5fd18f...4742/a7fb45...e1fc2",
  "instance_name": "/Compute-acme/jack.jones@example.com/a6462ba5-5933-41a1-b853-fcfcb421cb07/5fd18f4a-2ac2-4548-a0cf-57774c024742",
  "state": "attached",
  "readonly": false,
  "name": "/Compute-acme/jack.jones@example.com/a6462ba5-5933-41a1-b853-fcfcb421cb07/5fd18f4a-2ac2-4548-a0cf-57774c024742/a7fb4550-df19-497c-a19f-44fc176e1fc2"
}
Back to Top