Azure / Azure/azure-rest-api-specs
Outdated API Spec for ExpressRouteCrossConnections_CreateOrUpdate
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
When using the ExpressRouteCrossConnections_CreateOrUpdate Endpoint as specified, it should be possible just to update the `serviceProviderProvisioningState`.
Although, this gives the following error:
Request:
```JSON
{
"properties": {
"serviceProviderProvisioningState": "Provisioned",
}
}
```
Response:
```JSON
{
"error": {
"code": "LocationRequired",
"message": "Die Eigenschaft \"location\" ist für diese Definition erforderlich."
}
}
```
After adding the `location` parameter, the following error occurs:
Request:
```JSON
{
"properties": {
"serviceProviderProvisioningState": "Provisioned",
},
"location": "germanywestcentral"
}
```
Response:
```JSON
{
"error": {
"code": "ExpressRouteCircuitReferenceInCrossConnectionCannotBeModified",
"message": "Der Leitungsverweis für die ExpressRoute-Querverbindung \"/subscriptions/********-****-****-***-***********/resourceGroups/crossconnection-Area51/providers/Microsoft.Network/expressRouteCrossConnections/********-****-****-***-***********\" kann nicht von \"/subscriptions/********-****-****-***-***********/resourceGroups/Test-ExpressRoute/providers/Microsoft.Network/expressRouteCircuits/Test\" in \"null\" geändert werden.",
"details": []
}
}
```
Not sure why it's German but it basically says that the CloudCircuit of this CrossConnection cannot be changed to null.
The same happens for the `peeringLocation` and `bandwidthInMbps` properties.
Once I updated my initial request to look like this, the request goes through and the provisioning state gets applied:
```JSON
{
"properties": {
"expressRouteCircuit": {
"id": "/subscriptions/********-****-****-***-***********/resourceGroups/Test-ExpressRoute/providers/Microsoft.Network/expressRouteCircuits/Test"
},
"serviceProviderProvisioningState": "NotProvisioned",
"peeringLocation": "Area51",
"bandwidthInMbps": 100
},
"location": "germanywestcentral"
}
```
This issue affects not only the REST API but also the Azure.ResourceManager.Network NuGet Package does not send those additional parameters to the Azure API. And using this package, it is not possible to change that behavior
Contributor guide
Research direction
Start by locating the ExpressRouteCrossConnections_CreateOrUpdate API definition and compare its request schema with the successful request shown in the issue. Check how the Azure.ResourceManager.Network package is generated from that definition. Done means the documented request and generated package support updating serviceProviderProvisioningState, peeringLocation, or bandwidthInMbps without requiring unrelated properties.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, openapi
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100