backups
Creates, updates, deletes, gets or lists a backups resource.
Overview
| Name | backups |
| Type | Resource |
| Id | azure.netapp.backups |
Fields
The following fields are returned by SELECT queries:
- get
- get_latest_status
- list_by_vault
| 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. |
backupId | string | UUID v4 used to identify the Backup. |
backupPolicyResourceId | string | ResourceId used to identify the backup policy. |
backupType | string | Type of backup Manual or Scheduled. Known values are: "Manual" and "Scheduled". (Manual, Scheduled) |
completionDate | string (date-time) | The completion date of the backup. |
creationDate | string (date-time) | The creation date of the backup. |
failureReason | string | Failure reason. |
isLargeVolume | boolean | Specifies if the backup is for a large volume. |
label | string | Label for backup. |
provisioningState | string | Azure lifecycle management. |
size | integer | Size of backup in bytes. |
snapshotCreationDate | string (date-time) | The snapshot creation date of the backup. |
snapshotName | string | The name of the snapshot. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
useExistingSnapshot | boolean | Manual backup an already existing snapshot. This will always be false for scheduled backups and true/false for manual backups. |
volumeResourceId | string | ResourceId used to identify the Volume. Required. |
| Name | Datatype | Description |
|---|---|---|
errorMessage | string | Displays error message if the backup is in an error state. |
healthy | boolean | Backup health status. |
lastTransferSize | integer | Displays the last transfer size. |
lastTransferType | string | Displays the last transfer type. |
mirrorState | string | The status of the backup. Known values are: "Uninitialized", "Mirrored", and "Broken". (Uninitialized, Mirrored, Broken) |
relationshipStatus | string | Status of the backup mirror relationship. Known values are: "Idle", "Transferring", "Failed", and "Unknown". (Idle, Transferring, Failed, Unknown) |
totalTransferBytes | integer | Displays the total bytes transferred. |
transferProgressBytes | integer | Displays the total number of bytes transferred for the ongoing operation. |
unhealthyReason | string | Reason for the unhealthy backup relationship. |
| 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. |
backupId | string | UUID v4 used to identify the Backup. |
backupPolicyResourceId | string | ResourceId used to identify the backup policy. |
backupType | string | Type of backup Manual or Scheduled. Known values are: "Manual" and "Scheduled". (Manual, Scheduled) |
completionDate | string (date-time) | The completion date of the backup. |
creationDate | string (date-time) | The creation date of the backup. |
failureReason | string | Failure reason. |
isLargeVolume | boolean | Specifies if the backup is for a large volume. |
label | string | Label for backup. |
provisioningState | string | Azure lifecycle management. |
size | integer | Size of backup in bytes. |
snapshotCreationDate | string (date-time) | The snapshot creation date of the backup. |
snapshotName | string | The name of the snapshot. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
useExistingSnapshot | boolean | Manual backup an already existing snapshot. This will always be false for scheduled backups and true/false for manual backups. |
volumeResourceId | string | ResourceId used to identify the Volume. Required. |
Methods
The following methods are available for this resource:
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 |
|---|---|---|
account_name | string | The name of the NetApp account. Required. |
backup_name | string | The name of the backup. Required. |
backup_vault_name | string | The name of the Backup Vault. Required. |
pool_name | string | The name of the capacity pool. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
volume_name | string | The name of the volume. Required. |
$filter | string | An option to specify the VolumeResourceId. If present, then only returns the backups under the specified volume. Default value is None. |
SELECT examples
- get
- get_latest_status
- list_by_vault
Get the specified Backup under Backup Vault.
SELECT
id,
name,
backupId,
backupPolicyResourceId,
backupType,
completionDate,
creationDate,
failureReason,
isLargeVolume,
label,
provisioningState,
size,
snapshotCreationDate,
snapshotName,
systemData,
type,
useExistingSnapshot,
volumeResourceId
FROM azure.netapp.backups
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND backup_vault_name = '{{ backup_vault_name }}' -- required
AND backup_name = '{{ backup_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Get the latest status of the backup for a volume.
SELECT
errorMessage,
healthy,
lastTransferSize,
lastTransferType,
mirrorState,
relationshipStatus,
totalTransferBytes,
transferProgressBytes,
unhealthyReason
FROM azure.netapp.backups
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND pool_name = '{{ pool_name }}' -- required
AND volume_name = '{{ volume_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List all backups Under a Backup Vault.
SELECT
id,
name,
backupId,
backupPolicyResourceId,
backupType,
completionDate,
creationDate,
failureReason,
isLargeVolume,
label,
provisioningState,
size,
snapshotCreationDate,
snapshotName,
systemData,
type,
useExistingSnapshot,
volumeResourceId
FROM azure.netapp.backups
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND backup_vault_name = '{{ backup_vault_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
;
INSERT examples
- create
- Manifest
Create a backup under the Backup Vault.
INSERT INTO azure.netapp.backups (
properties,
resource_group_name,
account_name,
backup_vault_name,
backup_name,
subscription_id
)
SELECT
'{{ properties }}' /* required */,
'{{ resource_group_name }}',
'{{ account_name }}',
'{{ backup_vault_name }}',
'{{ backup_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: backups
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the backups resource.
- name: account_name
value: "{{ account_name }}"
description: Required parameter for the backups resource.
- name: backup_vault_name
value: "{{ backup_vault_name }}"
description: Required parameter for the backups resource.
- name: backup_name
value: "{{ backup_name }}"
description: Required parameter for the backups resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the backups resource.
- name: properties
description: |
Backup Properties. Required.
value:
backupId: "{{ backupId }}"
creationDate: "{{ creationDate }}"
snapshotCreationDate: "{{ snapshotCreationDate }}"
completionDate: "{{ completionDate }}"
provisioningState: "{{ provisioningState }}"
size: {{ size }}
label: "{{ label }}"
backupType: "{{ backupType }}"
failureReason: "{{ failureReason }}"
volumeResourceId: "{{ volumeResourceId }}"
useExistingSnapshot: {{ useExistingSnapshot }}
snapshotName: "{{ snapshotName }}"
backupPolicyResourceId: "{{ backupPolicyResourceId }}"
isLargeVolume: {{ isLargeVolume }}
UPDATE examples
- update
Patch a Backup under the Backup Vault.
UPDATE azure.netapp.backups
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND backup_vault_name = '{{ backup_vault_name }}' --required
AND backup_name = '{{ backup_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- delete
Delete a Backup under the Backup Vault.
DELETE FROM azure.netapp.backups
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND backup_vault_name = '{{ backup_vault_name }}' --required
AND backup_name = '{{ backup_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- get_volume_latest_restore_status
Get the latest status of the restore for a volume.
EXEC azure.netapp.backups.get_volume_latest_restore_status
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@pool_name='{{ pool_name }}' --required,
@volume_name='{{ volume_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;