Export (0) Print
Expand All

List Disks

Updated: April 3, 2014

The List Disks operation retrieves a list of the disks in the image repository that is associated with the specified subscription.

The List Disks request may be specified as follows. Replace <subscription-id> with the subscription ID.

 

Method Request URI

GET

https://management.core.windows.net/<subscription-id>/services/disks

You must make sure that the request that is made to the management service is secure. For additional details, see Authenticating Service Management Requests.

The following table describes required and optional request headers.

 

Request Header Description

x-ms-version

Required. Specifies the version of the operation to use for this request. This header should be set to 2012-03-01 or higher. For more information about versioning headers, see Service Management Versioning.

The response includes an HTTP status code, a set of response headers, and a response body.

A successful operation returns status code 200 (OK). For information about status codes, see Service Management Status and Error Codes.

The response for this operation includes the following headers. The response may also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.

 

Response Header Description

x-ms-request-id

A value that uniquely identifies a request made against the management service.

The format of the response body is as follows:

  
<Disks xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <Disk>
    <AffinityGroup>name-of-affinity-group</AffinityGroup>
    <AttachedTo>
      <HostedServiceName>name-of-cloud-service</HostedServiceName>
      <DeploymentName>name-of-deployment</DeploymentName> 
      <RoleName>name-of-virtual-machine</RoleName>
    </AttachedTo>
    <OS>operating-system-type</OS>
    <Location>geo-location-of-disk</Location>
    <LogicalSizeInGB>size-of-disk</LogicalSizeInGB>
    <MediaLink>uri-of-vhd</MediaLink>
    <Name>name-of-disk</Name>
    <SourceImageName>name-of-source-image</SourceImageName>
    <CreatedTime>creation-time-of-disk</CreatedTime>
  </Disk>
</Disks>

The following table describes the elements of the response body.

 

Element name Description

AffinityGroup

Specifies the affinity group in which the disk is located. The AffinityGroup value is derived from storage account that contains the blob in which the vhd is located. If the storage account does not belong to an affinity group the value is NULL.

AttachedTo

Specifies information about the Virtual Machine that is currently using the disk. A disk cannot be deleted as long as it is attached to a Virtual Machine.

HostedServiceName

Specifies the cloud service in which the disk is being used.

DeploymentName

Specifies the deployment in which the disk is being used.

RoleName

Specifies the Virtual Machine that the disk is attached to.

OS

The operating system type of the image on the disk.

Possible Values are:

  • Linux

  • Windows

  • NULL

Location

Specifies the geo-location in which the disk is located. The Location value is derived from storage account that contains the blob in which the disk is located. If the storage account belongs to an affinity group the value is NULL.

LogicalSizeInGB

Specifies the size, in GB, of the disk.

MediaLink

Specifies the location of the blob in the blob store in which the media for the disk is located. The blob location belongs to a storage account in the subscription specified by the <subscription-id> value in the operation call.

Example:

http://example.blob.core.windows.net/disks/mydisk.vhd

Name

Specifies the name of the disk. This is the name that is used when you create a Virtual Machine using the disk.

SourceImageName

Specifies the name of the OS Image from which the disk was created. This property is populated automatically when a disk is created from an OS image by calling the Add Role or Create Virtual Machine Deployment. operations.

CreatedTime

Specifies in UTC format when the disk was created.

The CreatedTime element is only available using version 2014-01-01 or higher.

Show:
© 2014 Microsoft