geo_backup_policies
Creates, updates, deletes, gets or lists a geo_backup_policies
resource.
Overview
Name | geo_backup_policies |
Type | Resource |
Id | azure.sql.geo_backup_policies |
Fields
- vw_geo_backup_policies
- geo_backup_policies
Name | Datatype | Description |
---|---|---|
databaseName | text | field from the properties object |
geoBackupPolicyName | text | field from the properties object |
kind | text | Kind of geo backup policy. This is metadata used for the Azure portal experience. |
location | text | Backup policy location. |
resourceGroupName | text | field from the properties object |
serverName | text | field from the properties object |
state | text | field from the properties object |
storage_type | text | field from the properties object |
subscriptionId | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
kind | string | Kind of geo backup policy. This is metadata used for the Azure portal experience. |
location | string | Backup policy location. |
properties | object | The properties of the geo backup policy. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | databaseName, geoBackupPolicyName, resourceGroupName, serverName, subscriptionId | Gets a geo backup policy. |
list_by_database | SELECT | databaseName, resourceGroupName, serverName, subscriptionId | Returns a list of geo backup policies. |
create_or_update | INSERT | databaseName, geoBackupPolicyName, resourceGroupName, serverName, subscriptionId, data__properties | Updates a database geo backup policy. |
SELECT
examples
Returns a list of geo backup policies.
- vw_geo_backup_policies
- 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 }}';
SELECT
kind,
location,
properties
FROM azure.sql.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.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: state
value: string
- name: storageType
value: string
- name: kind
value: string
- name: location
value: string