Azure / Azure/azure-rest-api-specs
[BUG] [Compute VM] `scheduledEventsPolicy` in PUT Request does not exist in PUT and GET Response
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
### API Spec link
https://github.com/Azure/azure-rest-api-specs/blob/main/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-03-01/virtualMachine.json
### API Spec version
2024-03-01
### Describe the bug
[PUT](https://github.com/Azure/azure-rest-api-specs/blob/43ce04961ccb6496e421789c54798ba1e0880f64/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-03-01/virtualMachine.json#L482) response does not return [scheduledEventsPolicy](https://github.com/Azure/azure-rest-api-specs/blob/43ce04961ccb6496e421789c54798ba1e0880f64/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2024-03-01/virtualMachine.json#L3208C10-L3208C31) which exists in PUT Request, which is not consistent with the [MS-DOC](https://learn.microsoft.com/en-us/rest/api/compute/virtual-machines/create-or-update?view=rest-compute-2024-07-01&tabs=HTTP#create-a-vm-with-disk-controller-type).
PUT Request:
PUT https: //management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctest0001/providers/Microsoft.Compute/virtualMachines/acctest0001?api-version=2024-03-01
**X-Ms-Correlation-Request-Id: 3be91d8c-1ad8-851d-64c8-701eb11965e5**
{
"location": "westeurope",
"properties": {
"hardwareProfile": {
"vmSize": "Standard_DS3_v2"
},
"networkProfile": {
"networkInterfaces": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctest0001/providers/Microsoft.Network/networkInterfaces/acctest0001",
"properties": {
"primary": false
}
}
]
},
"osProfile": {
"adminPassword": "xxx",
"adminUsername": "testadmin",
"computerName": "hostname230630032848831819",
"linuxConfiguration": {
"disablePasswordAuthentication": false
}
},
"scheduledEventsPolicy": {
"scheduledEventsAdditionalPublishingTargets": {
"eventGridAndResourceGraph": {
"enable": false
}
},
"userInitiatedReboot": {
"automaticallyApprove": true
},
"userInitiatedRedeploy": {
"automaticallyApprove": true
}
},
"securityProfile": {
"encryptionAtHost": true
},
"storageProfile": {
"imageReference": {
"offer": "UbuntuServer",
"publisher": "Canonical",
"sku": "16.04-LTS",
"version": "latest"
},
"osDisk": {
"caching": "ReadWrite",
"createOption": "FromImage",
"name": "myosdisk1",
"writeAcceleratorEnabled": false
}
}
}
}
### Expected behavior
PUT response should return the same value of scheduledEventsPolicy which exists in PUT Request,
### Actual behavior
PUT response does not return the value of scheduledEventsPolicy which exists in PUT Request,
### Reproduction Steps
1. Create a VM with scheduledEventsPolicy in PUT Request
2. Check scheduledEventsPolicy in PUT Response
### Environment
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.