Using the CloudHealth API, how can I identify which Azure Reservation Orders are derived?
search cancel

Using the CloudHealth API, how can I identify which Azure Reservation Orders are derived?

book

Article ID: 284456

calendar_today

Updated On:

Products

CloudHealth

Issue/Introduction

You can use the Assets API to search for Azure Reservation Orders where the is_derived field has a value of TRUE
Here's an example REST API command: 
You will need to replace {{apiKey}} with your own API key. 
Automating detection of derived Azure Reservation Orders 
This could easily be added to a scheduled script that runs hourly or daily to ensure that CloudHealth has the correct permissions to read all Azure Reservation Orders. 
Step 1:  Query CloudHealth API to identify Reservation IDs for any Reservation Orders that are derived
Step 2:  Use the Azure API to add the correct permissions for each of those Reservation Orders 
Assumptions:  The user running the scheduled script has view permissions on the CloudHealth Assets API and also has an Azure API key with the ability to add Read permissions on Reservation Orders.