如何解决Azure API管理-如何使用Azure Cli添加API和操作?
我已经手动添加了以下API和Azure API管理上的操作
我尝试过azure cli添加相同的API和操作,但是无法实现。如何使用Azure Cli或Azure Powershell在Azure API管理上添加API和简单的操作?
解决方法
您可以使用Azure CLI:
请在我的博客文章中找到更多详细信息:
Create Azure API Management API Operation with Azure CLI
$resourceGroupName = "eval.datatransformation"
$serviceName = "mm-sample"
$apiId="lorem-ipsum"
$apiDisplayName="Lorem Ipsum"
$apiId="Lorem"
$apiPath="/lorem-ipsum"
$operationPath="/"
$operationDisplayName="Get"
$operationDescription="Gets the data"
az login
# create the API
az apim api create --service-name $serviceName -g $resourceGroupName --api-id $apiId --path $apiPath --display-name $apiDisplayName
# create the Operation
az apim api operation create --service-name $serviceName -g $resourceGroupName --api-id $apiId --url-template $operationPath --method "GET" --display-name $operationDisplayName --description $operationDescription
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。