Skip to content

Remove -TenantLevel parameter used for on the Get-AzResourceLock cmdlet #11689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 7, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public class GetAzureResourceLockCmdlet : ResourceLockManagementCmdletBase
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.ScopeLevelLock, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.SubscriptionLevelLock, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.SubscriptionResourceLevelLock, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.TenantResourceLevelLock, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
[ValidateNotNullOrEmpty]
public string LockName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public class NewAzureResourceLockCmdlet : ResourceLockManagementCmdletBase
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.ScopeLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.SubscriptionLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.SubscriptionResourceLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.TenantResourceLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
[ValidateNotNullOrEmpty]
public string LockName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public class RemoveAzureResourceLockCmdlet : ResourceLockManagementCmdletBase
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.ScopeLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.SubscriptionLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.SubscriptionResourceLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.TenantResourceLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The name of the lock.")]
[ValidateNotNullOrEmpty]
public string LockName { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ public abstract class ResourceLockManagementCmdletBase : ResourceManagerCmdletBa
/// </summary>
internal const string SubscriptionResourceLevelLock = "BySubscriptionLevel";

/// <summary>
/// The tenant level resource lock patameter set.
/// </summary>
internal const string TenantResourceLevelLock = "ByTenantLevel";

/// <summary>
/// The resource group lock parametere set.
/// </summary>
Expand All @@ -75,7 +70,6 @@ public abstract class ResourceLockManagementCmdletBase : ResourceManagerCmdletBa
/// </summary>
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.ResourceGroupResourceLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource name. e.g. to specify a database MyServer/MyDatabase.")]
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.SubscriptionResourceLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource name. e.g. to specify a database MyServer/MyDatabase.")]
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.TenantResourceLevelLock, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource name. e.g. to specify a database MyServer/MyDatabase.")]
[ValidateNotNullOrEmpty]
public string ResourceName { get; set; }

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

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

/// <summary>
/// Gets or sets the tenant level parameter.
/// </summary>
[Parameter(ParameterSetName = ResourceLockManagementCmdletBase.TenantResourceLevelLock, Mandatory = true, HelpMessage = "Indicates that this is a tenant level operation.")]
public SwitchParameter TenantLevel { get; set; }

/// <summary>
/// The Id of the lock.
/// </summary>
Expand Down
4 changes: 3 additions & 1 deletion src/Resources/Resources/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
## Upcoming Release
* Add message warning about view delay when creating a new Role Definition
* Change policy cmdlets to output strongly-typed objects
* Fixed `Remove-AzResourceGroup -Id ResourceId`[#9882]
* Fiexed `Remove-AzResourceGroup -Id ResourceId`[#9882]
* Removed -TenantLevel parameter used for on the Get-AzResourceLock cmdlet [#11335]


## Version 1.13.0
* Fixed `Get-AzResource -ResourceGroupName -Name -ExpandProperties -ResourceType` to use actual apiVersion of resources instead of default apiVersion [#11267]
Expand Down
27 changes: 3 additions & 24 deletions src/Resources/Resources/help/Get-AzResourceLock.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ Get-AzResourceLock [-LockName <String>] [-AtScope] -ResourceName <String> -Resou
[-ApiVersion <String>] [-Pre] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
```

### ByTenantLevel
```
Get-AzResourceLock [-LockName <String>] [-AtScope] -ResourceName <String> -ResourceType <String> [-TenantLevel]
[-ApiVersion <String>] [-Pre] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
```

### ByLockId
```
Get-AzResourceLock [-AtScope] -LockId <String> [-ApiVersion <String>] [-Pre]
Expand Down Expand Up @@ -144,7 +138,7 @@ Specifies the name of the lock that this cmdlet gets.

```yaml
Type: System.String
Parameter Sets: ByResourceGroup, ByResourceGroupLevel, BySpecifiedScope, BySubscription, BySubscriptionLevel, ByTenantLevel
Parameter Sets: ByResourceGroup, ByResourceGroupLevel, BySpecifiedScope, BySubscription, BySubscriptionLevel
Aliases: ExtensionResourceName, Name

Required: False
Expand Down Expand Up @@ -191,7 +185,7 @@ This cmdlet gets locks for this resource.

```yaml
Type: System.String
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel, ByTenantLevel
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel
Aliases:

Required: True
Expand All @@ -207,7 +201,7 @@ This cmdlet gets locks for this resource.

```yaml
Type: System.String
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel, ByTenantLevel
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel
Aliases:

Required: True
Expand All @@ -233,21 +227,6 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -TenantLevel
Indicates that this cmdlet operates at the tenant level.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: ByTenantLevel
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
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).

Expand Down
28 changes: 3 additions & 25 deletions src/Resources/Resources/help/New-AzResourceLock.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ New-AzResourceLock -LockName <String> -LockLevel <LockLevel> [-LockNotes <String
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### ByTenantLevel
```
New-AzResourceLock -LockName <String> -LockLevel <LockLevel> [-LockNotes <String>] [-Force]
-ResourceName <String> -ResourceType <String> [-TenantLevel] [-ApiVersion <String>] [-Pre]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### ByLockId
```
New-AzResourceLock -LockLevel <LockLevel> [-LockNotes <String>] [-Force] -LockId <String>
Expand Down Expand Up @@ -159,7 +152,7 @@ Specifies the name of the lock.

```yaml
Type: System.String
Parameter Sets: BySpecifiedScope, ByResourceGroup, ByResourceGroupLevel, BySubscription, BySubscriptionLevel, ByTenantLevel
Parameter Sets: BySpecifiedScope, ByResourceGroup, ByResourceGroupLevel, BySubscription, BySubscriptionLevel
Aliases: ExtensionResourceName, Name

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

```yaml
Type: System.String
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel, ByTenantLevel
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel
Aliases:

Required: True
Expand All @@ -236,7 +229,7 @@ Specifies the resource type of the resource for which the lock applies.

```yaml
Type: System.String
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel, ByTenantLevel
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel
Aliases:

Required: True
Expand Down Expand Up @@ -265,21 +258,6 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -TenantLevel
Indicates that this cmdlet operates at the tenant level.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: ByTenantLevel
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Confirm
Prompts you for confirmation before running the cmdlet.

Expand Down
28 changes: 3 additions & 25 deletions src/Resources/Resources/help/Remove-AzResourceLock.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@ Remove-AzResourceLock -LockName <String> [-Force] -ResourceName <String> -Resour
[<CommonParameters>]
```

### ByTenantLevel
```
Remove-AzResourceLock -LockName <String> [-Force] -ResourceName <String> -ResourceType <String> [-TenantLevel]
[-ApiVersion <String>] [-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```

## DESCRIPTION
The **Remove-AzResourceLock** cmdlet removes an Azure resource lock.

Expand Down Expand Up @@ -138,7 +131,7 @@ Specifies the name of the lock that this cmdlet removes.
```yaml
Type: System.String
Parameter Sets: ByResourceGroup, ByResourceGroupLevel, BySpecifiedScope, BySubscription, BySubscriptionLevel, ByTenantLevel
Parameter Sets: ByResourceGroup, ByResourceGroupLevel, BySpecifiedScope, BySubscription, BySubscriptionLevel
Aliases: ExtensionResourceName, Name

Required: True
Expand Down Expand Up @@ -185,7 +178,7 @@ Server`/`Database

```yaml
Type: System.String
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel, ByTenantLevel
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel
Aliases:
Required: True
Expand All @@ -200,7 +193,7 @@ Specifies the resource type of the resource for which the lock applies.

```yaml
Type: System.String
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel, ByTenantLevel
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel
Aliases:
Required: True
Expand All @@ -225,21 +218,6 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -TenantLevel
Indicates that this cmdlet operates at the tenant level.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: ByTenantLevel
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Confirm
Prompts you for confirmation before running the cmdlet.

Expand Down
28 changes: 3 additions & 25 deletions src/Resources/Resources/help/Set-AzResourceLock.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ Set-AzResourceLock -LockName <String> -LockLevel <LockLevel> [-LockNotes <String
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### ByTenantLevel
```
Set-AzResourceLock -LockName <String> -LockLevel <LockLevel> [-LockNotes <String>] [-Force]
-ResourceName <String> -ResourceType <String> [-TenantLevel] [-ApiVersion <String>] [-Pre]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### ByLockId
```
Set-AzResourceLock -LockLevel <LockLevel> [-LockNotes <String>] [-Force] -LockId <String>
Expand Down Expand Up @@ -159,7 +152,7 @@ Specifies the name of the lock that this cmdlet modifies.

```yaml
Type: System.String
Parameter Sets: BySpecifiedScope, ByResourceGroup, ByResourceGroupLevel, BySubscription, BySubscriptionLevel, ByTenantLevel
Parameter Sets: BySpecifiedScope, ByResourceGroup, ByResourceGroupLevel, BySubscription, BySubscriptionLevel
Aliases: ExtensionResourceName, Name

Required: True
Expand Down Expand Up @@ -221,7 +214,7 @@ Server`/`Database

```yaml
Type: System.String
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel, ByTenantLevel
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel
Aliases:

Required: True
Expand All @@ -236,7 +229,7 @@ Specifies the resource type for which the lock applies.

```yaml
Type: System.String
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel, ByTenantLevel
Parameter Sets: ByResourceGroupLevel, BySubscriptionLevel
Aliases:

Required: True
Expand Down Expand Up @@ -265,21 +258,6 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -TenantLevel
Indicates that this cmdlet operates at the tenant level.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: ByTenantLevel
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Confirm
Prompts you for confirmation before running the cmdlet.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,12 @@
"Microsoft.Azure.PowerShell.Cmdlets.ResourceManager.dll","Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.GetAzureDeploymentCmdlet","Get-AzDeployment","0","1050","The parameter set 'GetByDeploymentId' for cmdlet 'Get-AzDeployment' has been removed.","Add parameter set 'GetByDeploymentId' back to cmdlet 'Get-AzDeployment'."
"Microsoft.Azure.PowerShell.Cmdlets.Resources.dll","Microsoft.Azure.Commands.ActiveDirectory.RemoveAzureADGroupCommand","Remove-AzADGroup","0","1060","The parameter set 'ObjectIdParameterSet' for cmdlet 'Remove-AzADGroup' is no longer the default parameter set.","Change the default parameter for cmdlet 'Remove-AzADGroup' back to 'ObjectIdParameterSet'."
"Microsoft.Azure.PowerShell.Cmdlets.ResourceManager.dll","Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.GetAzDeploymentScript","Get-AzDeploymentScript","0","3000","The type of property 'Error' of type 'Microsoft.Azure.Management.ResourceManager.Models.ScriptStatus' has changed from 'Microsoft.Azure.Management.ResourceManager.Models.DefaultErrorResponse' to 'Microsoft.Azure.Management.ResourceManager.Models.ErrorResponse'.","Change the type of property 'Error' back to 'Microsoft.Azure.Management.ResourceManager.Models.DefaultErrorResponse'."
"Microsoft.Azure.PowerShell.Cmdlets.ResourceManager.dll","Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.GetAzurePolicyAlias","Get-AzPolicyAlias","0","3030","The generic type for 'property Aliases' has been changed from 'System.Collections.Generic.IList`1[Microsoft.Azure.Management.ResourceManager.Models.AliasType]' to 'System.Collections.Generic.IList`1[Microsoft.Azure.Management.ResourceManager.Models.Alias]'.","Change the generic type for 'property Aliases' back to 'System.Collections.Generic.IList`1[Microsoft.Azure.Management.ResourceManager.Models.AliasType]'."
"Microsoft.Azure.PowerShell.Cmdlets.ResourceManager.dll","Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.GetAzurePolicyAlias","Get-AzPolicyAlias","0","3030","The generic type for 'property Aliases' has been changed from 'System.Collections.Generic.IList`1[Microsoft.Azure.Management.ResourceManager.Models.AliasType]' to 'System.Collections.Generic.IList`1[Microsoft.Azure.Management.ResourceManager.Models.Alias]'.","Change the generic type for 'property Aliases' back to 'System.Collections.Generic.IList`1[Microsoft.Azure.Management.ResourceManager.Models.AliasType]'."
"Microsoft.Azure.PowerShell.Cmdlets.ResourceManager.dll","Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.GetAzureResourceLockCmdlet","Get-AzResourceLock","0","2000","The cmdlet 'Get-AzResourceLock' no longer supports the parameter 'TenantLevel' and no alias was found for the original parameter name.","Add the parameter 'TenantLevel' back to the cmdlet 'Get-AzResourceLock', or add an alias to the original parameter name."
"Microsoft.Azure.PowerShell.Cmdlets.ResourceManager.dll","Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.GetAzureResourceLockCmdlet","Get-AzResourceLock","0","1050","The parameter set 'ByTenantLevel' for cmdlet 'Get-AzResourceLock' has been removed.","Add parameter set 'ByTenantLevel' back to cmdlet 'Get-AzResourceLock'."
"Microsoft.Azure.PowerShell.Cmdlets.ResourceManager.dll","Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceLockCmdlet","New-AzResourceLock","0","2000","The cmdlet 'New-AzResourceLock' no longer supports the parameter 'TenantLevel' and no alias was found for the original parameter name.","Add the parameter 'TenantLevel' back to the cmdlet 'New-AzResourceLock', or add an alias to the original parameter name."
"Microsoft.Azure.PowerShell.Cmdlets.ResourceManager.dll","Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceLockCmdlet","New-AzResourceLock","0","1050","The parameter set 'ByTenantLevel' for cmdlet 'New-AzResourceLock' has been removed.","Add parameter set 'ByTenantLevel' back to cmdlet 'New-AzResourceLock'."
"Microsoft.Azure.PowerShell.Cmdlets.ResourceManager.dll","Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.RemoveAzureResourceLockCmdlet","Remove-AzResourceLock","0","2000","The cmdlet 'Remove-AzResourceLock' no longer supports the parameter 'TenantLevel' and no alias was found for the original parameter name.","Add the parameter 'TenantLevel' back to the cmdlet 'Remove-AzResourceLock', or add an alias to the original parameter name."
"Microsoft.Azure.PowerShell.Cmdlets.ResourceManager.dll","Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.RemoveAzureResourceLockCmdlet","Remove-AzResourceLock","0","1050","The parameter set 'ByTenantLevel' for cmdlet 'Remove-AzResourceLock' has been removed.","Add parameter set 'ByTenantLevel' back to cmdlet 'Remove-AzResourceLock'."
"Microsoft.Azure.PowerShell.Cmdlets.ResourceManager.dll","Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.SetAzureResourceLockCmdlet","Set-AzResourceLock","0","2000","The cmdlet 'Set-AzResourceLock' no longer supports the parameter 'TenantLevel' and no alias was found for the original parameter name.","Add the parameter 'TenantLevel' back to the cmdlet 'Set-AzResourceLock', or add an alias to the original parameter name."
"Microsoft.Azure.PowerShell.Cmdlets.ResourceManager.dll","Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.SetAzureResourceLockCmdlet","Set-AzResourceLock","0","1050","The parameter set 'ByTenantLevel' for cmdlet 'Set-AzResourceLock' has been removed.","Add parameter set 'ByTenantLevel' back to cmdlet 'Set-AzResourceLock'."