Azure / Azure/azure-libraries-for-java

Please consistently support .WithExistingXXX(*string resourceId*)

オープン
#5 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る
Investigate Mgmt
主要言語
Java
スター
97
フォーク
102
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、WithExistingXXX の Java Fluent API 定義、特に DefinePrivateFrontend で使用される WithExistingSubnet を見つけます。現在どのメソッドがリソースオブジェクトを必要としているかを確認し、リソース ID を受け取る関連するオーバーロードを特定します。対象となる API が、追加の GET を必要とせずにリソース ID 形式を一貫してサポートしていれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
azure, java
領域
api, cloud
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。