Azure / Azure/azure-rest-api-specs
VPN Site: non-idempotent handling of `deviceProperties`
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
If the user doesn't specify [`deviceProperties`](https://github.com/Azure/azure-rest-api-specs/blob/master/specification/network/resource-manager/Microsoft.Network/stable/2020-05-01/virtualWan.json#L4643) and [`linProperties`](https://github.com/Azure/azure-rest-api-specs/blob/master/specification/network/resource-manager/Microsoft.Network/stable/2020-05-01/virtualWan.json#L4723) in the PUT request of VpnSite resource. The response will still return them anyway, which is unexpected.
Request:
`PUT: https://management.azure.com/subscriptions/xxx/resourceGroups/magodo-vwan/providers/Microsoft.Network/vpnSites/testsite3?api-version=2020-05-01`
```json
{
"location": "eastus2",
"properties": {
"addressSpace": {
"addressPrefixes": [
"192.168.0.0/24"
]
},
"virtualWan": {
"id": "/subscriptions/xxx/resourceGroups/magodo-vwan/providers/Microsoft.Network/virtualWans/magodo-vwan"
},
"vpnSiteLinks": [
{
"name": "test",
"properties": {
"fqdn": "foobar.com"
},
}
]
}
}
```
Response:
```json
{
"name": "testsite3",
"id": "/subscriptions/xxx/resourceGroups/magodo-vwan/providers/Microsoft.Network/vpnSites/testsite3",
"type": "Microsoft.Network/vpnSites",
"location": "eastus2",
"properties": {
"provisioningState": "Updating",
"addressSpace": {
"addressPrefixes": [
"192.168.0.0/24"
]
},
"deviceProperties": {
"linkSpeedInMbps": 0
},
"virtualWan": {
"id": "/subscriptions/xxx/resourceGroups/magodo-vwan/providers/Microsoft.Network/virtualWans/magodo-vwan"
},
"isSecuritySite": false,
"o365Policy": {
"breakOutCategories": {
"optimize": false,
"allow": false,
"default": false
}
},
"vpnSiteLinks": [
{
"name": "test",
"id": "/subscriptions/xxx/resourceGroups/magodo-vwan/providers/Microsoft.Network/vpnSites/testsite3/vpnSiteLinks/*(&",
"etag": "W/\"afea70e2-d299-4e47-a872-4c5efb3c366e\"",
"properties": {
"provisioningState": "Updating",
"fqdn": "foobar.com",
"linkProperties": {
"linkSpeedInMbps": 0
}
},
"type": "Microsoft.Network/vpnSites/vpnSiteLinks"
}
]
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.