backups
Creates, updates, deletes, gets or lists a backups
resource.
Overview
Name | backups |
Type | Resource |
Id | azure.postgresql.backups |
Fields
- vw_backups
- backups
Name | Datatype | Description |
---|---|---|
backupName | text | field from the properties object |
backup_type | text | field from the properties object |
completed_time | text | field from the properties object |
resourceGroupName | text | field from the properties object |
serverName | text | field from the properties object |
source | text | field from the properties object |
subscriptionId | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | The properties of a server backup. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | backupName, resourceGroupName, serverName, subscriptionId | Get specific backup for a given server. |
list_by_server | SELECT | resourceGroupName, serverName, subscriptionId | List all the backups for a given server. |
create | INSERT | backupName, resourceGroupName, serverName, subscriptionId | Create a specific backup for PostgreSQL flexible server. |
delete | DELETE | backupName, resourceGroupName, serverName, subscriptionId | Deletes a specific backup. |
SELECT
examples
List all the backups for a given server.
- vw_backups
- backups
SELECT
backupName,
backup_type,
completed_time,
resourceGroupName,
serverName,
source,
subscriptionId
FROM azure.postgresql.vw_backups
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.postgresql.backups
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new backups
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.postgresql.backups (
backupName,
resourceGroupName,
serverName,
subscriptionId
)
SELECT
'{{ backupName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}'
;
- name: your_resource_model_name
props: []
DELETE
example
Deletes the specified backups
resource.
/*+ delete */
DELETE FROM azure.postgresql.backups
WHERE backupName = '{{ backupName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';