backup_policies
Creates, updates, deletes, gets or lists a backup_policies resource.
Overview
| Name | backup_policies |
| Type | Resource |
| Id | azure.data_protection.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. |
datasourceTypes | array | Type of datasource for the backup management. Required. |
objectType | string | Required. Default value is None. |
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". |
| 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. |
datasourceTypes | array | Type of datasource for the backup management. Required. |
objectType | string | Required. Default value is None. |
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". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, vault_name, backup_policy_name, subscription_id | Gets a backup policy belonging to a backup vault. | |
list | select | resource_group_name, vault_name, subscription_id | Returns list of backup policies belonging to a backup vault. | |
create_or_update | insert | resource_group_name, vault_name, backup_policy_name, subscription_id | Creates or Updates a backup policy belonging to a backup vault. | |
create_or_update | replace | resource_group_name, vault_name, backup_policy_name, subscription_id | Creates or Updates a backup policy belonging to a backup vault. | |
delete | delete | resource_group_name, vault_name, backup_policy_name, subscription_id | Deletes a backup policy belonging to a backup vault. |
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 |
|---|---|---|
backup_policy_name | string | Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
vault_name | string | The name of the backup vault. Required. |
SELECT examples
- get
- list
Gets a backup policy belonging to a backup vault.
SELECT
id,
name,
datasourceTypes,
objectType,
systemData,
type
FROM azure.data_protection.backup_policies
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND vault_name = '{{ vault_name }}' -- required
AND backup_policy_name = '{{ backup_policy_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Returns list of backup policies belonging to a backup vault.
SELECT
id,
name,
datasourceTypes,
objectType,
systemData,
type
FROM azure.data_protection.backup_policies
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND vault_name = '{{ vault_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Creates or Updates a backup policy belonging to a backup vault.
INSERT INTO azure.data_protection.backup_policies (
properties,
resource_group_name,
vault_name,
backup_policy_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ vault_name }}',
'{{ backup_policy_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
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: vault_name
value: "{{ vault_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: properties
description: |
BaseBackupPolicyResource properties.
value:
datasourceTypes:
- "{{ datasourceTypes }}"
objectType: "{{ objectType }}"
REPLACE examples
- create_or_update
Creates or Updates a backup policy belonging to a backup vault.
REPLACE azure.data_protection.backup_policies
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND vault_name = '{{ vault_name }}' --required
AND backup_policy_name = '{{ backup_policy_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- delete
Deletes a backup policy belonging to a backup vault.
DELETE FROM azure.data_protection.backup_policies
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND vault_name = '{{ vault_name }}' --required
AND backup_policy_name = '{{ backup_policy_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;