Skip to main content

geo_backup_policies

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

Overview

Namegeo_backup_policies
TypeResource
Idazure.sql.geo_backup_policies

Fields

NameDatatypeDescription
databaseNametextfield from the properties object
geoBackupPolicyNametextfield from the properties object
kindtextKind of geo backup policy. This is metadata used for the Azure portal experience.
locationtextBackup policy location.
resourceGroupNametextfield from the properties object
serverNametextfield from the properties object
statetextfield from the properties object
storage_typetextfield from the properties object
subscriptionIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTdatabaseName, geoBackupPolicyName, resourceGroupName, serverName, subscriptionIdGets a geo backup policy.
list_by_databaseSELECTdatabaseName, resourceGroupName, serverName, subscriptionIdReturns a list of geo backup policies.
create_or_updateINSERTdatabaseName, geoBackupPolicyName, resourceGroupName, serverName, subscriptionId, data__propertiesUpdates a database geo backup policy.

SELECT examples

Returns a list of geo backup policies.

SELECT
databaseName,
geoBackupPolicyName,
kind,
location,
resourceGroupName,
serverName,
state,
storage_type,
subscriptionId
FROM azure.sql.vw_geo_backup_policies
WHERE databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new geo_backup_policies resource.

/*+ create */
INSERT INTO azure.sql.geo_backup_policies (
databaseName,
geoBackupPolicyName,
resourceGroupName,
serverName,
subscriptionId,
data__properties,
properties
)
SELECT
'{{ databaseName }}',
'{{ geoBackupPolicyName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ properties }}'
;