@Angelo IORLI (PTV Group) Thanks for your time over offline. I will be summarizing our discussion and posting the same as answer for the benefit of community members.
Issue: Customer is trying to pull the resource health status of the resources under their subscription using the bash script and it is getting 3 resources details instead of listing all resource details under their subscription/resource group.
Troubleshooting/Mitigation Steps:
- Customer is using the wrong api version in their rest api to pull the resource health of resources.
- Updated the customer script to use this rest api Availability Statuses - List By Resource Group and this api version "2024-02-01" to pull the resource health.
- Customer has made the above suggested changes and they are able to pull the resource health of existing resources under their resource group.
Hope this helps, let me know if you have any further questions.
Please accept as Yes if the answer is helpful so that it can help others in the community.