Azure / Azure/azure-libraries-for-java

Provide a Get by ID SDK method which fetches VirtualMachine model and instance views in a single API call

Open
#402 1 comment 0 reactions 0 assignees View on GitHub
Compute customer-reported feature-request Mgmt
Dominant language
Java
Stars
97
Forks
102
PR merge metrics
No merged PRs in 30d

Description

There is currently no way to retrieve the combined model and instance views of a single Virtual Machine using a Get by ID API call in the SDK. The Virtual Machine Get REST API supports this using the $expand parameter:

https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/get

`Azure.virtualMachines().getById()` and `Azure.virtualMachines().getByIdAsync()` both call the Get API without the $expand parameter. The only way I've found to retrieve instance view details after calling getById() is to attempt to access one of the instance properties such as VirtualMachine.powerState(). This forces the calling code to make two sequential API calls to Azure.

It would be ideal to have a way in the SDK to retrieve both model and instance views in a single API call since the underlying REST API supports this mechanism.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.