通过编程方式找到Azure函数的区域
我有一个使用托管服务身份身份验证令牌来调用Azure函数API的服务。我希望能够根据代码的区域调用正确的区域Azure函数。因此,例如,如果我通过的区域是useast2,则我需要使用C#编程中驻留在useast2区域中的Azure函数。我该怎么做?
谢谢
I have a service that invokes the azure function API using the Managed Service Identity authentication token. I want to be able to invoke the correct regional azure function based on the region from code. So for example, if the region I pass is useast2, I need to invoke the azure function that resides in useast2 region programmatically using C#. How can I do this?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将此代码线用于查找区域名称。
region_name
应用程序的名称。就我而言,我正在创建一个使用以下代码查找区域的WebJob。
输出
您可以在这些 Microsoft文档应用程序环境
You can use this line of code for find the regions name.
REGION_NAME
regions name of the app.In my case, I am create a webjob for find the region using below code.
Output
You can find other environment variable on these Microsoft Document App Environment