Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft.RecoveryServices - confusing/incorrect error message #32688

Open
sreallymatt opened this issue Feb 18, 2025 · 0 comments
Open

Microsoft.RecoveryServices - confusing/incorrect error message #32688

sreallymatt opened this issue Feb 18, 2025 · 0 comments
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@sreallymatt
Copy link

API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices

API Spec version

2023-02-01

Question/Query

The API returns a confusing/incorrect error message when attempting to set an existing backup item's ProtectionState to BackupsSuspended.

Error message:

{
	"error": {
		"code": "UserErrorOperationDeniedOnImmutableItem",
		"message": "The Vault and Bakcup Item is in Immutable state where destructive operations are not supported. The Vault and Backup Item is immutable, hence operation is denied. Refer to the documentation to learn more: https://aka.ms/AB-ImmutableVaults-States "
	}
}

The error message above seems to imply that this operation was denied because the vault was in an immutable state, which it was not, interestingly enabling vault immutability and sending the request again responds with HTTP 202 and subsequent GET requests show this was applied to the backup item.

I encountered it in API version 2023-02-01 however the behaviour seems to be the same in the latest stable version (2024-10-01)

Example Request
PUT https://management.azure.com/subscriptions/<subscription ID>/resourceGroups/<resource group name>/providers/Microsoft.RecoveryServices/vaults/<vault name>/backupFabrics/<backup fabric name>/protectionContainers/<container name>/protectedItems/VM;<name>?api-version=2023-02-01

{
    "properties": {
        "protectedItemType": "Microsoft.Compute/virtualMachines",
        "protectionState": "BackupsSuspended",
        "sourceResourceId": "/subscriptions/<subscription ID>/resourceGroups/<resource group name>/providers/Microsoft.Compute/virtualMachines/<vm name>"
    }
}

Environment

No response

@sreallymatt sreallymatt added the question The issue doesn't require a change to the product in order to be resolved. Most issues start as that label Feb 18, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

1 participant