Skip to main content

long_term_retention_managed_instance_backups

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

Overview

Namelong_term_retention_managed_instance_backups
TypeResource
Idazure.sql.long_term_retention_managed_instance_backups

Fields

NameDatatypeDescription
backupNametextfield from the properties object
backup_expiration_timetextfield from the properties object
backup_storage_redundancytextfield from the properties object
backup_timetextfield from the properties object
databaseNametextfield from the properties object
database_deletion_timetextfield from the properties object
database_nametextfield from the properties object
locationNametextfield from the properties object
managedInstanceNametextfield from the properties object
managed_instance_create_timetextfield from the properties object
managed_instance_nametextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTbackupName, databaseName, locationName, managedInstanceName, subscriptionIdGets a long term retention backup for a managed database.
get_by_resource_groupSELECTbackupName, databaseName, locationName, managedInstanceName, resourceGroupName, subscriptionIdGets a long term retention backup for a managed database.
list_by_databaseSELECTdatabaseName, locationName, managedInstanceName, subscriptionIdLists all long term retention backups for a managed database.
list_by_locationSELECTlocationName, subscriptionIdLists the long term retention backups for managed databases in a given location.
list_by_resource_group_databaseSELECTdatabaseName, locationName, managedInstanceName, resourceGroupName, subscriptionIdLists all long term retention backups for a managed database.
list_by_resource_group_locationSELECTlocationName, resourceGroupName, subscriptionIdLists the long term retention backups for managed databases in a given location.
deleteDELETEbackupName, databaseName, locationName, managedInstanceName, subscriptionIdDeletes a long term retention backup.
delete_by_resource_groupDELETEbackupName, databaseName, locationName, managedInstanceName, resourceGroupName, subscriptionIdDeletes a long term retention backup.

SELECT examples

Lists the long term retention backups for managed databases in a given location.

SELECT
backupName,
backup_expiration_time,
backup_storage_redundancy,
backup_time,
databaseName,
database_deletion_time,
database_name,
locationName,
managedInstanceName,
managed_instance_create_time,
managed_instance_name,
resourceGroupName,
subscriptionId
FROM azure.sql.vw_long_term_retention_managed_instance_backups
WHERE locationName = '{{ locationName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified long_term_retention_managed_instance_backups resource.

/*+ delete */
DELETE FROM azure.sql.long_term_retention_managed_instance_backups
WHERE backupName = '{{ backupName }}'
AND databaseName = '{{ databaseName }}'
AND locationName = '{{ locationName }}'
AND managedInstanceName = '{{ managedInstanceName }}'
AND subscriptionId = '{{ subscriptionId }}';