Azure / Azure/azure-rest-api-specs
[BUG] Microsoft.RecoveryServices/vaults updating softDeleteState does not work
- 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/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/vaults.json
### API Spec version
2025-02-01
### Describe the bug
Hi,
it seems that updating the soft delete state does not work through the update process.
`https://learn.microsoft.com/en-us/rest/api/recoveryservices/vaults/update?view=rest-recoveryservices-2025-02-01&tabs=HTTP&tryIt=true#code-try-0`
`PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}?api-version=2025-02-01`
If I want to update the softDeleteState it does not actually change anything, even though I get a `Response Code: 200`
I can also see in the body of the response nothing has changed.
### Expected behavior
Security Settings actually change
### Actual behavior
Nothing, and no error
### Reproduction Steps
use curl or https://learn.microsoft.com/en-us/rest/api/recoveryservices/vaults/update?view=rest-recoveryservices-2025-02-01&tabs=HTTP&tryIt=true#code-try-0
Post to a vault that does not have soft delete enabled:
```
{
"properties": {
"securitySettings": {
"softDeleteSettings": {
"softDeleteState": "Enabled"
}
}
}
}
```
I've noticed this is a bigger bug during testing, actually more affected than just the setting I want to change:
```
{
"properties": {
"ERRORsecuritySettings": {
"softDeleteSettings": {
"softDeleteState": "Enabled"
}
}
}
}
```
will error as it should but with no helpful message though
```
{
"properties": {
"securitySettings": {
"THIS_SETTING_DOES_NOT_EXIST": "test",
"softDeleteSettings": {
"softDeleteState": "Enabled"
}
}
}
}
```
Will happily report 200 back, but won't notice that the setting does not actually exist, so my guess is everything below securitySettings is broken.
### Environment
current rhel8 curl and edge
Contributor guide
Research direction
Start with the linked stable/2025-02-01/vaults.json API specification and its PATCH update operation. Reproduce the request against a vault using the provided curl body, then compare behavior for softDeleteState and an unknown nested setting. Done means the documented update changes security settings and invalid nested properties are rejected with a useful error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, openapi
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100