Skip to content

Commit 3a5cce7

Browse files
committed
Merge pull request #129 from MabOneSdk/pragrawadev1
ScrubErrorMessage for Policy and Bug #4298876 [OneSDK] Remove same Pr…
2 parents 3db2904 + 779c8b6 commit 3a5cce7

File tree

2 files changed

+66
-33
lines changed

2 files changed

+66
-33
lines changed

src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/ProtectionPolicy/RemoveAzureRMBackupProtectionPolicy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public override void ExecuteCmdlet()
4545
}
4646
else
4747
{
48-
var exception = new ArgumentException(string.Format(Resources.PolicyNotFound, policyInfo.Name));
48+
var exception = new ArgumentException(string.Format(Resources.PolicyNotFound, ProtectionPolicy.Name));
4949
throw exception;
5050
}
5151
});

src/ResourceManager/AzureBackup/Commands.AzureBackup/Properties/Resources.resx

Lines changed: 65 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,12 @@ Please contact Microsoft for further assistant.</value>
148148
<value>Cmdlet called for ResourceGroupName: {0}, ResourceName: {1}, Location: {2}</value>
149149
</data>
150150
<data name="BackupScheduleDailyParamException" xml:space="preserve">
151-
<value>For daily backup schedule, protection policy cannot have DaysOfWeek param in backup schedule</value>
151+
<value>For a daily backup schedule, using the DaysOfWeek parameter is not allowed</value>
152+
<comment>Scrubbed</comment>
152153
</data>
153154
<data name="BackupScheduleWeeklyParamException" xml:space="preserve">
154-
<value>For weekly backup schedule, DaysOfWeek in backup schedule is mandatory and cannot be empty</value>
155+
<value>For a weekly backup schedule, using the DaysOfWeek parameter is mandatory</value>
156+
<comment>Scrubbed</comment>
155157
</data>
156158
<data name="BackupVaultResNameNullOrEmpty" xml:space="preserve">
157159
<value>AzureBackupVault.Name</value>
@@ -190,22 +192,26 @@ Please contact Microsoft for further assistant.</value>
190192
<value>Creating backup vault with ResourceGroupName: {0}, ResourceName: {1}</value>
191193
</data>
192194
<data name="DailyRetentionPolicyException" xml:space="preserve">
193-
<value>Only one AzureBackupDailyRetentionPolicy in RetentionPolicies is allowed</value>
195+
<value>Only one daily retention policy is allowed for a Protection Policy</value>
196+
<comment>Scrubbed</comment>
194197
</data>
195198
<data name="DailyRetentionPolicyValueException" xml:space="preserve">
196-
<value>For AzureBackupDailyRetentionPolicy , valid values of retention are {0} to {1}</value>
199+
<value>The daily retention value should be between {0} and {1}</value>
200+
<comment>Scrubbed</comment>
197201
</data>
198202
<data name="DailyScheduleException" xml:space="preserve">
199-
<value>For Daily Schedule, AzureBackupDailyRetentionPolicy in RetentionPolicies param is mandatory</value>
203+
<value>For a daily backup schedule, setting a daily retention policy is mandatory</value>
204+
<comment>Scrubbed</comment>
200205
</data>
201206
<data name="DaysOfMonthsNotAllowedinMonthlyYearlyFormat" xml:space="preserve">
202-
<value>Days of the month in Monthly/Yearly retention is not allowed for weekly backup Schedules</value>
207+
<value>Using the DaysOfMonth parameter in retention policies is not allowed when weekly backup schedules are used</value>
208+
<comment>Scrubbed</comment>
203209
</data>
204210
<data name="DaysofTheWeekInWeeklyRetentionException" xml:space="preserve">
205-
<value>DaysofTheWeek list in Weekly retention schedule must be same of backup schedule DaysOfTheWeek</value>
211+
<value>The DaysOfWeek specified in a weekly retention schedule should be same as of DaysOfWeek value specified in the backup schedule</value>
206212
</data>
207213
<data name="DaysOfTheWeekOfRetentionScheduleException" xml:space="preserve">
208-
<value>DaysOfTheWeek of retention schedule must be same of backup schedule DaysOfTheWeek</value>
214+
<value>The DaysOfWeek specified in a weekly retention schedule should be same as of DaysOfWeek value specified in the backup schedule</value>
209215
</data>
210216
<data name="DesiredContainerNotFound" xml:space="preserve">
211217
<value>Desired Container is not found. Returning with isDiscoveryNeed = true</value>
@@ -256,28 +262,36 @@ Please contact Microsoft for further assistant.</value>
256262
<value>Making client call</value>
257263
</data>
258264
<data name="MonthlyRetentionPolicyDaysOfMonthParamException" xml:space="preserve">
259-
<value>For AzureBackupMonthlyRetentionPolicy and RetentionFormat in Days, DaysOfMonth param is mandatory and can not be empty</value>
265+
<value>For a monthly retention policy specified in days, using the DaysOfMonth parameter is mandatory</value>
266+
<comment>Scrubbed</comment>
260267
</data>
261268
<data name="MonthlyRetentionPolicyDaysOfMonthsException" xml:space="preserve">
262-
<value>For AzureBackupMonthlyRetentionPolicy and RetentionFormat in Weeks, DaysOfMonth param is not allowed.</value>
269+
<value>For a monthly retention policy specified in weeks, using the DaysOfMonth parameter is not allowed</value>
270+
<comment>Scrubbed</comment>
263271
</data>
264272
<data name="MonthlyRetentionPolicyDaysOfWeekException" xml:space="preserve">
265-
<value>For AzureBackupMonthlyRetentionPolicy and RetentionFormat in Weeks, DaysOfWeek param is mandatory and can not be empty</value>
273+
<value>For a monthly retention policy specified in weeks, using the DaysOfWeek parameter is mandatory</value>
274+
<comment>Scrubbed</comment>
266275
</data>
267276
<data name="MonthlyRetentionPolicyDaysOfWeekParamException" xml:space="preserve">
268-
<value>For AzureBackupMonthlyRetentionPolicy and RetentionFormat in Days, DaysOfWeek or WeekNumber params are not allowed</value>
277+
<value>For a monthly retention policy specified in days, using the DaysOfWeek and WeekNumber parameters is not allowed</value>
278+
<comment>Scrubbed</comment>
269279
</data>
270280
<data name="MonthlyRetentionPolicyException" xml:space="preserve">
271-
<value>Only one AzureBackupMonthlyRetentionPolicy in RetentionPolicies is allowed</value>
281+
<value>Only one monthly retention policy is allowed for a Protection Policy</value>
282+
<comment>Scrubbed</comment>
272283
</data>
273284
<data name="MonthlyRetentionPolicyValueException" xml:space="preserve">
274-
<value>For AzureBackupMonthlyRetentionPolicy , valid values of retention are {0} to {1}</value>
285+
<value>The monthly retention value should be between {0} and {1}</value>
286+
<comment>Scrubbed</comment>
275287
</data>
276288
<data name="MonthlyRetentionPolicyWeekNumException" xml:space="preserve">
277-
<value>For AzureBackupMonthlyRetentionPolicy and RetentionFormat in Weeks, WeekNumber param is mandatory and can not be empty</value>
289+
<value>For a monthly retention policy specified in weeks, using the WeekNumber parameter is mandatory</value>
290+
<comment>Scrubbed</comment>
278291
</data>
279292
<data name="MonthlyYearlyRetentionArgumentException" xml:space="preserve">
280-
<value>Days of the week list in Monthly/Yearly retention schedule should be subset of Day of week list in Backup Schedule</value>
293+
<value>The DaysOfWeek specified for monthly and yearly retention policies should be a subset of the DaysOfWeek value specified in the backup schedule</value>
294+
<comment>Scrubbed</comment>
281295
</data>
282296
<data name="NoRpExist" xml:space="preserve">
283297
<value>No recovery point exist with Id := {0}</value>
@@ -295,13 +309,16 @@ Please contact Microsoft for further assistant.</value>
295309
<value>OperationStatus : {0}</value>
296310
</data>
297311
<data name="PolicyAlreadyExist" xml:space="preserve">
298-
<value>A protection policy with the specified name already exists.</value>
312+
<value>A protection policy with the specified name already exists</value>
313+
<comment>Scrubbed</comment>
299314
</data>
300315
<data name="PolicyArgumentException" xml:space="preserve">
301-
<value>For DaysOfWeek, weekly switch param is required</value>
316+
<value>The DaysOfWeek parameter should be used in conjunction with the –Weekly switch parameter</value>
317+
<comment>Scrubbed</comment>
302318
</data>
303319
<data name="PolicyNotFound" xml:space="preserve">
304320
<value>Protection Policy {0} not found</value>
321+
<comment>Scrubbed</comment>
305322
</data>
306323
<data name="PolicyParameterSet" xml:space="preserve">
307324
<value>ParameterSetName = {0}</value>
@@ -320,9 +337,11 @@ Please contact Microsoft for further assistant.</value>
320337
</data>
321338
<data name="ProtectionPolicyNameException" xml:space="preserve">
322339
<value>The protection policy name should contain alphanumeric characters and cannot start with a number</value>
340+
<comment>Scrubbed</comment>
323341
</data>
324342
<data name="ProtectionPolicyNameLengthException" xml:space="preserve">
325343
<value>The protection policy name must contain between 3 and 150 characters</value>
344+
<comment>Scrubbed</comment>
326345
</data>
327346
<data name="PSArgumentException" xml:space="preserve">
328347
<value>Please make sure you have pass right set of parameters</value>
@@ -419,45 +438,59 @@ Please contact Microsoft for further assistant.</value>
419438
<value>Received WebException, Response: {0}, Status: {1}</value>
420439
</data>
421440
<data name="WeeklyRetentionPolicyDaysOfWeekException" xml:space="preserve">
422-
<value>For AzureBackupWeeklyRetentionPolicy , DaysOfWeek param is mandatory and can not be empty</value>
441+
<value>For a weekly retention policy, using the DaysOfWeek parameter is mandatory</value>
442+
<comment>Scrubbed</comment>
423443
</data>
424444
<data name="WeeklyRetentionPolicyException" xml:space="preserve">
425-
<value>Only one AzureBackupWeeklyRetentionPolicy in RetentionPolicies is allowed</value>
445+
<value>Only one weekly retention policy is allowed for a Protection Policy</value>
446+
<comment>Scrubbed</comment>
426447
</data>
427448
<data name="WeeklyRetentionPolicyValueException" xml:space="preserve">
428-
<value>For AzureBackupWeeklyRetentionPolicy , valid values of retention are {0} to {1}</value>
449+
<value>The weekly retention value should be between {0} and {1}</value>
450+
<comment>Scrubbed</comment>
429451
</data>
430452
<data name="WeeklyScheduleException" xml:space="preserve">
431-
<value>For Weekly Schedule, AzureBackupWeeklyRetentionPolicy in RetentionPolicies param is mandatory</value>
453+
<value>For a weekly backup schedule, setting a weekly retention policy is mandatory</value>
454+
<comment>Scrubbed</comment>
432455
</data>
433456
<data name="WeeklyScheduleRunDaysException" xml:space="preserve">
434-
<value>For weekly scheduletype , ScheduleRunDays param is mandatory and can not be empty.</value>
457+
<value>For a weekly backup schedule, using the DaysOfWeek parameter is mandatory</value>
458+
<comment>Scrubbed</comment>
435459
</data>
436460
<data name="WeeklyScheduleWithDailyException" xml:space="preserve">
437-
<value>For Weekly Schedule, AzureBackupDailyRetentionPolicy in RetentionPolicies param is not allowed</value>
461+
<value>For a weekly backup schedule, setting a daily retention policy is not allowed</value>
462+
<comment>Scrubbed</comment>
438463
</data>
439464
<data name="YearlyRetentionPolicyDaysOfMonthInWeekFormatException" xml:space="preserve">
440-
<value>For AzureBackupYearlyRetentionPolicy and RetentionFormat in Weeks, DaysOfMonth param is not allowed</value>
465+
<value>For a yearly retention policy specified in days, using the MonthsOfYear and DaysOfMonth parameters is not allowed</value>
466+
<comment>Scrubbed</comment>
441467
</data>
442468
<data name="YearlyRetentionPolicyDaysOfMonthParamException" xml:space="preserve">
443-
<value>For AzureBackupYearlyRetentionPolicy and RetentionFormat in Days, DaysOfMonth param is mandatory and can not be empty</value>
469+
<value>For a yearly retention policy specified in days, using the MonthsOfYear and DaysOfMonth parameters is mandatory</value>
470+
<comment>Scrubbed</comment>
444471
</data>
445472
<data name="YearlyRetentionPolicyDaysOfWeekInWeeksFormatParamException" xml:space="preserve">
446-
<value>For AzureBackupYearlyRetentionPolicy and RetentionFormat in Weeks, DaysOfWeek param is mandatory and can not be empty</value>
473+
<value>For a yearly retention policy specified in weeks, using the DaysOfWeek and WeekNumber parameters is mandatory</value>
474+
<comment>Scrubbed</comment>
447475
</data>
448476
<data name="YearlyRetentionPolicyDaysOfWeekParamException" xml:space="preserve">
449-
<value>For AzureBackupYearlyRetentionPolicy and RetentionFormat in Days, DaysOfWeek or WeekNumber params are not allowed</value>
477+
<value>For a yearly retention policy specified in days, using the DaysOfWeek and WeekNumber parameters is not allowed</value>
478+
<comment>Scrubbed</comment>
450479
</data>
451480
<data name="YearlyRetentionPolicyException" xml:space="preserve">
452-
<value>Only one AzureBackupYearlyRetentionPolicy in RetentionPolicies is allowed</value>
481+
<value>Only one yearly retention policy is allowed for a Protection Policy</value>
482+
<comment>Scrubbed</comment>
453483
</data>
454484
<data name="YearlyRetentionPolicyMonthOfYearParamException" xml:space="preserve">
455-
<value>For AzureBackupYearlyRetentionPolicy and RetentionFormat in days, MonthsOfYear param is mandatory and can not be empty</value>
485+
<value>For a yearly retention policy specified in days, using the MonthsOfYear and DaysOfMonth parameters is mandatory</value>
486+
<comment>Scrubbed</comment>
456487
</data>
457488
<data name="YearlyRetentionPolicyValueException" xml:space="preserve">
458-
<value>For AzureBackupYearlyRetentionPolicy , valid values of retention are {0} to {1}</value>
489+
<value>Yearly retention value should be between {0} and {1}</value>
490+
<comment>Scrubbed</comment>
459491
</data>
460492
<data name="YearlyRetentionPolicyWeekNumParamException" xml:space="preserve">
461-
<value>For AzureBackupYearlyRetentionPolicy and RetentionFormat in Weeks, WeekNumber param is mandatory and can not be empty</value>
493+
<value>For a yearly retention policy specified in weeks, using the DaysOfWeek and WeekNumber parameters is mandatory</value>
494+
<comment>Scrubbed</comment>
462495
</data>
463496
</root>

0 commit comments

Comments
 (0)