Loading... Azure官方下载一个az-cli,各个操作系统的都有,官方文档讲得已经很详细了,这里就不做赘述。 [点我直达 Windows可直接点击此链接](https://aka.ms/installazurecliwindows) 下载并安装azure提供的cli安装文件安装 打开cmd或者powershell输入 `az login --use-device-code` 或 `az login`命令进行登录 前者需要手动打开https://aka.ms/devicelogin 输入code 进行登录,后者会调用默认的浏览器自动打开登录界面,两者各有利弊,前者可以在开号的环境下进行登录操作,而后者更方便,请自行选择 登录完成之后运行下面命令开通订阅的开机权限以及申请api <div class="hideContent">此处内容需要评论回复后(审核通过)方可阅读。</div> 通过以下代码也可以获取API信息: ``` az ad sp create-for-rbac --role contributor --scopes /subscriptions/$(az account list --query [].id -o tsv) ``` ``` az ad sp create-for-rbac --role owner --sdk-auth --years 99 --scopes /subscriptions/订阅ID ``` > 也可以通过登录 [https://shell.azure.com](https://shell.azure.com) 选择Bash或Powershell 输入以上命令获取API信息 <hr class="content-copyright" style="margin-top:50px" /><blockquote class="content-copyright" style="font-style:normal"><p class="content-copyright">版权属于:大漠孤狼</p><p class="content-copyright">本文链接:<a class="content-copyright" href="https://www.dmgls.com/1312.html">https://www.dmgls.com/1312.html</a></p><p class="content-copyright">转载时须注明出处及本声明</p></blockquote> Last modification:August 19th, 2022 at 07:55 pm © 允许规范转载 Support 如果觉得我的文章对你有用,请随意赞赏 Appreciate the author
7 comments
666
楼主,我是一个小白,其他行业人士,也想做一个和您一样的boke,请问怎么搞呢?
看看
333
666666
666
6666