Skip to content

Commit 477a972

Browse files
author
Sambit Rath
committed
updated paramsets and added help file
1 parent 6574265 commit 477a972

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

src/RecoveryServices/RecoveryServices.Backup/Cmdlets/ProtectionPolicy/SetAzureRmRecoveryServicesBackupProtectionPolicy.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ public class SetAzureRmRecoveryServicesBackupProtectionPolicy : RSBackupVaultCmd
3838
/// Policy object to be modified
3939
/// </summary>
4040
[Parameter(Position = 1, Mandatory = true, HelpMessage = ParamHelpMsgs.Policy.ProtectionPolicy,
41-
ValueFromPipeline = true, ParameterSetName = ModifyPolicyParamSet)]
42-
[Parameter(Position = 1, Mandatory = true, HelpMessage = ParamHelpMsgs.Policy.ProtectionPolicy,
43-
ValueFromPipeline = true, ParameterSetName = FixInconsistentPolicyParamSet)]
41+
ValueFromPipeline = true)]
4442
[ValidateNotNullOrEmpty]
4543
public PolicyBase Policy { get; set; }
4644

@@ -63,9 +61,8 @@ public class SetAzureRmRecoveryServicesBackupProtectionPolicy : RSBackupVaultCmd
6361
/// <summary>
6462
/// Retry Policy Update for Failed Items
6563
/// </summary>
66-
[Parameter(Mandatory = false, HelpMessage = ParamHelpMsgs.Policy.FixForInConsistentItems,
64+
[Parameter(Mandatory = true, HelpMessage = ParamHelpMsgs.Policy.FixForInConsistentItems,
6765
ParameterSetName = FixInconsistentPolicyParamSet)]
68-
[ValidateNotNullOrEmpty]
6966
public SwitchParameter FixForInconsistentItems { get; set; }
7067

7168
public override void ExecuteCmdlet()

src/RecoveryServices/RecoveryServices/help/Set-AzRecoveryServicesBackupProtectionPolicy.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,19 @@ Modifies a Backup protection policy.
1313

1414
## SYNTAX
1515

16+
### ModifyPolicyParamSet
1617
```
1718
Set-AzRecoveryServicesBackupProtectionPolicy [-Policy] <PolicyBase> [[-RetentionPolicy] <RetentionPolicyBase>]
1819
[[-SchedulePolicy] <SchedulePolicyBase>] [-VaultId <String>] [-DefaultProfile <IAzureContextContainer>]
1920
[-WhatIf] [-Confirm] [<CommonParameters>]
2021
```
2122

23+
### FixPolicyParamSet
24+
```
25+
Set-AzRecoveryServicesBackupProtectionPolicy [-Policy] <PolicyBase> [-FixForInconsistentItems]
26+
[-VaultId <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
27+
```
28+
2229
## DESCRIPTION
2330
The **Set-AzBackupProtectionPolicy** cmdlet modifies an existing Azure Backup protection policy.
2431
You can modify the Backup schedule and retention policy components.
@@ -65,6 +72,21 @@ Accept pipeline input: False
6572
Accept wildcard characters: False
6673
```
6774
75+
### -FixForInconsistentItems
76+
Switch Parameter indicating whether or not to retry Policy Update for failed items.
77+
78+
```yaml
79+
Type: System.Management.Automation.SwitchParameter
80+
Parameter Sets: FixPolicyParamSet
81+
Aliases:
82+
83+
Required: True
84+
Position: Named
85+
Default value: None
86+
Accept pipeline input: False
87+
Accept wildcard characters: False
88+
```
89+
6890
### -Policy
6991
Specifies the Backup protection policy that this cmdlet modifies.
7092
To obtain a **BackupProtectionPolicy** object, use the Get-AzRecoveryServicesBackupProtectionPolicy cmdlet.
@@ -87,7 +109,7 @@ To obtain a **RetentionPolicy** object, use the Get-AzRecoveryServicesBackupRete
87109
88110
```yaml
89111
Type: Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.RetentionPolicyBase
90-
Parameter Sets: (All)
112+
Parameter Sets: ModifyPolicyParamSet
91113
Aliases:
92114

93115
Required: False
@@ -103,7 +125,7 @@ To obtain a **SchedulePolicy** object, use the Get-AzRecoveryServicesBackupSched
103125
104126
```yaml
105127
Type: Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.SchedulePolicyBase
106-
Parameter Sets: (All)
128+
Parameter Sets: ModifyPolicyParamSet
107129
Aliases:
108130

109131
Required: False

0 commit comments

Comments
 (0)