Disks - Get

Get disk.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}?api-version=2018-09-15
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/disks/{name}?$expand={$expand}&api-version=2018-09-15

URI Parameters

Name In Required Type Description
labName
path True

string

The name of the lab.

name
path True

string

The name of the disk.

resourceGroupName
path True

string

The name of the resource group.

subscriptionId
path True

string

The subscription ID.

userName
path True

string

The name of the user profile.

api-version
query True

string

Client API version.

$expand
query

string

Specify the $expand query. Example: 'properties($select=diskType)'

Responses

Name Type Description
200 OK

Disk

OK

Other Status Codes

CloudError

BadRequest

Security

azure_auth

OAuth2 Implicit Grant

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation Access Microsoft Azure

Examples

Disks_Get

Sample Request

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/users/@me/disks/{diskName}?api-version=2018-09-15

Sample Response

{
  "id": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/users/{userId}/disks/{diskName}",
  "name": "{diskName}",
  "type": "Microsoft.DevTestLab/labs/users/disks",
  "properties": {
    "diskType": "Standard",
    "diskSizeGiB": 1023,
    "leasedByLabVmId": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/vmName",
    "diskUri": "",
    "createdDate": "2021-01-04T20:27:32.1445632+00:00",
    "hostCaching": "None",
    "managedDiskId": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.compute/disks/{diskName}",
    "provisioningState": "Succeeded",
    "uniqueIdentifier": "9bf098d1-1b64-41a5-aa05-286767074a0b"
  }
}

Definitions

Name Description
CloudError

Error from a REST request.

CloudErrorBody

Body of an error from a REST request.

Disk

A Disk.

StorageType

The storage type for the disk (i.e. Standard, Premium).

CloudError

Error from a REST request.

Name Type Description
error

CloudErrorBody

The cloud error that occurred

CloudErrorBody

Body of an error from a REST request.

Name Type Description
code

string

The error code.

details

CloudErrorBody[]

Inner errors.

message

string

The error message.

target

string

The error target.

Disk

A Disk.

Name Type Description
id

string

The identifier of the resource.

location

string

The location of the resource.

name

string

The name of the resource.

properties.createdDate

string

The creation date of the disk.

properties.diskBlobName

string

When backed by a blob, the name of the VHD blob without extension.

properties.diskSizeGiB

integer

The size of the disk in Gibibytes.

properties.diskType

StorageType

The storage type for the disk (i.e. Standard, Premium).

properties.diskUri

string

When backed by a blob, the URI of underlying blob.

properties.hostCaching

string

The host caching policy of the disk (i.e. None, ReadOnly, ReadWrite).

properties.leasedByLabVmId

string

The resource ID of the VM to which this disk is leased.

properties.managedDiskId

string

When backed by managed disk, this is the ID of the compute disk resource.

properties.provisioningState

string

The provisioning status of the resource.

properties.storageAccountId

string

When backed by a blob, the storage account where the blob is.

properties.uniqueIdentifier

string

The unique immutable identifier of a resource (Guid).

tags

object

The tags of the resource.

type

string

The type of the resource.

StorageType

The storage type for the disk (i.e. Standard, Premium).

Name Type Description
Premium

string

Standard

string

StandardSSD

string