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
- Vorherrschende Sprache
- Java
- Sterne
- 97
- Forks
- 102
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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.
Beitragsleitfaden
Rechercherichtung
Beginne damit, Azure.virtualMachines().getById() und getByIdAsync() bis zum REST Get-Aufruf nachzuverfolgen, und lies anschließend die verlinkte Dokumentation zur Virtual Machines Get API auf ihre Unterstützung von $expand hin. Die Aufgabe ist abgeschlossen, wenn beide SDK-Methoden kombinierte Modell- und Instanzansichten über einen einzigen API-Aufruf abrufen können.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- azure, java
- Bereich
- api, cloud
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100