Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.36k stars 2.71k forks source link

Support user assigned managed identities for azure batch pool add parameter #29282

Open jakevc opened 1 year ago

jakevc commented 1 year ago

Is your feature request related to a problem? Please describe.

I am unable to find out how to add a user assigned managed identity to the azure batch pool via the python SDK

Describe the solution you'd like

I want to be able to add a user assigned managed identity for the azure batch pool when adding a pool

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

ghost commented 1 year ago

Thank you for your feedback. This has been routed to the support team for assistance.

kristapratico commented 1 year ago

@jakevc thanks for your issue. We'll investigate and get back to you as soon as possible.

jakevc commented 1 year ago

https://learn.microsoft.com/en-us/answers/questions/606714/how-do-i-add-managed-identity-to-azure-batch-pool

This advice for example, seems to be inaccurate because PoolAddParameter class doesn't actually have an identity field.

jakevc commented 1 year ago

Ohh this is a duplicate of this other issue I guess: https://github.com/Azure/azure-sdk-for-python/issues/21811

jakevc commented 1 year ago

But still should really be included in this SDK

jakevc commented 1 year ago

Very cumbersome to have to use two different Batch clients

xiangyan99 commented 1 year ago

@wiboris could you help to answer the question?

renjthmails commented 1 year ago

Hello @xiangyan99,

Do we have solution yet or any tentative dates for this implementation to be available as part of the package ? Thank You, Renjith R

jakevc commented 10 months ago

Ping here again @wiboris @cRui861 @paterasMSFT

datatrigger commented 10 months ago

@jakevc Thanks for raising this issue. I am trying to set up a Batch pool able to pull from ACR but the fact that PoolAddParameter does not have any identity field makes it very cumbersome. @wiboris & Team, please add such a field in the Python SDK as it is part of the equivalent .NET class. Many thanks!

jakevc commented 10 months ago

@datatrigger I ended up refactoring my code so that the pool creation step uses the azure.mgmt.batch,

https://learn.microsoft.com/en-us/python/api/azure-mgmt-batch/azure.mgmt.batch.operations.pooloperations?view=azure-python#azure-mgmt-batch-operations-pooloperations-create

The Pool class in this package does support passing a managed identity:

https://learn.microsoft.com/en-us/python/api/azure-mgmt-batch/azure.mgmt.batch.models.pool?view=azure-python

And then for the other job and task operations I use azure.batch

github-actions[bot] commented 9 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @mksuni @bgklein @mscurrell @cRui861 @paterasMSFT @gingi @dpwatrous.

kfajdsl commented 9 months ago

Bump, this is super valuable for me as well - having to use two different clients is extremely cumbersome.

jakevc commented 8 months ago

I think the underlying reason for this is that not all components of azure batch are supported by ARM yet. Basically, the problem runs deep.

rfernand2 commented 4 weeks ago

Please update the docs to reflect this workaround until a cleaner solution is implemented.