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

Aperta
#402 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Compute customer-reported feature-request Mgmt
Lingua principale
Java
Stelle
97
Fork
102
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.