Microsoft Azure Syntax

The syntax for this plugin and an audit are as follows:

Example 1

<custom_item>

description : "Virtual Machines List"

info : "A list of all virtual machines"

request : "getresourcesubs"

json_transform : '.[] | .subscriptionId as $subID | .resourceGroups[].virtualMachines[] |

"Subscription: " + $subID + " - Virtual Machine: " + ([.properties.instanceView.fullyQualifiedDomainName] | join (", "))'

</custom_item>

Example 2

<custom_item>

description : "Stopped Virtual Machines List"

info : "A list of all virtual machines that are stopped"

request : "getresourcesubs"

json_transform : '.[] | .subscriptionId as $subID | .resourceGroups[].virtualMachines[].properties.instanceView | select (.powerState == "Stopped") |

"Subscription: " + $subID + " - Virtual Machine: " + ([.properties.instanceView.fullyQualifiedDomainName] | join (", "))'

regex : ".+"

expect : "Subscription:.+"

</custom_item>