Skip to content

Commit f111bf0

Browse files
Remove -TenantLevel parameter used for on the Get-AzResourceLock cmdlet (#11689)
* remove tenantId from Lock * change BreakingChangeIssue.csv Co-authored-by: Yeming Liu <[email protected]>
1 parent c884264 commit f111bf0

File tree

10 files changed

+21
-115
lines changed

10 files changed

+21
-115
lines changed

src/Resources/ResourceManager/Implementation/Lock/GetAzureResourceLockCmdlet.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ public class GetAzureResourceLockCmdlet : ResourceLockManagementCmdletBase
4242
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.ScopeLevelLock, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
4343
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.SubscriptionLevelLock, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
4444
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.SubscriptionResourceLevelLock, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
45-
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.TenantResourceLevelLock, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
4645
[ValidateNotNullOrEmpty]
4746
public string LockName { get; set; }
4847

src/Resources/ResourceManager/Implementation/Lock/NewAzureResourceLockCmdlet.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ public class NewAzureResourceLockCmdlet : ResourceLockManagementCmdletBase
3434
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.ScopeLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
3535
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.SubscriptionLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
3636
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.SubscriptionResourceLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
37-
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.TenantResourceLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
3837
[ValidateNotNullOrEmpty]
3938
public string LockName { get; set; }
4039

src/Resources/ResourceManager/Implementation/Lock/RemoveAzureResourceLockCmdlet.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public class RemoveAzureResourceLockCmdlet : ResourceLockManagementCmdletBase
3131
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.ScopeLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
3232
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.SubscriptionLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
3333
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.SubscriptionResourceLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
34-
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.TenantResourceLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
3534
[ValidateNotNullOrEmpty]
3635
public string LockName { get; set; }
3736

src/Resources/ResourceManager/Implementation/Lock/ResourceLockManagementCmdletBase.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ public abstract class ResourceLockManagementCmdletBase : ResourceManagerCmdletBa
4848
/// </summary>
4949
internal const string SubscriptionResourceLevelLock = "BySubscriptionLevel";
5050

51-
/// <summary>
52-
/// The tenant level resource lock patameter set.
53-
/// </summary>
54-
internal const string TenantResourceLevelLock = "ByTenantLevel";
55-
5651
/// <summary>
5752
/// The resource group lock parametere set.
5853
/// </summary>
@@ -75,7 +70,6 @@ public abstract class ResourceLockManagementCmdletBase : ResourceManagerCmdletBa
7570
/// </summary>
7671
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.ResourceGroupResourceLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource name. e.g. to specify a database MyServer/MyDatabase.")]
7772
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.SubscriptionResourceLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource name. e.g. to specify a database MyServer/MyDatabase.")]
78-
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.TenantResourceLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource name. e.g. to specify a database MyServer/MyDatabase.")]
7973
[ValidateNotNullOrEmpty]
8074
public string ResourceName { get; set; }
8175

@@ -84,7 +78,6 @@ public abstract class ResourceLockManagementCmdletBase : ResourceManagerCmdletBa
8478
/// </summary>
8579
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.ResourceGroupResourceLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource type. e.g. Microsoft.Sql/Servers/Databases.")]
8680
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.SubscriptionResourceLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource type. e.g. Microsoft.Sql/Servers/Databases.")]
87-
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.TenantResourceLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource type. e.g. Microsoft.Sql/Servers/Databases.")]
8881
[ValidateNotNullOrEmpty]
8982
public string ResourceType { get; set; }
9083

@@ -97,12 +90,6 @@ public abstract class ResourceLockManagementCmdletBase : ResourceManagerCmdletBa
9790
[ValidateNotNullOrEmpty]
9891
public string ResourceGroupName { get; set; }
9992

100-
/// <summary>
101-
/// Gets or sets the tenant level parameter.
102-
/// </summary>
103-
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.TenantResourceLevelLock, Mandatory = true, HelpMessage = "Indicates that this is a tenant level operation.")]
104-
public SwitchParameter TenantLevel { get; set; }
105-
10693
/// <summary>
10794
/// The Id of the lock.
10895
/// </summary>

src/Resources/Resources/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
## Upcoming Release
2121
* Add message warning about view delay when creating a new Role Definition
2222
* Change policy cmdlets to output strongly-typed objects
23+
* Removed `-TenantLevel` parameter used for on the `Get-AzResourceLock` cmdlet [#11335]
2324
* Fixed `Remove-AzResourceGroup -Id ResourceId`[#9882]
2425
* Added new cmdlet for getting ARM template What-If results at resource group scope: `Get-AzDeploymentResourceGroupWhatIfResult`
2526
* Added new cmdlet for getting ARM template What-If results at subscription scope: `Get-AzDeploymentWhatIfResult`

src/Resources/Resources/help/Get-AzResourceLock.md

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ Get-AzResourceLock [-LockName <String>] [-AtScope] -ResourceName <String> -Resou
4444
[-ApiVersion <String>] [-Pre] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
4545
```
4646

47-
### ByTenantLevel
48-
```
49-
Get-AzResourceLock [-LockName <String>] [-AtScope] -ResourceName <String> -ResourceType <String> [-TenantLevel]
50-
[-ApiVersion <String>] [-Pre] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
51-
```
52-
5347
### ByLockId
5448
```
5549
Get-AzResourceLock [-AtScope] -LockId <String> [-ApiVersion <String>] [-Pre]
@@ -144,7 +138,7 @@ Specifies the name of the lock that this cmdlet gets.
144138
145139
```yaml
146140
Type: System.String
147-
Parameter Sets: ByResourceGroup, ByResourceGroupLevel, BySpecifiedScope, BySubscription, BySubscriptionLevel, ByTenantLevel
141+
Parameter Sets: ByResourceGroup, ByResourceGroupLevel, BySpecifiedScope, BySubscription, BySubscriptionLevel
148142
Aliases: ExtensionResourceName, Name
149143

150144
Required: False
@@ -191,7 +185,7 @@ This cmdlet gets locks for this resource.
191185
192186
```yaml
193187
Type: System.String
194-
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel, ByTenantLevel
188+
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel
195189
Aliases:
196190

197191
Required: True
@@ -207,7 +201,7 @@ This cmdlet gets locks for this resource.
207201
208202
```yaml
209203
Type: System.String
210-
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel, ByTenantLevel
204+
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel
211205
Aliases:
212206

213207
Required: True
@@ -233,21 +227,6 @@ Accept pipeline input: True (ByPropertyName)
233227
Accept wildcard characters: False
234228
```
235229
236-
### -TenantLevel
237-
Indicates that this cmdlet operates at the tenant level.
238-
239-
```yaml
240-
Type: System.Management.Automation.SwitchParameter
241-
Parameter Sets: ByTenantLevel
242-
Aliases:
243-
244-
Required: True
245-
Position: Named
246-
Default value: None
247-
Accept pipeline input: False
248-
Accept wildcard characters: False
249-
```
250-
251230
### CommonParameters
252231
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
253232

src/Resources/Resources/help/New-AzResourceLock.md

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@ New-AzResourceLock -LockName <String> -LockLevel <LockLevel> [-LockNotes <String
4848
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
4949
```
5050

51-
### ByTenantLevel
52-
```
53-
New-AzResourceLock -LockName <String> -LockLevel <LockLevel> [-LockNotes <String>] [-Force]
54-
-ResourceName <String> -ResourceType <String> [-TenantLevel] [-ApiVersion <String>] [-Pre]
55-
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
56-
```
57-
5851
### ByLockId
5952
```
6053
New-AzResourceLock -LockLevel <LockLevel> [-LockNotes <String>] [-Force] -LockId <String>
@@ -159,7 +152,7 @@ Specifies the name of the lock.
159152
160153
```yaml
161154
Type: System.String
162-
Parameter Sets: BySpecifiedScope, ByResourceGroup, ByResourceGroupLevel, BySubscription, BySubscriptionLevel, ByTenantLevel
155+
Parameter Sets: BySpecifiedScope, ByResourceGroup, ByResourceGroupLevel, BySubscription, BySubscriptionLevel
163156
Aliases: ExtensionResourceName, Name
164157

165158
Required: True
@@ -221,7 +214,7 @@ For instance, to specify a database, use the following format:
221214

222215
```yaml
223216
Type: System.String
224-
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel, ByTenantLevel
217+
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel
225218
Aliases:
226219
227220
Required: True
@@ -236,7 +229,7 @@ Specifies the resource type of the resource for which the lock applies.
236229

237230
```yaml
238231
Type: System.String
239-
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel, ByTenantLevel
232+
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel
240233
Aliases:
241234
242235
Required: True
@@ -265,21 +258,6 @@ Accept pipeline input: True (ByPropertyName)
265258
Accept wildcard characters: False
266259
```
267260

268-
### -TenantLevel
269-
Indicates that this cmdlet operates at the tenant level.
270-
271-
```yaml
272-
Type: System.Management.Automation.SwitchParameter
273-
Parameter Sets: ByTenantLevel
274-
Aliases:
275-
276-
Required: True
277-
Position: Named
278-
Default value: None
279-
Accept pipeline input: False
280-
Accept wildcard characters: False
281-
```
282-
283261
### -Confirm
284262
Prompts you for confirmation before running the cmdlet.
285263

src/Resources/Resources/help/Remove-AzResourceLock.md

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,6 @@ Remove-AzResourceLock -LockName <String> [-Force] -ResourceName <String> -Resour
5151
[<CommonParameters>]
5252
```
5353

54-
### ByTenantLevel
55-
```
56-
Remove-AzResourceLock -LockName <String> [-Force] -ResourceName <String> -ResourceType <String> [-TenantLevel]
57-
[-ApiVersion <String>] [-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
58-
[<CommonParameters>]
59-
```
60-
6154
## DESCRIPTION
6255
The **Remove-AzResourceLock** cmdlet removes an Azure resource lock.
6356

@@ -138,7 +131,7 @@ Specifies the name of the lock that this cmdlet removes.
138131
139132
```yaml
140133
Type: System.String
141-
Parameter Sets: ByResourceGroup, ByResourceGroupLevel, BySpecifiedScope, BySubscription, BySubscriptionLevel, ByTenantLevel
134+
Parameter Sets: ByResourceGroup, ByResourceGroupLevel, BySpecifiedScope, BySubscription, BySubscriptionLevel
142135
Aliases: ExtensionResourceName, Name
143136

144137
Required: True
@@ -185,7 +178,7 @@ Server`/`Database
185178

186179
```yaml
187180
Type: System.String
188-
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel, ByTenantLevel
181+
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel
189182
Aliases:
190183
191184
Required: True
@@ -200,7 +193,7 @@ Specifies the resource type of the resource for which the lock applies.
200193

201194
```yaml
202195
Type: System.String
203-
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel, ByTenantLevel
196+
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel
204197
Aliases:
205198
206199
Required: True
@@ -225,21 +218,6 @@ Accept pipeline input: True (ByPropertyName)
225218
Accept wildcard characters: False
226219
```
227220

228-
### -TenantLevel
229-
Indicates that this cmdlet operates at the tenant level.
230-
231-
```yaml
232-
Type: System.Management.Automation.SwitchParameter
233-
Parameter Sets: ByTenantLevel
234-
Aliases:
235-
236-
Required: True
237-
Position: Named
238-
Default value: None
239-
Accept pipeline input: False
240-
Accept wildcard characters: False
241-
```
242-
243221
### -Confirm
244222
Prompts you for confirmation before running the cmdlet.
245223

src/Resources/Resources/help/Set-AzResourceLock.md

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@ Set-AzResourceLock -LockName <String> -LockLevel <LockLevel> [-LockNotes <String
4848
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
4949
```
5050

51-
### ByTenantLevel
52-
```
53-
Set-AzResourceLock -LockName <String> -LockLevel <LockLevel> [-LockNotes <String>] [-Force]
54-
-ResourceName <String> -ResourceType <String> [-TenantLevel] [-ApiVersion <String>] [-Pre]
55-
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
56-
```
57-
5851
### ByLockId
5952
```
6053
Set-AzResourceLock -LockLevel <LockLevel> [-LockNotes <String>] [-Force] -LockId <String>
@@ -159,7 +152,7 @@ Specifies the name of the lock that this cmdlet modifies.
159152
160153
```yaml
161154
Type: System.String
162-
Parameter Sets: BySpecifiedScope, ByResourceGroup, ByResourceGroupLevel, BySubscription, BySubscriptionLevel, ByTenantLevel
155+
Parameter Sets: BySpecifiedScope, ByResourceGroup, ByResourceGroupLevel, BySubscription, BySubscriptionLevel
163156
Aliases: ExtensionResourceName, Name
164157

165158
Required: True
@@ -221,7 +214,7 @@ Server`/`Database
221214

222215
```yaml
223216
Type: System.String
224-
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel, ByTenantLevel
217+
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel
225218
Aliases:
226219
227220
Required: True
@@ -236,7 +229,7 @@ Specifies the resource type for which the lock applies.
236229

237230
```yaml
238231
Type: System.String
239-
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel, ByTenantLevel
232+
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel
240233
Aliases:
241234
242235
Required: True
@@ -265,21 +258,6 @@ Accept pipeline input: True (ByPropertyName)
265258
Accept wildcard characters: False
266259
```
267260

268-
### -TenantLevel
269-
Indicates that this cmdlet operates at the tenant level.
270-
271-
```yaml
272-
Type: System.Management.Automation.SwitchParameter
273-
Parameter Sets: ByTenantLevel
274-
Aliases:
275-
276-
Required: True
277-
Position: Named
278-
Default value: None
279-
Accept pipeline input: False
280-
Accept wildcard characters: False
281-
```
282-
283261
### -Confirm
284262
Prompts you for confirmation before running the cmdlet.
285263

0 commit comments

Comments
 (0)