azure - 是否有等效于“az rest”的 PowerShell?
问题描述
我最近发现了这个az rest
命令,它允许我执行经过身份验证的 REST 命令,而不必担心获取令牌。
https://www.codeisahighway.com/native-azure-rest-api-calls-now-available-in-azure-cli-2-0-67/
az rest --method patch --url "https://graph.microsoft.com/v1.0/users/johndoe@azuresdkteam.onmicrosoft.com" --body "{\"displayName\": \"jondoe2\"}"
Azure Powershell 中是否有等价物?我需要进行一个无法通过任何AzAd...
cmdlet 进行的调用。我会想象类似的东西Invoke-AzRestMethod
,但这不存在。
编辑:我想执行通过 Azure AD Cmdlet 不可用的调用(还)。就像直接使用新类型的 replyUrls,或者为 AAD B2C (Beta API) 上传自定义策略一样。
解决方案
您现在可以使用 Az Powershell 模块执行此操作
Invoke-AzRestMethod
-Path <String>
-Method <String>
[-Payload <String>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
推荐阅读
- swift - 通过单击 Xcode 源代码管理中的“结帐”损失了 2 周的进度,有什么办法可以恢复吗?
- r - R上的三个感叹号
- mysql - digitalocean上的Laravel 5:无法连接到数据库
- jenkins - 空手道 afterFeature 函数执行在本地运行时工作正常,但在通过 Jenkins 运行时失败
- r - Renderplot 不会为 R Shiny 中的多个绘图呈现 selectinput 的默认值
- powerbi - 累计值已知时的每日值 Power BI
- azure-machine-learning-service - 使用环境对象的 AML 服务评分
- r - R Shiny:将文本输出框固定到屏幕底部
- python - 将熊猫数据框转换为 JSON 对象列
- reactjs - ReactJS,一个组件正在更改要控制的类型编号的不受控制的输入