MockableSqlResourceGroupResource.GetLongTermRetentionBackupsWithServer Method

Definition

Lists the long term retention backups for a given server based on resource groups.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups
  • Operation Id: LongTermRetentionBackups_ListByResourceGroupServer
  • Default Api Version: 2023-05-01-preview
public virtual Azure.Pageable<Azure.ResourceManager.Sql.LongTermRetentionBackupData> GetLongTermRetentionBackupsWithServer (Azure.Core.AzureLocation locationName, string longTermRetentionServerName, bool? onlyLatestPerDatabase = default, Azure.ResourceManager.Sql.Models.SqlDatabaseState? databaseState = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetLongTermRetentionBackupsWithServer : Azure.Core.AzureLocation * string * Nullable<bool> * Nullable<Azure.ResourceManager.Sql.Models.SqlDatabaseState> * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Sql.LongTermRetentionBackupData>
override this.GetLongTermRetentionBackupsWithServer : Azure.Core.AzureLocation * string * Nullable<bool> * Nullable<Azure.ResourceManager.Sql.Models.SqlDatabaseState> * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Sql.LongTermRetentionBackupData>
Public Overridable Function GetLongTermRetentionBackupsWithServer (locationName As AzureLocation, longTermRetentionServerName As String, Optional onlyLatestPerDatabase As Nullable(Of Boolean) = Nothing, Optional databaseState As Nullable(Of SqlDatabaseState) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of LongTermRetentionBackupData)

Parameters

locationName
AzureLocation

The location of the database.

longTermRetentionServerName
String

The name of the server.

onlyLatestPerDatabase
Nullable<Boolean>

Whether or not to only get the latest backup for each database.

databaseState
Nullable<SqlDatabaseState>

Whether to query against just live databases, just deleted databases, or all databases.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

A collection of LongTermRetentionBackupData that may take multiple service requests to iterate over.

Exceptions

longTermRetentionServerName is an empty string, and was expected to be non-empty.

longTermRetentionServerName is null.

Applies to