/// <summary>
 /// Gets a managed database's short term retention policy.
 /// </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='managedInstanceName'>
 /// The name of the managed instance.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ManagedBackupShortTermRetentionPolicy> GetAsync(this IManagedBackupShortTermRetentionPoliciesOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, managedInstanceName, databaseName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#2
0
 /// <summary>
 /// Gets a managed database's short term retention policy list.
 /// </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 <ManagedBackupShortTermRetentionPolicyInner> > ListByDatabaseNextAsync(this IManagedBackupShortTermRetentionPoliciesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByDatabaseNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#3
0
 /// <summary>
 /// Updates a managed database's short term retention policy.
 /// </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='managedInstanceName'>
 /// The name of the managed instance.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='retentionDays'>
 /// The backup retention period in days. This is how many days Point-in-Time
 /// Restore will be supported.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ManagedBackupShortTermRetentionPolicyInner> BeginCreateOrUpdateAsync(this IManagedBackupShortTermRetentionPoliciesOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, int?retentionDays = default(int?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, managedInstanceName, databaseName, retentionDays, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Updates a managed database's short term retention policy.
 /// </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='managedInstanceName'>
 /// The name of the managed instance.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='parameters'>
 /// The short term retention policy info.
 /// </param>
 public static ManagedBackupShortTermRetentionPolicy CreateOrUpdate(this IManagedBackupShortTermRetentionPoliciesOperations operations, string resourceGroupName, string managedInstanceName, string databaseName, ManagedBackupShortTermRetentionPolicy parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, managedInstanceName, databaseName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets a managed database's short term retention policy.
 /// </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='managedInstanceName'>
 /// The name of the managed instance.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 public static ManagedBackupShortTermRetentionPolicy Get(this IManagedBackupShortTermRetentionPoliciesOperations operations, string resourceGroupName, string managedInstanceName, string databaseName)
 {
     return(operations.GetAsync(resourceGroupName, managedInstanceName, databaseName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets a managed database's short term retention policy list.
 /// </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 <ManagedBackupShortTermRetentionPolicy> ListByDatabaseNext(this IManagedBackupShortTermRetentionPoliciesOperations operations, string nextPageLink)
 {
     return(operations.ListByDatabaseNextAsync(nextPageLink).GetAwaiter().GetResult());
 }