Skip to content

New-AzureResourceLock fails to validate -LockLevel parameter #384

@pcgeek86

Description

@pcgeek86

Environment

  • Windows 8.1
  • PowerShell 5.0 April 2015 Preview (5.0.10105.0)
  • Azure PowerShell 0.9.1

Problem

When I call the New-AzureResourceLock command, and specify a -LockLevel parameter value of ReadOnly, I receive an error.

New-AzureResourceLock : Cannot bind parameter 'LockLevel'. Cannot convert value "ReadOnly" to type "Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.Locks.LockLevel". Error: "Unable to match the identifier name ReadOnly to a valid enumerator
name. Specify one of the following enumerator names and try again:
CanNotDelete"

image

The [Microsoft.Azure.Management.Resources.Models.LockLevel] .NET Enumeration clearly shows that there are three valid values:

  • ReadOnly
  • CanNotDelete
  • NotSpecified

Expected Result

The New-AzureResourceLock command's -LockLevel parameter should accept any of the values from the [LockLevel] .NET Enumeration.


Why isn't this validating against the enum values properly?

Cheers,
Trevor Sullivan
Microsoft MVP: PowerShell
http://trevorsullivan.net
http://twitter.com/pcgeek86

Metadata

Metadata

Assignees

No one assigned

    Labels

    ARMService AttentionThis issue is responsible by Azure service team.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions