Search code examples
virtual-machineazure-service-fabric

How to get VM type/size for the nodes in a Service Fabric Cluster?


I have a Service Fabric cluster with 5 nodes that I set initially to the type Standard_D1_v2. I wanted to know if there is a way to programmatically get the type or size (SKU information) of the nodes in a Service Fabric Cluster. I basically want to retrieve the information 'Standard_D1_v2' about my nodes by code.


Solution

    • You can use the REST api.

    https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/VirtualMachineScaleSets/{vmScaleSet}/skus?api-version={apiVersion}