[QUERY] Retrieval of VMSS VMs properties using new Azure.ResourceManager libraries
See original GitHub issueLibrary name and version
Azure.ResourceManager.Compute Version=“1.0.0-beta.5” Azure.ResourceManager.Network Version=1.0.0-beta.5
Query/Question
I have questions about the new resource manager libraries:
- How can I retrieve a public IP of a running VMSS instance? Tried various things without any luck.
- How can I retrieve all the running (or deallocated) instances in VMSS? Came up with this, but it seems very cryptic to me:
var vms = vmCollection.GetAllAsync(filter: "startswith(instanceView/statuses/code, 'PowerState') eq true", select: "instanceView/statuses", expand: "instanceView");
var filtered = vms.Where(ins => ins.Data.InstanceView.Statuses[0].Code == "PowerState/running");
Environment
Platform: Windows Microsoft Visual Studio Professional 2019 Version 16.10.0
.NET SDK (reflecting any global.json):
Version: 5.0.300
Commit: 2e0c8c940e
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19043
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.300\
Host (useful for support):
Version: 5.0.6
Commit: 478b2f8c0e
.NET SDKs installed:
2.1.201 [C:\Program Files\dotnet\sdk]
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.503 [C:\Program Files\dotnet\sdk]
2.1.514 [C:\Program Files\dotnet\sdk]
3.1.201 [C:\Program Files\dotnet\sdk]
5.0.300 [C:\Program Files\dotnet\sdk]
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Virtual Machines - Get - REST API (Azure Compute)
Learn more about Compute service - Retrieves information about the model view or the instance view of a virtual machine.
Read more >Azure Resource Graph sample queries for Azure Virtual ...
This query looks for virtual machine scale set resources and gets various details including the virtual machine size and the capacity of the ......
Read more >Virtual Machine Scale Sets - Get - REST API (Azure ...
Specifies the Spot-Try-Restore properties for the virtual machine scale set. With this property customer can enable or disable automatic restore of the evicted ......
Read more >Virtual Machine Scale Set VMs - List - REST API (Azure ...
Learn more about Compute service - Gets a list of all virtual machines in a VM scale sets.
Read more >Virtual Machines - List - REST API (Azure Compute)
Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
These methods are still not available currently but will be good to go soon.
@Yao725 how is this issue currently tracking?