backup_policies
Creates, updates, deletes, gets or lists a backup_policies resource.
Overview
| Name | backup_policies |
| Type | Resource |
| Id | azure.service_fabric_dataplane.backup_policies |
Fields
The following fields are returned by SELECT queries:
- get_backup_policy_by_name
| Name | Datatype | Description |
|---|---|---|
AutoRestoreOnDataLoss | boolean | |
MaxIncrementalBackups | integer | |
Name | string | |
RetentionPolicy | object | Describes the retention policy configured. You probably want to use the sub-classes and not this class directly. Known sub-classes are: BasicRetentionPolicyDescription All required parameters must be populated in order to send to Azure. |
Schedule | object | Describes the backup schedule parameters. You probably want to use the sub-classes and not this class directly. Known sub-classes are: FrequencyBasedBackupScheduleDescription, TimeBasedBackupScheduleDescription All required parameters must be populated in order to send to Azure. |
Storage | object | Describes the parameters for the backup storage. You probably want to use the sub-classes and not this class directly. Known sub-classes are: AzureBlobBackupStorageDescription, FileShareBackupStorageDescription, DsmsAzureBlobBackupStorageDescription, ManagedIdentityAzureBlobBackupStorageDescription All required parameters must be populated in order to send to Azure. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_backup_policy_by_name | select | backup_policy_name, endpoint | timeout | Gets a particular backup policy by name. Gets a particular backup policy identified by {backupPolicyName}. |
create_backup_policy | insert | endpoint, Name, AutoRestoreOnDataLoss, MaxIncrementalBackups, Schedule, Storage | timeout, ValidateConnection | Creates a backup policy. Creates a backup policy which can be associated later with a Service Fabric application, service or a partition for periodic backup. |
delete_backup_policy | delete | backup_policy_name, endpoint | timeout | Deletes the backup policy. Deletes an existing backup policy. A backup policy must be created before it can be deleted. A currently active backup policy, associated with any Service Fabric application, service or partition, cannot be deleted without first deleting the mapping. |
update_backup_policy | exec | backup_policy_name, endpoint, Name, AutoRestoreOnDataLoss, MaxIncrementalBackups, Schedule, Storage | timeout, ValidateConnection | Updates the backup policy. Updates the backup policy identified by {backupPolicyName}. |
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 | The name of the backup policy. |
endpoint | string | The service endpoint host (no scheme). (default: ) |
ValidateConnection | boolean | Specifies whether to validate the storage connection and credentials before creating or updating the backup policies. |
timeout | integer (int64) | The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. |
SELECT examples
- get_backup_policy_by_name
Gets a particular backup policy by name. Gets a particular backup policy identified by {backupPolicyName}.
SELECT
AutoRestoreOnDataLoss,
MaxIncrementalBackups,
Name,
RetentionPolicy,
Schedule,
Storage
FROM azure.service_fabric_dataplane.backup_policies
WHERE backup_policy_name = '{{ backup_policy_name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND timeout = '{{ timeout }}'
;
INSERT examples
- create_backup_policy
- Manifest
Creates a backup policy. Creates a backup policy which can be associated later with a Service Fabric application, service or a partition for periodic backup.
INSERT INTO azure.service_fabric_dataplane.backup_policies (
Name,
AutoRestoreOnDataLoss,
MaxIncrementalBackups,
Schedule,
Storage,
RetentionPolicy,
endpoint,
timeout,
ValidateConnection
)
SELECT
'{{ Name }}' /* required */,
{{ AutoRestoreOnDataLoss }} /* required */,
{{ MaxIncrementalBackups }} /* required */,
'{{ Schedule }}' /* required */,
'{{ Storage }}' /* required */,
'{{ RetentionPolicy }}',
'{{ endpoint }}',
'{{ timeout }}',
'{{ ValidateConnection }}'
;
# Description fields are for documentation purposes
- name: backup_policies
props:
- name: endpoint
value: "{{ endpoint }}"
description: Required parameter for the backup_policies resource.
- name: Name
value: "{{ Name }}"
- name: AutoRestoreOnDataLoss
value: {{ AutoRestoreOnDataLoss }}
- name: MaxIncrementalBackups
value: {{ MaxIncrementalBackups }}
- name: Schedule
description: |
Describes the backup schedule parameters. You probably want to use the sub-classes and not this class directly. Known sub-classes are: FrequencyBasedBackupScheduleDescription, TimeBasedBackupScheduleDescription All required parameters must be populated in order to send to Azure.
value:
ScheduleKind: "{{ ScheduleKind }}"
- name: Storage
description: |
Describes the parameters for the backup storage. You probably want to use the sub-classes and not this class directly. Known sub-classes are: AzureBlobBackupStorageDescription, FileShareBackupStorageDescription, DsmsAzureBlobBackupStorageDescription, ManagedIdentityAzureBlobBackupStorageDescription All required parameters must be populated in order to send to Azure.
value:
FriendlyName: "{{ FriendlyName }}"
StorageKind: "{{ StorageKind }}"
- name: RetentionPolicy
description: |
Describes the retention policy configured. You probably want to use the sub-classes and not this class directly. Known sub-classes are: BasicRetentionPolicyDescription All required parameters must be populated in order to send to Azure.
value:
RetentionPolicyType: "{{ RetentionPolicyType }}"
- name: timeout
value: "{{ timeout }}"
description: The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds.
description: The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds.
- name: ValidateConnection
value: {{ ValidateConnection }}
description: Specifies whether to validate the storage connection and credentials before creating or updating the backup policies.
description: Specifies whether to validate the storage connection and credentials before creating or updating the backup policies.
DELETE examples
- delete_backup_policy
Deletes the backup policy. Deletes an existing backup policy. A backup policy must be created before it can be deleted. A currently active backup policy, associated with any Service Fabric application, service or partition, cannot be deleted without first deleting the mapping.
DELETE FROM azure.service_fabric_dataplane.backup_policies
WHERE backup_policy_name = '{{ backup_policy_name }}' --required
AND endpoint = '{{ endpoint }}' --required
AND timeout = '{{ timeout }}'
;
Lifecycle Methods
- update_backup_policy
Updates the backup policy. Updates the backup policy identified by {backupPolicyName}.
EXEC azure.service_fabric_dataplane.backup_policies.update_backup_policy
@backup_policy_name='{{ backup_policy_name }}' --required,
@endpoint='{{ endpoint }}' --required,
@timeout='{{ timeout }}',
@ValidateConnection={{ ValidateConnection }}
@@json=
'{
"Name": "{{ Name }}",
"AutoRestoreOnDataLoss": {{ AutoRestoreOnDataLoss }},
"MaxIncrementalBackups": {{ MaxIncrementalBackups }},
"Schedule": "{{ Schedule }}",
"Storage": "{{ Storage }}",
"RetentionPolicy": "{{ RetentionPolicy }}"
}'
;