如何从Microsoft Azure的Service Fabric中获取资源组名称 [英] How can I get the resource group name from within Service Fabric on Microsoft Azure

查看:88
本文介绍了如何从Microsoft Azure的Service Fabric中获取资源组名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的服务可以放置在不同的资源组上,但是需要知道资源组的名称才能请求有关正在运行的VM Scale Set的信息. 如何从Fabric内部获取Fabric所在的资源组的名称?

My service can be placed on different resource groups, but needs to know the name of the resource group in order to request information about the VM Scale Sets it's running on. How do I get the name of the Resource Group which the Fabric is in from within the Fabric?

推荐答案

这可能有效:

如果您唯一地标记资源组,并且将sf应用程序配置为知道该标记,则可以查询资源组并按标记进行过滤.您可以使用服务主体来访问资源管理器.

If you uniquely tag your resource group, and configure the sf application to know that tag, you might be able to query the resource groups and filter by tag. You could use a Service Principal to access the Resource manager.

这篇关于如何从Microsoft Azure的Service Fabric中获取资源组名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆