在Azure APIM中导入Azure功能 [英] Importing Azure Function in Azure APIM

查看:159
本文介绍了在Azure APIM中导入Azure功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在浏览有关APIM的在线文章及其使用ARM模板的配置。创建APIM的基本模板非常简单。但是,我想将Azure功能应用程序中的所有API导入APIM API。是否有
使用ARM模板或Azure Powershell实现此目的?

I have been going through the online articles on APIM and its configuration using ARM templates. The basic template for the creation of APIM is quite straight forward. However, I want to import all the APIs in an Azure Function App into APIM API. Is there a way of achieving this using ARM Template or Azure Powershell?

到目前为止,在线提供的唯一解决方案是手动导入并从azure门户导出模板。问题是,有很多参数和部分,因为在功能应用程序中有这么多的API,现在模板看起来很混乱
和凌乱。我正在寻找一个更好,更清洁的解决方案,它将从功能应用程序导入API,让我配置OAuth和其他参数。

Till now, the only solution given online is to import it manually and export the template from the azure portal. The problem is that, there are a lot of parameters and sections as there were so many APIs in function app and now the template looks very confusing and messy. I am looking for a better and cleaner solution which would import the APIs from a Function App and let me configure the OAuth and other parameters.

此外,如果在函数内创建了新的API App,有没有办法自动将其添加到APIM API?或者是否需要手动完成?

Also, if a new API is created within the Function App, is there a way to automatically add it to the APIM API? Or is it needed to be done manually?

推荐答案

您好AnanyoBAzDOps

Hi AnanyoBAzDOps

你有没有探索过&尝试使用  Azure API管理DevOps资源工具包?我认为您可以使用此工具(a)为您的APIM服务建立CI / CD,以及(b)为您的APIM实例上运行的所有API创建
ARM模板,并在单独的dev和prod中创建其配置Git回购上的分支机构。有了这个,现在你可能需要的只是另一个过程,可以通过Logic Apps或Poweshell在Git上更新你的
ARM模板,以反映你当前的功能应用程序结构(以保持它们同步),然后在效果中,将触发你的APIM重新部署?
$


更新:以上内容可能仅适用于函数v1.x:  为函数创建OpenAPI定义

Have you explored & tried using Azure API Management DevOps Resource Kit? I think that you can use this tool to (a) establish CI/CD for your APIM service and (b) create ARM templates for all of your APIs that run on your APIM instance and its configurations in separate dev and prod branches on a Git repo. With this in place, may be all you'll need now is another process either via Logic Apps or Poweshell that updates your ARM templates on Git to reflect your current functions apps structure (to keep them in-sync), which then in an effect, will trigger re-deployment of your APIM?

UPDATE: the above might only work with Functions v1.x as per: Create an OpenAPI definition for a function


这篇关于在Azure APIM中导入Azure功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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