/// <summary> /// Provides the status of the delete operations such as deleting backed up /// item. Once the operation has started, the /// status code in the response would be Accepted. It will continue to be in /// this state till it reaches completion. On /// successful completion, the status code will be OK. This method expects /// OperationID as an argument. OperationID is /// part of the Location header of the operation response. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='vaultName'> /// The name of the recovery services vault. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group where the recovery services vault is /// present. /// </param> /// <param name='operationId'> /// OperationID which represents the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task GetAsync(this IBackupOperationResultsOperations operations, string vaultName, string resourceGroupName, string operationId, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.GetWithHttpMessagesAsync(vaultName, resourceGroupName, operationId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Provides the status of the delete operations such as deleting backed up /// item. Once the operation has started, the /// status code in the response would be Accepted. It will continue to be in /// this state till it reaches completion. On /// successful completion, the status code will be OK. This method expects /// OperationID as an argument. OperationID is /// part of the Location header of the operation response. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='vaultName'> /// The name of the recovery services vault. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group where the recovery services vault is /// present. /// </param> /// <param name='operationId'> /// OperationID which represents the operation. /// </param> public static void Get(this IBackupOperationResultsOperations operations, string vaultName, string resourceGroupName, string operationId) { operations.GetAsync(vaultName, resourceGroupName, operationId).GetAwaiter().GetResult(); }