如何解决使用Az Powershell将新操作追加到现有API
在Azure API管理中,我正在研究将新操作附加到现有API修订版的可能性。
在导入API https://docs.microsoft.com/en-us/powershell/module/az.apimanagement/import-azapimanagementapi?view=azps-4.7.0的powershell命令中看不到这种灵活性(在更新和附加之间进行选择)
我们非常感谢您的帮助。谢谢!
解决方法
您可以使用此command来实现它。
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
New-AzApiManagementOperation -Context $apimContext -ApiId $APIId -OperationId "Operation001" -Name "Operation" -Method "GET" -UrlTemplate "/resource" -Description "Use this operation to get resource"
,
您应该使用此处记录的 PowerShell cmdlet Import-AzApiManagementApi
https://docs.microsoft.com/en-us/powershell/module/az.apimanagement/import-azapimanagementapi?view=azps-5.7.0
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。