Azure / Azure/azure-libraries-for-java
Please consistently support .WithExistingXXX(*string resourceId*)
- Langage dominant
- Java
- Étoiles
- 97
- Forks
- 102
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
_From @TimLovellSmith on August 7, 2017 19:51_
Some Fluent APIs only give you a single overload of WithExistingXXX, such as the WithExistingSubnet(INetwork network, string subnetName) for defining ILoadBalancer private frontend which requires you to pass an INetwork object. Could these 'WithExisting' please be consistently implemented with an overload that works with just the resource ID?
```
loadBalancerDefWithFrontEnd = loadBalancerDefBlank
.DefinePrivateFrontend("frontend")
.WithExistingSubnet(vnet, subnetName)
.WithPrivateIPAddressStatic(StaticIP)
.Attach();
```
Not only is it sometimes simpler to implement with a resourceId string, requiring INetwork causes worse reliability as it requires extra GET calls to ARM to get resource state as the easiest way in order to satisfy these API signatures.
And finally, in some advanced RBAC scenarios, the authentication model required to do GET IFoo and then WithExisting(IFoo) is actually an added difficulty, because 'foo' another subscription. In the worst case you might even *fail* authentication on the GET even though the PUT request could in theory succeed (due to specific RBAC permissions granted you)!
(BTW this feedback is based on "Microsoft.Azure.Management.Network.Fluent" version="1.1.2")
_Copied from original issue: Azure/azure-sdk-for-net#3552_
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par localiser les définitions de la Java Fluent API pour WithExistingXXX, en particulier WithExistingSubnet, utilisé par DefinePrivateFrontend. Examinez quelles méthodes exigent actuellement des objets de ressource et identifiez les overloads associés qui acceptent des ID de ressources ; le travail est terminé lorsque les API concernées prennent systématiquement en charge la forme utilisant l’ID de ressource sans nécessiter de GET supplémentaire.
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é
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100