/// <summary> /// Get properties of specified deleted account resource. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deletedAccountName'> /// Name of the deleted storage account. /// </param> /// <param name='location'> /// The location of the deleted storage account. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <DeletedAccount> GetAsync(this IDeletedAccountsOperations operations, string deletedAccountName, string location, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(deletedAccountName, location, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists deleted accounts under the subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <DeletedAccount> > ListAsync(this IDeletedAccountsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get properties of specified deleted account resource. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deletedAccountName'> /// Name of the deleted storage account. /// </param> /// <param name='location'> /// The location of the deleted storage account. /// </param> public static DeletedAccount Get(this IDeletedAccountsOperations operations, string deletedAccountName, string location) { return(operations.GetAsync(deletedAccountName, location).GetAwaiter().GetResult()); }
/// <summary> /// Lists deleted accounts under the subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <DeletedAccount> List(this IDeletedAccountsOperations operations) { return(operations.ListAsync().GetAwaiter().GetResult()); }
/// <summary> /// Lists deleted accounts under the subscription. /// </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 <DeletedAccount> ListNext(this IDeletedAccountsOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a Cognitive Services account from the resource group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// Resource location. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='accountName'> /// The name of Cognitive Services account. /// </param> public static void Purge(this IDeletedAccountsOperations operations, string location, string resourceGroupName, string accountName) { operations.PurgeAsync(location, resourceGroupName, accountName).GetAwaiter().GetResult(); }
/// <summary> /// Returns a Cognitive Services account specified by the parameters. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// Resource location. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='accountName'> /// The name of Cognitive Services account. /// </param> public static Account Get(this IDeletedAccountsOperations operations, string location, string resourceGroupName, string accountName) { return(operations.GetAsync(location, resourceGroupName, accountName).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a Cognitive Services account from the resource group. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// Resource location. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='accountName'> /// The name of Cognitive Services account. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginPurgeAsync(this IDeletedAccountsOperations operations, string location, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginPurgeWithHttpMessagesAsync(location, resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }