Hello Prashant , Welcome to MS Q&A
Querying soft-deleted resources at the resource group level is not directly supported. Instead, you should use the specific API calls designed for retrieving soft-deleted resources. For API Management, you can list all soft-deleted services available for undelete for a given subscription by using the appropriate API Management REST API.
To retrieve soft-deleted resources, you can use the following API call:
List all soft-deleted instances for a given subscription for API management
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices?api-version=2021-08-01
This API call allows you to list soft-deleted services, but it does not filter by resource group. You may need to implement additional logic on the client side to filter the results based on your resource group.
As for limitations, you should ensure that you have the necessary RBAC permissions at the subscription scope in addition to Contributor access to the API Management instance. There are no specific restrictions mentioned regarding querying soft-deleted resources at the resource group level, but the API version should be at least 2020-06-01-preview or later for the relevant operations.
If you're looking for alternatives, consider checking if the resources support soft delete and whether you can restore them using the soft delete features available for specific resource types.
Moreover in Azure , The following Azure resources are supported by REST API soft-delete:
- API Management: Soft-delete is available for API Management instances, allowing recovery of recently deleted instances during a retention period.
- Key Vault: Soft-delete is implemented for Key Vaults, enabling recovery of deleted vaults and their objects (keys, secrets, certificates) for a configurable period.
- SQL Server and SAP HANA in Azure VM: Soft-delete is supported for backup data related to SQL Server and SAP HANA in Azure VMs, retaining deleted backup data for an additional 14 days.
References:
- API Management soft-delete (preview)
- Azure Key Vault soft-delete overview
- Soft delete for SQL server in Azure VM and SAP HANA in Azure VM workloads
Please let me know if any other questions
Kindly accept if it helps
Thanks
Deepanshu