Skip to main content

backups

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

Overview

Namebackups
TypeResource
Idazure.netapp.backups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
backupIdstringUUID v4 used to identify the Backup.
backupPolicyResourceIdstringResourceId used to identify the backup policy.
backupTypestringType of backup Manual or Scheduled. Known values are: "Manual" and "Scheduled". (Manual, Scheduled)
completionDatestring (date-time)The completion date of the backup.
creationDatestring (date-time)The creation date of the backup.
failureReasonstringFailure reason.
isLargeVolumebooleanSpecifies if the backup is for a large volume.
labelstringLabel for backup.
provisioningStatestringAzure lifecycle management.
sizeintegerSize of backup in bytes.
snapshotCreationDatestring (date-time)The snapshot creation date of the backup.
snapshotNamestringThe name of the snapshot.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
useExistingSnapshotbooleanManual backup an already existing snapshot. This will always be false for scheduled backups and true/false for manual backups.
volumeResourceIdstringResourceId used to identify the Volume. Required.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, account_name, backup_vault_name, backup_name, subscription_idGet the specified Backup under Backup Vault.
get_latest_statusselectresource_group_name, account_name, pool_name, volume_name, subscription_idGet the latest status of the backup for a volume.
list_by_vaultselectresource_group_name, account_name, backup_vault_name, subscription_id$filterList all backups Under a Backup Vault.
createinsertresource_group_name, account_name, backup_vault_name, backup_name, subscription_id, propertiesCreate a backup under the Backup Vault.
updateupdateresource_group_name, account_name, backup_vault_name, backup_name, subscription_idPatch a Backup under the Backup Vault.
deletedeleteresource_group_name, account_name, backup_vault_name, backup_name, subscription_idDelete a Backup under the Backup Vault.
get_volume_latest_restore_statusexecresource_group_name, account_name, pool_name, volume_name, subscription_idGet the latest status of the restore for a volume.

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
account_namestringThe name of the NetApp account. Required.
backup_namestringThe name of the backup. Required.
backup_vault_namestringThe name of the Backup Vault. Required.
pool_namestringThe name of the capacity pool. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
volume_namestringThe name of the volume. Required.
$filterstringAn option to specify the VolumeResourceId. If present, then only returns the backups under the specified volume. Default value is None.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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 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 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
;