Skip to content

Commit 3075382

Browse files
author
Samuel Anudeep
committed
Moved VaultLocation to Restore cmdlet only.
1 parent 871efa6 commit 3075382

25 files changed

+118
-144
lines changed

src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup/Cmdlets/Restore/RestoreAzureRMRecoveryServicesBackupItem.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
using Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models;
2020
using Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.ProviderModel;
2121
using Microsoft.Azure.Commands.RecoveryServices.Backup.Properties;
22+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
2223
using Microsoft.Azure.Management.Internal.Resources;
2324
using Microsoft.Azure.Management.Internal.Resources.Models;
2425
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
@@ -32,6 +33,15 @@ namespace Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets
3233
OutputType(typeof(JobBase))]
3334
public class RestoreAzureRmRecoveryServicesBackupItem : RSBackupVaultCmdletBase
3435
{
36+
/// <summary>
37+
/// Location of the Recovery Services Vault.
38+
/// </summary>
39+
[Parameter(Mandatory = false, HelpMessage = "Location of the Recovery Services Vault.",
40+
ValueFromPipeline = true)]
41+
[LocationCompleter("Microsoft.RecoveryServices/vaults")]
42+
[ValidateNotNullOrEmpty]
43+
public string VaultLocation { get; set; }
44+
3545
/// <summary>
3646
/// Recovery point of the item to be restored
3747
/// </summary>

src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup/RSBackupVaultCmdletBase.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,6 @@ public abstract class RSBackupVaultCmdletBase : RecoveryServicesBackupCmdletBase
2020
[ValidateNotNullOrEmpty]
2121
public string VaultId { get; set; }
2222

23-
/// <summary>
24-
/// Location of the Recovery Services Vault.
25-
/// </summary>
26-
[Parameter(Mandatory = false, HelpMessage = "Location of the Recovery Services Vault.",
27-
ValueFromPipeline = true)]
28-
[LocationCompleter("Microsoft.RecoveryServices/vaults")]
29-
[ValidateNotNullOrEmpty]
30-
public string VaultLocation { get; set; }
31-
3223
/// <summary>
3324
/// Get the job PS model after fetching the job object from the service given the job ID.
3425
/// </summary>

src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup/help/AzureRM.RecoveryServices.Backup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
Module Name: AzureRM.RecoveryServices.Backup
33
Module Guid: 3d444bee-6742-4ce2-b573-dfd1b7c4144c
44
Download Help Link: https://docs.microsoft.com/en-us/powershell/module/azurerm.recoveryservices.backup

src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup/help/Backup-AzureRmRecoveryServicesBackupItem.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Starts a backup for a Backup item.
1414
## SYNTAX
1515

1616
```
17-
Backup-AzureRmRecoveryServicesBackupItem -Item <ItemBase> [-ExpiryDateTimeUTC <DateTime>] [-Vault <ARSVault>]
17+
Backup-AzureRmRecoveryServicesBackupItem -Item <ItemBase> [-ExpiryDateTimeUTC <DateTime>] [-VaultId <String>]
1818
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
1919
```
2020

@@ -89,11 +89,9 @@ Accept pipeline input: True (ByValue)
8989
Accept wildcard characters: False
9090
```
9191
92-
### -Vault
93-
The Recovery Services Vault.
94-
95-
```yaml
96-
Type: ARSVault
92+
### -VaultId
93+
ARM ID of the Recovery Services Vault.```yaml
94+
Type: String
9795
Parameter Sets: (All)
9896
Aliases:
9997

src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup/help/Disable-AzureRmRecoveryServicesBackupProtection.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Disables protection for a Backup-protected item.
1515

1616
```
1717
Disable-AzureRmRecoveryServicesBackupProtection [-Item] <ItemBase> [-RemoveRecoveryPoints] [-Force]
18-
[-Vault <ARSVault>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
18+
[-VaultId <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
1919
```
2020

2121
## DESCRIPTION
@@ -104,11 +104,9 @@ Accept pipeline input: False
104104
Accept wildcard characters: False
105105
```
106106
107-
### -Vault
108-
The Recovery Services Vault.
109-
110-
```yaml
111-
Type: ARSVault
107+
### -VaultId
108+
ARM ID of the Recovery Services Vault.```yaml
109+
Type: String
112110
Parameter Sets: (All)
113111
Aliases:
114112

src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup/help/Disable-AzureRmRecoveryServicesBackupRPMountScript.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Dismounts all the files of the recovery point.
1414

1515
```
1616
Disable-AzureRmRecoveryServicesBackupRPMountScript [-RecoveryPoint] <RecoveryPointBase> [-PassThru]
17-
[-Vault <ARSVault>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
17+
[-VaultId <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
1818
```
1919

2020
## DESCRIPTION
@@ -92,11 +92,9 @@ Accept pipeline input: True (ByValue)
9292
Accept wildcard characters: False
9393
```
9494
95-
### -Vault
96-
The Recovery Services Vault.
97-
98-
```yaml
99-
Type: ARSVault
95+
### -VaultId
96+
ARM ID of the Recovery Services Vault.```yaml
97+
Type: String
10098
Parameter Sets: (All)
10199
Aliases:
102100

src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup/help/Enable-AzureRmRecoveryServicesBackupProtection.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ Enables backup for an item with a specified Backup protection policy.
1616
### AzureVMComputeEnableProtection (Default)
1717
```
1818
Enable-AzureRmRecoveryServicesBackupProtection [-Policy] <PolicyBase> [-Name] <String>
19-
[-ResourceGroupName] <String> [-Vault <ARSVault>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
19+
[-ResourceGroupName] <String> [-VaultId <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
2020
[-Confirm] [<CommonParameters>]
2121
```
2222

2323
### AzureVMClassicComputeEnableProtection
2424
```
2525
Enable-AzureRmRecoveryServicesBackupProtection [-Policy] <PolicyBase> [-Name] <String> [-ServiceName] <String>
26-
[-Vault <ARSVault>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
26+
[-VaultId <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
2727
```
2828

2929
### ModifyProtection
3030
```
31-
Enable-AzureRmRecoveryServicesBackupProtection [-Policy] <PolicyBase> [-Item] <ItemBase> [-Vault <ARSVault>]
31+
Enable-AzureRmRecoveryServicesBackupProtection [-Policy] <PolicyBase> [-Item] <ItemBase> [-VaultId <String>]
3232
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
3333
```
3434

@@ -148,11 +148,9 @@ Accept pipeline input: True (ByPropertyName)
148148
Accept wildcard characters: False
149149
```
150150
151-
### -Vault
152-
The Recovery Services Vault.
153-
154-
```yaml
155-
Type: ARSVault
151+
### -VaultId
152+
ARM ID of the Recovery Services Vault.```yaml
153+
Type: String
156154
Parameter Sets: (All)
157155
Aliases:
158156

src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup/help/Get-AzureRmRecoveryServicesBackupContainer.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Gets Backup containers.
1616
```
1717
Get-AzureRmRecoveryServicesBackupContainer [-ContainerType] <ContainerType> [[-BackupManagementType] <String>]
1818
[[-Name] <String>] [[-FriendlyName] <String>] [[-ResourceGroupName] <String>]
19-
[[-Status] <ContainerRegistrationStatus>] [-Vault <ARSVault>] [-DefaultProfile <IAzureContextContainer>]
19+
[[-Status] <ContainerRegistrationStatus>] [-VaultId <String>] [-DefaultProfile <IAzureContextContainer>]
2020
[<CommonParameters>]
2121
```
2222

@@ -169,11 +169,9 @@ Accept pipeline input: False
169169
Accept wildcard characters: False
170170
```
171171
172-
### -Vault
173-
The Recovery Services Vault.
174-
175-
```yaml
176-
Type: ARSVault
172+
### -VaultId
173+
ARM ID of the Recovery Services Vault.```yaml
174+
Type: String
177175
Parameter Sets: (All)
178176
Aliases:
179177

src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup/help/Get-AzureRmRecoveryServicesBackupItem.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ Gets the items from a container in Backup.
1717
```
1818
Get-AzureRmRecoveryServicesBackupItem [-Container] <ContainerBase> [[-Name] <String>]
1919
[[-ProtectionStatus] <ItemProtectionStatus>] [[-ProtectionState] <ItemProtectionState>]
20-
[-WorkloadType] <WorkloadType> [-Vault <ARSVault>] [-DefaultProfile <IAzureContextContainer>]
20+
[-WorkloadType] <WorkloadType> [-VaultId <String>] [-DefaultProfile <IAzureContextContainer>]
2121
[<CommonParameters>]
2222
```
2323

2424
### GetItemsForVault
2525
```
2626
Get-AzureRmRecoveryServicesBackupItem [-BackupManagementType] <BackupManagementType> [[-Name] <String>]
2727
[[-ProtectionStatus] <ItemProtectionStatus>] [[-ProtectionState] <ItemProtectionState>]
28-
[-WorkloadType] <WorkloadType> [-Vault <ARSVault>] [-DefaultProfile <IAzureContextContainer>]
28+
[-WorkloadType] <WorkloadType> [-VaultId <String>] [-DefaultProfile <IAzureContextContainer>]
2929
[<CommonParameters>]
3030
```
3131

@@ -166,11 +166,9 @@ Accept pipeline input: False
166166
Accept wildcard characters: False
167167
```
168168
169-
### -Vault
170-
The Recovery Services Vault.
171-
172-
```yaml
173-
Type: ARSVault
169+
### -VaultId
170+
ARM ID of the Recovery Services Vault.```yaml
171+
Type: String
174172
Parameter Sets: (All)
175173
Aliases:
176174

src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup/help/Get-AzureRmRecoveryServicesBackupJob.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Gets Backup jobs.
1616
```
1717
Get-AzureRmRecoveryServicesBackupJob [[-Status] <JobStatus>] [[-Operation] <JobOperation>] [[-From] <DateTime>]
1818
[[-To] <DateTime>] [[-JobId] <String>] [[-Job] <JobBase>] [-BackupManagementType <BackupManagementType>]
19-
[-Vault <ARSVault>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
19+
[-VaultId <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
2020
```
2121

2222
## DESCRIPTION
@@ -220,11 +220,9 @@ Accept pipeline input: False
220220
Accept wildcard characters: False
221221
```
222222

223-
### -Vault
224-
The Recovery Services Vault.
225-
226-
```yaml
227-
Type: ARSVault
223+
### -VaultId
224+
ARM ID of the Recovery Services Vault.```yaml
225+
Type: String
228226
Parameter Sets: (All)
229227
Aliases:
230228

src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup/help/Get-AzureRmRecoveryServicesBackupJobDetails.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ Gets details for a Backup job.
1515

1616
### JobFilterSet (Default)
1717
```
18-
Get-AzureRmRecoveryServicesBackupJobDetails [-Job] <JobBase> [-Vault <ARSVault>]
18+
Get-AzureRmRecoveryServicesBackupJobDetails [-Job] <JobBase> [-VaultId <String>]
1919
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
2020
```
2121

2222
### IdFilterSet
2323
```
24-
Get-AzureRmRecoveryServicesBackupJobDetails [-JobId] <String> [-Vault <ARSVault>]
24+
Get-AzureRmRecoveryServicesBackupJobDetails [-JobId] <String> [-VaultId <String>]
2525
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
2626
```
2727

@@ -94,11 +94,9 @@ Accept pipeline input: False
9494
Accept wildcard characters: False
9595
```
9696
97-
### -Vault
98-
The Recovery Services Vault.
99-
100-
```yaml
101-
Type: ARSVault
97+
### -VaultId
98+
ARM ID of the Recovery Services Vault.```yaml
99+
Type: String
102100
Parameter Sets: (All)
103101
Aliases:
104102

src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup/help/Get-AzureRmRecoveryServicesBackupManagementServer.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Gets SCDPM and Azure Backup management servers.
1414
## SYNTAX
1515

1616
```
17-
Get-AzureRmRecoveryServicesBackupManagementServer [[-Name] <String>] [-Vault <ARSVault>]
17+
Get-AzureRmRecoveryServicesBackupManagementServer [[-Name] <String>] [-VaultId <String>]
1818
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
1919
```
2020

@@ -67,11 +67,9 @@ Accept pipeline input: False
6767
Accept wildcard characters: False
6868
```
6969
70-
### -Vault
71-
The Recovery Services Vault.
72-
73-
```yaml
74-
Type: ARSVault
70+
### -VaultId
71+
ARM ID of the Recovery Services Vault.```yaml
72+
Type: String
7573
Parameter Sets: (All)
7674
Aliases:
7775

src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup/help/Get-AzureRmRecoveryServicesBackupProtectionPolicy.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,26 @@ Gets Backup protection policies for a vault.
1515

1616
### NoParamSet (Default)
1717
```
18-
Get-AzureRmRecoveryServicesBackupProtectionPolicy [-Vault <ARSVault>]
18+
Get-AzureRmRecoveryServicesBackupProtectionPolicy [-VaultId <String>]
1919
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
2020
```
2121

2222
### PolicyNameParamSet
2323
```
24-
Get-AzureRmRecoveryServicesBackupProtectionPolicy [-Name] <String> [-Vault <ARSVault>]
24+
Get-AzureRmRecoveryServicesBackupProtectionPolicy [-Name] <String> [-VaultId <String>]
2525
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
2626
```
2727

2828
### WorkloadParamSet
2929
```
30-
Get-AzureRmRecoveryServicesBackupProtectionPolicy [-WorkloadType] <WorkloadType> [-Vault <ARSVault>]
30+
Get-AzureRmRecoveryServicesBackupProtectionPolicy [-WorkloadType] <WorkloadType> [-VaultId <String>]
3131
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
3232
```
3333

3434
### WorkloadBackupManagementTypeParamSet
3535
```
3636
Get-AzureRmRecoveryServicesBackupProtectionPolicy [-WorkloadType] <WorkloadType>
37-
[-BackupManagementType] <BackupManagementType> [-Vault <ARSVault>] [-DefaultProfile <IAzureContextContainer>]
37+
[-BackupManagementType] <BackupManagementType> [-VaultId <String>] [-DefaultProfile <IAzureContextContainer>]
3838
[<CommonParameters>]
3939
```
4040

@@ -113,11 +113,9 @@ Accept pipeline input: False
113113
Accept wildcard characters: False
114114
```
115115
116-
### -Vault
117-
The Recovery Services Vault.
118-
119-
```yaml
120-
Type: ARSVault
116+
### -VaultId
117+
ARM ID of the Recovery Services Vault.```yaml
118+
Type: String
121119
Parameter Sets: (All)
122120
Aliases:
123121

src/ResourceManager/RecoveryServices/Commands.RecoveryServices.Backup/help/Get-AzureRmRecoveryServicesBackupRPMountScript.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Downloads a script to mount all the files of the recovery point.
1414

1515
```
1616
Get-AzureRmRecoveryServicesBackupRPMountScript [-RecoveryPoint] <RecoveryPointBase> [[-Path] <String>]
17-
[-Vault <ARSVault>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
17+
[-VaultId <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
1818
```
1919

2020
## DESCRIPTION
@@ -88,11 +88,9 @@ Accept pipeline input: True (ByValue)
8888
Accept wildcard characters: False
8989
```
9090
91-
### -Vault
92-
The Recovery Services Vault.
93-
94-
```yaml
95-
Type: ARSVault
91+
### -VaultId
92+
ARM ID of the Recovery Services Vault.```yaml
93+
Type: String
9694
Parameter Sets: (All)
9795
Aliases:
9896

0 commit comments

Comments
 (0)