Azure / Azure/azure-powershell

Set-AzExpressRoutePort: `-ExpressRoutePort` expects un-documented type

Open
#14,028 1 comment 0 reactions 0 assignees View on GitHub
Network - ExpressRoute question Service Attention
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
3d 14h
Merged PRs (30d)
54

Description

## Description

In the [document](https://docs.microsoft.com/en-us/powershell/module/az.network/set-azexpressrouteport?view=azps-5.4.0) `Set-AzExpressRoutePort -ExpressRoutePort` expects type `Microsoft.Azure.Commands.Network.Models.PSExpressRoutePort` whilst in fact it requires `Microsoft.Azure.Management.Network.Models.ExpressRoutePort`.

## Steps to reproduce

```powershell
$erport = Get-AzExpressRoutePort -Name $PortName -ResourceGroupName $rg
Set-AzExpressRoutePort -ExpressRoutePort $erport
```

## Module versions

```powershell
4.5.0 Az.Network
```

## Error output

```
Set-AzExpressRoutePort: Error mapping types.
Mapping types:
PSExpressRoutePort -> ExpressRoutePort
Microsoft.Azure.Commands.Network.Models.PSExpressRoutePort -> Microsoft.Azure.Management.Network.Models.ExpressRoutePort
Type Map configuration:
PSExpressRoutePort -> ExpressRoutePort
Microsoft.Azure.Commands.Network.Models.PSExpressRoutePort -> Microsoft.Azure.Management.Network.Models.ExpressRoutePort
Property:
Links
```

Contributor guide

Open the contributing guide

Research direction

Start with the Set-AzExpressRoutePort documentation linked in the issue and reproduce the commands using Get-AzExpressRoutePort and Set-AzExpressRoutePort. Compare the documented -ExpressRoutePort type with the type required by the cmdlet; done means the documentation and the reported command behavior agree without the mapping error.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, powershell
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.