Skip to main content

backup_policies

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

Overview

Namebackup_policies
TypeResource
Idazure.service_fabric_dataplane.backup_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
AutoRestoreOnDataLossboolean
MaxIncrementalBackupsinteger
Namestring
RetentionPolicyobjectDescribes 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.
ScheduleobjectDescribes 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.
StorageobjectDescribes 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:

NameAccessible byRequired ParamsOptional ParamsDescription
get_backup_policy_by_nameselectbackup_policy_name, endpointtimeoutGets a particular backup policy by name. Gets a particular backup policy identified by {backupPolicyName}.
create_backup_policyinsertendpoint, Name, AutoRestoreOnDataLoss, MaxIncrementalBackups, Schedule, Storagetimeout, ValidateConnectionCreates 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_policydeletebackup_policy_name, endpointtimeoutDeletes 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_policyexecbackup_policy_name, endpoint, Name, AutoRestoreOnDataLoss, MaxIncrementalBackups, Schedule, Storagetimeout, ValidateConnectionUpdates 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.

NameDatatypeDescription
backup_policy_namestringThe name of the backup policy.
endpointstringThe service endpoint host (no scheme). (default: )
ValidateConnectionbooleanSpecifies whether to validate the storage connection and credentials before creating or updating the backup policies.
timeoutinteger (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

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

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

DELETE examples

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

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 }}"
}'
;