Azure / Azure/azure-libraries-for-java

Please consistently support .WithExistingXXX(*string resourceId*)

Aperta
#5 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Investigate Mgmt
Lingua principale
Java
Stelle
97
Fork
102
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

_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_

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia individuando le definizioni della Java Fluent API per WithExistingXXX, in particolare WithExistingSubnet utilizzato da DefinePrivateFrontend. Esamina quali metodi richiedono attualmente oggetti risorsa e identifica gli overload correlati che accettano gli ID delle risorse; il lavoro è completato quando le API interessate supportano coerentemente la forma basata sull'ID della risorsa senza richiedere una GET aggiuntiva.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
azure, java
Ambito
api, cloud
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.