如何设置具有 Azure Compute API 权限的应用程序 [英] How do you set up app with permissions to Azure Compute API

查看:25
本文介绍了如何设置具有 Azure Compute API 权限的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为 Azure Compute 创建 API 客户端.我希望能够启动/停止/重新启动我的 Azure 虚拟机.

I am creating an API client for Azure Compute. I want the ability to start/stop/restart my Azure virtual machines.

过去,当我使用 Graph API 创建应用时,我创建了一个新的应用注册,然后在Microsoft Graph API"权限列表下为应用授予了我想要的操作权限.

In the past when I've created apps using the Graph API, I created a new app registration and then gave the app permissions for the actions I wanted under 'Microsoft Graph API' permissions list.

但是,我在可用的 Microsoft API 中找不到列出的 Azure 计算.我不知道我需要做什么才能获得 Azure 计算的 API 权限,而不是其他一些 API.

However, I cannot find Azure Compute listed in the available Microsoft APIs. I'm confused as to what I need to do in order to get API permissions for Azure compute as opposed to some of the other APIs.

我花了一上午时间寻找教程或示例实现来浏览,但是 Azure/Compute/API/permissions/etc 的组合......似乎从来没有想出我正在寻找的结果

I've spent the morning searching for tutorials or example implementations to look through, but combinations of Azure/Compute/API/permissions/etc... don't seem to ever come up with the results that I'm looking for.

有人做过这样的事情吗?是否可以将应用程序权限用于 Azure 计算还是完全独立?是否需要服务帐户?

Has anyone done something like this? Is it possible to use application permissions for Azure compute or is it entirely separate? Will it require a service account instead?

推荐答案

但是,我在可用的 Microsoft蜜蜂.我很困惑我需要做什么才能获得 API与其他一些 API 相对的 Azure 计算权限.

However, I cannot find Azure Compute listed in the available Microsoft APIs. I'm confused as to what I need to do in order to get API permissions for Azure compute as opposed to some of the other APIs.

您正在寻找的 API 是 Azure 服务管理.

The API you're looking for is Azure Service Management.

添加此委派权限后,只要在 Azure 订阅中为您的服务主体分配了适当的角色(例如虚拟机参与者),您就可以在虚拟机上执行操作.

Once you add this delegated permission, you will be able to perform operations on your Virtual Machines provided your Service Principal is assigned an appropriate role (Virtual Machine Contributor, for example) in an Azure Subscription.

这篇关于如何设置具有 Azure Compute API 权限的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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