/// <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));
        }
        /// <summary>
        /// Lists recovery points generated for the given item
        /// </summary>
        /// <returns>List of recovery point PowerShell model objects</returns>
        public List <RecoveryPointBase> ListRecoveryPoints()
        {
            DateTime     startDate = (DateTime)(ProviderData[RecoveryPointParams.StartDate]);
            DateTime     endDate   = (DateTime)(ProviderData[RecoveryPointParams.EndDate]);
            AzureSqlItem item      = ProviderData[RecoveryPointParams.Item]
                                     as AzureSqlItem;

            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 > maxRestoreDiskTimeRange)
            {
                throw new Exception(Resources.RestoreDiskTimeRangeError);
            }

            //we need to fetch the list of RPs
            var queryFilterString = QueryBuilder.Instance.GetQueryString(new BMSRPQueryObject()
            {
                StartDate = startDate,
                EndDate   = endDate
            });

            ODataQuery <BMSRPQueryObject> queryFilter = new ODataQuery <BMSRPQueryObject>();

            queryFilter.Filter = queryFilterString;

            List <RecoveryPointResource> rpListResponse = ServiceClientAdapter.GetRecoveryPoints(
                containerUri, protectedItemName, queryFilter);

            return(RecoveryPointConversions.GetPSAzureRecoveryPoints(rpListResponse, item));
        }
Beispiel #3
0
        /// <summary>
        /// Fetches the detail info for the given recovery point
        /// </summary>
        /// <returns>Recovery point detail as returned by the service</returns>
        public RecoveryPointBase GetRecoveryPointDetails()
        {
            AzureVmItem item = ProviderData[RecoveryPointParams.Item]
                               as AzureVmItem;

            string recoveryPointId = ProviderData[RecoveryPointParams.RecoveryPointId].ToString();

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

            var rpResponse = ServiceClientAdapter.GetRecoveryPointDetails(
                containerUri, protectedItemName, recoveryPointId);

            var rp = RecoveryPointConversions.GetPSAzureRecoveryPoints(rpResponse, item) as AzureVmRecoveryPoint;

            if (rp.EncryptionEnabled && rp.KeyAndSecretDetails != null)
            {
                string keyFileDownloadLocation =
                    (string)ProviderData[RecoveryPointParams.KeyFileDownloadLocation];
                string keyFileContent = rp.KeyAndSecretDetails.KeyBackupData;
                if (!string.IsNullOrEmpty(keyFileDownloadLocation))
                {
                    string absoluteFilePath = Path.Combine(keyFileDownloadLocation, "key.blob");
                    File.WriteAllBytes(absoluteFilePath, Convert.FromBase64String(keyFileContent));
                }
            }
            return(rp);
        }
        public List <RecoveryPointBase> ListRecoveryPoints(Dictionary <Enum, object> ProviderData)
        {
            string   vaultName             = (string)ProviderData[VaultParams.VaultName];
            string   resourceGroupName     = (string)ProviderData[VaultParams.ResourceGroupName];
            DateTime startDate             = (DateTime)(ProviderData[RecoveryPointParams.StartDate]);
            DateTime endDate               = (DateTime)(ProviderData[RecoveryPointParams.EndDate]);
            string   restorePointQueryType = ProviderData.ContainsKey(RecoveryPointParams.RestorePointQueryType) ?
                                             (string)ProviderData[RecoveryPointParams.RestorePointQueryType] : "All";

            ItemBase item = ProviderData[RecoveryPointParams.Item] as ItemBase;

            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
            var queryFilterString = "null";

            if (string.Compare(restorePointQueryType, "All") == 0)
            {
                queryFilterString = QueryBuilder.Instance.GetQueryString(new BMSRPQueryObject()
                {
                    StartDate = startDate,
                    EndDate   = endDate,
                });
            }
            else
            {
                queryFilterString = QueryBuilder.Instance.GetQueryString(new BMSRPQueryObject()
                {
                    StartDate             = startDate,
                    EndDate               = endDate,
                    RestorePointQueryType = restorePointQueryType,
                    ExtendedInfo          = true
                });
            }

            ODataQuery <BMSRPQueryObject> queryFilter = new ODataQuery <BMSRPQueryObject>();

            queryFilter.Filter = queryFilterString;

            List <RecoveryPointResource> rpListResponse = ServiceClientAdapter.GetRecoveryPoints(
                containerUri,
                protectedItemName,
                queryFilter,
                vaultName: vaultName,
                resourceGroupName: resourceGroupName);

            return(RecoveryPointConversions.GetPSAzureRecoveryPoints(rpListResponse, item));
        }
        /// <summary>
        /// Fetches the detail info for the given recovery point
        /// </summary>
        /// <returns>Recovery point detail as returned by the service</returns>
        public CmdletModel.RecoveryPointBase GetRecoveryPointDetails()
        {
            AzureVmItem item = ProviderData[GetRecoveryPointParams.Item]
                               as AzureVmItem;

            string recoveryPointId = ProviderData[GetRecoveryPointParams.RecoveryPointId].ToString();

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

            var rpResponse = ServiceClientAdapter.GetRecoveryPointDetails(containerUri, protectedItemName, recoveryPointId);

            return(RecoveryPointConversions.GetPSAzureRecoveryPoints(rpResponse, item));
        }
        public RecoveryPointBase GetRecoveryPointDetails(Dictionary <Enum, object> ProviderData)
        {
            string   vaultName         = (string)ProviderData[VaultParams.VaultName];
            string   resourceGroupName = (string)ProviderData[VaultParams.ResourceGroupName];
            ItemBase item = ProviderData[RecoveryPointParams.Item] as ItemBase;

            string recoveryPointId = ProviderData[RecoveryPointParams.RecoveryPointId].ToString();

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

            var rpResponse = ServiceClientAdapter.GetRecoveryPointDetails(
                containerUri,
                protectedItemName,
                recoveryPointId,
                vaultName: vaultName,
                resourceGroupName: resourceGroupName);

            return(RecoveryPointConversions.GetPSAzureRecoveryPoints(rpResponse, item));
        }
Beispiel #7
0
        private List <RecoveryPointBase> GetMoveRecommendedRecoveryPoints(Dictionary <Enum, object> ProviderData)
        {
            string   vaultName         = (string)ProviderData[VaultParams.VaultName];
            string   resourceGroupName = (string)ProviderData[VaultParams.ResourceGroupName];
            ItemBase item = ProviderData[RecoveryPointParams.Item] as ItemBase;

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

            ServiceClientModel.ListRecoveryPointsRecommendedForMoveRequest moveRequest = new ServiceClientModel.ListRecoveryPointsRecommendedForMoveRequest();

            List <ServiceClientModel.RecoveryPointResource> rpListResponse;

            rpListResponse = ServiceClientAdapter.GetMoveRecommendedRecoveryPoints(
                containerUri,
                protectedItemName,
                moveRequest,
                vaultName: vaultName,
                resourceGroupName: resourceGroupName);

            return(RecoveryPointConversions.GetPSAzureRecoveryPoints(rpListResponse, item));
        }
        public List <RecoveryPointBase> ListRecoveryPoints(Dictionary <Enum, object> ProviderData)
        {
            string   vaultName             = (string)ProviderData[VaultParams.VaultName];
            string   resourceGroupName     = (string)ProviderData[VaultParams.ResourceGroupName];
            DateTime startDate             = (DateTime)(ProviderData[RecoveryPointParams.StartDate]);
            DateTime endDate               = (DateTime)(ProviderData[RecoveryPointParams.EndDate]);
            string   restorePointQueryType = ProviderData.ContainsKey(RecoveryPointParams.RestorePointQueryType) ?
                                             (string)ProviderData[RecoveryPointParams.RestorePointQueryType] : "All";
            bool secondaryRegion         = (bool)ProviderData[CRRParams.UseSecondaryRegion];
            RecoveryPointTier targetTier = (RecoveryPointTier)ProviderData[RecoveryPointParams.TargetTier];
            bool isReadyForMove          = (bool)ProviderData[RecoveryPointParams.IsReadyForMove];
            RecoveryPointTier tier       = (RecoveryPointTier)ProviderData[RecoveryPointParams.Tier];

            ItemBase item = ProviderData[RecoveryPointParams.Item] as ItemBase;

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

            //we need to fetch the list of RPs
            var queryFilterString = "null";

            if (string.Compare(restorePointQueryType, "All") == 0)
            {
                queryFilterString = QueryBuilder.Instance.GetQueryString(new BMSRPQueryObject()
                {
                    StartDate = startDate,
                    EndDate   = endDate,
                });
            }
            else
            {
                queryFilterString = QueryBuilder.Instance.GetQueryString(new BMSRPQueryObject()
                {
                    StartDate             = startDate,
                    EndDate               = endDate,
                    RestorePointQueryType = restorePointQueryType,
                    ExtendedInfo          = true
                });
            }

            ODataQuery <BMSRPQueryObject> queryFilter = new ODataQuery <BMSRPQueryObject>();

            queryFilter.Filter = queryFilterString;

            List <RecoveryPointResource> rpListResponse;

            if (secondaryRegion)
            {
                //fetch recovery points from secondary region
                rpListResponse = ServiceClientAdapter.GetRecoveryPointsFromSecondaryRegion(
                    containerUri,
                    protectedItemName,
                    queryFilter,
                    vaultName: vaultName,
                    resourceGroupName: resourceGroupName);
            }
            else
            {
                rpListResponse = ServiceClientAdapter.GetRecoveryPoints(
                    containerUri,
                    protectedItemName,
                    queryFilter,
                    vaultName: vaultName,
                    resourceGroupName: resourceGroupName);
            }

            var recoveryPointList = RecoveryPointConversions.GetPSAzureRecoveryPoints(rpListResponse, item);

            //filter out archived recovery points for secondary region
            if (secondaryRegion)
            {
                recoveryPointList = recoveryPointList.Where(
                    recoveryPoint =>
                {
                    if (recoveryPoint.GetType() == typeof(AzureVmRecoveryPoint))
                    {
                        return(((AzureVmRecoveryPoint)recoveryPoint).RecoveryPointTier != RecoveryPointTier.VaultArchive);
                    }

                    if (recoveryPoint.GetType() == typeof(CmdletModel.AzureWorkloadRecoveryPoint))
                    {
                        return(((CmdletModel.AzureWorkloadRecoveryPoint)recoveryPoint).RecoveryPointTier != RecoveryPointTier.VaultArchive);
                    }

                    return(false);
                }).ToList();
            }

            // filter move readness based on target tier
            recoveryPointList = RecoveryPointConversions.CheckRPMoveReadiness(recoveryPointList, targetTier, isReadyForMove);

            //filter RPs based on tier
            return(RecoveryPointConversions.FilterRPsBasedOnTier(recoveryPointList, tier));
        }
Beispiel #9
0
        public override void ExecuteCmdlet()
        {
            ExecutionBlock(() =>
            {
                ConfirmAction(
                    Force.IsPresent,
                    string.Format(Resources.DisableProtectionWarning, Item.Name),
                    Resources.DisableProtectionMessage,
                    Item.Name, () =>
                {
                    base.ExecuteCmdlet();

                    ResourceIdentifier resourceIdentifier = new ResourceIdentifier(VaultId);
                    string vaultName         = resourceIdentifier.ResourceName;
                    string resourceGroupName = resourceIdentifier.ResourceGroupName;

                    if (Token != "" && Token != null && !this.DeleteBackupData)
                    {
                        throw new ArgumentException(String.Format(Resources.DisableWithRetainBackupNotCrititcal));
                    }

                    PsBackupProviderManager providerManager =
                        new PsBackupProviderManager(new Dictionary <System.Enum, object>()
                    {
                        { VaultParams.VaultName, vaultName },
                        { VaultParams.ResourceGroupName, resourceGroupName },
                        { ItemParams.Item, Item },
                        { ItemParams.DeleteBackupData, this.DeleteBackupData },
                        { ResourceGuardParams.Token, Token },
                    }, ServiceClientAdapter);

                    IPsBackupProvider psBackupProvider =
                        providerManager.GetProviderInstance(Item.WorkloadType,
                                                            Item.BackupManagementType);

                    if (DeleteBackupData)
                    {
                        #region Archived RPs
                        // Fetch RecoveryPoints in Archive Tier, if yes throw warning and confirmation prompt
                        Dictionary <UriEnums, string> uriDict = HelperUtils.ParseUri(Item.Id);
                        string containerUri      = HelperUtils.GetContainerUri(uriDict, Item.Id);
                        string protectedItemName = HelperUtils.GetProtectedItemUri(uriDict, Item.Id);

                        ODataQuery <ServiceClientModel.BMSRPQueryObject> queryFilter = null;
                        if (string.Compare(Item.BackupManagementType.ToString(), BackupManagementType.AzureWorkload.ToString()) == 0)
                        {
                            var restorePointQueryType = "FullAndDifferential";

                            string queryFilterString = QueryBuilder.Instance.GetQueryString(new ServiceClientModel.BMSRPQueryObject()
                            {
                                RestorePointQueryType = restorePointQueryType,
                                ExtendedInfo          = true
                            });
                            queryFilter        = new ODataQuery <ServiceClientModel.BMSRPQueryObject>();
                            queryFilter.Filter = queryFilterString;
                        }

                        var rpListResponse = ServiceClientAdapter.GetRecoveryPoints(
                            containerUri,
                            protectedItemName,
                            queryFilter,
                            vaultName: vaultName,
                            resourceGroupName: resourceGroupName);

                        var recoveryPointList = RecoveryPointConversions.GetPSAzureRecoveryPoints(rpListResponse, Item);

                        recoveryPointList = RecoveryPointConversions.FilterRPsBasedOnTier(recoveryPointList, RecoveryPointTier.VaultArchive);

                        #endregion

                        if (recoveryPointList.Count != 0)
                        {
                            bool yesToAll = Force.IsPresent;
                            bool noToAll  = false;
                            if (ShouldContinue(Resources.DeleteArchiveRecoveryPoints, Resources.DeleteRecoveryPoints, ref yesToAll, ref noToAll))
                            {
                                var itemResponse = psBackupProvider.DisableProtectionWithDeleteData();
                                Logger.Instance.WriteDebug("item Response " + JsonConvert.SerializeObject(itemResponse));
                                // Track Response and display job details
                                HandleCreatedJob(
                                    itemResponse,
                                    Resources.DisableProtectionOperation,
                                    vaultName: vaultName,
                                    resourceGroupName: resourceGroupName);
                            }
                        }
                        else
                        {
                            var itemResponse = psBackupProvider.DisableProtectionWithDeleteData();

                            // Track Response and display job details
                            HandleCreatedJob(
                                itemResponse,
                                Resources.DisableProtectionOperation,
                                vaultName: vaultName,
                                resourceGroupName: resourceGroupName);
                        }
                    }
                    else
                    {
                        var itemResponse = psBackupProvider.DisableProtection();
                        Logger.Instance.WriteDebug("Disable protection response " + JsonConvert.SerializeObject(itemResponse));
                        // Track Response and display job details
                        HandleCreatedJob(
                            itemResponse,
                            Resources.DisableProtectionOperation,
                            vaultName: vaultName,
                            resourceGroupName: resourceGroupName);
                    }
                }
                    );
            }, ShouldProcess(Item.Name, VerbsLifecycle.Disable));
        }
Beispiel #10
0
        public List <RecoveryPointBase> ListRecoveryPoints(Dictionary <Enum, object> ProviderData)
        {
            string   vaultName             = (string)ProviderData[VaultParams.VaultName];
            string   resourceGroupName     = (string)ProviderData[VaultParams.ResourceGroupName];
            DateTime startDate             = (DateTime)(ProviderData[RecoveryPointParams.StartDate]);
            DateTime endDate               = (DateTime)(ProviderData[RecoveryPointParams.EndDate]);
            string   restorePointQueryType = ProviderData.ContainsKey(RecoveryPointParams.RestorePointQueryType) ?
                                             (string)ProviderData[RecoveryPointParams.RestorePointQueryType] : "All";
            bool secondaryRegion = (bool)ProviderData[CRRParams.UseSecondaryRegion];

            ItemBase item = ProviderData[RecoveryPointParams.Item] as ItemBase;

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

            //we need to fetch the list of RPs
            var queryFilterString = "null";

            if (string.Compare(restorePointQueryType, "All") == 0)
            {
                queryFilterString = QueryBuilder.Instance.GetQueryString(new BMSRPQueryObject()
                {
                    StartDate = startDate,
                    EndDate   = endDate,
                });
            }
            else
            {
                queryFilterString = QueryBuilder.Instance.GetQueryString(new BMSRPQueryObject()
                {
                    StartDate             = startDate,
                    EndDate               = endDate,
                    RestorePointQueryType = restorePointQueryType,
                    ExtendedInfo          = true
                });
            }

            ODataQuery <BMSRPQueryObject> queryFilter = new ODataQuery <BMSRPQueryObject>();

            queryFilter.Filter = queryFilterString;

            List <RecoveryPointResource> rpListResponse;

            if (secondaryRegion)
            {
                //fetch recovery points from secondary region
                rpListResponse = ServiceClientAdapter.GetRecoveryPointsFromSecondaryRegion(
                    containerUri,
                    protectedItemName,
                    queryFilter,
                    vaultName: vaultName,
                    resourceGroupName: resourceGroupName);
            }
            else
            {
                rpListResponse = ServiceClientAdapter.GetRecoveryPoints(
                    containerUri,
                    protectedItemName,
                    queryFilter,
                    vaultName: vaultName,
                    resourceGroupName: resourceGroupName);
            }

            return(RecoveryPointConversions.GetPSAzureRecoveryPoints(rpListResponse, item));
        }
Beispiel #11
0
        public override void ExecuteCmdlet()
        {
            ExecutionBlock(() =>
            {
                ConfirmAction(
                    Force.IsPresent,
                    string.Format(Resources.DisableProtectionWarning, Item.Name),
                    Resources.DisableProtectionMessage,
                    Item.Name, () =>
                {
                    base.ExecuteCmdlet();

                    ResourceIdentifier resourceIdentifier = new ResourceIdentifier(VaultId);
                    string vaultName         = resourceIdentifier.ResourceName;
                    string resourceGroupName = resourceIdentifier.ResourceGroupName;

                    PsBackupProviderManager providerManager =
                        new PsBackupProviderManager(new Dictionary <System.Enum, object>()
                    {
                        { VaultParams.VaultName, vaultName },
                        { VaultParams.ResourceGroupName, resourceGroupName },
                        { ItemParams.Item, Item },
                        { ItemParams.DeleteBackupData, this.DeleteBackupData },
                    }, ServiceClientAdapter);

                    IPsBackupProvider psBackupProvider =
                        providerManager.GetProviderInstance(Item.WorkloadType,
                                                            Item.BackupManagementType);

                    if (DeleteBackupData)
                    {
                        // Fetch RecoveryPoints in Archive Tier, if yes throw warning and confirmation prompt
                        Dictionary <UriEnums, string> uriDict = HelperUtils.ParseUri(Item.Id);
                        string containerUri      = HelperUtils.GetContainerUri(uriDict, Item.Id);
                        string protectedItemName = HelperUtils.GetProtectedItemUri(uriDict, Item.Id);

                        var rpListResponse = ServiceClientAdapter.GetRecoveryPoints(
                            containerUri,
                            protectedItemName,
                            null,
                            vaultName: vaultName,
                            resourceGroupName: resourceGroupName);

                        var recoveryPointList = RecoveryPointConversions.GetPSAzureRecoveryPoints(rpListResponse, Item);
                        recoveryPointList     = RecoveryPointConversions.FilterRPsBasedOnTier(recoveryPointList, RecoveryPointTier.VaultArchive);

                        if (recoveryPointList.Count != 0)
                        {
                            bool yesToAll = Force.IsPresent;
                            bool noToAll  = false;
                            if (ShouldContinue(Resources.DeleteArchiveRecoveryPoints, Resources.DeleteRecoveryPoints, ref yesToAll, ref noToAll))
                            {
                                var itemResponse = psBackupProvider.DisableProtectionWithDeleteData();
                                Logger.Instance.WriteDebug("item Response " + JsonConvert.SerializeObject(itemResponse));
                                // Track Response and display job details
                                HandleCreatedJob(
                                    itemResponse,
                                    Resources.DisableProtectionOperation,
                                    vaultName: vaultName,
                                    resourceGroupName: resourceGroupName);
                            }
                        }
                        else
                        {
                            var itemResponse = psBackupProvider.DisableProtectionWithDeleteData();
                            Logger.Instance.WriteDebug("item Response " + JsonConvert.SerializeObject(itemResponse));
                            // Track Response and display job details
                            HandleCreatedJob(
                                itemResponse,
                                Resources.DisableProtectionOperation,
                                vaultName: vaultName,
                                resourceGroupName: resourceGroupName);
                        }
                    }
                    else
                    {
                        var itemResponse = psBackupProvider.DisableProtection();
                        Logger.Instance.WriteDebug("Disable protection response " + JsonConvert.SerializeObject(itemResponse));
                        // Track Response and display job details
                        HandleCreatedJob(
                            itemResponse,
                            Resources.DisableProtectionOperation,
                            vaultName: vaultName,
                            resourceGroupName: resourceGroupName);
                    }
                }
                    );
            }, ShouldProcess(Item.Name, VerbsLifecycle.Disable));
        }