/// <summary> /// This method prepares the source vault for Data Move operation. /// </summary> /// <param name="vaultName"></param> /// <param name="resourceGroupName"></param> /// <param name="prepareMoveRequest"></param> public string PrepareDataMove(string vaultName, string resourceGroupName, PrepareDataMoveRequest prepareMoveRequest) { // prepare move var prepareMoveOperationResponse = ServiceClientAdapter.BmsAdapter.Client.BeginBMSPrepareDataMoveWithHttpMessagesAsync( vaultName, resourceGroupName, prepareMoveRequest).Result; // track prepare-move operation to success var operationStatus = TrackingHelpers.GetOperationStatusDataMove( prepareMoveOperationResponse, operationId => ServiceClientAdapter.GetDataMoveOperationStatus(operationId, vaultName, resourceGroupName)); Logger.Instance.WriteDebug("Prepare move operation: " + operationStatus.Body.Status); // get the correlation Id and return it for trigger data move var operationResult = TrackingHelpers.GetCorrelationId( prepareMoveOperationResponse, operationId => ServiceClientAdapter.GetPrepareDataMoveOperationResult(operationId, vaultName, resourceGroupName)); Logger.Instance.WriteDebug("Prepare move - correlationId:" + operationResult.CorrelationId); return(operationResult.CorrelationId); }