long_term_retention_backups
Creates, updates, deletes, gets or lists a long_term_retention_backups resource.
Overview
| Name | long_term_retention_backups |
| Type | Resource |
| Id | azure.sql.long_term_retention_backups |
Fields
The following fields are returned by SELECT queries:
- get_by_resource_group
- get
- list_by_resource_group_database
- list_by_database
- list_by_resource_group_server
- list_by_server
- list_by_resource_group_location
- list_by_location
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
backupExpirationTime | string (date-time) | The time the long term retention backup will expire. |
backupStorageAccessTier | string | The BackupStorageAccessTier for the LTR backup. Known values are: "Hot" and "Archive". (Hot, Archive) |
backupStorageRedundancy | string | The storage redundancy type of the backup. Known values are: "Geo", "Local", "Zone", and "GeoZone". (Geo, Local, Zone, GeoZone) |
backupTime | string (date-time) | The time the backup was taken. |
databaseDeletionTime | string (date-time) | The delete time of the database. |
databaseName | string | The name of the database the backup belong to. |
isBackupImmutable | boolean | The setting whether the LTR backup is immutable. |
legalHoldImmutability | string | The setting for whether LegalHold is enabled or disabled on the LTR backup. When LegalHold is enabled, the backup cannot be deleted until the LegalHold is removed. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
requestedBackupStorageRedundancy | string | The storage redundancy type of the backup. Known values are: "Geo", "Local", "Zone", and "GeoZone". (Geo, Local, Zone, GeoZone) |
serverCreateTime | string (date-time) | The create time of the server. |
serverName | string | The server name that the backup database belong to. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
timeBasedImmutability | string | The setting for whether or not time-based immutability is enabled for the LTR backup. When time-based immutability is enabled and locked, the backup cannot be deleted until BackupExpirationTime. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
timeBasedImmutabilityMode | string | The time-based immutability mode. Only applicable if time-based immutability is enabled. Known values are: "Locked" and "Unlocked". (Locked, Unlocked) |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
backupExpirationTime | string (date-time) | The time the long term retention backup will expire. |
backupStorageAccessTier | string | The BackupStorageAccessTier for the LTR backup. Known values are: "Hot" and "Archive". (Hot, Archive) |
backupStorageRedundancy | string | The storage redundancy type of the backup. Known values are: "Geo", "Local", "Zone", and "GeoZone". (Geo, Local, Zone, GeoZone) |
backupTime | string (date-time) | The time the backup was taken. |
databaseDeletionTime | string (date-time) | The delete time of the database. |
databaseName | string | The name of the database the backup belong to. |
isBackupImmutable | boolean | The setting whether the LTR backup is immutable. |
legalHoldImmutability | string | The setting for whether LegalHold is enabled or disabled on the LTR backup. When LegalHold is enabled, the backup cannot be deleted until the LegalHold is removed. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
requestedBackupStorageRedundancy | string | The storage redundancy type of the backup. Known values are: "Geo", "Local", "Zone", and "GeoZone". (Geo, Local, Zone, GeoZone) |
serverCreateTime | string (date-time) | The create time of the server. |
serverName | string | The server name that the backup database belong to. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
timeBasedImmutability | string | The setting for whether or not time-based immutability is enabled for the LTR backup. When time-based immutability is enabled and locked, the backup cannot be deleted until BackupExpirationTime. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
timeBasedImmutabilityMode | string | The time-based immutability mode. Only applicable if time-based immutability is enabled. Known values are: "Locked" and "Unlocked". (Locked, Unlocked) |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
backupExpirationTime | string (date-time) | The time the long term retention backup will expire. |
backupStorageAccessTier | string | The BackupStorageAccessTier for the LTR backup. Known values are: "Hot" and "Archive". (Hot, Archive) |
backupStorageRedundancy | string | The storage redundancy type of the backup. Known values are: "Geo", "Local", "Zone", and "GeoZone". (Geo, Local, Zone, GeoZone) |
backupTime | string (date-time) | The time the backup was taken. |
databaseDeletionTime | string (date-time) | The delete time of the database. |
databaseName | string | The name of the database the backup belong to. |
isBackupImmutable | boolean | The setting whether the LTR backup is immutable. |
legalHoldImmutability | string | The setting for whether LegalHold is enabled or disabled on the LTR backup. When LegalHold is enabled, the backup cannot be deleted until the LegalHold is removed. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
requestedBackupStorageRedundancy | string | The storage redundancy type of the backup. Known values are: "Geo", "Local", "Zone", and "GeoZone". (Geo, Local, Zone, GeoZone) |
serverCreateTime | string (date-time) | The create time of the server. |
serverName | string | The server name that the backup database belong to. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
timeBasedImmutability | string | The setting for whether or not time-based immutability is enabled for the LTR backup. When time-based immutability is enabled and locked, the backup cannot be deleted until BackupExpirationTime. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
timeBasedImmutabilityMode | string | The time-based immutability mode. Only applicable if time-based immutability is enabled. Known values are: "Locked" and "Unlocked". (Locked, Unlocked) |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
backupExpirationTime | string (date-time) | The time the long term retention backup will expire. |
backupStorageAccessTier | string | The BackupStorageAccessTier for the LTR backup. Known values are: "Hot" and "Archive". (Hot, Archive) |
backupStorageRedundancy | string | The storage redundancy type of the backup. Known values are: "Geo", "Local", "Zone", and "GeoZone". (Geo, Local, Zone, GeoZone) |
backupTime | string (date-time) | The time the backup was taken. |
databaseDeletionTime | string (date-time) | The delete time of the database. |
databaseName | string | The name of the database the backup belong to. |
isBackupImmutable | boolean | The setting whether the LTR backup is immutable. |
legalHoldImmutability | string | The setting for whether LegalHold is enabled or disabled on the LTR backup. When LegalHold is enabled, the backup cannot be deleted until the LegalHold is removed. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
requestedBackupStorageRedundancy | string | The storage redundancy type of the backup. Known values are: "Geo", "Local", "Zone", and "GeoZone". (Geo, Local, Zone, GeoZone) |
serverCreateTime | string (date-time) | The create time of the server. |
serverName | string | The server name that the backup database belong to. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
timeBasedImmutability | string | The setting for whether or not time-based immutability is enabled for the LTR backup. When time-based immutability is enabled and locked, the backup cannot be deleted until BackupExpirationTime. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
timeBasedImmutabilityMode | string | The time-based immutability mode. Only applicable if time-based immutability is enabled. Known values are: "Locked" and "Unlocked". (Locked, Unlocked) |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
backupExpirationTime | string (date-time) | The time the long term retention backup will expire. |
backupStorageAccessTier | string | The BackupStorageAccessTier for the LTR backup. Known values are: "Hot" and "Archive". (Hot, Archive) |
backupStorageRedundancy | string | The storage redundancy type of the backup. Known values are: "Geo", "Local", "Zone", and "GeoZone". (Geo, Local, Zone, GeoZone) |
backupTime | string (date-time) | The time the backup was taken. |
databaseDeletionTime | string (date-time) | The delete time of the database. |
databaseName | string | The name of the database the backup belong to. |
isBackupImmutable | boolean | The setting whether the LTR backup is immutable. |
legalHoldImmutability | string | The setting for whether LegalHold is enabled or disabled on the LTR backup. When LegalHold is enabled, the backup cannot be deleted until the LegalHold is removed. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
requestedBackupStorageRedundancy | string | The storage redundancy type of the backup. Known values are: "Geo", "Local", "Zone", and "GeoZone". (Geo, Local, Zone, GeoZone) |
serverCreateTime | string (date-time) | The create time of the server. |
serverName | string | The server name that the backup database belong to. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
timeBasedImmutability | string | The setting for whether or not time-based immutability is enabled for the LTR backup. When time-based immutability is enabled and locked, the backup cannot be deleted until BackupExpirationTime. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
timeBasedImmutabilityMode | string | The time-based immutability mode. Only applicable if time-based immutability is enabled. Known values are: "Locked" and "Unlocked". (Locked, Unlocked) |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
backupExpirationTime | string (date-time) | The time the long term retention backup will expire. |
backupStorageAccessTier | string | The BackupStorageAccessTier for the LTR backup. Known values are: "Hot" and "Archive". (Hot, Archive) |
backupStorageRedundancy | string | The storage redundancy type of the backup. Known values are: "Geo", "Local", "Zone", and "GeoZone". (Geo, Local, Zone, GeoZone) |
backupTime | string (date-time) | The time the backup was taken. |
databaseDeletionTime | string (date-time) | The delete time of the database. |
databaseName | string | The name of the database the backup belong to. |
isBackupImmutable | boolean | The setting whether the LTR backup is immutable. |
legalHoldImmutability | string | The setting for whether LegalHold is enabled or disabled on the LTR backup. When LegalHold is enabled, the backup cannot be deleted until the LegalHold is removed. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
requestedBackupStorageRedundancy | string | The storage redundancy type of the backup. Known values are: "Geo", "Local", "Zone", and "GeoZone". (Geo, Local, Zone, GeoZone) |
serverCreateTime | string (date-time) | The create time of the server. |
serverName | string | The server name that the backup database belong to. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
timeBasedImmutability | string | The setting for whether or not time-based immutability is enabled for the LTR backup. When time-based immutability is enabled and locked, the backup cannot be deleted until BackupExpirationTime. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
timeBasedImmutabilityMode | string | The time-based immutability mode. Only applicable if time-based immutability is enabled. Known values are: "Locked" and "Unlocked". (Locked, Unlocked) |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
backupExpirationTime | string (date-time) | The time the long term retention backup will expire. |
backupStorageAccessTier | string | The BackupStorageAccessTier for the LTR backup. Known values are: "Hot" and "Archive". (Hot, Archive) |
backupStorageRedundancy | string | The storage redundancy type of the backup. Known values are: "Geo", "Local", "Zone", and "GeoZone". (Geo, Local, Zone, GeoZone) |
backupTime | string (date-time) | The time the backup was taken. |
databaseDeletionTime | string (date-time) | The delete time of the database. |
databaseName | string | The name of the database the backup belong to. |
isBackupImmutable | boolean | The setting whether the LTR backup is immutable. |
legalHoldImmutability | string | The setting for whether LegalHold is enabled or disabled on the LTR backup. When LegalHold is enabled, the backup cannot be deleted until the LegalHold is removed. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
requestedBackupStorageRedundancy | string | The storage redundancy type of the backup. Known values are: "Geo", "Local", "Zone", and "GeoZone". (Geo, Local, Zone, GeoZone) |
serverCreateTime | string (date-time) | The create time of the server. |
serverName | string | The server name that the backup database belong to. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
timeBasedImmutability | string | The setting for whether or not time-based immutability is enabled for the LTR backup. When time-based immutability is enabled and locked, the backup cannot be deleted until BackupExpirationTime. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
timeBasedImmutabilityMode | string | The time-based immutability mode. Only applicable if time-based immutability is enabled. Known values are: "Locked" and "Unlocked". (Locked, Unlocked) |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
backupExpirationTime | string (date-time) | The time the long term retention backup will expire. |
backupStorageAccessTier | string | The BackupStorageAccessTier for the LTR backup. Known values are: "Hot" and "Archive". (Hot, Archive) |
backupStorageRedundancy | string | The storage redundancy type of the backup. Known values are: "Geo", "Local", "Zone", and "GeoZone". (Geo, Local, Zone, GeoZone) |
backupTime | string (date-time) | The time the backup was taken. |
databaseDeletionTime | string (date-time) | The delete time of the database. |
databaseName | string | The name of the database the backup belong to. |
isBackupImmutable | boolean | The setting whether the LTR backup is immutable. |
legalHoldImmutability | string | The setting for whether LegalHold is enabled or disabled on the LTR backup. When LegalHold is enabled, the backup cannot be deleted until the LegalHold is removed. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
requestedBackupStorageRedundancy | string | The storage redundancy type of the backup. Known values are: "Geo", "Local", "Zone", and "GeoZone". (Geo, Local, Zone, GeoZone) |
serverCreateTime | string (date-time) | The create time of the server. |
serverName | string | The server name that the backup database belong to. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
timeBasedImmutability | string | The setting for whether or not time-based immutability is enabled for the LTR backup. When time-based immutability is enabled and locked, the backup cannot be deleted until BackupExpirationTime. Known values are: "Enabled" and "Disabled". (Enabled, Disabled) |
timeBasedImmutabilityMode | string | The time-based immutability mode. Only applicable if time-based immutability is enabled. Known values are: "Locked" and "Unlocked". (Locked, Unlocked) |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
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.
| Name | Datatype | Description |
|---|---|---|
backup_name | string | The backup name. Required. |
location_name | string | The location of the database. Required. |
long_term_retention_database_name | string | The name of the database. Required. |
long_term_retention_server_name | string | The name of the server. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
databaseState | string | Whether to query against just live databases, just deleted databases, or all databases. Known values are: "All", "Live", and "Deleted". Default value is None. |
onlyLatestPerDatabase | boolean | Whether or not to only get the latest backup for each database. Default value is None. |
SELECT examples
- get_by_resource_group
- get
- list_by_resource_group_database
- list_by_database
- list_by_resource_group_server
- list_by_server
- list_by_resource_group_location
- list_by_location
Gets a long term retention backup.
SELECT
id,
name,
backupExpirationTime,
backupStorageAccessTier,
backupStorageRedundancy,
backupTime,
databaseDeletionTime,
databaseName,
isBackupImmutable,
legalHoldImmutability,
requestedBackupStorageRedundancy,
serverCreateTime,
serverName,
systemData,
timeBasedImmutability,
timeBasedImmutabilityMode,
type
FROM azure.sql.long_term_retention_backups
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND location_name = '{{ location_name }}' -- required
AND long_term_retention_server_name = '{{ long_term_retention_server_name }}' -- required
AND long_term_retention_database_name = '{{ long_term_retention_database_name }}' -- required
AND backup_name = '{{ backup_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets a long term retention backup.
SELECT
id,
name,
backupExpirationTime,
backupStorageAccessTier,
backupStorageRedundancy,
backupTime,
databaseDeletionTime,
databaseName,
isBackupImmutable,
legalHoldImmutability,
requestedBackupStorageRedundancy,
serverCreateTime,
serverName,
systemData,
timeBasedImmutability,
timeBasedImmutabilityMode,
type
FROM azure.sql.long_term_retention_backups
WHERE location_name = '{{ location_name }}' -- required
AND long_term_retention_server_name = '{{ long_term_retention_server_name }}' -- required
AND long_term_retention_database_name = '{{ long_term_retention_database_name }}' -- required
AND backup_name = '{{ backup_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists all long term retention backups for a database based on a particular resource group.
SELECT
id,
name,
backupExpirationTime,
backupStorageAccessTier,
backupStorageRedundancy,
backupTime,
databaseDeletionTime,
databaseName,
isBackupImmutable,
legalHoldImmutability,
requestedBackupStorageRedundancy,
serverCreateTime,
serverName,
systemData,
timeBasedImmutability,
timeBasedImmutabilityMode,
type
FROM azure.sql.long_term_retention_backups
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND location_name = '{{ location_name }}' -- required
AND long_term_retention_server_name = '{{ long_term_retention_server_name }}' -- required
AND long_term_retention_database_name = '{{ long_term_retention_database_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND onlyLatestPerDatabase = '{{ onlyLatestPerDatabase }}'
AND databaseState = '{{ databaseState }}'
;
Lists all long term retention backups for a database.
SELECT
id,
name,
backupExpirationTime,
backupStorageAccessTier,
backupStorageRedundancy,
backupTime,
databaseDeletionTime,
databaseName,
isBackupImmutable,
legalHoldImmutability,
requestedBackupStorageRedundancy,
serverCreateTime,
serverName,
systemData,
timeBasedImmutability,
timeBasedImmutabilityMode,
type
FROM azure.sql.long_term_retention_backups
WHERE location_name = '{{ location_name }}' -- required
AND long_term_retention_server_name = '{{ long_term_retention_server_name }}' -- required
AND long_term_retention_database_name = '{{ long_term_retention_database_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND onlyLatestPerDatabase = '{{ onlyLatestPerDatabase }}'
AND databaseState = '{{ databaseState }}'
;
Lists the long term retention backups for a given server based on resource groups.
SELECT
id,
name,
backupExpirationTime,
backupStorageAccessTier,
backupStorageRedundancy,
backupTime,
databaseDeletionTime,
databaseName,
isBackupImmutable,
legalHoldImmutability,
requestedBackupStorageRedundancy,
serverCreateTime,
serverName,
systemData,
timeBasedImmutability,
timeBasedImmutabilityMode,
type
FROM azure.sql.long_term_retention_backups
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND location_name = '{{ location_name }}' -- required
AND long_term_retention_server_name = '{{ long_term_retention_server_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND onlyLatestPerDatabase = '{{ onlyLatestPerDatabase }}'
AND databaseState = '{{ databaseState }}'
;
Lists the long term retention backups for a given server.
SELECT
id,
name,
backupExpirationTime,
backupStorageAccessTier,
backupStorageRedundancy,
backupTime,
databaseDeletionTime,
databaseName,
isBackupImmutable,
legalHoldImmutability,
requestedBackupStorageRedundancy,
serverCreateTime,
serverName,
systemData,
timeBasedImmutability,
timeBasedImmutabilityMode,
type
FROM azure.sql.long_term_retention_backups
WHERE location_name = '{{ location_name }}' -- required
AND long_term_retention_server_name = '{{ long_term_retention_server_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND onlyLatestPerDatabase = '{{ onlyLatestPerDatabase }}'
AND databaseState = '{{ databaseState }}'
;
Lists the long term retention backups for a given location based on resource group.
SELECT
id,
name,
backupExpirationTime,
backupStorageAccessTier,
backupStorageRedundancy,
backupTime,
databaseDeletionTime,
databaseName,
isBackupImmutable,
legalHoldImmutability,
requestedBackupStorageRedundancy,
serverCreateTime,
serverName,
systemData,
timeBasedImmutability,
timeBasedImmutabilityMode,
type
FROM azure.sql.long_term_retention_backups
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND location_name = '{{ location_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND onlyLatestPerDatabase = '{{ onlyLatestPerDatabase }}'
AND databaseState = '{{ databaseState }}'
;
Lists the long term retention backups for a given location.
SELECT
id,
name,
backupExpirationTime,
backupStorageAccessTier,
backupStorageRedundancy,
backupTime,
databaseDeletionTime,
databaseName,
isBackupImmutable,
legalHoldImmutability,
requestedBackupStorageRedundancy,
serverCreateTime,
serverName,
systemData,
timeBasedImmutability,
timeBasedImmutabilityMode,
type
FROM azure.sql.long_term_retention_backups
WHERE location_name = '{{ location_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND onlyLatestPerDatabase = '{{ onlyLatestPerDatabase }}'
AND databaseState = '{{ databaseState }}'
;
DELETE examples
- delete_by_resource_group
- delete
Deletes a long term retention backup.
DELETE FROM azure.sql.long_term_retention_backups
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND location_name = '{{ location_name }}' --required
AND long_term_retention_server_name = '{{ long_term_retention_server_name }}' --required
AND long_term_retention_database_name = '{{ long_term_retention_database_name }}' --required
AND backup_name = '{{ backup_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Deletes a long term retention backup.
DELETE FROM azure.sql.long_term_retention_backups
WHERE location_name = '{{ location_name }}' --required
AND long_term_retention_server_name = '{{ long_term_retention_server_name }}' --required
AND long_term_retention_database_name = '{{ long_term_retention_database_name }}' --required
AND backup_name = '{{ backup_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- change_access_tier
- copy
- lock_time_based_immutability
- remove_legal_hold_immutability
- remove_time_based_immutability
- set_legal_hold_immutability
- update
- change_access_tier_by_resource_group
- copy_by_resource_group
- lock_time_based_immutability_by_resource_group
- remove_legal_hold_immutability_by_resource_group
- remove_time_based_immutability_by_resource_group
- set_legal_hold_immutability_by_resource_group
- update_by_resource_group
Change a long term retention backup access tier.
EXEC azure.sql.long_term_retention_backups.change_access_tier
@location_name='{{ location_name }}' --required,
@long_term_retention_server_name='{{ long_term_retention_server_name }}' --required,
@long_term_retention_database_name='{{ long_term_retention_database_name }}' --required,
@backup_name='{{ backup_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"backupStorageAccessTier": "{{ backupStorageAccessTier }}",
"operationMode": "{{ operationMode }}"
}'
;
Copy an existing long term retention backup.
EXEC azure.sql.long_term_retention_backups.copy
@location_name='{{ location_name }}' --required,
@long_term_retention_server_name='{{ long_term_retention_server_name }}' --required,
@long_term_retention_database_name='{{ long_term_retention_database_name }}' --required,
@backup_name='{{ backup_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;
Lock time based immutability of an existing long term retention backup.
EXEC azure.sql.long_term_retention_backups.lock_time_based_immutability
@location_name='{{ location_name }}' --required,
@long_term_retention_server_name='{{ long_term_retention_server_name }}' --required,
@long_term_retention_database_name='{{ long_term_retention_database_name }}' --required,
@backup_name='{{ backup_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Remove legal hold immutability of an existing long term retention backup.
EXEC azure.sql.long_term_retention_backups.remove_legal_hold_immutability
@location_name='{{ location_name }}' --required,
@long_term_retention_server_name='{{ long_term_retention_server_name }}' --required,
@long_term_retention_database_name='{{ long_term_retention_database_name }}' --required,
@backup_name='{{ backup_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Remove time based immutability of an existing long term retention backup.
EXEC azure.sql.long_term_retention_backups.remove_time_based_immutability
@location_name='{{ location_name }}' --required,
@long_term_retention_server_name='{{ long_term_retention_server_name }}' --required,
@long_term_retention_database_name='{{ long_term_retention_database_name }}' --required,
@backup_name='{{ backup_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Set legal hold immutability of an existing long term retention backup.
EXEC azure.sql.long_term_retention_backups.set_legal_hold_immutability
@location_name='{{ location_name }}' --required,
@long_term_retention_server_name='{{ long_term_retention_server_name }}' --required,
@long_term_retention_database_name='{{ long_term_retention_database_name }}' --required,
@backup_name='{{ backup_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Updates an existing long term retention backup.
EXEC azure.sql.long_term_retention_backups.update
@location_name='{{ location_name }}' --required,
@long_term_retention_server_name='{{ long_term_retention_server_name }}' --required,
@long_term_retention_database_name='{{ long_term_retention_database_name }}' --required,
@backup_name='{{ backup_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;
Change a long term retention backup access tier.
EXEC azure.sql.long_term_retention_backups.change_access_tier_by_resource_group
@resource_group_name='{{ resource_group_name }}' --required,
@location_name='{{ location_name }}' --required,
@long_term_retention_server_name='{{ long_term_retention_server_name }}' --required,
@long_term_retention_database_name='{{ long_term_retention_database_name }}' --required,
@backup_name='{{ backup_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"backupStorageAccessTier": "{{ backupStorageAccessTier }}",
"operationMode": "{{ operationMode }}"
}'
;
Copy an existing long term retention backup to a different server.
EXEC azure.sql.long_term_retention_backups.copy_by_resource_group
@resource_group_name='{{ resource_group_name }}' --required,
@location_name='{{ location_name }}' --required,
@long_term_retention_server_name='{{ long_term_retention_server_name }}' --required,
@long_term_retention_database_name='{{ long_term_retention_database_name }}' --required,
@backup_name='{{ backup_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;
Lock time based immutability of an existing long term retention backup.
EXEC azure.sql.long_term_retention_backups.lock_time_based_immutability_by_resource_group
@resource_group_name='{{ resource_group_name }}' --required,
@location_name='{{ location_name }}' --required,
@long_term_retention_server_name='{{ long_term_retention_server_name }}' --required,
@long_term_retention_database_name='{{ long_term_retention_database_name }}' --required,
@backup_name='{{ backup_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Remove legal hold immutability of an existing long term retention backup.
EXEC azure.sql.long_term_retention_backups.remove_legal_hold_immutability_by_resource_group
@resource_group_name='{{ resource_group_name }}' --required,
@location_name='{{ location_name }}' --required,
@long_term_retention_server_name='{{ long_term_retention_server_name }}' --required,
@long_term_retention_database_name='{{ long_term_retention_database_name }}' --required,
@backup_name='{{ backup_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Remove time based immutability of an existing long term retention backup.
EXEC azure.sql.long_term_retention_backups.remove_time_based_immutability_by_resource_group
@resource_group_name='{{ resource_group_name }}' --required,
@location_name='{{ location_name }}' --required,
@long_term_retention_server_name='{{ long_term_retention_server_name }}' --required,
@long_term_retention_database_name='{{ long_term_retention_database_name }}' --required,
@backup_name='{{ backup_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Set legal hold immutability of an existing long term retention backup.
EXEC azure.sql.long_term_retention_backups.set_legal_hold_immutability_by_resource_group
@resource_group_name='{{ resource_group_name }}' --required,
@location_name='{{ location_name }}' --required,
@long_term_retention_server_name='{{ long_term_retention_server_name }}' --required,
@long_term_retention_database_name='{{ long_term_retention_database_name }}' --required,
@backup_name='{{ backup_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Updates an existing long term retention backup.
EXEC azure.sql.long_term_retention_backups.update_by_resource_group
@resource_group_name='{{ resource_group_name }}' --required,
@location_name='{{ location_name }}' --required,
@long_term_retention_server_name='{{ long_term_retention_server_name }}' --required,
@long_term_retention_database_name='{{ long_term_retention_database_name }}' --required,
@backup_name='{{ backup_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;