0

I have a requirement where I need to get NSG rules attached to all VM/NIC under a subscription using azure node SDK. I went through Node doc but didn't find any suitable method to do so. Is there anything that I'm missing?

I have tried below snippet to get all VM but it didn't include NSG details, is there any specific method in ComputeManagementClient/NetworkManagementClient which will return me the NSG details corresponding to VM or at least return NSG for a particular VM? Thanks in Advance.

function getVMDetailsAll(callback) {
return computeClient.virtualMachines.listAll(callback)

}

lambodar
  • 3,495
  • 5
  • 34
  • 58

1 Answers1

0

Never mind guys, the documentation really shocks, I went through the source code and figured out the way to query and run few costume code to filter

function getNSGAll(callback) {
  return networkClient.networkSecurityGroups.listAll(callback);
}
lambodar
  • 3,495
  • 5
  • 34
  • 58