/// <summary>
        /// Lists recovery points generated for the given item
        /// </summary>
        /// <returns>List of recovery point PowerShell model objects</returns>
        public List <CmdletModel.RecoveryPointBase> ListRecoveryPoints()
        {
            DateTime    startDate = (DateTime)(ProviderData[GetRecoveryPointParams.StartDate]);
            DateTime    endDate   = (DateTime)(ProviderData[GetRecoveryPointParams.EndDate]);
            AzureVmItem item      = ProviderData[GetRecoveryPointParams.Item]
                                    as AzureVmItem;

            Dictionary <UriEnums, string> uriDict = HelperUtils.ParseUri(item.Id);
            string containerUri      = HelperUtils.GetContainerUri(uriDict, item.Id);
            string protectedItemName = HelperUtils.GetProtectedItemUri(uriDict, item.Id);

            TimeSpan duration = endDate - startDate;

            if (duration.TotalDays > 30)
            {
                throw new Exception(Resources.RestoreDiskTimeRangeError);
            }

            //we need to fetch the list of RPs
            RecoveryPointQueryParameters queryFilter = new RecoveryPointQueryParameters();

            queryFilter.StartDate = CommonHelpers.GetDateTimeStringForService(startDate);
            queryFilter.EndDate   = CommonHelpers.GetDateTimeStringForService(endDate);
            RecoveryPointListResponse rpListResponse = null;

            rpListResponse = ServiceClientAdapter.GetRecoveryPoints(containerUri, protectedItemName, queryFilter);
            return(RecoveryPointConversions.GetPSAzureRecoveryPoints(rpListResponse, item));
        }
        public void ListRecoveryPointTest()
        {
            using (UndoContext context = UndoContext.Current)
            {
                context.Start();

                string resourceNamespace = ConfigurationManager.AppSettings["ResourceNamespace"];
                string resourceGroupName = ConfigurationManager.AppSettings["RsVaultRgNameRP"];
                string resourceName      = ConfigurationManager.AppSettings["RsVaultNameRP"];
                string location          = ConfigurationManager.AppSettings["vaultLocationRP"];
                // TODO: Create VM instead of taking these parameters from config
                string containerUniqueName = ConfigurationManager.AppSettings["RsVaultIaasVMContainerUniqueNameRP"];
                string itemUniqueName      = ConfigurationManager.AppSettings["RsVaultIaasVMItemUniqueNameRP"];
                string containeType        = ConfigurationManager.AppSettings["IaaSVMContainerType"];
                string itemType            = ConfigurationManager.AppSettings["IaaSVMItemType"];
                string containerUri        = containeType + ";" + containerUniqueName;
                string itemUri             = itemType + ";" + itemUniqueName;
                string fabricName          = ConfigurationManager.AppSettings["AzureBackupFabricName"];
                string utcDateTimeFormat   = ConfigurationManager.AppSettings["UTCDateTimeFormat"];

                var client = GetServiceClient <RecoveryServicesBackupManagementClient>(resourceNamespace);

                // 1. Create vault
                VaultTestHelpers vaultTestHelper = new VaultTestHelpers(client);
                vaultTestHelper.CreateVault(resourceGroupName, resourceName, location);

                // 2. Get default policy
                PolicyTestHelpers policyTestHelper = new PolicyTestHelpers(client);
                string            policyId         = policyTestHelper.GetDefaultPolicyId(resourceGroupName, resourceName);

                // 3. Enable protection
                ProtectedItemTestHelpers protectedItemTestHelper = new ProtectedItemTestHelpers(client);
                protectedItemTestHelper.EnableProtection(resourceGroupName, resourceName, policyId, containerUri, itemUri);

                // 4. Trigger backup and wait for completion
                BackupTestHelpers backupTestHelper = new BackupTestHelpers(client);
                DateTime          backupStartTime  = DateTime.UtcNow;
                string            jobId            = backupTestHelper.BackupProtectedItem(resourceGroupName, resourceName, containerUri, itemUri);
                JobTestHelpers    jobTestHelper    = new JobTestHelpers(client);
                jobTestHelper.WaitForJob(resourceGroupName, resourceName, jobId);
                DateTime backupEndTime = DateTime.UtcNow;

                // ACTION: Fetch RP
                RecoveryPointQueryParameters queryFilter = new RecoveryPointQueryParameters();
                queryFilter.StartDate = backupStartTime.ToString(utcDateTimeFormat);
                queryFilter.EndDate   = backupEndTime.ToString(utcDateTimeFormat);
                var response = client.RecoveryPoints.List(
                    resourceGroupName, resourceName, CommonTestHelper.GetCustomRequestHeaders(), fabricName, containerUri, itemUri, queryFilter);

                // VALIDATION: Should be only one RP
                Assert.NotNull(response.RecoveryPointList);
                Assert.NotNull(response.RecoveryPointList.RecoveryPoints);
                Assert.Equal(1, response.RecoveryPointList.RecoveryPoints.Count);
            }
        }
        public List <RecoveryPointResource> ListRecoveryPoints(string resourceGroupName, string resourceName, string containerUri, string itemUri, DateTime backupStartTime, DateTime backupEndTime)
        {
            string fabricName        = ConfigurationManager.AppSettings["AzureBackupFabricName"];
            string utcDateTimeFormat = ConfigurationManager.AppSettings["UTCDateTimeFormat"];

            RecoveryPointQueryParameters queryFilter = new RecoveryPointQueryParameters();

            queryFilter.StartDate = backupStartTime.ToString(utcDateTimeFormat);
            queryFilter.EndDate   = backupEndTime.ToString(utcDateTimeFormat);
            var response = Client.RecoveryPoints.List(
                resourceGroupName, resourceName, CommonTestHelper.GetCustomRequestHeaders(), fabricName, containerUri, itemUri, queryFilter);

            return(response.RecoveryPointList.RecoveryPoints.ToList());
        }
Exemplo n.º 4
0
        public void ListRecoveryPointTest()
        {
            using (UndoContext context = UndoContext.Current)
            {
                context.Start();

                string resourceNamespace = ConfigurationManager.AppSettings["ResourceNamespace"];
                var    client            = GetServiceClient <RecoveryServicesBackupManagementClient>(resourceNamespace);

                string resourceGroupName = ConfigurationManager.AppSettings["RsVaultRgNameRestore"];
                string resourceName      = ConfigurationManager.AppSettings["RsVaultNameRestore"];
                string fabricName        = ConfigurationManager.AppSettings["AzureBackupFabricName"];

                string containerUniqueName = ConfigurationManager.AppSettings["RsVaultIaasVMContainerUniqueNameRestore"];
                string containeType        = ConfigurationManager.AppSettings["IaaSVMContainerType"];
                string containerUri        = containeType + ";" + containerUniqueName;

                string itemUniqueName = ConfigurationManager.AppSettings["RsVaultIaasVMItemUniqueNameRestore"];
                string itemType       = ConfigurationManager.AppSettings["IaaSVMItemType"];
                string itemUri        = itemType + ";" + itemUniqueName;

                DateTime startTime = new DateTime(2016, 4, 17, 15, 25, 9, DateTimeKind.Utc);
                DateTime endTime   = new DateTime(2016, 4, 18, 19, 25, 9, DateTimeKind.Utc);

                RecoveryPointQueryParameters queryFilter = new RecoveryPointQueryParameters();
                queryFilter.StartDate = startTime.ToString("yyyy-MM-dd hh:mm:ss tt");
                queryFilter.EndDate   = endTime.ToString("yyyy-MM-dd hh:mm:ss tt");

                var response = client.RecoveryPoints.List(resourceGroupName, resourceName, CommonTestHelper.GetCustomRequestHeaders(),
                                                          fabricName, containerUri, itemUri, queryFilter);

                Assert.NotNull(response.RecoveryPointList);
                Assert.NotNull(response.RecoveryPointList.RecoveryPoints);

                foreach (var rpo in response.RecoveryPointList.RecoveryPoints)
                {
                    Assert.True(!string.IsNullOrEmpty(rpo.Name), "RP Id cant be null");
                    RecoveryPoint rp = rpo.Properties as RecoveryPoint;
                    Assert.True(!string.IsNullOrEmpty(rp.RecoveryPointTime), "RecoveryPointTime can't be null or empty");
                    Assert.True(!string.IsNullOrEmpty(rp.SourceVMStorageType), "SourceVMStorageType can't be null or empty");
                }
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// Lists recovery points according to the input parameters
        /// </summary>
        /// <param name="containerName">Name of the container which the item belongs to</param>
        /// <param name="protectedItemName">Name of the item</param>
        /// <param name="queryFilter">Query filter</param>
        /// <returns>List of recovery points</returns>
        public RecoveryPointListResponse GetRecoveryPoints
        (
            string containerName,
            string protectedItemName,
            RecoveryPointQueryParameters queryFilter
        )
        {
            string resourceGroupName = BmsAdapter.GetResourceGroupName();
            string resourceName      = BmsAdapter.GetResourceName();

            var response = BmsAdapter.Client.RecoveryPoints.ListAsync(
                resourceGroupName,
                resourceName,
                BmsAdapter.GetCustomRequestHeaders(),
                AzureFabricName,
                containerName,
                protectedItemName,
                queryFilter,
                BmsAdapter.CmdletCancellationToken).Result;

            return(response);
        }
        /// <summary>
        /// Lists all the recovery points of the given item protected by your
        /// Recovery Services Vault according to the query filter supplied in
        /// the arguments.
        /// </summary>
        /// <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='customRequestHeaders'>
        /// Optional. Request header parameters.
        /// </param>
        /// <param name='fabricName'>
        /// Optional. Fabric name of the protected item.
        /// </param>
        /// <param name='containerName'>
        /// Optional. Name of the container where the protected item belongs to.
        /// </param>
        /// <param name='protectedItemName'>
        /// Optional. Name of the protected item whose recovery points are to
        /// be fetched.
        /// </param>
        /// <param name='queryFilter'>
        /// Optional. Query parameters for listing recovery points.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        /// <returns>
        /// List of recovery points as returned by the service with the list
        /// recovery points call.
        /// </returns>
        public async Task <RecoveryPointListResponse> ListAsync(string resourceGroupName, string resourceName, CustomRequestHeaders customRequestHeaders, string fabricName, string containerName, string protectedItemName, RecoveryPointQueryParameters queryFilter, CancellationToken cancellationToken)
        {
            // Validate
            if (resourceGroupName == null)
            {
                throw new ArgumentNullException("resourceGroupName");
            }
            if (resourceName == null)
            {
                throw new ArgumentNullException("resourceName");
            }

            // Tracing
            bool   shouldTrace  = TracingAdapter.IsEnabled;
            string invocationId = null;

            if (shouldTrace)
            {
                invocationId = TracingAdapter.NextInvocationId.ToString();
                Dictionary <string, object> tracingParameters = new Dictionary <string, object>();
                tracingParameters.Add("resourceGroupName", resourceGroupName);
                tracingParameters.Add("resourceName", resourceName);
                tracingParameters.Add("customRequestHeaders", customRequestHeaders);
                tracingParameters.Add("fabricName", fabricName);
                tracingParameters.Add("containerName", containerName);
                tracingParameters.Add("protectedItemName", protectedItemName);
                tracingParameters.Add("queryFilter", queryFilter);
                TracingAdapter.Enter(invocationId, this, "ListAsync", tracingParameters);
            }

            // Construct URL
            string url = "";

            url = url + "/subscriptions/";
            if (this.Client.Credentials.SubscriptionId != null)
            {
                url = url + Uri.EscapeDataString(this.Client.Credentials.SubscriptionId);
            }
            url = url + "/resourceGroups/";
            url = url + Uri.EscapeDataString(resourceGroupName);
            url = url + "/providers/";
            if (this.Client.ResourceNamespace != null)
            {
                url = url + Uri.EscapeDataString(this.Client.ResourceNamespace);
            }
            url = url + "/";
            url = url + "vaults";
            url = url + "/";
            url = url + Uri.EscapeDataString(resourceName);
            url = url + "/backupFabrics/";
            if (fabricName != null)
            {
                url = url + Uri.EscapeDataString(fabricName);
            }
            url = url + "/protectionContainers/";
            if (containerName != null)
            {
                url = url + Uri.EscapeDataString(containerName);
            }
            url = url + "/protectedItems/";
            if (protectedItemName != null)
            {
                url = url + Uri.EscapeDataString(protectedItemName);
            }
            url = url + "/recoveryPoints";
            List <string> queryParameters = new List <string>();

            queryParameters.Add("api-version=2016-05-01");
            List <string> odataFilter = new List <string>();

            if (queryFilter != null && queryFilter.StartDate != null)
            {
                odataFilter.Add("startDate eq '" + Uri.EscapeDataString(queryFilter.StartDate) + "'");
            }
            if (queryFilter != null && queryFilter.EndDate != null)
            {
                odataFilter.Add("endDate eq '" + Uri.EscapeDataString(queryFilter.EndDate) + "'");
            }
            if (odataFilter.Count > 0)
            {
                queryParameters.Add("$filter=" + string.Join(" and ", odataFilter));
            }
            if (queryParameters.Count > 0)
            {
                url = url + "?" + string.Join("&", queryParameters);
            }
            string baseUrl = this.Client.BaseUri.AbsoluteUri;

            // Trim '/' character from the end of baseUrl and beginning of url.
            if (baseUrl[baseUrl.Length - 1] == '/')
            {
                baseUrl = baseUrl.Substring(0, baseUrl.Length - 1);
            }
            if (url[0] == '/')
            {
                url = url.Substring(1);
            }
            url = baseUrl + "/" + url;
            url = url.Replace(" ", "%20");

            // Create HTTP transport objects
            HttpRequestMessage httpRequest = null;

            try
            {
                httpRequest            = new HttpRequestMessage();
                httpRequest.Method     = HttpMethod.Get;
                httpRequest.RequestUri = new Uri(url);

                // Set Headers
                httpRequest.Headers.Add("Accept-Language", customRequestHeaders.Culture);
                httpRequest.Headers.Add("x-ms-client-request-id", customRequestHeaders.ClientRequestId);

                // Set Credentials
                cancellationToken.ThrowIfCancellationRequested();
                await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false);

                // Send Request
                HttpResponseMessage httpResponse = null;
                try
                {
                    if (shouldTrace)
                    {
                        TracingAdapter.SendRequest(invocationId, httpRequest);
                    }
                    cancellationToken.ThrowIfCancellationRequested();
                    httpResponse = await this.Client.HttpClient.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false);

                    if (shouldTrace)
                    {
                        TracingAdapter.ReceiveResponse(invocationId, httpResponse);
                    }
                    HttpStatusCode statusCode = httpResponse.StatusCode;
                    if (statusCode != HttpStatusCode.OK)
                    {
                        cancellationToken.ThrowIfCancellationRequested();
                        CloudException ex = CloudException.Create(httpRequest, null, httpResponse, await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false));
                        if (shouldTrace)
                        {
                            TracingAdapter.Error(invocationId, ex);
                        }
                        throw ex;
                    }

                    // Create Result
                    RecoveryPointListResponse result = null;
                    // Deserialize Response
                    if (statusCode == HttpStatusCode.OK)
                    {
                        cancellationToken.ThrowIfCancellationRequested();
                        string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);

                        result = new RecoveryPointListResponse();
                        JToken responseDoc = null;
                        if (string.IsNullOrEmpty(responseContent) == false)
                        {
                            responseDoc = JToken.Parse(responseContent);
                        }

                        if (responseDoc != null && responseDoc.Type != JTokenType.Null)
                        {
                            RecoveryPointResourceList recoveryPointListInstance = new RecoveryPointResourceList();
                            result.RecoveryPointList = recoveryPointListInstance;

                            JToken valueArray = responseDoc["value"];
                            if (valueArray != null && valueArray.Type != JTokenType.Null)
                            {
                                foreach (JToken valueValue in ((JArray)valueArray))
                                {
                                    RecoveryPointResource recoveryPointResourceInstance = new RecoveryPointResource();
                                    recoveryPointListInstance.RecoveryPoints.Add(recoveryPointResourceInstance);

                                    JToken propertiesValue = valueValue["properties"];
                                    if (propertiesValue != null && propertiesValue.Type != JTokenType.Null)
                                    {
                                        string typeName = ((string)propertiesValue["objectType"]);
                                        if (typeName == "IaasVMRecoveryPoint")
                                        {
                                            RecoveryPoint recoveryPointInstance = new RecoveryPoint();

                                            JToken recoveryPointTypeValue = propertiesValue["recoveryPointType"];
                                            if (recoveryPointTypeValue != null && recoveryPointTypeValue.Type != JTokenType.Null)
                                            {
                                                string recoveryPointTypeInstance = ((string)recoveryPointTypeValue);
                                                recoveryPointInstance.RecoveryPointType = recoveryPointTypeInstance;
                                            }

                                            JToken recoveryPointTimeValue = propertiesValue["recoveryPointTime"];
                                            if (recoveryPointTimeValue != null && recoveryPointTimeValue.Type != JTokenType.Null)
                                            {
                                                string recoveryPointTimeInstance = ((string)recoveryPointTimeValue);
                                                recoveryPointInstance.RecoveryPointTime = recoveryPointTimeInstance;
                                            }

                                            JToken recoveryPointAdditionalInfoValue = propertiesValue["recoveryPointAdditionalInfo"];
                                            if (recoveryPointAdditionalInfoValue != null && recoveryPointAdditionalInfoValue.Type != JTokenType.Null)
                                            {
                                                string recoveryPointAdditionalInfoInstance = ((string)recoveryPointAdditionalInfoValue);
                                                recoveryPointInstance.RecoveryPointAdditionalInfo = recoveryPointAdditionalInfoInstance;
                                            }

                                            JToken sourceVMStorageTypeValue = propertiesValue["sourceVMStorageType"];
                                            if (sourceVMStorageTypeValue != null && sourceVMStorageTypeValue.Type != JTokenType.Null)
                                            {
                                                string sourceVMStorageTypeInstance = ((string)sourceVMStorageTypeValue);
                                                recoveryPointInstance.SourceVMStorageType = sourceVMStorageTypeInstance;
                                            }
                                            recoveryPointResourceInstance.Properties = recoveryPointInstance;
                                        }
                                        if (typeName == "GenericRecoveryPoint")
                                        {
                                            GenericRecoveryPoint genericRecoveryPointInstance = new GenericRecoveryPoint();

                                            JToken recoveryPointTypeValue2 = propertiesValue["recoveryPointType"];
                                            if (recoveryPointTypeValue2 != null && recoveryPointTypeValue2.Type != JTokenType.Null)
                                            {
                                                string recoveryPointTypeInstance2 = ((string)recoveryPointTypeValue2);
                                                genericRecoveryPointInstance.RecoveryPointType = recoveryPointTypeInstance2;
                                            }

                                            JToken recoveryPointTimeValue2 = propertiesValue["recoveryPointTime"];
                                            if (recoveryPointTimeValue2 != null && recoveryPointTimeValue2.Type != JTokenType.Null)
                                            {
                                                string recoveryPointTimeInstance2 = ((string)recoveryPointTimeValue2);
                                                genericRecoveryPointInstance.RecoveryPointTime = recoveryPointTimeInstance2;
                                            }

                                            JToken recoveryPointAdditionalInfoValue2 = propertiesValue["recoveryPointAdditionalInfo"];
                                            if (recoveryPointAdditionalInfoValue2 != null && recoveryPointAdditionalInfoValue2.Type != JTokenType.Null)
                                            {
                                                string recoveryPointAdditionalInfoInstance2 = ((string)recoveryPointAdditionalInfoValue2);
                                                genericRecoveryPointInstance.RecoveryPointAdditionalInfo = recoveryPointAdditionalInfoInstance2;
                                            }
                                            recoveryPointResourceInstance.Properties = genericRecoveryPointInstance;
                                        }
                                    }

                                    JToken idValue = valueValue["id"];
                                    if (idValue != null && idValue.Type != JTokenType.Null)
                                    {
                                        string idInstance = ((string)idValue);
                                        recoveryPointResourceInstance.Id = idInstance;
                                    }

                                    JToken nameValue = valueValue["name"];
                                    if (nameValue != null && nameValue.Type != JTokenType.Null)
                                    {
                                        string nameInstance = ((string)nameValue);
                                        recoveryPointResourceInstance.Name = nameInstance;
                                    }

                                    JToken typeValue = valueValue["type"];
                                    if (typeValue != null && typeValue.Type != JTokenType.Null)
                                    {
                                        string typeInstance = ((string)typeValue);
                                        recoveryPointResourceInstance.Type = typeInstance;
                                    }

                                    JToken locationValue = valueValue["location"];
                                    if (locationValue != null && locationValue.Type != JTokenType.Null)
                                    {
                                        string locationInstance = ((string)locationValue);
                                        recoveryPointResourceInstance.Location = locationInstance;
                                    }

                                    JToken tagsSequenceElement = ((JToken)valueValue["tags"]);
                                    if (tagsSequenceElement != null && tagsSequenceElement.Type != JTokenType.Null)
                                    {
                                        foreach (JProperty property in tagsSequenceElement)
                                        {
                                            string tagsKey   = ((string)property.Name);
                                            string tagsValue = ((string)property.Value);
                                            recoveryPointResourceInstance.Tags.Add(tagsKey, tagsValue);
                                        }
                                    }

                                    JToken eTagValue = valueValue["eTag"];
                                    if (eTagValue != null && eTagValue.Type != JTokenType.Null)
                                    {
                                        string eTagInstance = ((string)eTagValue);
                                        recoveryPointResourceInstance.ETag = eTagInstance;
                                    }
                                }
                            }

                            JToken nextLinkValue = responseDoc["nextLink"];
                            if (nextLinkValue != null && nextLinkValue.Type != JTokenType.Null)
                            {
                                string nextLinkInstance = ((string)nextLinkValue);
                                recoveryPointListInstance.NextLink = nextLinkInstance;
                            }
                        }
                    }
                    result.StatusCode = statusCode;

                    if (shouldTrace)
                    {
                        TracingAdapter.Exit(invocationId, result);
                    }
                    return(result);
                }
                finally
                {
                    if (httpResponse != null)
                    {
                        httpResponse.Dispose();
                    }
                }
            }
            finally
            {
                if (httpRequest != null)
                {
                    httpRequest.Dispose();
                }
            }
        }
Exemplo n.º 7
0
 /// <summary>
 /// Lists all the recovery points of the given item protected by your
 /// Recovery Services Vault according to the query filter supplied in
 /// the arguments.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.RecoveryServices.Backup.IRecoveryPointOperations.
 /// </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='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <param name='fabricName'>
 /// Optional. Fabric name of the protected item.
 /// </param>
 /// <param name='containerName'>
 /// Optional. Name of the container where the protected item belongs to.
 /// </param>
 /// <param name='protectedItemName'>
 /// Optional. Name of the protected item whose recovery points are to
 /// be fetched.
 /// </param>
 /// <param name='queryFilter'>
 /// Optional. Query parameters for listing recovery points.
 /// </param>
 /// <returns>
 /// List of recovery points as returned by the service with the list
 /// recovery points call.
 /// </returns>
 public static Task <RecoveryPointListResponse> ListAsync(this IRecoveryPointOperations operations, string resourceGroupName, string resourceName, CustomRequestHeaders customRequestHeaders, string fabricName, string containerName, string protectedItemName, RecoveryPointQueryParameters queryFilter)
 {
     return(operations.ListAsync(resourceGroupName, resourceName, customRequestHeaders, fabricName, containerName, protectedItemName, queryFilter, CancellationToken.None));
 }
Exemplo n.º 8
0
 /// <summary>
 /// Lists all the recovery points of the given item protected by your
 /// Recovery Services Vault according to the query filter supplied in
 /// the arguments.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.RecoveryServices.Backup.IRecoveryPointOperations.
 /// </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='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <param name='fabricName'>
 /// Optional. Fabric name of the protected item.
 /// </param>
 /// <param name='containerName'>
 /// Optional. Name of the container where the protected item belongs to.
 /// </param>
 /// <param name='protectedItemName'>
 /// Optional. Name of the protected item whose recovery points are to
 /// be fetched.
 /// </param>
 /// <param name='queryFilter'>
 /// Optional. Query parameters for listing recovery points.
 /// </param>
 /// <returns>
 /// List of recovery points as returned by the service with the list
 /// recovery points call.
 /// </returns>
 public static RecoveryPointListResponse List(this IRecoveryPointOperations operations, string resourceGroupName, string resourceName, CustomRequestHeaders customRequestHeaders, string fabricName, string containerName, string protectedItemName, RecoveryPointQueryParameters queryFilter)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IRecoveryPointOperations)s).ListAsync(resourceGroupName, resourceName, customRequestHeaders, fabricName, containerName, protectedItemName, queryFilter);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }