backup_policies
Creates, updates, deletes, gets or lists a backup_policies resource.
Overview
| Name | backup_policies |
| Type | Resource |
| Id | azure.netapp.backup_policies |
Fields
The following fields are returned by SELECT queries:
- get
- list
| 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. |
backupPolicyId | string | Backup Policy GUID ID. |
dailyBackupsToKeep | integer | Daily backups count to keep. |
enabled | boolean | The property to decide policy is enabled or not. |
etag | string | "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."). |
location | string | The geo-location where the resource lives. Required. |
monthlyBackupsToKeep | integer | Monthly backups count to keep. |
provisioningState | string | Azure lifecycle management. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
volumeBackups | array | A list of volumes assigned to this policy. |
volumesAssigned | integer | Volumes using current backup policy. |
weeklyBackupsToKeep | integer | Weekly backups count to keep. |
| 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. |
backupPolicyId | string | Backup Policy GUID ID. |
dailyBackupsToKeep | integer | Daily backups count to keep. |
enabled | boolean | The property to decide policy is enabled or not. |
etag | string | "If etag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields."). |
location | string | The geo-location where the resource lives. Required. |
monthlyBackupsToKeep | integer | Monthly backups count to keep. |
provisioningState | string | Azure lifecycle management. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
volumeBackups | array | A list of volumes assigned to this policy. |
volumesAssigned | integer | Volumes using current backup policy. |
weeklyBackupsToKeep | integer | Weekly backups count to keep. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, account_name, backup_policy_name, subscription_id | Get a particular backup Policy. | |
list | select | resource_group_name, account_name, subscription_id | List backup policies for Netapp Account. | |
create | insert | resource_group_name, account_name, backup_policy_name, subscription_id, location, properties | Create a backup policy for Netapp Account. | |
update | update | resource_group_name, account_name, backup_policy_name, subscription_id | Patch a backup policy for Netapp Account. | |
delete | delete | resource_group_name, account_name, backup_policy_name, subscription_id | Delete backup policy. |
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_policy_name | string | Backup policy Name which uniquely identify backup policy. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get
- list
Get a particular backup Policy.
SELECT
id,
name,
backupPolicyId,
dailyBackupsToKeep,
enabled,
etag,
location,
monthlyBackupsToKeep,
provisioningState,
systemData,
tags,
type,
volumeBackups,
volumesAssigned,
weeklyBackupsToKeep
FROM azure.netapp.backup_policies
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND backup_policy_name = '{{ backup_policy_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List backup policies for Netapp Account.
SELECT
id,
name,
backupPolicyId,
dailyBackupsToKeep,
enabled,
etag,
location,
monthlyBackupsToKeep,
provisioningState,
systemData,
tags,
type,
volumeBackups,
volumesAssigned,
weeklyBackupsToKeep
FROM azure.netapp.backup_policies
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create
- Manifest
Create a backup policy for Netapp Account.
INSERT INTO azure.netapp.backup_policies (
tags,
location,
properties,
resource_group_name,
account_name,
backup_policy_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}' /* required */,
'{{ resource_group_name }}',
'{{ account_name }}',
'{{ backup_policy_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
location,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: backup_policies
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the backup_policies resource.
- name: account_name
value: "{{ account_name }}"
description: Required parameter for the backup_policies resource.
- name: backup_policy_name
value: "{{ backup_policy_name }}"
description: Required parameter for the backup_policies resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the backup_policies resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: properties
description: |
Backup policy Properties. Required.
value:
backupPolicyId: "{{ backupPolicyId }}"
provisioningState: "{{ provisioningState }}"
dailyBackupsToKeep: {{ dailyBackupsToKeep }}
weeklyBackupsToKeep: {{ weeklyBackupsToKeep }}
monthlyBackupsToKeep: {{ monthlyBackupsToKeep }}
volumesAssigned: {{ volumesAssigned }}
enabled: {{ enabled }}
volumeBackups:
- volumeName: "{{ volumeName }}"
volumeResourceId: "{{ volumeResourceId }}"
backupsCount: {{ backupsCount }}
policyEnabled: {{ policyEnabled }}
UPDATE examples
- update
Patch a backup policy for Netapp Account.
UPDATE azure.netapp.backup_policies
SET
location = '{{ location }}',
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND backup_policy_name = '{{ backup_policy_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
location,
properties,
systemData,
tags,
type;
DELETE examples
- delete
Delete backup policy.
DELETE FROM azure.netapp.backup_policies
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND backup_policy_name = '{{ backup_policy_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;