disks
Creates, updates, deletes, gets or lists a disks resource.
Overview
| Name | disks |
| Type | Resource |
| Id | azure_stack.compute_admin.disks |
Fields
The following fields are returned by SELECT queries:
- get
- list
OK -- The disk has been returned.
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | string | The name of the resource |
properties | object | Disk properties. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
OK -- The list of disks has been returned.
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | string | The name of the resource |
properties | object | Disk properties. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | subscriptionId, location, diskId | showSizeDetail | Returns the disk. |
list | select | subscriptionId, location | userSubscriptionId, status, sharePath, scaleUnit, volumeLabel, count, start | Returns 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.
| Name | Datatype | Description |
|---|---|---|
diskId | string | The disk guid as identity. |
location | string | The name of Azure region. |
subscriptionId | string | The ID of the target subscription. |
count | integer (int32) | The maximum number of disks to return. |
scaleUnit | string | The scale unit which the resource belongs to. |
sharePath | string | The share which the resource belongs to. |
showSizeDetail | boolean | Switch for whether summary or detailed disk size information is returned. |
start | integer (int32) | The start index of disks in query. |
status | string | The parameters of disk state. |
userSubscriptionId | string | User Subscription Id which the resource belongs to. |
volumeLabel | string | The volume label of the volume which the resource belongs to. |
SELECT examples
- get
- list
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 }}'
;
Returns a list of disks.
SELECT
id,
name,
properties,
type
FROM azure_stack.compute_admin.disks
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND location = '{{ location }}' -- required
AND userSubscriptionId = '{{ userSubscriptionId }}'
AND status = '{{ status }}'
AND sharePath = '{{ sharePath }}'
AND scaleUnit = '{{ scaleUnit }}'
AND volumeLabel = '{{ volumeLabel }}'
AND count = '{{ count }}'
AND start = '{{ start }}'
;