diff --git a/src/Sql/Sql.Management.Sdk/Generated/ILongTermRetentionBackupsOperations.cs b/src/Sql/Sql.Management.Sdk/Generated/ILongTermRetentionBackupsOperations.cs
index 663ff1ed90c9..6e78adf4a112 100644
--- a/src/Sql/Sql.Management.Sdk/Generated/ILongTermRetentionBackupsOperations.cs
+++ b/src/Sql/Sql.Management.Sdk/Generated/ILongTermRetentionBackupsOperations.cs
@@ -13,6 +13,201 @@ namespace Microsoft.Azure.Management.Sql
///
public partial interface ILongTermRetentionBackupsOperations
{
+ ///
+ /// Lists the long term retention backups for a given location.
+ ///
+ ///
+ /// Lists the long term retention backups for a given location.
+ ///
+ ///
+ /// The location of the database
+ ///
+ ///
+ /// Whether or not to only get the latest backup for each database.
+ ///
+ ///
+ /// Whether to query against just live databases, just deleted databases, or
+ /// all databases.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task>> ListByLocationWithHttpMessagesAsync(string locationName, bool? onlyLatestPerDatabase = default(bool?), string databaseState = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Lists the long term retention backups for a given server.
+ ///
+ ///
+ /// Lists the long term retention backups for a given server.
+ ///
+ ///
+ /// The location of the database
+ ///
+ ///
+ /// The name of the server
+ ///
+ ///
+ /// Whether or not to only get the latest backup for each database.
+ ///
+ ///
+ /// Whether to query against just live databases, just deleted databases, or
+ /// all databases.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task>> ListByServerWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, bool? onlyLatestPerDatabase = default(bool?), string databaseState = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Lists all long term retention backups for a database.
+ ///
+ ///
+ /// Lists all long term retention backups for a database.
+ ///
+ ///
+ /// The location of the database
+ ///
+ ///
+ /// The name of the server
+ ///
+ ///
+ /// The name of the database
+ ///
+ ///
+ /// Whether or not to only get the latest backup for each database.
+ ///
+ ///
+ /// Whether to query against just live databases, just deleted databases, or
+ /// all databases.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task>> ListByDatabaseWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, bool? onlyLatestPerDatabase = default(bool?), string databaseState = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Gets a long term retention backup.
+ ///
+ ///
+ /// Gets a long term retention backup.
+ ///
+ ///
+ /// The location of the database.
+ ///
+ ///
+ /// The name of the server
+ ///
+ ///
+ /// The name of the database
+ ///
+ ///
+ /// The backup name.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Deletes a long term retention backup.
+ ///
+ ///
+ /// Deletes a long term retention backup.
+ ///
+ ///
+ /// The location of the database
+ ///
+ ///
+ /// The name of the server
+ ///
+ ///
+ /// The name of the database
+ ///
+ ///
+ /// The backup name.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Change a long term retention backup access tier.
+ ///
+ ///
+ /// Change a long term retention backup access tier.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> ChangeAccessTierWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, ChangeLongTermRetentionBackupAccessTierParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
///
/// Copy an existing long term retention backup.
///
@@ -46,16 +241,516 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task> CopyWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CopyLongTermRetentionBackupParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task> CopyWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CopyLongTermRetentionBackupParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Lock time based immutability of an existing long term retention backup.
+ ///
+ ///
+ /// Lock time based immutability of an existing long term retention backup.
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The name of the server
+ ///
+ ///
+ /// The name of the database
+ ///
+ ///
+ /// The backup name.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> LockTimeBasedImmutabilityWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Remove legal hold immutability of an existing long term retention backup.
+ ///
+ ///
+ /// Remove legal hold immutability of an existing long term retention backup.
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The name of the server
+ ///
+ ///
+ /// The name of the database
+ ///
+ ///
+ /// The backup name.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> RemoveLegalHoldImmutabilityWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Remove time based immutability of an existing long term retention backup.
+ ///
+ ///
+ /// Remove time based immutability of an existing long term retention backup.
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The name of the server
+ ///
+ ///
+ /// The name of the database
+ ///
+ ///
+ /// The backup name.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> RemoveTimeBasedImmutabilityWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Set legal hold immutability of an existing long term retention backup.
+ ///
+ ///
+ /// Set legal hold immutability of an existing long term retention backup.
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The name of the server
+ ///
+ ///
+ /// The name of the database
+ ///
+ ///
+ /// The backup name.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> SetLegalHoldImmutabilityWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Updates an existing long term retention backup.
+ ///
+ ///
+ /// Updates an existing long term retention backup.
+ ///
+ ///
+ /// The location of the database.
+ ///
+ ///
+ /// The name of the server
+ ///
+ ///
+ /// The name of the database
+ ///
+ ///
+ /// The backup name.
+ ///
+ ///
+ /// The requested backup resource state
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, UpdateLongTermRetentionBackupParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Lists the long term retention backups for a given location based on
+ /// resource group.
+ ///
+ ///
+ /// Lists the long term retention backups for a given location based on
+ /// resource group.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The location of the database
+ ///
+ ///
+ /// Whether or not to only get the latest backup for each database.
+ ///
+ ///
+ /// Whether to query against just live databases, just deleted databases, or
+ /// all databases.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task>> ListByResourceGroupLocationWithHttpMessagesAsync(string resourceGroupName, string locationName, bool? onlyLatestPerDatabase = default(bool?), string databaseState = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Lists the long term retention backups for a given server based on resource
+ /// groups.
+ ///
+ ///
+ /// Lists the long term retention backups for a given server based on resource
+ /// groups.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The location of the database
+ ///
+ ///
+ /// The name of the server
+ ///
+ ///
+ /// Whether or not to only get the latest backup for each database.
+ ///
+ ///
+ /// Whether to query against just live databases, just deleted databases, or
+ /// all databases.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task>> ListByResourceGroupServerWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, bool? onlyLatestPerDatabase = default(bool?), string databaseState = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Lists all long term retention backups for a database based on a particular
+ /// resource group.
+ ///
+ ///
+ /// Lists all long term retention backups for a database based on a particular
+ /// resource group.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The location of the database
+ ///
+ ///
+ /// The name of the server
+ ///
+ ///
+ /// The name of the database
+ ///
+ ///
+ /// Whether or not to only get the latest backup for each database.
+ ///
+ ///
+ /// Whether to query against just live databases, just deleted databases, or
+ /// all databases.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task>> ListByResourceGroupDatabaseWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, bool? onlyLatestPerDatabase = default(bool?), string databaseState = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Gets a long term retention backup.
+ ///
+ ///
+ /// Gets a long term retention backup.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The location of the database.
+ ///
+ ///
+ /// The name of the server
+ ///
+ ///
+ /// The name of the database
+ ///
+ ///
+ /// The backup name.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> GetByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Deletes a long term retention backup.
+ ///
+ ///
+ /// Deletes a long term retention backup.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The location of the database
+ ///
+ ///
+ /// The name of the server
+ ///
+ ///
+ /// The name of the database
+ ///
+ ///
+ /// The backup name.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ System.Threading.Tasks.Task> DeleteByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Change a long term retention backup access tier.
+ ///
+ ///
+ /// Change a long term retention backup access tier.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> ChangeAccessTierByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, ChangeLongTermRetentionBackupAccessTierParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Copy an existing long term retention backup to a different server.
+ ///
+ ///
+ /// Copy an existing long term retention backup to a different server.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The location of the database.
+ ///
+ ///
+ /// The name of the server
+ ///
+ ///
+ /// The name of the database
+ ///
+ ///
+ /// The backup name.
+ ///
+ ///
+ /// The parameters needed for long term retention copy request
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> CopyByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CopyLongTermRetentionBackupParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Lock time based immutability of an existing long term retention backup.
+ ///
+ ///
+ /// Lock time based immutability of an existing long term retention backup.
+ ///
+ ///
+ /// The resource group name of the database.
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The name of the server
+ ///
+ ///
+ /// The name of the database
+ ///
+ ///
+ /// The backup name.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> LockTimeBasedImmutabilityByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Remove legal hold immutability of an existing long term retention backup.
+ ///
+ ///
+ /// Remove legal hold immutability of an existing long term retention backup.
+ ///
+ ///
+ /// The resource group name of the database.
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The name of the server
+ ///
+ ///
+ /// The name of the database
+ ///
+ ///
+ /// The backup name.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> RemoveLegalHoldImmutabilityByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Updates an existing long term retention backup.
+ /// Remove time based immutability of an existing long term retention backup.
///
///
- /// Updates an existing long term retention backup.
+ /// Remove time based immutability of an existing long term retention backup.
///
+ ///
+ /// The resource group name of the database.
+ ///
///
- /// The location of the database.
+ ///
///
///
/// The name of the server
@@ -66,9 +761,6 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// The backup name.
///
- ///
- /// The requested backup resource state
- ///
///
/// The headers that will be added to request.
///
@@ -81,16 +773,19 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, UpdateLongTermRetentionBackupParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task> RemoveTimeBasedImmutabilityByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Gets a long term retention backup.
+ /// Set legal hold immutability of an existing long term retention backup.
///
///
- /// Gets a long term retention backup.
+ /// Set legal hold immutability of an existing long term retention backup.
///
+ ///
+ /// The resource group name of the database.
+ ///
///
- /// The location of the database.
+ ///
///
///
/// The name of the server
@@ -113,16 +808,20 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task> SetLegalHoldImmutabilityByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Deletes a long term retention backup.
+ /// Updates an existing long term retention backup.
///
///
- /// Deletes a long term retention backup.
+ /// Updates an existing long term retention backup.
///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
///
- /// The location of the database
+ /// The location of the database.
///
///
/// The name of the server
@@ -133,6 +832,9 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// The backup name.
///
+ ///
+ /// The requested backup resource state
+ ///
///
/// The headers that will be added to request.
///
@@ -142,13 +844,16 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when the operation returned an invalid status code
///
- System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> UpdateByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, UpdateLongTermRetentionBackupParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Lists all long term retention backups for a database.
+ /// Deletes a long term retention backup.
///
///
- /// Lists all long term retention backups for a database.
+ /// Deletes a long term retention backup.
///
///
/// The location of the database
@@ -159,12 +864,8 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// The name of the database
///
- ///
- /// Whether or not to only get the latest backup for each database.
- ///
- ///
- /// Whether to query against just live databases, just deleted databases, or
- /// all databases.
+ ///
+ /// The backup name.
///
///
/// The headers that will be added to request.
@@ -175,26 +876,28 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when the operation returned an invalid status code
///
- ///
- /// Thrown when unable to deserialize the response
- ///
- System.Threading.Tasks.Task>> ListByDatabaseWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, bool? onlyLatestPerDatabase = default(bool?), string databaseState = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task> BeginDeleteWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Lists the long term retention backups for a given location.
+ /// Change a long term retention backup access tier.
///
///
- /// Lists the long term retention backups for a given location.
+ /// Change a long term retention backup access tier.
///
///
- /// The location of the database
+ ///
///
- ///
- /// Whether or not to only get the latest backup for each database.
+ ///
+ ///
///
- ///
- /// Whether to query against just live databases, just deleted databases, or
- /// all databases.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
///
///
/// The headers that will be added to request.
@@ -208,26 +911,28 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task>> ListByLocationWithHttpMessagesAsync(string locationName, bool? onlyLatestPerDatabase = default(bool?), string databaseState = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task> BeginChangeAccessTierWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, ChangeLongTermRetentionBackupAccessTierParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Lists the long term retention backups for a given server.
+ /// Copy an existing long term retention backup.
///
///
- /// Lists the long term retention backups for a given server.
+ /// Copy an existing long term retention backup.
///
///
- /// The location of the database
+ /// The location of the database.
///
///
/// The name of the server
///
- ///
- /// Whether or not to only get the latest backup for each database.
+ ///
+ /// The name of the database
///
- ///
- /// Whether to query against just live databases, just deleted databases, or
- /// all databases.
+ ///
+ /// The backup name.
+ ///
+ ///
+ /// The parameters needed for long term retention copy request
///
///
/// The headers that will be added to request.
@@ -241,20 +946,16 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task>> ListByServerWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, bool? onlyLatestPerDatabase = default(bool?), string databaseState = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task> BeginCopyWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CopyLongTermRetentionBackupParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Copy an existing long term retention backup to a different server.
+ /// Lock time based immutability of an existing long term retention backup.
///
///
- /// Copy an existing long term retention backup to a different server.
+ /// Lock time based immutability of an existing long term retention backup.
///
- ///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
- ///
///
- /// The location of the database.
+ ///
///
///
/// The name of the server
@@ -265,9 +966,6 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// The backup name.
///
- ///
- /// The parameters needed for long term retention copy request
- ///
///
/// The headers that will be added to request.
///
@@ -280,20 +978,16 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task> CopyByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CopyLongTermRetentionBackupParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task> BeginLockTimeBasedImmutabilityWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Updates an existing long term retention backup.
+ /// Remove legal hold immutability of an existing long term retention backup.
///
///
- /// Updates an existing long term retention backup.
+ /// Remove legal hold immutability of an existing long term retention backup.
///
- ///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
- ///
///
- /// The location of the database.
+ ///
///
///
/// The name of the server
@@ -304,9 +998,6 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// The backup name.
///
- ///
- /// The requested backup resource state
- ///
///
/// The headers that will be added to request.
///
@@ -319,20 +1010,16 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task> UpdateByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, UpdateLongTermRetentionBackupParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task> BeginRemoveLegalHoldImmutabilityWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Gets a long term retention backup.
+ /// Remove time based immutability of an existing long term retention backup.
///
///
- /// Gets a long term retention backup.
+ /// Remove time based immutability of an existing long term retention backup.
///
- ///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
- ///
///
- /// The location of the database.
+ ///
///
///
/// The name of the server
@@ -355,20 +1042,16 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task> GetByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task> BeginRemoveTimeBasedImmutabilityWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Deletes a long term retention backup.
+ /// Set legal hold immutability of an existing long term retention backup.
///
///
- /// Deletes a long term retention backup.
+ /// Set legal hold immutability of an existing long term retention backup.
///
- ///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
- ///
///
- /// The location of the database
+ ///
///
///
/// The name of the server
@@ -388,20 +1071,19 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when the operation returned an invalid status code
///
- System.Threading.Tasks.Task DeleteByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> BeginSetLegalHoldImmutabilityWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Lists all long term retention backups for a database.
+ /// Updates an existing long term retention backup.
///
///
- /// Lists all long term retention backups for a database.
+ /// Updates an existing long term retention backup.
///
- ///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
- ///
///
- /// The location of the database
+ /// The location of the database.
///
///
/// The name of the server
@@ -409,12 +1091,11 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// The name of the database
///
- ///
- /// Whether or not to only get the latest backup for each database.
+ ///
+ /// The backup name.
///
- ///
- /// Whether to query against just live databases, just deleted databases, or
- /// all databases.
+ ///
+ /// The requested backup resource state
///
///
/// The headers that will be added to request.
@@ -428,13 +1109,13 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task>> ListByResourceGroupDatabaseWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, bool? onlyLatestPerDatabase = default(bool?), string databaseState = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, UpdateLongTermRetentionBackupParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Lists the long term retention backups for a given location.
+ /// Deletes a long term retention backup.
///
///
- /// Lists the long term retention backups for a given location.
+ /// Deletes a long term retention backup.
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -443,12 +1124,14 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// The location of the database
///
- ///
- /// Whether or not to only get the latest backup for each database.
+ ///
+ /// The name of the server
///
- ///
- /// Whether to query against just live databases, just deleted databases, or
- /// all databases.
+ ///
+ /// The name of the database
+ ///
+ ///
+ /// The backup name.
///
///
/// The headers that will be added to request.
@@ -459,33 +1142,32 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when the operation returned an invalid status code
///
- ///
- /// Thrown when unable to deserialize the response
- ///
- System.Threading.Tasks.Task>> ListByResourceGroupLocationWithHttpMessagesAsync(string resourceGroupName, string locationName, bool? onlyLatestPerDatabase = default(bool?), string databaseState = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task> BeginDeleteByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Lists the long term retention backups for a given server.
+ /// Change a long term retention backup access tier.
///
///
- /// Lists the long term retention backups for a given server.
+ /// Change a long term retention backup access tier.
///
///
/// The name of the resource group that contains the resource. You can obtain
/// this value from the Azure Resource Manager API or the portal.
///
///
- /// The location of the database
+ ///
///
///
- /// The name of the server
+ ///
///
- ///
- /// Whether or not to only get the latest backup for each database.
+ ///
+ ///
///
- ///
- /// Whether to query against just live databases, just deleted databases, or
- /// all databases.
+ ///
+ ///
+ ///
+ ///
+ ///
///
///
/// The headers that will be added to request.
@@ -499,14 +1181,18 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task>> ListByResourceGroupServerWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, bool? onlyLatestPerDatabase = default(bool?), string databaseState = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task> BeginChangeAccessTierByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, ChangeLongTermRetentionBackupAccessTierParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Copy an existing long term retention backup.
+ /// Copy an existing long term retention backup to a different server.
///
///
- /// Copy an existing long term retention backup.
+ /// Copy an existing long term retention backup to a different server.
///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
///
/// The location of the database.
///
@@ -534,16 +1220,19 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task> BeginCopyWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CopyLongTermRetentionBackupParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task> BeginCopyByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CopyLongTermRetentionBackupParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Updates an existing long term retention backup.
+ /// Lock time based immutability of an existing long term retention backup.
///
///
- /// Updates an existing long term retention backup.
+ /// Lock time based immutability of an existing long term retention backup.
///
+ ///
+ /// The resource group name of the database.
+ ///
///
- /// The location of the database.
+ ///
///
///
/// The name of the server
@@ -554,9 +1243,6 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// The backup name.
///
- ///
- /// The requested backup resource state
- ///
///
/// The headers that will be added to request.
///
@@ -569,16 +1255,19 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, UpdateLongTermRetentionBackupParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task> BeginLockTimeBasedImmutabilityByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Deletes a long term retention backup.
+ /// Remove legal hold immutability of an existing long term retention backup.
///
///
- /// Deletes a long term retention backup.
+ /// Remove legal hold immutability of an existing long term retention backup.
///
+ ///
+ /// The resource group name of the database.
+ ///
///
- /// The location of the database
+ ///
///
///
/// The name of the server
@@ -598,20 +1287,22 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when the operation returned an invalid status code
///
- System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> BeginRemoveLegalHoldImmutabilityByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Copy an existing long term retention backup to a different server.
+ /// Remove time based immutability of an existing long term retention backup.
///
///
- /// Copy an existing long term retention backup to a different server.
+ /// Remove time based immutability of an existing long term retention backup.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The resource group name of the database.
///
///
- /// The location of the database.
+ ///
///
///
/// The name of the server
@@ -622,9 +1313,6 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// The backup name.
///
- ///
- /// The parameters needed for long term retention copy request
- ///
///
/// The headers that will be added to request.
///
@@ -637,20 +1325,19 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task> BeginCopyByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CopyLongTermRetentionBackupParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task> BeginRemoveTimeBasedImmutabilityByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Updates an existing long term retention backup.
+ /// Set legal hold immutability of an existing long term retention backup.
///
///
- /// Updates an existing long term retention backup.
+ /// Set legal hold immutability of an existing long term retention backup.
///
///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ /// The resource group name of the database.
///
///
- /// The location of the database.
+ ///
///
///
/// The name of the server
@@ -661,9 +1348,6 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// The backup name.
///
- ///
- /// The requested backup resource state
- ///
///
/// The headers that will be added to request.
///
@@ -676,20 +1360,20 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task> BeginUpdateByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, UpdateLongTermRetentionBackupParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task> BeginSetLegalHoldImmutabilityByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Deletes a long term retention backup.
+ /// Updates an existing long term retention backup.
///
///
- /// Deletes a long term retention backup.
+ /// Updates an existing long term retention backup.
///
///
/// The name of the resource group that contains the resource. You can obtain
/// this value from the Azure Resource Manager API or the portal.
///
///
- /// The location of the database
+ /// The location of the database.
///
///
/// The name of the server
@@ -700,6 +1384,9 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// The backup name.
///
+ ///
+ /// The requested backup resource state
+ ///
///
/// The headers that will be added to request.
///
@@ -709,13 +1396,16 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when the operation returned an invalid status code
///
- System.Threading.Tasks.Task BeginDeleteByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ System.Threading.Tasks.Task> BeginUpdateByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, UpdateLongTermRetentionBackupParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Lists all long term retention backups for a database.
+ /// Lists the long term retention backups for a given location.
///
///
- /// Lists all long term retention backups for a database.
+ /// Lists the long term retention backups for a given location.
///
///
/// The NextLink from the previous successful call to List operation.
@@ -732,13 +1422,13 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task>> ListByDatabaseNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task>> ListByLocationNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Lists the long term retention backups for a given location.
+ /// Lists the long term retention backups for a given server.
///
///
- /// Lists the long term retention backups for a given location.
+ /// Lists the long term retention backups for a given server.
///
///
/// The NextLink from the previous successful call to List operation.
@@ -755,13 +1445,13 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task>> ListByLocationNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task>> ListByServerNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Lists the long term retention backups for a given server.
+ /// Lists all long term retention backups for a database.
///
///
- /// Lists the long term retention backups for a given server.
+ /// Lists all long term retention backups for a database.
///
///
/// The NextLink from the previous successful call to List operation.
@@ -778,13 +1468,15 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task>> ListByServerNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task>> ListByDatabaseNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Lists all long term retention backups for a database.
+ /// Lists the long term retention backups for a given location based on
+ /// resource group.
///
///
- /// Lists all long term retention backups for a database.
+ /// Lists the long term retention backups for a given location based on
+ /// resource group.
///
///
/// The NextLink from the previous successful call to List operation.
@@ -801,13 +1493,15 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task>> ListByResourceGroupDatabaseNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task>> ListByResourceGroupLocationNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Lists the long term retention backups for a given location.
+ /// Lists the long term retention backups for a given server based on resource
+ /// groups.
///
///
- /// Lists the long term retention backups for a given location.
+ /// Lists the long term retention backups for a given server based on resource
+ /// groups.
///
///
/// The NextLink from the previous successful call to List operation.
@@ -824,13 +1518,15 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task>> ListByResourceGroupLocationNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task>> ListByResourceGroupServerNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Lists the long term retention backups for a given server.
+ /// Lists all long term retention backups for a database based on a particular
+ /// resource group.
///
///
- /// Lists the long term retention backups for a given server.
+ /// Lists all long term retention backups for a database based on a particular
+ /// resource group.
///
///
/// The NextLink from the previous successful call to List operation.
@@ -847,7 +1543,7 @@ public partial interface ILongTermRetentionBackupsOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task>> ListByResourceGroupServerNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task>> ListByResourceGroupDatabaseNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
}
}
\ No newline at end of file
diff --git a/src/Sql/Sql.Management.Sdk/Generated/ILongTermRetentionPoliciesOperations.cs b/src/Sql/Sql.Management.Sdk/Generated/ILongTermRetentionPoliciesOperations.cs
index 64b6c6fe3aba..0a8cbdc83d2a 100644
--- a/src/Sql/Sql.Management.Sdk/Generated/ILongTermRetentionPoliciesOperations.cs
+++ b/src/Sql/Sql.Management.Sdk/Generated/ILongTermRetentionPoliciesOperations.cs
@@ -41,13 +41,13 @@ public partial interface ILongTermRetentionPoliciesOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task>> ListByDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Sets a database's long term retention policy.
+ /// Gets a database's long term retention policy.
///
///
- /// Sets a database's long term retention policy.
+ /// Gets a database's long term retention policy.
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -59,9 +59,6 @@ public partial interface ILongTermRetentionPoliciesOperations
///
/// The name of the database.
///
- ///
- /// The long term retention policy info.
- ///
///
/// The headers that will be added to request.
///
@@ -74,13 +71,13 @@ public partial interface ILongTermRetentionPoliciesOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, LongTermRetentionPolicy parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Gets a database's long term retention policy.
+ /// Set or update a database's long term retention policy.
///
///
- /// Gets a database's long term retention policy.
+ /// Set or update a database's long term retention policy.
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -92,6 +89,9 @@ public partial interface ILongTermRetentionPoliciesOperations
///
/// The name of the database.
///
+ ///
+ /// The long term retention policy info.
+ ///
///
/// The headers that will be added to request.
///
@@ -104,13 +104,13 @@ public partial interface ILongTermRetentionPoliciesOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task>> ListByDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, LongTermRetentionPolicy parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
- /// Sets a database's long term retention policy.
+ /// Set or update a database's long term retention policy.
///
///
- /// Sets a database's long term retention policy.
+ /// Set or update a database's long term retention policy.
///
///
/// The name of the resource group that contains the resource. You can obtain
@@ -137,7 +137,7 @@ public partial interface ILongTermRetentionPoliciesOperations
///
/// Thrown when unable to deserialize the response
///
- System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, LongTermRetentionPolicy parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, LongTermRetentionPolicy parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
///
/// Gets a database's long term retention policy.
diff --git a/src/Sql/Sql.Management.Sdk/Generated/LongTermRetentionBackupsOperations.cs b/src/Sql/Sql.Management.Sdk/Generated/LongTermRetentionBackupsOperations.cs
index 8952082fa3e0..979d43e46be6 100644
--- a/src/Sql/Sql.Management.Sdk/Generated/LongTermRetentionBackupsOperations.cs
+++ b/src/Sql/Sql.Management.Sdk/Generated/LongTermRetentionBackupsOperations.cs
@@ -39,81 +39,17 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
public SqlManagementClient Client { get; private set; }
///
- /// Copy an existing long term retention backup.
- ///
- ///
- /// The location of the database.
- ///
- ///
- /// The name of the server
- ///
- ///
- /// The name of the database
- ///
- ///
- /// The backup name.
- ///
- ///
- /// The parameters needed for long term retention copy request
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async System.Threading.Tasks.Task> CopyWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CopyLongTermRetentionBackupParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
- {
- // Send Request
- Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCopyWithHttpMessagesAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
- return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Updates an existing long term retention backup.
- ///
- ///
- /// The location of the database.
- ///
- ///
- /// The name of the server
- ///
- ///
- /// The name of the database
- ///
- ///
- /// The backup name.
- ///
- ///
- /// The requested backup resource state
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, UpdateLongTermRetentionBackupParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
- {
- // Send Request
- Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
- return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Gets a long term retention backup.
+ /// Lists the long term retention backups for a given location.
///
///
- /// The location of the database.
- ///
- ///
- /// The name of the server
+ /// The location of the database
///
- ///
- /// The name of the database
+ ///
+ /// Whether or not to only get the latest backup for each database.
///
- ///
- /// The backup name.
+ ///
+ /// Whether to query against just live databases, just deleted databases, or
+ /// all databases.
///
///
/// Headers that will be added to request.
@@ -136,7 +72,7 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async System.Threading.Tasks.Task>> ListByLocationWithHttpMessagesAsync(string locationName, bool? onlyLatestPerDatabase = default(bool?), string databaseState = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
@@ -147,27 +83,14 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "locationName");
}
- if (longTermRetentionServerName == null)
- {
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "longTermRetentionServerName");
- }
-
- if (longTermRetentionDatabaseName == null)
- {
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "longTermRetentionDatabaseName");
- }
- if (backupName == null)
- {
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "backupName");
- }
if (this.Client.SubscriptionId == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2021-05-01-preview";
+ string apiVersion = "2024-11-01-preview";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -176,26 +99,30 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
_invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
tracingParameters.Add("locationName", locationName);
- tracingParameters.Add("longTermRetentionServerName", longTermRetentionServerName);
- tracingParameters.Add("longTermRetentionDatabaseName", longTermRetentionDatabaseName);
- tracingParameters.Add("backupName", backupName);
+ tracingParameters.Add("onlyLatestPerDatabase", onlyLatestPerDatabase);
+ tracingParameters.Add("databaseState", databaseState);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByLocation", tracingParameters);
}
// Construct URL
var _baseUrl = this.Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups").ToString();
_url = _url.Replace("{locationName}", System.Uri.EscapeDataString(locationName));
- _url = _url.Replace("{longTermRetentionServerName}", System.Uri.EscapeDataString(longTermRetentionServerName));
- _url = _url.Replace("{longTermRetentionDatabaseName}", System.Uri.EscapeDataString(longTermRetentionDatabaseName));
- _url = _url.Replace("{backupName}", System.Uri.EscapeDataString(backupName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ if (onlyLatestPerDatabase != null)
+ {
+ _queryParameters.Add(string.Format("onlyLatestPerDatabase={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(onlyLatestPerDatabase, this.Client.SerializationSettings).Trim('"'))));
+ }
+ if (databaseState != null)
+ {
+ _queryParameters.Add(string.Format("databaseState={0}", System.Uri.EscapeDataString(databaseState)));
+ }
if (apiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
@@ -260,14 +187,13 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
if ((int)_statusCode != 200)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -277,10 +203,6 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -293,7 +215,7 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
throw ex;
}
// Create Result
- var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
@@ -307,7 +229,7 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
@@ -331,35 +253,7 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
}
///
- /// Deletes a long term retention backup.
- ///
- ///
- /// The location of the database
- ///
- ///
- /// The name of the server
- ///
- ///
- /// The name of the database
- ///
- ///
- /// The backup name.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
- {
- // Send Request
- Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, customHeaders, cancellationToken).ConfigureAwait(false);
- return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Lists all long term retention backups for a database.
+ /// Lists the long term retention backups for a given server.
///
///
/// The location of the database
@@ -367,9 +261,6 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
///
/// The name of the server
///
- ///
- /// The name of the database
- ///
///
/// Whether or not to only get the latest backup for each database.
///
@@ -398,7 +289,7 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async System.Threading.Tasks.Task>> ListByDatabaseWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, bool? onlyLatestPerDatabase = default(bool?), string databaseState = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async System.Threading.Tasks.Task>> ListByServerWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, bool? onlyLatestPerDatabase = default(bool?), string databaseState = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
@@ -414,11 +305,6 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "longTermRetentionServerName");
}
- if (longTermRetentionDatabaseName == null)
- {
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "longTermRetentionDatabaseName");
- }
-
if (this.Client.SubscriptionId == null)
@@ -426,7 +312,7 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2021-05-01-preview";
+ string apiVersion = "2024-11-01-preview";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -436,22 +322,20 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
tracingParameters.Add("locationName", locationName);
tracingParameters.Add("longTermRetentionServerName", longTermRetentionServerName);
- tracingParameters.Add("longTermRetentionDatabaseName", longTermRetentionDatabaseName);
tracingParameters.Add("onlyLatestPerDatabase", onlyLatestPerDatabase);
tracingParameters.Add("databaseState", databaseState);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByDatabase", tracingParameters);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByServer", tracingParameters);
}
// Construct URL
var _baseUrl = this.Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups").ToString();
_url = _url.Replace("{locationName}", System.Uri.EscapeDataString(locationName));
_url = _url.Replace("{longTermRetentionServerName}", System.Uri.EscapeDataString(longTermRetentionServerName));
- _url = _url.Replace("{longTermRetentionDatabaseName}", System.Uri.EscapeDataString(longTermRetentionDatabaseName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
@@ -527,14 +411,13 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
if ((int)_statusCode != 200)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -544,10 +427,6 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -598,11 +477,17 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
}
///
- /// Lists the long term retention backups for a given location.
+ /// Lists all long term retention backups for a database.
///
///
/// The location of the database
///
+ ///
+ /// The name of the server
+ ///
+ ///
+ /// The name of the database
+ ///
///
/// Whether or not to only get the latest backup for each database.
///
@@ -631,7 +516,7 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async System.Threading.Tasks.Task>> ListByLocationWithHttpMessagesAsync(string locationName, bool? onlyLatestPerDatabase = default(bool?), string databaseState = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async System.Threading.Tasks.Task>> ListByDatabaseWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, bool? onlyLatestPerDatabase = default(bool?), string databaseState = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
@@ -642,6 +527,16 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "locationName");
}
+ if (longTermRetentionServerName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "longTermRetentionServerName");
+ }
+
+ if (longTermRetentionDatabaseName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "longTermRetentionDatabaseName");
+ }
+
if (this.Client.SubscriptionId == null)
@@ -649,7 +544,7 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2021-05-01-preview";
+ string apiVersion = "2024-11-01-preview";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -658,19 +553,23 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
_invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
tracingParameters.Add("locationName", locationName);
+ tracingParameters.Add("longTermRetentionServerName", longTermRetentionServerName);
+ tracingParameters.Add("longTermRetentionDatabaseName", longTermRetentionDatabaseName);
tracingParameters.Add("onlyLatestPerDatabase", onlyLatestPerDatabase);
tracingParameters.Add("databaseState", databaseState);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByLocation", tracingParameters);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByDatabase", tracingParameters);
}
// Construct URL
var _baseUrl = this.Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups").ToString();
_url = _url.Replace("{locationName}", System.Uri.EscapeDataString(locationName));
+ _url = _url.Replace("{longTermRetentionServerName}", System.Uri.EscapeDataString(longTermRetentionServerName));
+ _url = _url.Replace("{longTermRetentionDatabaseName}", System.Uri.EscapeDataString(longTermRetentionDatabaseName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
@@ -746,14 +645,13 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
if ((int)_statusCode != 200)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -763,10 +661,6 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -817,20 +711,19 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
}
///
- /// Lists the long term retention backups for a given server.
+ /// Gets a long term retention backup.
///
///
- /// The location of the database
+ /// The location of the database.
///
///
/// The name of the server
///
- ///
- /// Whether or not to only get the latest backup for each database.
+ ///
+ /// The name of the database
///
- ///
- /// Whether to query against just live databases, just deleted databases, or
- /// all databases.
+ ///
+ /// The backup name.
///
///
/// Headers that will be added to request.
@@ -853,7 +746,7 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async System.Threading.Tasks.Task>> ListByServerWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, bool? onlyLatestPerDatabase = default(bool?), string databaseState = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
@@ -869,14 +762,22 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "longTermRetentionServerName");
}
+ if (longTermRetentionDatabaseName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "longTermRetentionDatabaseName");
+ }
+ if (backupName == null)
+ {
+ throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "backupName");
+ }
if (this.Client.SubscriptionId == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2021-05-01-preview";
+ string apiVersion = "2024-11-01-preview";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -886,31 +787,25 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
tracingParameters.Add("locationName", locationName);
tracingParameters.Add("longTermRetentionServerName", longTermRetentionServerName);
- tracingParameters.Add("onlyLatestPerDatabase", onlyLatestPerDatabase);
- tracingParameters.Add("databaseState", databaseState);
+ tracingParameters.Add("longTermRetentionDatabaseName", longTermRetentionDatabaseName);
+ tracingParameters.Add("backupName", backupName);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByServer", tracingParameters);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
}
// Construct URL
var _baseUrl = this.Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}").ToString();
_url = _url.Replace("{locationName}", System.Uri.EscapeDataString(locationName));
_url = _url.Replace("{longTermRetentionServerName}", System.Uri.EscapeDataString(longTermRetentionServerName));
+ _url = _url.Replace("{longTermRetentionDatabaseName}", System.Uri.EscapeDataString(longTermRetentionDatabaseName));
+ _url = _url.Replace("{backupName}", System.Uri.EscapeDataString(backupName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
- if (onlyLatestPerDatabase != null)
- {
- _queryParameters.Add(string.Format("onlyLatestPerDatabase={0}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(onlyLatestPerDatabase, this.Client.SerializationSettings).Trim('"'))));
- }
- if (databaseState != null)
- {
- _queryParameters.Add(string.Format("databaseState={0}", System.Uri.EscapeDataString(databaseState)));
- }
if (apiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
@@ -975,14 +870,13 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
if ((int)_statusCode != 200)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
@@ -992,10 +886,6 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
}
ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
if (_shouldTrace)
{
Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
@@ -1008,7 +898,7 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
throw ex;
}
// Create Result
- var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
+ var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
@@ -1022,7 +912,7 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
+ _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
}
catch (Newtonsoft.Json.JsonException ex)
{
@@ -1046,14 +936,10 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
}
///
- /// Copy an existing long term retention backup to a different server.
+ /// Deletes a long term retention backup.
///
- ///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
- ///
///
- /// The location of the database.
+ /// The location of the database
///
///
/// The name of the server
@@ -1064,34 +950,58 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
///
/// The backup name.
///
- ///
- /// The parameters needed for long term retention copy request
- ///
///
/// Headers that will be added to request.
///
///
/// The cancellation token.
///
- public async System.Threading.Tasks.Task> CopyByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CopyLongTermRetentionBackupParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// Send Request
- Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCopyByResourceGroupWithHttpMessagesAsync(resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginDeleteWithHttpMessagesAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, customHeaders, cancellationToken).ConfigureAwait(false);
return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
///
- /// Updates an existing long term retention backup.
+ /// Change a long term retention backup access tier.
///
- ///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
- ///
///
- /// The location of the database.
+ ///
///
///
- /// The name of the server
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async System.Threading.Tasks.Task> ChangeAccessTierWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, ChangeLongTermRetentionBackupAccessTierParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ // Send Request
+ Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginChangeAccessTierWithHttpMessagesAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Copy an existing long term retention backup.
+ ///
+ ///
+ /// The location of the database.
+ ///
+ ///
+ /// The name of the server
///
///
/// The name of the database
@@ -1100,7 +1010,7 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
/// The backup name.
///
///
- /// The requested backup resource state
+ /// The parameters needed for long term retention copy request
///
///
/// Headers that will be added to request.
@@ -1108,20 +1018,128 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
///
/// The cancellation token.
///
- public async System.Threading.Tasks.Task> UpdateByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, UpdateLongTermRetentionBackupParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async System.Threading.Tasks.Task> CopyWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, CopyLongTermRetentionBackupParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
// Send Request
- Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateByResourceGroupWithHttpMessagesAsync(resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCopyWithHttpMessagesAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
///
- /// Gets a long term retention backup.
+ /// Lock time based immutability of an existing long term retention backup.
///
- ///
- /// The name of the resource group that contains the resource. You can obtain
- /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ ///
+ ///
+ /// The name of the server
+ ///
+ ///
+ /// The name of the database
+ ///
+ ///
+ /// The backup name.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async System.Threading.Tasks.Task> LockTimeBasedImmutabilityWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ // Send Request
+ Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginLockTimeBasedImmutabilityWithHttpMessagesAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Remove legal hold immutability of an existing long term retention backup.
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The name of the server
+ ///
+ ///
+ /// The name of the database
+ ///
+ ///
+ /// The backup name.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async System.Threading.Tasks.Task> RemoveLegalHoldImmutabilityWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ // Send Request
+ Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginRemoveLegalHoldImmutabilityWithHttpMessagesAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Remove time based immutability of an existing long term retention backup.
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The name of the server
+ ///
+ ///
+ /// The name of the database
+ ///
+ ///
+ /// The backup name.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
///
+ public async System.Threading.Tasks.Task> RemoveTimeBasedImmutabilityWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ // Send Request
+ Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginRemoveTimeBasedImmutabilityWithHttpMessagesAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Set legal hold immutability of an existing long term retention backup.
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The name of the server
+ ///
+ ///
+ /// The name of the database
+ ///
+ ///
+ /// The backup name.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async System.Threading.Tasks.Task> SetLegalHoldImmutabilityWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ // Send Request
+ Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginSetLegalHoldImmutabilityWithHttpMessagesAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Updates an existing long term retention backup.
+ ///
///
/// The location of the database.
///
@@ -1134,6 +1152,40 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
///
/// The backup name.
///
+ ///
+ /// The requested backup resource state
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, UpdateLongTermRetentionBackupParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ // Send Request
+ Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(locationName, longTermRetentionServerName, longTermRetentionDatabaseName, backupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Lists the long term retention backups for a given location based on
+ /// resource group.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The location of the database
+ ///
+ ///
+ /// Whether or not to only get the latest backup for each database.
+ ///
+ ///
+ /// Whether to query against just live databases, just deleted databases, or
+ /// all databases.
+ ///
///
/// Headers that will be added to request.
///
@@ -1155,7 +1207,7 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async System.Threading.Tasks.Task> GetByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string locationName, string longTermRetentionServerName, string longTermRetentionDatabaseName, string backupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async System.Threading.Tasks.Task>> ListByResourceGroupLocationWithHttpMessagesAsync(string resourceGroupName, string locationName, bool? onlyLatestPerDatabase = default(bool?), string databaseState = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
@@ -1171,27 +1223,14 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "locationName");
}
- if (longTermRetentionServerName == null)
- {
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "longTermRetentionServerName");
- }
-
- if (longTermRetentionDatabaseName == null)
- {
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "longTermRetentionDatabaseName");
- }
- if (backupName == null)
- {
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "backupName");
- }
if (this.Client.SubscriptionId == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2021-05-01-preview";
+ string apiVersion = "2024-11-01-preview";
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1201,27 +1240,31 @@ internal LongTermRetentionBackupsOperations (SqlManagementClient client)
System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("locationName", locationName);
- tracingParameters.Add("longTermRetentionServerName", longTermRetentionServerName);
- tracingParameters.Add("longTermRetentionDatabaseName", longTermRetentionDatabaseName);
- tracingParameters.Add("backupName", backupName);
+ tracingParameters.Add("onlyLatestPerDatabase", onlyLatestPerDatabase);
+ tracingParameters.Add("databaseState", databaseState);
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetByResourceGroup", tracingParameters);
+ Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupLocation", tracingParameters);
}
// Construct URL
var _baseUrl = this.Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{locationName}", System.Uri.EscapeDataString(locationName));
- _url = _url.Replace("{longTermRetentionServerName}", System.Uri.EscapeDataString(longTermRetentionServerName));
- _url = _url.Replace("{longTermRetentionDatabaseName}", System.Uri.EscapeDataString(longTermRetentionDatabaseName));
- _url = _url.Replace("{backupName}", System.Uri.EscapeDataString(backupName));
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List