diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupItemTestCases.ps1 b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupItemTestCases.ps1 index 9f0217553376..7d798efdee15 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupItemTestCases.ps1 +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupItemTestCases.ps1 @@ -80,5 +80,5 @@ function Test-DisableAzureBackupProtection $azureBackUpItem.Type = $DataSourceType $azureBackUpItem.ItemName = $itemName $azureBackUpItem.Name = $POName - $jobId1 = Disable-AzureRmBackupProtection -Item $azureBackUpItem + $jobId1 = Disable-AzureRmBackupProtection -Item $azureBackUpItem -Force } diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupPolicyTests.ps1 b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupPolicyTests.ps1 index 9627d9614bd8..ab3e4a480995 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupPolicyTests.ps1 +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupPolicyTests.ps1 @@ -92,8 +92,9 @@ function Test-SetAzureBackupProtectionPolicyTests function Test-RemoveAzureBackupProtectionPolicyTests { + $vault = Get-AzureRmBackupVault -Name $ResourceName; $protectionPolicy = Get-AzureRmBackupProtectionPolicy -vault $vault -Name $PolicyName - Remove-AzureRmBackupProtectionPolicy -ProtectionPolicy $protectionPolicy + Remove-AzureRmBackupProtectionPolicy -ProtectionPolicy $protectionPolicy -Force } diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupScenarioTests.ps1 b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupScenarioTests.ps1 index 1fc676f33a9d..3c50b376f733 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupScenarioTests.ps1 +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupScenarioTests.ps1 @@ -287,7 +287,7 @@ function Test-AzureBackupEndToEnd Try { $startTime = Get-Date -format G; - $Job = Disable-AzureRmBackupProtection -RemoveRecoveryPoints -Item $item[0]; + $Job = Disable-AzureRmBackupProtection -RemoveRecoveryPoints -Item $item[0] -Force; Wait-AzureRmBackupJob -Job $Job; $JobDetails = Get-AzureRmBackupJobDetails -Vault $vault -JobID $Job.InstanceId; Assert-AreEqual $JobDetails.Operation "Unprotect"; @@ -332,7 +332,7 @@ function Test-AzureBackupEndToEnd Try { $startTime = Get-Date -format G; - Remove-AzureRmBackupProtectionPolicy -ProtectionPolicy $protectionpolicy; + Remove-AzureRmBackupProtectionPolicy -ProtectionPolicy $protectionpolicy -Force; $endTime = Get-Date -format G; "Remove-AzureRmBackupProtectionPolicy", "Pass", $startTime, $endTime -join "," >> $ResultTxtFile; } diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Item/Disable-AzureRMBackupProtection .cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Item/Disable-AzureRMBackupProtection .cs index 5c4ac4900aa5..a1366f956137 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Item/Disable-AzureRMBackupProtection .cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Item/Disable-AzureRMBackupProtection .cs @@ -38,41 +38,52 @@ public SwitchParameter RemoveRecoveryPoints get { return DeleteBackupData; } set { DeleteBackupData = value; } } + + [Parameter(Mandatory = false, HelpMessage = "Don't ask for confirmation.")] + public SwitchParameter Force { get; set; } + private bool DeleteBackupData; protected override void ProcessRecord() { - ExecutionBlock(() => - { - base.ProcessRecord(); - Guid operationId = Guid.Empty; - WriteDebug(Resources.MakingClientCall); - - if (!this.DeleteBackupData) + ConfirmAction( + Force.IsPresent, + string.Format(Resources.DisableProtectionWarning, Item.Name), + Resources.DisableProtectionMessage, + Item.Name, () => { - //Calling update protection with policy Id as empty. - CSMUpdateProtectionRequest input = new CSMUpdateProtectionRequest() + ExecutionBlock(() => { - Properties = new CSMUpdateProtectionRequestProperties(string.Empty) - }; + base.ProcessRecord(); + Guid operationId = Guid.Empty; + WriteDebug(Resources.MakingClientCall); - operationId = AzureBackupClient.UpdateProtection(Item.ResourceGroupName, Item.ResourceName, Item.ContainerUniqueName, Item.ItemName, input); - } + if (!this.DeleteBackupData) + { + //Calling update protection with policy Id as empty. + CSMUpdateProtectionRequest input = new CSMUpdateProtectionRequest() + { + Properties = new CSMUpdateProtectionRequestProperties(string.Empty) + }; - else - { - //Calling disable protection - operationId = AzureBackupClient.DisableProtection(Item.ResourceGroupName, Item.ResourceName, Item.ContainerUniqueName, Item.ItemName); - } + operationId = AzureBackupClient.UpdateProtection(Item.ResourceGroupName, Item.ResourceName, Item.ContainerUniqueName, Item.ItemName, input); + } + + else + { + //Calling disable protection + operationId = AzureBackupClient.DisableProtection(Item.ResourceGroupName, Item.ResourceName, Item.ContainerUniqueName, Item.ItemName); + } - WriteDebug(Resources.DisableAzureBackupProtection); - var operationStatus = TrackOperation(Item.ResourceGroupName, Item.ResourceName, operationId); - this.WriteObject(GetCreatedJobs(Item.ResourceGroupName, - Item.ResourceName, - new Models.AzureRMBackupVault(Item.ResourceGroupName, Item.ResourceName, Item.Location), - operationStatus.JobList).FirstOrDefault()); - }); + WriteDebug(Resources.DisableAzureBackupProtection); + var operationStatus = TrackOperation(Item.ResourceGroupName, Item.ResourceName, operationId); + this.WriteObject(GetCreatedJobs(Item.ResourceGroupName, + Item.ResourceName, + new Models.AzureRMBackupVault(Item.ResourceGroupName, Item.ResourceName, Item.Location), + operationStatus.JobList).FirstOrDefault()); + }); + }); } } } \ No newline at end of file diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/ProtectionPolicy/RemoveAzureRMBackupProtectionPolicy.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/ProtectionPolicy/RemoveAzureRMBackupProtectionPolicy.cs index 170573204cd9..c8341621a709 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/ProtectionPolicy/RemoveAzureRMBackupProtectionPolicy.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/ProtectionPolicy/RemoveAzureRMBackupProtectionPolicy.cs @@ -29,26 +29,37 @@ namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets [Cmdlet(VerbsCommon.Remove, "AzureRmBackupProtectionPolicy")] public class RemoveAzureRMBackupProtectionPolicy : AzureBackupPolicyCmdletBase { + [Parameter(Mandatory = false, HelpMessage = "Don't ask for confirmation.")] + public SwitchParameter Force { get; set; } + protected override void ProcessRecord() { - ExecutionBlock(() => - { - base.ProcessRecord(); + ConfirmAction( + Force.IsPresent, + string.Format(Resources.RemoveProtectionPolicyWarning, ProtectionPolicy.Name), + Resources.RemoveProtectionPolicyMessage, + ProtectionPolicy.Name, () => + { + ExecutionBlock(() => + { + base.ProcessRecord(); + + WriteDebug(Resources.MakingClientCall); - WriteDebug(Resources.MakingClientCall); + var policyInfo = AzureBackupClient.GetProtectionPolicyByName(ProtectionPolicy.ResourceGroupName, ProtectionPolicy.ResourceName, ProtectionPolicy.Name); + if (policyInfo != null) + { + AzureBackupClient.DeleteProtectionPolicy(ProtectionPolicy.ResourceGroupName, ProtectionPolicy.ResourceName, policyInfo.Name); + WriteDebug(Resources.ProtectionPolicyDeleted); + } + else + { + var exception = new ArgumentException(string.Format(Resources.PolicyNotFound, ProtectionPolicy.Name)); + throw exception; + } + }); - var policyInfo = AzureBackupClient.GetProtectionPolicyByName(ProtectionPolicy.ResourceGroupName, ProtectionPolicy.ResourceName, ProtectionPolicy.Name); - if (policyInfo != null) - { - AzureBackupClient.DeleteProtectionPolicy(ProtectionPolicy.ResourceGroupName, ProtectionPolicy.ResourceName, policyInfo.Name); - WriteDebug(Resources.ProtectionPolicyDeleted); - } - else - { - var exception = new ArgumentException(string.Format(Resources.PolicyNotFound, ProtectionPolicy.Name)); - throw exception; - } - }); + }); } } } diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/ProtectionPolicyHelpers.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/ProtectionPolicyHelpers.cs index 97044655a262..9980dfcdf7a5 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/ProtectionPolicyHelpers.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/ProtectionPolicyHelpers.cs @@ -763,7 +763,7 @@ private static IList ConvertToCSMDayList(List DaysOfMonth) foreach (string DayOfMonth in DaysOfMonth) { Day day = new Day(); - if (string.Compare(DayOfMonth,"IsLast", true) == 0) + if (string.Compare(DayOfMonth, LastDayOfTheMonth, true) == 0) { day.IsLast = true; } diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Properties/Resources.Designer.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Properties/Resources.Designer.cs index 5f78194dd775..a26fb69fc7f8 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Properties/Resources.Designer.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Properties/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.18449 +// Runtime Version:4.0.30319.34209 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -139,7 +139,7 @@ internal static string BackupItemCmdletCalled { } /// - /// Looks up a localized string similar to For daily backup schedule, protection policy cannot have DaysOfWeek param in backup schedule. + /// Looks up a localized string similar to For a daily backup schedule, using the DaysOfWeek parameter is not allowed. /// internal static string BackupScheduleDailyParamException { get { @@ -148,7 +148,7 @@ internal static string BackupScheduleDailyParamException { } /// - /// Looks up a localized string similar to For weekly backup schedule, DaysOfWeek in backup schedule is mandatory and cannot be empty. + /// Looks up a localized string similar to For a weekly backup schedule, using the DaysOfWeek parameter is mandatory. /// internal static string BackupScheduleWeeklyParamException { get { @@ -265,7 +265,7 @@ internal static string CreatingBackupVault { } /// - /// Looks up a localized string similar to Only one AzureBackupDailyRetentionPolicy in RetentionPolicies is allowed. + /// Looks up a localized string similar to Only one daily retention policy is allowed for a Protection Policy. /// internal static string DailyRetentionPolicyException { get { @@ -274,7 +274,7 @@ internal static string DailyRetentionPolicyException { } /// - /// Looks up a localized string similar to For AzureBackupDailyRetentionPolicy , valid values of retention are {0} to {1}. + /// Looks up a localized string similar to The daily retention value should be between {0} and {1}. /// internal static string DailyRetentionPolicyValueException { get { @@ -283,7 +283,7 @@ internal static string DailyRetentionPolicyValueException { } /// - /// Looks up a localized string similar to For Daily Schedule, AzureBackupDailyRetentionPolicy in RetentionPolicies param is mandatory. + /// Looks up a localized string similar to For a daily backup schedule, setting a daily retention policy is mandatory. /// internal static string DailyScheduleException { get { @@ -292,7 +292,7 @@ internal static string DailyScheduleException { } /// - /// Looks up a localized string similar to Days of the month in Monthly/Yearly retention is not allowed for weekly backup Schedules. + /// Looks up a localized string similar to Using the DaysOfMonth parameter in retention policies is not allowed when weekly backup schedules are used. /// internal static string DaysOfMonthsNotAllowedinMonthlyYearlyFormat { get { @@ -301,7 +301,7 @@ internal static string DaysOfMonthsNotAllowedinMonthlyYearlyFormat { } /// - /// Looks up a localized string similar to DaysofTheWeek list in Weekly retention schedule must be same of backup schedule DaysOfTheWeek. + /// Looks up a localized string similar to The DaysOfWeek specified in a weekly retention schedule should be same as of DaysOfWeek value specified in the backup schedule. /// internal static string DaysofTheWeekInWeeklyRetentionException { get { @@ -310,7 +310,7 @@ internal static string DaysofTheWeekInWeeklyRetentionException { } /// - /// Looks up a localized string similar to DaysOfTheWeek of retention schedule must be same of backup schedule DaysOfTheWeek. + /// Looks up a localized string similar to The DaysOfWeek specified in a weekly retention schedule should be same as of DaysOfWeek value specified in the backup schedule. /// internal static string DaysOfTheWeekOfRetentionScheduleException { get { @@ -463,7 +463,7 @@ internal static string MakingClientCall { } /// - /// Looks up a localized string similar to For AzureBackupMonthlyRetentionPolicy and RetentionFormat in Days, DaysOfMonth param is mandatory and can not be empty. + /// Looks up a localized string similar to For a monthly retention policy specified in days, using the DaysOfMonth parameter is mandatory. /// internal static string MonthlyRetentionPolicyDaysOfMonthParamException { get { @@ -472,7 +472,7 @@ internal static string MonthlyRetentionPolicyDaysOfMonthParamException { } /// - /// Looks up a localized string similar to For AzureBackupMonthlyRetentionPolicy and RetentionFormat in Weeks, DaysOfMonth param is not allowed.. + /// Looks up a localized string similar to For a monthly retention policy specified in weeks, using the DaysOfMonth parameter is not allowed. /// internal static string MonthlyRetentionPolicyDaysOfMonthsException { get { @@ -481,7 +481,7 @@ internal static string MonthlyRetentionPolicyDaysOfMonthsException { } /// - /// Looks up a localized string similar to For AzureBackupMonthlyRetentionPolicy and RetentionFormat in Weeks, DaysOfWeek param is mandatory and can not be empty. + /// Looks up a localized string similar to For a monthly retention policy specified in weeks, using the DaysOfWeek parameter is mandatory. /// internal static string MonthlyRetentionPolicyDaysOfWeekException { get { @@ -490,7 +490,7 @@ internal static string MonthlyRetentionPolicyDaysOfWeekException { } /// - /// Looks up a localized string similar to For AzureBackupMonthlyRetentionPolicy and RetentionFormat in Days, DaysOfWeek or WeekNumber params are not allowed. + /// Looks up a localized string similar to For a monthly retention policy specified in days, using the DaysOfWeek and WeekNumber parameters is not allowed. /// internal static string MonthlyRetentionPolicyDaysOfWeekParamException { get { @@ -499,7 +499,7 @@ internal static string MonthlyRetentionPolicyDaysOfWeekParamException { } /// - /// Looks up a localized string similar to Only one AzureBackupMonthlyRetentionPolicy in RetentionPolicies is allowed. + /// Looks up a localized string similar to Only one monthly retention policy is allowed for a Protection Policy. /// internal static string MonthlyRetentionPolicyException { get { @@ -508,7 +508,7 @@ internal static string MonthlyRetentionPolicyException { } /// - /// Looks up a localized string similar to For AzureBackupMonthlyRetentionPolicy , valid values of retention are {0} to {1}. + /// Looks up a localized string similar to The monthly retention value should be between {0} and {1}. /// internal static string MonthlyRetentionPolicyValueException { get { @@ -517,7 +517,7 @@ internal static string MonthlyRetentionPolicyValueException { } /// - /// Looks up a localized string similar to For AzureBackupMonthlyRetentionPolicy and RetentionFormat in Weeks, WeekNumber param is mandatory and can not be empty. + /// Looks up a localized string similar to For a monthly retention policy specified in weeks, using the WeekNumber parameter is mandatory. /// internal static string MonthlyRetentionPolicyWeekNumException { get { @@ -526,7 +526,7 @@ internal static string MonthlyRetentionPolicyWeekNumException { } /// - /// Looks up a localized string similar to Days of the week list in Monthly/Yearly retention schedule should be subset of Day of week list in Backup Schedule. + /// Looks up a localized string similar to The DaysOfWeek specified for monthly and yearly retention policies should be a subset of the DaysOfWeek value specified in the backup schedule. /// internal static string MonthlyYearlyRetentionArgumentException { get { @@ -580,7 +580,7 @@ internal static string OperationStatus { } /// - /// Looks up a localized string similar to A protection policy with the specified name already exists.. + /// Looks up a localized string similar to A protection policy with the specified name already exists. /// internal static string PolicyAlreadyExist { get { @@ -589,7 +589,7 @@ internal static string PolicyAlreadyExist { } /// - /// Looks up a localized string similar to For DaysOfWeek, weekly switch param is required. + /// Looks up a localized string similar to The DaysOfWeek parameter should be used in conjunction with the –Weekly switch parameter. /// internal static string PolicyArgumentException { get { @@ -723,6 +723,46 @@ internal static string RegisteringVM { } } + /// + /// Looks up a localized string similar to Remove Protection Policy Message. + /// + internal static string RemoveProtectionPolicyMessage { + get { + return ResourceManager.GetString("RemoveProtectionPolicyMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove Protection Policy Warning;. + /// + internal static string RemoveProtectionPolicyWarning { + get { + return ResourceManager.GetString("RemoveProtectionPolicyWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Disable Protection Message. + /// + internal static string DisableProtectionMessage + { + get + { + return ResourceManager.GetString("DisableProtectionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Disable Protection Warning;. + /// + internal static string DisableProtectionWarning + { + get + { + return ResourceManager.GetString("DisableProtectionWarning", resourceCulture); + } + } + /// /// Looks up a localized string similar to Going to retry Discovery if retry count is not exceeded. /// @@ -949,7 +989,7 @@ internal static string WebException { } /// - /// Looks up a localized string similar to For AzureBackupWeeklyRetentionPolicy , DaysOfWeek param is mandatory and can not be empty. + /// Looks up a localized string similar to For a weekly retention policy, using the DaysOfWeek parameter is mandatory. /// internal static string WeeklyRetentionPolicyDaysOfWeekException { get { @@ -958,7 +998,7 @@ internal static string WeeklyRetentionPolicyDaysOfWeekException { } /// - /// Looks up a localized string similar to Only one AzureBackupWeeklyRetentionPolicy in RetentionPolicies is allowed. + /// Looks up a localized string similar to Only one weekly retention policy is allowed for a Protection Policy. /// internal static string WeeklyRetentionPolicyException { get { @@ -967,7 +1007,7 @@ internal static string WeeklyRetentionPolicyException { } /// - /// Looks up a localized string similar to For AzureBackupWeeklyRetentionPolicy , valid values of retention are {0} to {1}. + /// Looks up a localized string similar to The weekly retention value should be between {0} and {1}. /// internal static string WeeklyRetentionPolicyValueException { get { @@ -976,7 +1016,7 @@ internal static string WeeklyRetentionPolicyValueException { } /// - /// Looks up a localized string similar to For Weekly Schedule, AzureBackupWeeklyRetentionPolicy in RetentionPolicies param is mandatory. + /// Looks up a localized string similar to For a weekly backup schedule, setting a weekly retention policy is mandatory. /// internal static string WeeklyScheduleException { get { @@ -985,7 +1025,7 @@ internal static string WeeklyScheduleException { } /// - /// Looks up a localized string similar to For weekly scheduletype , ScheduleRunDays param is mandatory and can not be empty.. + /// Looks up a localized string similar to For a weekly backup schedule, using the DaysOfWeek parameter is mandatory. /// internal static string WeeklyScheduleRunDaysException { get { @@ -994,7 +1034,7 @@ internal static string WeeklyScheduleRunDaysException { } /// - /// Looks up a localized string similar to For Weekly Schedule, AzureBackupDailyRetentionPolicy in RetentionPolicies param is not allowed. + /// Looks up a localized string similar to For a weekly backup schedule, setting a daily retention policy is not allowed. /// internal static string WeeklyScheduleWithDailyException { get { @@ -1003,7 +1043,7 @@ internal static string WeeklyScheduleWithDailyException { } /// - /// Looks up a localized string similar to For AzureBackupYearlyRetentionPolicy and RetentionFormat in Weeks, DaysOfMonth param is not allowed. + /// Looks up a localized string similar to For a yearly retention policy specified in days, using the MonthsOfYear and DaysOfMonth parameters is not allowed. /// internal static string YearlyRetentionPolicyDaysOfMonthInWeekFormatException { get { @@ -1012,7 +1052,7 @@ internal static string YearlyRetentionPolicyDaysOfMonthInWeekFormatException { } /// - /// Looks up a localized string similar to For AzureBackupYearlyRetentionPolicy and RetentionFormat in Days, DaysOfMonth param is mandatory and can not be empty. + /// Looks up a localized string similar to For a yearly retention policy specified in days, using the MonthsOfYear and DaysOfMonth parameters is mandatory. /// internal static string YearlyRetentionPolicyDaysOfMonthParamException { get { @@ -1021,7 +1061,7 @@ internal static string YearlyRetentionPolicyDaysOfMonthParamException { } /// - /// Looks up a localized string similar to For AzureBackupYearlyRetentionPolicy and RetentionFormat in Weeks, DaysOfWeek param is mandatory and can not be empty. + /// Looks up a localized string similar to For a yearly retention policy specified in weeks, using the DaysOfWeek and WeekNumber parameters is mandatory. /// internal static string YearlyRetentionPolicyDaysOfWeekInWeeksFormatParamException { get { @@ -1030,7 +1070,7 @@ internal static string YearlyRetentionPolicyDaysOfWeekInWeeksFormatParamExceptio } /// - /// Looks up a localized string similar to For AzureBackupYearlyRetentionPolicy and RetentionFormat in Days, DaysOfWeek or WeekNumber params are not allowed. + /// Looks up a localized string similar to For a yearly retention policy specified in days, using the DaysOfWeek and WeekNumber parameters is not allowed. /// internal static string YearlyRetentionPolicyDaysOfWeekParamException { get { @@ -1039,7 +1079,7 @@ internal static string YearlyRetentionPolicyDaysOfWeekParamException { } /// - /// Looks up a localized string similar to Only one AzureBackupYearlyRetentionPolicy in RetentionPolicies is allowed. + /// Looks up a localized string similar to Only one yearly retention policy is allowed for a Protection Policy. /// internal static string YearlyRetentionPolicyException { get { @@ -1048,7 +1088,7 @@ internal static string YearlyRetentionPolicyException { } /// - /// Looks up a localized string similar to For AzureBackupYearlyRetentionPolicy and RetentionFormat in days, MonthsOfYear param is mandatory and can not be empty. + /// Looks up a localized string similar to For a yearly retention policy specified in days, using the MonthsOfYear and DaysOfMonth parameters is mandatory. /// internal static string YearlyRetentionPolicyMonthOfYearParamException { get { @@ -1057,7 +1097,7 @@ internal static string YearlyRetentionPolicyMonthOfYearParamException { } /// - /// Looks up a localized string similar to For AzureBackupYearlyRetentionPolicy , valid values of retention are {0} to {1}. + /// Looks up a localized string similar to Yearly retention value should be between {0} and {1}. /// internal static string YearlyRetentionPolicyValueException { get { @@ -1066,7 +1106,7 @@ internal static string YearlyRetentionPolicyValueException { } /// - /// Looks up a localized string similar to For AzureBackupYearlyRetentionPolicy and RetentionFormat in Weeks, WeekNumber param is mandatory and can not be empty. + /// Looks up a localized string similar to For a yearly retention policy specified in weeks, using the DaysOfWeek and WeekNumber parameters is mandatory. /// internal static string YearlyRetentionPolicyWeekNumParamException { get { diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Properties/Resources.resx b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Properties/Resources.resx index b6bca7072396..e300ab5acf9b 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Properties/Resources.resx +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Properties/Resources.resx @@ -493,4 +493,16 @@ Please contact Microsoft for further assistant. For a yearly retention policy specified in weeks, using the DaysOfWeek and WeekNumber parameters is mandatory Scrubbed + + Disabling protection for item + + + Are you sure you want to disable protection for item '{0}' + + + Removing protection policy + + + Are you sure you want to remove protection policy '{0}' + \ No newline at end of file