restore_points
Creates, updates, deletes, gets or lists a restore_points
resource.
Overview
Name | restore_points |
Type | Resource |
Id | azure.sql.restore_points |
Fields
- vw_restore_points
- restore_points
Name | Datatype | Description |
---|---|---|
databaseName | text | field from the properties object |
earliest_restore_date | text | field from the properties object |
location | text | Resource location. |
resourceGroupName | text | field from the properties object |
restorePointName | text | field from the properties object |
restore_point_creation_date | text | field from the properties object |
restore_point_label | text | field from the properties object |
restore_point_type | text | field from the properties object |
serverName | text | field from the properties object |
subscriptionId | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
location | string | Resource location. |
properties | object | Properties of a database restore point |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | databaseName, resourceGroupName, restorePointName, serverName, subscriptionId | Gets a restore point. |
list_by_database | SELECT | databaseName, resourceGroupName, serverName, subscriptionId | Gets a list of database restore points. |
create | INSERT | databaseName, resourceGroupName, serverName, subscriptionId, data__restorePointLabel | Creates a restore point for a data warehouse. |
delete | DELETE | databaseName, resourceGroupName, restorePointName, serverName, subscriptionId | Deletes a restore point. |
SELECT
examples
Gets a list of database restore points.
- vw_restore_points
- restore_points
SELECT
databaseName,
earliest_restore_date,
location,
resourceGroupName,
restorePointName,
restore_point_creation_date,
restore_point_label,
restore_point_type,
serverName,
subscriptionId
FROM azure.sql.vw_restore_points
WHERE databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
location,
properties
FROM azure.sql.restore_points
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 restore_points
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sql.restore_points (
databaseName,
resourceGroupName,
serverName,
subscriptionId,
data__restorePointLabel,
restorePointLabel
)
SELECT
'{{ databaseName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ data__restorePointLabel }}',
'{{ restorePointLabel }}'
;
- name: your_resource_model_name
props:
- name: restorePointLabel
value: string
DELETE
example
Deletes the specified restore_points
resource.
/*+ delete */
DELETE FROM azure.sql.restore_points
WHERE databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND restorePointName = '{{ restorePointName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';