Skip to main content

disks

Creates, updates, deletes, gets or lists a disks resource.

Overview

Namedisks
TypeResource
Idazure_stack.compute_admin.disks

Fields

The following fields are returned by SELECT queries:

OK -- The disk has been returned.

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
namestringThe name of the resource
propertiesobjectDisk properties.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, location, diskIdshowSizeDetailReturns the disk.
listselectsubscriptionId, locationuserSubscriptionId, status, sharePath, scaleUnit, volumeLabel, count, startReturns a list of disks.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
diskIdstringThe disk guid as identity.
locationstringThe name of Azure region.
subscriptionIdstringThe ID of the target subscription.
countinteger (int32)The maximum number of disks to return.
scaleUnitstringThe scale unit which the resource belongs to.
sharePathstringThe share which the resource belongs to.
showSizeDetailbooleanSwitch for whether summary or detailed disk size information is returned.
startinteger (int32)The start index of disks in query.
statusstringThe parameters of disk state.
userSubscriptionIdstringUser Subscription Id which the resource belongs to.
volumeLabelstringThe volume label of the volume which the resource belongs to.

SELECT examples

Returns the disk.

SELECT
id,
name,
properties,
type
FROM azure_stack.compute_admin.disks
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND location = '{{ location }}' -- required
AND diskId = '{{ diskId }}' -- required
AND showSizeDetail = '{{ showSizeDetail }}'
;