azure-rest-api-specs icon indicating copy to clipboard operation
azure-rest-api-specs copied to clipboard

Outdated API Spec for ExpressRouteCrossConnections_CreateOrUpdate

Open tomfrenzel opened this issue 1 year ago • 0 comments

When using the ExpressRouteCrossConnections_CreateOrUpdate Endpoint as specified, it should be possible just to update the serviceProviderProvisioningState. Although, this gives the following error:

Request:

{
  "properties": {
    "serviceProviderProvisioningState": "Provisioned",
  }
}

Response:

{
  "error": {
    "code": "LocationRequired",
    "message": "Die Eigenschaft \"location\" ist für diese Definition erforderlich."
  }
}

After adding the location parameter, the following error occurs: Request:

{
  "properties": {
    "serviceProviderProvisioningState": "Provisioned",
  },
  "location": "germanywestcentral"
}

Response:

{
  "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:

{
  "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

tomfrenzel avatar Jan 18 '24 08:01 tomfrenzel