Azure / Azure/azure-libraries-for-java
Please consistently support .WithExistingXXX(*string resourceId*)
- Lenguaje dominante
- Java
- Estrellas
- 97
- Forks
- 102
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
_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_
Guía de contribución
Línea de trabajo
Start by locating the Java Fluent API definitions for WithExistingXXX, especially WithExistingSubnet used by DefinePrivateFrontend. Review which methods currently require resource objects and identify the related overloads that accept resource IDs; done means the applicable APIs consistently support the resource-ID form without requiring an extra GET.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- azure, java
- Área
- api, cloud
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100