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
- Langage dominant
- Java
- Étoiles
- 97
- Forks
- 102
- Métriques de merge des PR
- Aucune PR mergée en 30 j
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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par suivre Azure.virtualMachines().getById() et getByIdAsync() jusqu'à l'appel REST Get, puis consultez la documentation liée de Virtual Machines Get API concernant sa prise en charge de $expand. Le travail est terminé lorsque les deux méthodes du SDK peuvent récupérer des vues combinées du modèle et de l'instance via un seul appel d'API.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- azure, java
- Domaine
- api, cloud
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100