File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed
RecoveryServices.Backup.Models/CommonModels Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -282,7 +282,7 @@ public class WeeklyRetentionSchedule : RetentionScheduleBase
282
282
283
283
public override void Validate ( )
284
284
{
285
- int MinDurationCountInWeeks = 1 , MaxDurationCountInWeeks = PolicyConstants . MaxAllowedRetentionDurationCount ;
285
+ int MinDurationCountInWeeks = 1 , MaxDurationCountInWeeks = PolicyConstants . MaxAllowedRetentionDurationCountWeekly ;
286
286
if ( BackupManagementType == Management . RecoveryServices . Backup . Models . BackupManagementType . AzureStorage )
287
287
{
288
288
MinDurationCountInWeeks = PolicyConstants . AfsWeeklyRetentionMin ;
@@ -342,7 +342,7 @@ public override void Validate()
342
342
{
343
343
base . Validate ( ) ;
344
344
345
- int MinDurationCountInMonths = 1 , MaxDurationCountInMonths = PolicyConstants . MaxAllowedRetentionDurationCount ;
345
+ int MinDurationCountInMonths = 1 , MaxDurationCountInMonths = PolicyConstants . MaxAllowedRetentionDurationCountMonthly ;
346
346
if ( BackupManagementType == Management . RecoveryServices . Backup . Models . BackupManagementType . AzureStorage )
347
347
{
348
348
MinDurationCountInMonths = PolicyConstants . AfsMonthlyRetentionMin ;
@@ -426,7 +426,7 @@ public override void Validate()
426
426
{
427
427
base . Validate ( ) ;
428
428
429
- int MinDurationCountInYears = 1 , MaxDurationCountInYears = 10 ;
429
+ int MinDurationCountInYears = 1 , MaxDurationCountInYears = PolicyConstants . MaxAllowedRetentionDurationCountYearly ;
430
430
if ( BackupManagementType == Management . RecoveryServices . Backup . Models . BackupManagementType . AzureStorage )
431
431
{
432
432
MinDurationCountInYears = PolicyConstants . AfsYearlyRetentionMin ;
Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ public class PolicyConstants
29
29
/// Maximum allowed duration length of retention.
30
30
/// </summary>
31
31
public const int MaxAllowedRetentionDurationCount = 9999 ;
32
+ public const int MaxAllowedRetentionDurationCountWeekly = 5163 ;
33
+ public const int MaxAllowedRetentionDurationCountMonthly = 1188 ;
34
+ public const int MaxAllowedRetentionDurationCountYearly = 99 ;
35
+
32
36
public const int AfsDailyRetentionDaysMax = 200 ;
33
37
public const int AfsDailyRetentionDaysMin = 1 ;
34
38
public const int AfsWeeklyRetentionMax = 200 ;
@@ -56,9 +60,10 @@ public class PolicyConstants
56
60
public const int NumOfMonthsInYear = 12 ;
57
61
58
62
// SQL constants
59
- public const int MaxAllowedRetentionDurationCountWeeklySql = 520 ;
60
- public const int MaxAllowedRetentionDurationCountMonthlySql = 120 ;
61
- public const int MaxAllowedRetentionDurationCountYearlySql = 10 ;
63
+ public const int MaxAllowedRetentionDurationCountWeeklySql = 5163 ;
64
+ public const int MaxAllowedRetentionDurationCountMonthlySql = 1188 ;
65
+ public const int MaxAllowedRetentionDurationCountYearlySql = 99 ;
66
+
62
67
}
63
68
64
69
/// <summary>
Original file line number Diff line number Diff line change 18
18
- Additional information about change #1
19
19
-->
20
20
## Upcoming Release
21
+ * modified policy validation limits as per backup service.
21
22
* Added Zone Redundancy for Recovery Service Vaults.
22
23
23
24
## Version 3.3.0
You can’t perform that action at this time.
0 commit comments