/// <summary> /// Gets a long term retention backup for a managed database. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='locationName'> /// The location of the database. /// </param> /// <param name='managedInstanceName'> /// The name of the managed instance. /// </param> /// <param name='databaseName'> /// The name of the managed database. /// </param> /// <param name='backupName'> /// The backup name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ManagedInstanceLongTermRetentionBackup> GetAsync(this ILongTermRetentionManagedInstanceBackupsOperations operations, string locationName, string managedInstanceName, string databaseName, string backupName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(locationName, managedInstanceName, databaseName, backupName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Deletes a long term retention backup. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='locationName'> /// The location of the database. /// </param> /// <param name='managedInstanceName'> /// The name of the managed instance. /// </param> /// <param name='databaseName'> /// The name of the managed database. /// </param> /// <param name='backupName'> /// The backup name. /// </param> public static void Delete(this ILongTermRetentionManagedInstanceBackupsOperations operations, string locationName, string managedInstanceName, string databaseName, string backupName) { operations.DeleteAsync(locationName, managedInstanceName, databaseName, backupName).GetAwaiter().GetResult(); }
/// <summary> /// Lists the long term retention backups for managed databases in a given /// location. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ManagedInstanceLongTermRetentionBackup> > ListByResourceGroupLocationNextAsync(this ILongTermRetentionManagedInstanceBackupsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByResourceGroupLocationNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists the long term retention backups for managed databases in a given /// location. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static IPage <ManagedInstanceLongTermRetentionBackup> ListByResourceGroupLocationNext(this ILongTermRetentionManagedInstanceBackupsOperations operations, string nextPageLink) { return(operations.ListByResourceGroupLocationNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a long term retention backup. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='locationName'> /// The location of the database /// </param> /// <param name='managedInstanceName'> /// The name of the managed instance. /// </param> /// <param name='databaseName'> /// The name of the managed database. /// </param> /// <param name='backupName'> /// The backup name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeleteByResourceGroupAsync(this ILongTermRetentionManagedInstanceBackupsOperations operations, string resourceGroupName, string locationName, string managedInstanceName, string databaseName, string backupName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeleteByResourceGroupWithHttpMessagesAsync(resourceGroupName, locationName, managedInstanceName, databaseName, backupName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes a long term retention backup. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='locationName'> /// The location of the database /// </param> /// <param name='managedInstanceName'> /// The name of the managed instance. /// </param> /// <param name='databaseName'> /// The name of the managed database. /// </param> /// <param name='backupName'> /// The backup name. /// </param> public static void BeginDeleteByResourceGroup(this ILongTermRetentionManagedInstanceBackupsOperations operations, string resourceGroupName, string locationName, string managedInstanceName, string databaseName, string backupName) { operations.BeginDeleteByResourceGroupAsync(resourceGroupName, locationName, managedInstanceName, databaseName, backupName).GetAwaiter().GetResult(); }
/// <summary> /// Lists the long term retention backups for managed databases in a given /// location. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='locationName'> /// The location of the database. /// </param> /// <param name='onlyLatestPerDatabase'> /// Whether or not to only get the latest backup for each database. /// </param> /// <param name='databaseState'> /// Whether to query against just live databases, just deleted databases, or /// all databases. Possible values include: 'All', 'Live', 'Deleted' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ManagedInstanceLongTermRetentionBackup> > ListByResourceGroupLocationAsync(this ILongTermRetentionManagedInstanceBackupsOperations operations, string resourceGroupName, string locationName, bool?onlyLatestPerDatabase = default(bool?), string databaseState = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByResourceGroupLocationWithHttpMessagesAsync(resourceGroupName, locationName, onlyLatestPerDatabase, databaseState, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists the long term retention backups for managed databases in a given /// location. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='locationName'> /// The location of the database. /// </param> /// <param name='onlyLatestPerDatabase'> /// Whether or not to only get the latest backup for each database. /// </param> /// <param name='databaseState'> /// Whether to query against just live databases, just deleted databases, or /// all databases. Possible values include: 'All', 'Live', 'Deleted' /// </param> public static IPage <ManagedInstanceLongTermRetentionBackup> ListByResourceGroupLocation(this ILongTermRetentionManagedInstanceBackupsOperations operations, string resourceGroupName, string locationName, bool?onlyLatestPerDatabase = default(bool?), string databaseState = default(string)) { return(operations.ListByResourceGroupLocationAsync(resourceGroupName, locationName, onlyLatestPerDatabase, databaseState).GetAwaiter().GetResult()); }
/// <summary> /// Gets a long term retention backup for a managed database. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='locationName'> /// The location of the database. /// </param> /// <param name='managedInstanceName'> /// The name of the managed instance. /// </param> /// <param name='databaseName'> /// The name of the managed database. /// </param> /// <param name='backupName'> /// The backup name. /// </param> public static ManagedInstanceLongTermRetentionBackup Get(this ILongTermRetentionManagedInstanceBackupsOperations operations, string locationName, string managedInstanceName, string databaseName, string backupName) { return(operations.GetAsync(locationName, managedInstanceName, databaseName, backupName).GetAwaiter().GetResult()); }