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
- vw_backup_policies
- backup_policies
Name | Datatype | Description |
---|---|---|
id | text | Resource Id represents the complete path to the resource. |
name | text | Resource name associated with the resource. |
backupPolicyName | text | field from the properties object |
datasource_types | text | field from the properties object |
object_type | text | field from the properties object |
resourceGroupName | text | field from the properties object |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
type | text | Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... |
vaultName | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
id | string | Resource Id represents the complete path to the resource. |
name | string | Resource name associated with the resource. |
properties | object | BackupPolicy base |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
type | string | Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | backupPolicyName, resourceGroupName, subscriptionId, vaultName | Gets a backup policy belonging to a backup vault |
list | SELECT | resourceGroupName, subscriptionId, vaultName | Returns list of backup policies belonging to a backup vault |
create_or_update | INSERT | backupPolicyName, resourceGroupName, subscriptionId, vaultName | |
delete | DELETE | backupPolicyName, resourceGroupName, subscriptionId, vaultName |
SELECT
examples
Returns list of backup policies belonging to a backup vault
- vw_backup_policies
- backup_policies
SELECT
id,
name,
backupPolicyName,
datasource_types,
object_type,
resourceGroupName,
subscriptionId,
system_data,
type,
vaultName
FROM azure.data_protection.vw_backup_policies
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND vaultName = '{{ vaultName }}';
SELECT
id,
name,
properties,
systemData,
type
FROM azure.data_protection.backup_policies
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND vaultName = '{{ vaultName }}';
INSERT
example
Use the following StackQL query and manifest file to create a new backup_policies
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.data_protection.backup_policies (
backupPolicyName,
resourceGroupName,
subscriptionId,
vaultName,
systemData,
properties
)
SELECT
'{{ backupPolicyName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ vaultName }}',
'{{ systemData }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
- name: properties
value:
- name: datasourceTypes
value:
- string
- name: objectType
value: string
DELETE
example
Deletes the specified backup_policies
resource.
/*+ delete */
DELETE FROM azure.data_protection.backup_policies
WHERE backupPolicyName = '{{ backupPolicyName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND vaultName = '{{ vaultName }}';