Azure / Azure/azure-rest-api-specs
loadBalancerBackendAddresses : Could not find member 'location' on object of type 'LoadBalancerBackendAddressPoolProperties'
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
When we try to create a new '**LoadBalancerBackendAddressPool**' we can not specify '**location**' property while this property exists in specifications : [loadBalancer.json](https://github.com/Azure/azure-rest-api-specs/blob/1e75ca2758ae24b252b4f7b411eb14a90aa643fb/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/loadBalancer.json#L1551)
## Expected behavior
Load balancer Backend Address Pool well created.
## Current behavior
No '**LoadBalancerBackendAddressPool**' created
Error message :
```json
{
"error": {
"code": "InvalidRequestFormat",
"message": "Cannot parse the request.",
"details": [
{
"code": "InvalidJson",
"message": "Could not find member 'location' on object of type 'LoadBalancerBackendAddressPoolProperties'. Path 'properties.location', line 3, position 15."
}
]
}
}
```
## Steps to reproduce
```bash
curl -i -X PUT \
-H 'Accept: application/json' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: Bearer XXX' \
--data-binary @data.json \
'https://management.azure.com/subscriptions/00000-00000/resourceGroups/rg-test/providers/Microsoft.Network/loadBalancers/lb-vm-tests/backendAddressPools/lb-backend-vm-tests-362de5f?api-version=2020-11-01'
```
Status 200 with following `data.json` content :
```json
{
"properties": {
"loadBalancerBackendAddresses": [
{
"name": "rg-test_nic-vm-tests-362de5fpublicIp",
"properties": {
"networkInterfaceIPConfiguration": {
"id": "/subscriptions/00000-00000/resourceGroups/rg-test/providers/Microsoft.Network/networkInterfaces/nic-vm-tests-362de5f/ipConfigurations/publicIp"
}
}
}
],
"backendIPConfigurations": [
{
"id": "/subscriptions/00000-00000/resourceGroups/rg-test/providers/Microsoft.Network/networkInterfaces/nic-vm-tests-362de5f/ipConfigurations/publicIp"
}
],
"loadBalancingRules": [
{
"id": "/subscriptions/00000-00000/resourceGroups/rg-test/providers/Microsoft.Network/loadBalancers/lb-vm-tests/loadBalancingRules/lb-rule-1"
},
{
"id": "/subscriptions/00000-00000/resourceGroups/rg-test/providers/Microsoft.Network/loadBalancers/lb-vm-tests/loadBalancingRules/lb-rule-0"
}
]
}
}
```
Status 400 with following `data-with-location.json` content :
```json
{
"properties": {
"location": "francecentral",
"loadBalancerBackendAddresses": [
{
"name": "rg-test_nic-vm-tests-362de5fpublicIp",
"properties": {
"networkInterfaceIPConfiguration": {
"id": "/subscriptions/00000-00000/resourceGroups/rg-test/providers/Microsoft.Network/networkInterfaces/nic-vm-tests-362de5f/ipConfigurations/publicIp"
}
}
}
],
"backendIPConfigurations": [
{
"id": "/subscriptions/00000-00000/resourceGroups/rg-test/providers/Microsoft.Network/networkInterfaces/nic-vm-tests-362de5f/ipConfigurations/publicIp"
}
],
"loadBalancingRules": [
{
"id": "/subscriptions/00000-00000/resourceGroups/rg-test/providers/Microsoft.Network/loadBalancers/lb-vm-tests/loadBalancingRules/lb-rule-1"
},
{
"id": "/subscriptions/00000-00000/resourceGroups/rg-test/providers/Microsoft.Network/loadBalancers/lb-vm-tests/loadBalancingRules/lb-rule-0"
}
]
}
}
```
Error 400
```json
{
"error": {
"code": "InvalidRequestFormat",
"message": "Cannot parse the request.",
"details": [
{
"code": "InvalidJson",
"message": "Could not find member 'location' on object of type 'LoadBalancerBackendAddressPoolProperties'. Path 'properties.location', line 3, position 15."
}
]
}
}
```
Contributor guide
Research direction
Start by comparing the loadBalancer.json definition at the linked line with the PUT request and the two provided JSON payloads. Reproduce the 2020-11-01 backend address pool request if possible, then trace how the specification represents LoadBalancerBackendAddressPoolProperties. Done means the specification and documented request behavior agree on whether properties.location is accepted, with the relevant validation covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, openapi
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100