Forum Discussion
API to retrieve if specific Azure resource type can be deployed in an Azure region
Thanks for the reply from Jai-Rathinavel please allow me to provide another insight:
Hi, Pascal_KTeam
The API mentioned by Jai-Rathinavel is indeed a good solution.
Of course, you might also consider trying the following API:
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources?api-version=2021-04-01
This API can retrieve all resources within a resource group. Below is a screenshot from the official documentation:
For further details, please refer to:
Resources - List By Resource Group - REST API (Azure Resource Management) | Microsoft Learn
Additionally, there is another API:
HEAD https://management.azure.com/{resourceId}?api-version=2021-04-01
This one checks whether a resource exists by its ID. Here’s a screenshot from the official documentation:
For more information, please refer to:
Resources - Check Existence By Id - REST API (Azure Resource Management) | Microsoft Learn
Of course, if you have any new discoveries or questions, please feel free to get in touch with us.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.