gpt4 book ai didi

azure - 如何从azure应用程序服务中查找subscrptionID

转载 作者:行者123 更新时间:2023-12-03 05:17:57 25 4
gpt4 key购买 nike

我有一个在 Microsoft Azure 中运行的应用服务。我想知道是否有任何 API 可以获取我的订阅 ID,我的应用程序服务正在其中运行。我知道一个可以在虚拟机内部使用的 API,它返回包括订阅 ID 在内的元数据。但我找不到azure应用程序服务的任何相关API。我不想手动从配置发送订阅。我想一定有一种方法可以使用某些 API 自动获取。

提前致谢。

最佳答案

WEBSITE_OWNER_NAME环境变量:

Contains the Azure subscription ID that owns the app, the resource group, and the webspace.

引用:https://learn.microsoft.com/en-us/azure/app-service/reference-app-settings?tabs=kudu%2Cdotnet#app-environment

关于azure - 如何从azure应用程序服务中查找subscrptionID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74034465/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com