Skip to content

Commit f7a21ce

Browse files
author
Sambit Rath
committed
Updated markdown help
1 parent 8112700 commit f7a21ce

File tree

4 files changed

+80
-9
lines changed

4 files changed

+80
-9
lines changed

src/RecoveryServices/RecoveryServices.Backup.Models/Properties/Resources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,4 +583,7 @@ Please contact Microsoft for further assistance.</value>
583583
<data name="FriendlyNamePassedWarning" xml:space="preserve">
584584
<value>A friendly name might return multiple items since it is not unique. To get a unique item, please use the -name parameter. Pass the value displayed under the name column when displayed as a table or use the name field in the PS object</value>
585585
</data>
586+
<data name="TargetContainerRequiredException" xml:space="preserve">
587+
<value>Target Container parameter is required for this operation.</value>
588+
</data>
586589
</root>

src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Restore/GetAzureRmRecoveryServicesBackupWorkloadRecoveryConfig.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,25 +85,25 @@ public class GetAzureRmRecoveryServicesBackupWorkloadRecoveryConfig : RSBackupVa
8585
/// <summary>
8686
/// Target Container to which files will be written
8787
/// </summary>
88-
[Parameter(Mandatory = false)]
88+
[Parameter(Mandatory = false, HelpMessage = ParamHelpMsgs.RecoveryPointConfig.TargetContainer)]
8989
public ContainerBase TargetContainer { get; set; }
9090

9191
/// <summary>
9292
/// Use this switch to restore db as files to a given target container
9393
/// </summary>
94-
[Parameter(Mandatory = false)]
94+
[Parameter(Mandatory = false, HelpMessage = ParamHelpMsgs.RecoveryPointConfig.RestoeAsFiles)]
9595
public SwitchParameter RestoreAsFiles { get; set; }
9696

9797
/// <summary>
9898
/// Specify Recovery point from which logs will be applies
9999
/// </summary>
100-
[Parameter(Mandatory = false)]
100+
[Parameter(Mandatory = false, HelpMessage = ParamHelpMsgs.RecoveryPointConfig.FromFull)]
101101
public RecoveryPointBase FromFull { get; set; }
102102

103103
/// <summary>
104104
/// Specify Recovery point from which logs will be applies
105105
/// </summary>
106-
[Parameter(Mandatory = false)]
106+
[Parameter(Mandatory = false, HelpMessage = ParamHelpMsgs.RecoveryPointConfig.FilePath)]
107107
public string FilePath { get; set; }
108108

109109
public override void ExecuteCmdlet()
@@ -255,7 +255,7 @@ public override void ExecuteCmdlet()
255255
{
256256
if(TargetContainer == null)
257257
{
258-
throw new ArgumentNullException("TargetContainer", "TargetContainer can't be null for Restoring as files operation.");
258+
throw new ArgumentNullException("TargetContainer", Resources.TargetContainerRequiredException);
259259
}
260260

261261
azureWorkloadRecoveryConfig.OverwriteWLIfpresent = "No";

src/RecoveryServices/RecoveryServices.Backup/ParamHelpMsgs.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15+
using System.Configuration.Internal;
16+
1517
namespace Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets
1618
{
1719
/// <summary>
@@ -163,6 +165,10 @@ internal static class RecoveryPointConfig
163165
public const string TargetItem = "Specifies the target on which the DB needs to be restored. For SQL restores, it needs to be of protectable item type SQLInstance only.";
164166
public const string OriginalWorkloadRestore = "Specifies that the backed up DB is to be overwritten with the DB information present in the recovery point.";
165167
public const string AlternateWorkloadRestore = "Specifies that the backed up DB should be restored as a new DB in another instance or as a new DB in the same instance";
168+
public const string TargetContainer = "Specifies the target machine on which DB Files need to be restored.";
169+
public const string RestoeAsFiles = "Specifies to restore Database as files in a machine.";
170+
public const string FilePath = "Specifies the filepath for restore operation.";
171+
public const string FromFull = "Specifies the Full RecoveryPoint to which Log backups will be applied.";
166172
}
167173
}
168174
}

src/RecoveryServices/RecoveryServices/help/Get-AzRecoveryServicesBackupWorkloadRecoveryConfig.md

Lines changed: 66 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,18 @@ This command constructs the recovery configuration of a backed up item such as S
1616
```
1717
Get-AzRecoveryServicesBackupWorkloadRecoveryConfig [[-RecoveryPoint] <RecoveryPointBase>]
1818
[[-TargetItem] <ProtectableItemBase>] [[-Item] <ItemBase>] [-OriginalWorkloadRestore]
19-
[-AlternateWorkloadRestore] [-VaultId <String>] [-DefaultProfile <IAzureContextContainer>]
20-
[<CommonParameters>]
19+
[-AlternateWorkloadRestore] [-TargetContainer <ContainerBase>] [-RestoreAsFiles]
20+
[-FromFull <RecoveryPointBase>] [-FilePath <String>] [-VaultId <String>]
21+
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
2122
```
2223

2324
### LogChainParameterSet
2425
```
2526
Get-AzRecoveryServicesBackupWorkloadRecoveryConfig [[-PointInTime] <DateTime>]
2627
[[-TargetItem] <ProtectableItemBase>] [[-Item] <ItemBase>] [-OriginalWorkloadRestore]
27-
[-AlternateWorkloadRestore] [-VaultId <String>] [-DefaultProfile <IAzureContextContainer>]
28-
[<CommonParameters>]
28+
[-AlternateWorkloadRestore] [-TargetContainer <ContainerBase>] [-RestoreAsFiles]
29+
[-FromFull <RecoveryPointBase>] [-FilePath <String>] [-VaultId <String>]
30+
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
2931
```
3032

3133
## DESCRIPTION
@@ -75,6 +77,36 @@ Accept pipeline input: False
7577
Accept wildcard characters: False
7678
```
7779
80+
### -FilePath
81+
Specifies the filepath for restore operation.
82+
83+
```yaml
84+
Type: System.String
85+
Parameter Sets: (All)
86+
Aliases:
87+
88+
Required: False
89+
Position: Named
90+
Default value: None
91+
Accept pipeline input: False
92+
Accept wildcard characters: False
93+
```
94+
95+
### -FromFull
96+
Specifies the Full RecoveryPoint to which Log backups will be applied.
97+
98+
```yaml
99+
Type: Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.RecoveryPointBase
100+
Parameter Sets: (All)
101+
Aliases:
102+
103+
Required: False
104+
Position: Named
105+
Default value: None
106+
Accept pipeline input: False
107+
Accept wildcard characters: False
108+
```
109+
78110
### -Item
79111
Specifies the backup item on which the restore operation is being performed.
80112
@@ -135,6 +167,36 @@ Accept pipeline input: True (ByValue)
135167
Accept wildcard characters: False
136168
```
137169
170+
### -RestoreAsFiles
171+
Specifies to restore Database as files in a machine.
172+
173+
```yaml
174+
Type: System.Management.Automation.SwitchParameter
175+
Parameter Sets: (All)
176+
Aliases:
177+
178+
Required: False
179+
Position: Named
180+
Default value: None
181+
Accept pipeline input: False
182+
Accept wildcard characters: False
183+
```
184+
185+
### -TargetContainer
186+
Specifies the target machine on which DB Files need to be restored.
187+
188+
```yaml
189+
Type: Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models.ContainerBase
190+
Parameter Sets: (All)
191+
Aliases:
192+
193+
Required: False
194+
Position: Named
195+
Default value: None
196+
Accept pipeline input: False
197+
Accept wildcard characters: False
198+
```
199+
138200
### -TargetItem
139201
Specifies the target on which the DB needs to be restored. For SQL restores, it needs to be of protectable item type SQLInstance only.
140202

0 commit comments

Comments
 (0)