Azure / Azure/azure-libraries-for-java

Please consistently support .WithExistingXXX(*string resourceId*)

Đang mở
#5 6 bình luận 0 reaction 0 người được giao Xem trên GitHub
Investigate Mgmt
Ngôn ngữ chính
Java
Star
97
Fork
102
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách xác định các định nghĩa Java Fluent API cho WithExistingXXX, đặc biệt là WithExistingSubnet được DefinePrivateFrontend sử dụng. Xem lại những phương thức nào hiện yêu cầu các đối tượng tài nguyên và xác định các overload liên quan chấp nhận ID tài nguyên; công việc được xem là hoàn tất khi các API áp dụng nhất quán hỗ trợ dạng ID tài nguyên mà không yêu cầu thêm một GET.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
azure, java
Lĩnh vực
api, cloud
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.