/// <summary> /// Once you trigger a delete operation such as deleting a protected /// item etc., you may use this method to get the operation's result. /// 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 completetion. On successful completion, the status code /// will be OK. This method expects the ID of the operation to be /// passed in the arguments. This usually is part of the Location /// header of the operation response. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.RecoveryServices.Backup.IRecoveryServicesBackupManagementClient. /// </param> /// <param name='resourceGroupName'> /// Required. Resource group name of your recovery services vault. /// </param> /// <param name='resourceName'> /// Required. Name of your recovery services vault. /// </param> /// <param name='operationId'> /// Required. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// Response object returned by the get operation result APIs. /// </returns> public static GetOperationResultResponse GetDeleteOperationResult(this IRecoveryServicesBackupManagementClient operations, string resourceGroupName, string resourceName, string operationId, CustomRequestHeaders customRequestHeaders) { return(Task.Factory.StartNew((object s) => { return ((IRecoveryServicesBackupManagementClient)s).GetDeleteOperationResultAsync(resourceGroupName, resourceName, operationId, customRequestHeaders); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// The GetOperationStatusByURL method can be used to fetch the status /// of an operation such as triggering a backup, restore etc. The /// status can be in progress, completed or failed. You can refer to /// the Operation Status enum for all the possible states of the /// operation. Some operations may create jobs within the backend /// service. This method can return the list of jobs when the /// operation is complete. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.RecoveryServices.Backup.IRecoveryServicesBackupManagementClient. /// </param> /// <param name='operationResultLink'> /// Required. Location value returned by operation. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// Response of the get operation status API calls. /// </returns> public static BackUpOperationStatusResponse GetOperationStatusByURL(this IRecoveryServicesBackupManagementClient operations, string operationResultLink, CustomRequestHeaders customRequestHeaders) { return(Task.Factory.StartNew((object s) => { return ((IRecoveryServicesBackupManagementClient)s).GetOperationStatusByURLAsync(operationResultLink, customRequestHeaders); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Once you trigger a delete operation such as deleting a protected /// item etc., you may use this method to get the operation's result. /// 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 completetion. On successful completion, the status code /// will be OK. This method expects the ID of the operation to be /// passed in the arguments. This usually is part of the Location /// header of the operation response. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.RecoveryServices.Backup.IRecoveryServicesBackupManagementClient. /// </param> /// <param name='resourceGroupName'> /// Required. Resource group name of your recovery services vault. /// </param> /// <param name='resourceName'> /// Required. Name of your recovery services vault. /// </param> /// <param name='operationId'> /// Required. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// Response object returned by the get operation result APIs. /// </returns> public static Task <GetOperationResultResponse> GetDeleteOperationResultAsync(this IRecoveryServicesBackupManagementClient operations, string resourceGroupName, string resourceName, string operationId, CustomRequestHeaders customRequestHeaders) { return(operations.GetDeleteOperationResultAsync(resourceGroupName, resourceName, operationId, customRequestHeaders, CancellationToken.None)); }
/// <summary> /// The GetOperationStatusByURL method can be used to fetch the status /// of an operation such as triggering a backup, restore etc. The /// status can be in progress, completed or failed. You can refer to /// the Operation Status enum for all the possible states of the /// operation. Some operations may create jobs within the backend /// service. This method can return the list of jobs when the /// operation is complete. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.RecoveryServices.Backup.IRecoveryServicesBackupManagementClient. /// </param> /// <param name='operationResultLink'> /// Required. Location value returned by operation. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// Response of the get operation status API calls. /// </returns> public static Task <BackUpOperationStatusResponse> GetOperationStatusByURLAsync(this IRecoveryServicesBackupManagementClient operations, string operationResultLink, CustomRequestHeaders customRequestHeaders) { return(operations.GetOperationStatusByURLAsync(operationResultLink, customRequestHeaders, CancellationToken.None)); }