Azure / Azure/azure-rest-api-specs
Azure FrondDoor: Spec incorrect or Service API misbehaving
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
Hi,
I'm using the Go SDK for Azure here https://github.com/lawrencegripper/azurefrontdoor-ingress to talk to Azure Frontdoor.
I see errors when using any of the individual resource clients. An `InvalidResourceType` response is returned when attempting to update/get or list the following:
- `/Microsoft.Network/Frontdoors/lgtestfrontdoor/LoadBalancingSettings`
- `/Microsoft.Network/Frontdoors/lgtestfrontdoor/backendPools`
- `/Microsoft.Network/Frontdoors/lgtestfrontdoor/healthProbeSettings`
Here is a quick example, the behavior isn't limited to the Go SDK as attempting to browse these resources using `resources.microsoft.com` also returns the same errors.
```text
curl 'https://resources.azure.com/api/operations' -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0' -H 'Accept: application/json, text/plain, */*' -H 'Accept-Language: en-GB,en;q=0.5' --compressed -H 'Referer: https://resources.azure.com/subscriptions/your-sub-id-here/resourceGroups/temp-frontdoortest/providers/Microsoft.Network/frontDoors/lgtestfrontdoor/frontendEndpoints' -H 'Content-Type: application/json;charset=utf-8' -H 'Cookie: [object Object]' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' --data '{"Url":"https://management.azure.com/subscriptions/your-sub-id-here/resourceGroups/temp-frontdoortest/providers/Microsoft.Network/frontDoors/lgtestfrontdoor/routingRules","HttpMethod":"GET","ApiVersion":"2018-08-01"}'
```
## Response
```text
HTTP/1.1 400 Bad Request
Cache-Control: private
Content-Length: 107
Content-Type: application/json; charset=utf-8
Content-Language: en-US
Server: Microsoft-IIS/8.5
Strict-Transport-Security: max-age=31536000; includeSubDomains
x-ms-ratelimit-remaining-subscription-reads: 11998
x-ms-request-id: 2ae5e8a7-b232-474a-bb52-3720abbb570b
x-ms-correlation-request-id: 2ae5e8a7-b232-474a-bb52-3720abbb570b
x-ms-routing-request-id: WESTUS:20181011T212358Z:2ae5e8a7-b232-474a-bb52-3720abbb570b
X-Content-Type-Options: nosniff
X-AspNet-Version: 4.0.30319
X-MS-Ellapsed: 392ms
Request-Context: appId=cid-v1:a7a0aa45-52ad-43f4-a8c4-8896f1392829
instance-name: explorer-bay
X-Powered-By: ASP.NET, ASP.NET
Date: Thu, 11 Oct 2018 21:23:58 GMT
```
```json
{
"error": {
"code": "InvalidResourceType",
"message": "The resource type is invalid."
}
}
```
## Sample from GOSDK with HTTP Traces on
```text
INFO[0001] PUT /subscriptions/your-sub-here/resourceGroups/temp-frontdoortest/providers/Microsoft.Network/Frontdoors/lgtestfrontdoor/LoadBalancingSettings/loadBalancingSettings-1539281898722?api-version=2018-08-01 HTTP/1.1
Host: management.azure.com
User-Agent: Go/go1.10.1 (amd64-linux) go-autorest/v10.15.5 Azure-SDK-For-Go/v21.1.0 frontdoor/2018-08-01-preview
Content-Length: 95
Authorization: Bearer *removed*
Content-Type: application/json; charset=utf-8
Accept-Encoding: gzip
{"properties":{"sampleSize":4,"successfulSamplesRequired":2,"additionalLatencyMilliseconds":0}}
INFO[0001] HTTP/1.1 400 Bad Request
Content-Length: 107
Cache-Control: private
Content-Language: en-US
Content-Type: application/json; charset=utf-8
Date: Thu, 11 Oct 2018 20:28:41 GMT
Server: Microsoft-IIS/8.5
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Aspnet-Version: 4.0.30319
X-Content-Type-Options: nosniff
X-Ms-Correlation-Request-Id: 054cedff-75ed-4d27-a954-76f58ed1743b
X-Ms-Ratelimit-Remaining-Subscription-Writes: 1199
X-Ms-Request-Id: 054cedff-75ed-4d27-a954-76f58ed1743b
X-Ms-Routing-Request-Id: WESTUS:20181011T202842Z:054cedff-75ed-4d27-a954-76f58ed1743b
X-Powered-By: ASP.NET
{
"error": {
"code": "InvalidResourceType",
"message": "The resource type is invalid."
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.