Each of the API commands described here relate to retrieving and updating one or more Azure Resources being monitored at your site.
Each Azure Resource is completely described by a Hash.
The Azure Resource Hash
An example JSON-encoded Azure Resource Hash is shown below:
Note
Currently UCM supports monitoring for only four azure types : VM, MSSQL, MySQL and PostgreSQL.
Corresponding azure types are Microsoft.Compute/virtualMachines, Microsoft.Sql/servers/databases, Microsoft.DBforMySQL/servers & Microsoft.DBforPostgreSQL/servers.
If type of resource is other than this, we report ‘Other’ and even for these four types we return short versions from API (Eg. VM) for readability purpose.
For filtering on type, you still need to send actual resource type (Eg. Microsoft.Compute/virtualMachines)
Index
Retrieve a list of all of your Azure Resources for an Azure Resource Group.
Required Parameters:
Azure_Account_ID
ID of Azure Account for which resources are being fetched
Optional Parameters:
Azure_Subscription_ID
ID of Azure Subscription for which resources are being fetched
Azure_Resource_Group_ID
ID of Azure Resource Group for which resources are being fetched
type
Fetch resources of specific type
CURL Command, and variations:
You can also query for resources under a specific azure subscription and azure resource group (for all the APIs mentioned below)
CURL command with optional parameters:
Filter azure resources on ‘name’
CURL Response:
Response is a JSON-encoded list of Azure Resource Hashes and stats(contains total no of resources for the resource group/account).
Show
Show one Azure Resource based on ID.
Required Parameters:
Azure_Account_ID
ID of Azure Account for which resource is to be updated
Azure_Resource_ID
ID of Azure Resource to be updated
Optional Parameters:
Azure_Subscription_ID
ID of Azure Subscription for which resource is to be updated
Azure_Resource_Group_ID
ID of Azure Resource Group for which resource is to be updated
Curl Command
Curl Response
Update
Updates an existing Azure Resource.
Only reading_enabled attribute is allowed to be modified for an azure resource.
Required Parameters:
Azure_Account_ID
ID of Azure Account for which resource is to be updated
Azure_Resource_ID
ID of Azure Resource to be updated
reading_enbled
If monitoring is enabled for the resource
Optional Parameters:
Azure_Subscription_ID
ID of Azure Subscription for which resource is to be updated
Azure_Resource_Group_ID
ID of Azure Resource Group for which resource is to be updated