You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/05/24 14:02:56 UTC

[GitHub] [apisix] penghuima opened a new pull request, #7120: docs: add azure-functions CN document

penghuima opened a new pull request, #7120:
URL: https://github.com/apache/apisix/pull/7120

   Signed-off-by: penghuima <29...@qq.com>
   
   ### Description
   
   docs: add azure-functions CN document
   
   Fixes # (issue)
   
   ### Checklist
   
   - [ ] I have explained the need for this PR and the problem it solves
   - [ ] I have explained the changes or the new features added to this PR
   - [ ] I have added tests corresponding to this change
   - [ ] I have updated the documentation to reflect this change
   - [ ] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first)
   
   <!--
   
   Note
   
   1. Mark the PR as draft until it's ready to be reviewed.
   2. Always add/update tests for any changes unless you have a good reason.
   3. Always update the documentation to reflect the changes made in the PR.
   4. Make a new commit to resolve conversations instead of `push -f`.
   5. To resolve merge conflicts, merge master instead of rebasing.
   6. Use "request review" to notify the reviewer after making changes.
   7. Only a reviewer can mark a conversation as resolved.
   
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] SylviaBABY commented on a diff in pull request #7120: docs: add azure-functions CN document

Posted by GitBox <gi...@apache.org>.
SylviaBABY commented on code in PR #7120:
URL: https://github.com/apache/apisix/pull/7120#discussion_r881147433


##########
docs/zh/latest/plugins/azure-functions.md:
##########
@@ -0,0 +1,198 @@
+---
+title: azure-functions
+keywords:
+  - APISIX
+  - Plugin
+  - Azure Functions
+  - azure-functions
+description: 本文介绍了关于 Apache APISIX `azure-functions` 插件的基本信息及使用方法。
+---
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+`azure-functions` 插件用于将 [Azure Serverless Function](https://azure.microsoft.com/en-in/services/functions/) 作为动态上游集成至 APISIX,从而实现将访问指定 URI 的请求代理到 Microsoft Azure 云。
+
+启用 `azure-functions` 插件后,该插件会终止对已配置 URI 的请求,并代表客户端向 Azure Functions 发起一个新的请求。这个新请求中携带了之前配置的授权详细信息,包括请求头、请求体和参数(以上参数都是从原始请求中传递的),然后 `azure-functions` 插件会将带有响应头、状态码和响应体的响应信息返回给使用 APISIX 发起请求的客户端。
+
+## 属性
+
+| 名称                   | 类型    | 必选项 | 默认值 | 有效值     | 描述                                                         |
+| ---------------------- | ------- | ------ | ------ | ---------- | ------------------------------------------------------------ |
+| function_uri           | string  | 是     |        |            | 触发 Serverless Functions 的 Azure Functions 端点。例如,`http://test-apisix.azurewebsites.net/api/HttpTrigger`。 |
+| authorization          | object  | 否     |        |            | 访问 Azure Functions 的授权凭证。                            |
+| authorization.apikey   | string  | 否     |        |            | 授权凭证内的字段。生成 API 密钥来授权对端点的请求。          |
+| authorization.clientid | string  | 否     |        |            | 授权凭证内的字段。生成客户端 ID(Azure Active Directory)来授权对端点的请求。 |
+| timeout                | integer | 否     | 3000   | [100,...]  | 代理请求超时(以毫秒为单位)。                               |
+| ssl_verify             | boolean | 否     | true   | true/false | 当设置为 `true` 时执行 SSL 验证。                            |
+| keepalive              | boolean | 否     | true   | true/false | 当设置为 `true` 时,保持连接的活动状态以便重复使用。         |
+| keepalive_pool         | integer | 否     | 5      | [1,...]    | 连接断开之前,可接收的最大请求数。                           |
+| keepalive_timeout      | integer | 否     | 60000  | [1000,...] | 当连接空闲时,保持该连接处于活动状态的时间(以毫秒为单位)。 |
+
+## 元数据
+
+| 名称            | 类型   | 必选项 | 默认值 | 描述                                                         |
+| --------------- | ------ | ------ | ------ | ------------------------------------------------------------ |
+| master_apikey   | string | 否     | ""     | 可用于访问 Azure Functions URI 的 API 密钥。                 |
+| master_clientid | string | 否     | ""     | 可用于授权 Azure Functions URI 的客户 ID(Active Directory)。 |
+
+`azure-functions` 插件的元数据提供了授权回退的功能。它定义了 `master_apikey` 和 `master_clientid` 字段,用户可以为关键任务的应用部署声明主 API 密钥或客户端 ID。因此,如果在 `azure-functions` 插件属性中没有找到授权凭证,元数据中的授权凭证就会发挥作用。
+
+授权方式优先级排序如下:
+
+- 首先,`azure-functions` 插件在 Apache APISIX 代理的请求头中寻找 `x-functions-key` 或 `x-functions-clientid` 键。
+- 如果没有找到,`azure-functions` 插件会检查插件属性中的授权凭证。如果授权凭证存在,`azure-functions` 插件会将相应的授权标头添加到发送到 Azure cloud function 的请求中。
+- 如果在 `azure-functions` 插件属性中没有找到授权凭证,Apache APISIX 将获取插件元数据配置并使用主密钥。
+
+如果你想添加一个新的主 API Key,请向 `/apisix/admin/plugin_metadata` 端点发出请求,并附上所需的元数据。示例如下:
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/plugin_metadata/azure-functions -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "master_apikey" : "<Your Azure master access key>"
+}'
+```
+
+## 启用插件
+
+以下示例展示了如何在指定路由上启用 `azure-functions` 插件。请确保你的 Azure Functions 已经部署好并提供服务。

Review Comment:
   ```suggestion
   以下示例展示了如何在指定路由上启用 `azure-functions` 插件。请确保你的 Azure Functions 已提前部署好,并正常提供服务。
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] SylviaBABY commented on a diff in pull request #7120: docs: add azure-functions CN document

Posted by GitBox <gi...@apache.org>.
SylviaBABY commented on code in PR #7120:
URL: https://github.com/apache/apisix/pull/7120#discussion_r881112306


##########
docs/zh/latest/plugins/azure-functions.md:
##########
@@ -0,0 +1,198 @@
+---
+title: azure-functions
+keywords:
+  - APISIX
+  - Plugin
+  - Azure Functions
+  - azure-functions
+description: 本文介绍了关于 Apache APISIX `azure-functions` 插件的基本信息及使用方法。
+---
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+`azure-functions` 插件用于将 [Azure Serverless Function](https://azure.microsoft.com/en-in/services/functions/) 作为动态上游集成至 APISIX,从而实现将访问指定 URI 的请求代理到 Microsoft Azure 云。

Review Comment:
   ```suggestion
   `azure-functions` 插件用于将 [Azure Serverless Function](https://azure.microsoft.com/en-in/services/functions/) 作为动态上游集成至 APISIX,从而实现将访问指定 URI 的请求代理到 Microsoft Azure 云服务。
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] lunarwhite commented on a diff in pull request #7120: docs: add azure-functions CN document

Posted by GitBox <gi...@apache.org>.
lunarwhite commented on code in PR #7120:
URL: https://github.com/apache/apisix/pull/7120#discussion_r882409897


##########
docs/zh/latest/plugins/azure-functions.md:
##########
@@ -0,0 +1,202 @@
+---
+title: azure-functions
+keywords:
+  - APISIX
+  - Plugin
+  - Azure Functions
+  - azure-functions
+description: 本文介绍了关于 Apache APISIX `azure-functions` 插件的基本信息及使用方法。
+---
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+`azure-functions` 插件用于将 [Azure Serverless Function](https://azure.microsoft.com/en-in/services/functions/) 作为动态上游集成至 APISIX,从而实现将访问指定 URI 的请求代理到 Microsoft Azure 云服务。
+
+启用 `azure-functions` 插件后,该插件会终止对已配置 URI 的请求,并代表客户端向 Azure Functions 发起一个新的请求。该新请求中携带了之前配置的授权详细信息,包括请求头、请求体和参数(以上参数都是从原始请求中传递的)。之后便会通过 `azure-functions` 插件,将带有响应头、状态码和响应体的信息返回给使用 APISIX 发起请求的客户端。
+
+## 属性
+
+| 名称                   | 类型    | 必选项 | 默认值 | 有效值     | 描述                                                         |
+| ---------------------- | ------- | ------ | ------ | ---------- | ------------------------------------------------------------ |
+| function_uri           | string  | 是     |        |            | 触发 Serverless Functions 的 Azure Functions 端点。例如 `http://test-apisix.azurewebsites.net/api/HttpTrigger`。 |
+| authorization          | object  | 否     |        |            | 访问 Azure Functions 的授权凭证。                            |
+| authorization.apikey   | string  | 否     |        |            | 授权凭证内的字段。生成 API 密钥来授权对端点的请求。          |
+| authorization.clientid | string  | 否     |        |            | 授权凭证内的字段。生成客户端 ID(Azure Active Directory)来授权对端点的请求。 |
+| timeout                | integer | 否     | 3000   | [100,...]  | 代理请求超时(以毫秒为单位)。                               |
+| ssl_verify             | boolean | 否     | true   | true/false | 当设置为 `true` 时执行 SSL 验证。                            |
+| keepalive              | boolean | 否     | true   | true/false | 当设置为 `true` 时,保持连接的活动状态以便重复使用。         |
+| keepalive_pool         | integer | 否     | 5      | [1,...]    | 连接断开之前,可接收的最大请求数。                           |
+| keepalive_timeout      | integer | 否     | 60000  | [1000,...] | 当连接空闲时,保持该连接处于活动状态的时间(以毫秒为单位)。 |
+
+## 元数据
+
+| 名称            | 类型   | 必选项 | 默认值 | 描述                                                         |
+| --------------- | ------ | ------ | ------ | ------------------------------------------------------------ |
+| master_apikey   | string | 否     | ""     | 可用于访问 Azure Functions URI 的 API 密钥。                 |
+| master_clientid | string | 否     | ""     | 可用于授权 Azure Functions URI 的客户 ID(Active Directory)。 |

Review Comment:
   ```suggestion
   | master_clientid | string | 否     | ""     | 可用于授权 Azure Functions URI 的客户端 ID(Active Directory)。 |
   ```



##########
docs/zh/latest/plugins/azure-functions.md:
##########
@@ -0,0 +1,202 @@
+---
+title: azure-functions
+keywords:
+  - APISIX
+  - Plugin
+  - Azure Functions
+  - azure-functions
+description: 本文介绍了关于 Apache APISIX `azure-functions` 插件的基本信息及使用方法。
+---
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+`azure-functions` 插件用于将 [Azure Serverless Function](https://azure.microsoft.com/en-in/services/functions/) 作为动态上游集成至 APISIX,从而实现将访问指定 URI 的请求代理到 Microsoft Azure 云服务。
+
+启用 `azure-functions` 插件后,该插件会终止对已配置 URI 的请求,并代表客户端向 Azure Functions 发起一个新的请求。该新请求中携带了之前配置的授权详细信息,包括请求头、请求体和参数(以上参数都是从原始请求中传递的)。之后便会通过 `azure-functions` 插件,将带有响应头、状态码和响应体的信息返回给使用 APISIX 发起请求的客户端。
+
+## 属性
+
+| 名称                   | 类型    | 必选项 | 默认值 | 有效值     | 描述                                                         |
+| ---------------------- | ------- | ------ | ------ | ---------- | ------------------------------------------------------------ |
+| function_uri           | string  | 是     |        |            | 触发 Serverless Functions 的 Azure Functions 端点。例如 `http://test-apisix.azurewebsites.net/api/HttpTrigger`。 |
+| authorization          | object  | 否     |        |            | 访问 Azure Functions 的授权凭证。                            |
+| authorization.apikey   | string  | 否     |        |            | 授权凭证内的字段。生成 API 密钥来授权对端点的请求。          |
+| authorization.clientid | string  | 否     |        |            | 授权凭证内的字段。生成客户端 ID(Azure Active Directory)来授权对端点的请求。 |
+| timeout                | integer | 否     | 3000   | [100,...]  | 代理请求超时(以毫秒为单位)。                               |
+| ssl_verify             | boolean | 否     | true   | true/false | 当设置为 `true` 时执行 SSL 验证。                            |
+| keepalive              | boolean | 否     | true   | true/false | 当设置为 `true` 时,保持连接的活动状态以便重复使用。         |
+| keepalive_pool         | integer | 否     | 5      | [1,...]    | 连接断开之前,可接收的最大请求数。                           |
+| keepalive_timeout      | integer | 否     | 60000  | [1000,...] | 当连接空闲时,保持该连接处于活动状态的时间(以毫秒为单位)。 |
+
+## 元数据
+
+| 名称            | 类型   | 必选项 | 默认值 | 描述                                                         |
+| --------------- | ------ | ------ | ------ | ------------------------------------------------------------ |
+| master_apikey   | string | 否     | ""     | 可用于访问 Azure Functions URI 的 API 密钥。                 |
+| master_clientid | string | 否     | ""     | 可用于授权 Azure Functions URI 的客户 ID(Active Directory)。 |
+
+`azure-functions` 插件的元数据提供了授权回退的功能。它定义了 `master_apikey` 和 `master_clientid` 字段,用户可以为关键任务的应用部署声明 API 密钥或客户端 ID。因此,如果在 `azure-functions` 插件属性中没有找到相关授权凭证,此时元数据中的授权凭证就会发挥作用。
+
+:::note
+
+授权方式优先级排序如下:
+
+- 首先,`azure-functions` 插件在 Apache APISIX 代理的请求头中寻找 `x-functions-key` 或 `x-functions-clientid` 键。
+- 如果没有找到,`azure-functions` 插件会检查插件属性中的授权凭证。如果授权凭证存在,`azure-functions` 插件会将相应的授权标头添加到发送到 Azure cloud function 的请求中。
+- 如果在 `azure-functions` 插件属性中没有找到授权凭证,Apache APISIX 将获取插件元数据配置并使用 API 密钥。
+
+:::
+
+如果你想添加一个新的 API 密钥,请向 `/apisix/admin/plugin_metadata` 端点发出请求,并附上所需的元数据。示例如下:
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/plugin_metadata/azure-functions -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "master_apikey" : "<Your Azure master access key>"
+}'
+```
+
+## 启用插件
+
+以下示例展示了如何在指定路由上启用 `azure-functions` 插件。请确保你的 Azure Functions 已提前部署好,并正常提供服务。
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "plugins": {
+        "azure-functions": {
+            "function_uri": "http://test-apisix.azurewebsites.net/api/HttpTrigger",
+            "authorization": {
+                "apikey": "<Generated API key to access the Azure-Function>"
+            }
+        }
+    },
+    "uri": "/azure"
+}'
+```
+
+通过上述示例配置插件后,任何对 `/azure` URI 的请求(`HTTP/1.1`、`HTTPS`、`HTTP2`)都将调用已配置的 Azure Functions 的 URI,并且会将响应信息返回给客户端。
+
+下述命令的含义是:Azure Function 从请求中获取 `name` 参数,并返回一条 `"Hello $name"` 消息:

Review Comment:
   ```suggestion
   下述命令的含义是:Azure Functions 从请求中获取 `name` 参数,并返回一条 `"Hello $name"` 消息:
   ```
   
   Keep 



##########
docs/zh/latest/plugins/azure-functions.md:
##########
@@ -0,0 +1,202 @@
+---
+title: azure-functions
+keywords:
+  - APISIX
+  - Plugin
+  - Azure Functions
+  - azure-functions
+description: 本文介绍了关于 Apache APISIX `azure-functions` 插件的基本信息及使用方法。
+---
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+`azure-functions` 插件用于将 [Azure Serverless Function](https://azure.microsoft.com/en-in/services/functions/) 作为动态上游集成至 APISIX,从而实现将访问指定 URI 的请求代理到 Microsoft Azure 云服务。
+
+启用 `azure-functions` 插件后,该插件会终止对已配置 URI 的请求,并代表客户端向 Azure Functions 发起一个新的请求。该新请求中携带了之前配置的授权详细信息,包括请求头、请求体和参数(以上参数都是从原始请求中传递的)。之后便会通过 `azure-functions` 插件,将带有响应头、状态码和响应体的信息返回给使用 APISIX 发起请求的客户端。
+
+## 属性
+
+| 名称                   | 类型    | 必选项 | 默认值 | 有效值     | 描述                                                         |
+| ---------------------- | ------- | ------ | ------ | ---------- | ------------------------------------------------------------ |
+| function_uri           | string  | 是     |        |            | 触发 Serverless Functions 的 Azure Functions 端点。例如 `http://test-apisix.azurewebsites.net/api/HttpTrigger`。 |
+| authorization          | object  | 否     |        |            | 访问 Azure Functions 的授权凭证。                            |
+| authorization.apikey   | string  | 否     |        |            | 授权凭证内的字段。生成 API 密钥来授权对端点的请求。          |
+| authorization.clientid | string  | 否     |        |            | 授权凭证内的字段。生成客户端 ID(Azure Active Directory)来授权对端点的请求。 |
+| timeout                | integer | 否     | 3000   | [100,...]  | 代理请求超时(以毫秒为单位)。                               |
+| ssl_verify             | boolean | 否     | true   | true/false | 当设置为 `true` 时执行 SSL 验证。                            |
+| keepalive              | boolean | 否     | true   | true/false | 当设置为 `true` 时,保持连接的活动状态以便重复使用。         |
+| keepalive_pool         | integer | 否     | 5      | [1,...]    | 连接断开之前,可接收的最大请求数。                           |
+| keepalive_timeout      | integer | 否     | 60000  | [1000,...] | 当连接空闲时,保持该连接处于活动状态的时间(以毫秒为单位)。 |
+
+## 元数据
+
+| 名称            | 类型   | 必选项 | 默认值 | 描述                                                         |
+| --------------- | ------ | ------ | ------ | ------------------------------------------------------------ |
+| master_apikey   | string | 否     | ""     | 可用于访问 Azure Functions URI 的 API 密钥。                 |
+| master_clientid | string | 否     | ""     | 可用于授权 Azure Functions URI 的客户 ID(Active Directory)。 |
+
+`azure-functions` 插件的元数据提供了授权回退的功能。它定义了 `master_apikey` 和 `master_clientid` 字段,用户可以为关键任务的应用部署声明 API 密钥或客户端 ID。因此,如果在 `azure-functions` 插件属性中没有找到相关授权凭证,此时元数据中的授权凭证就会发挥作用。
+
+:::note
+
+授权方式优先级排序如下:
+
+- 首先,`azure-functions` 插件在 Apache APISIX 代理的请求头中寻找 `x-functions-key` 或 `x-functions-clientid` 键。
+- 如果没有找到,`azure-functions` 插件会检查插件属性中的授权凭证。如果授权凭证存在,`azure-functions` 插件会将相应的授权标头添加到发送到 Azure cloud function 的请求中。
+- 如果在 `azure-functions` 插件属性中没有找到授权凭证,Apache APISIX 将获取插件元数据配置并使用 API 密钥。
+
+:::
+
+如果你想添加一个新的 API 密钥,请向 `/apisix/admin/plugin_metadata` 端点发出请求,并附上所需的元数据。示例如下:
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/plugin_metadata/azure-functions -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "master_apikey" : "<Your Azure master access key>"
+}'
+```
+
+## 启用插件
+
+以下示例展示了如何在指定路由上启用 `azure-functions` 插件。请确保你的 Azure Functions 已提前部署好,并正常提供服务。
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "plugins": {
+        "azure-functions": {
+            "function_uri": "http://test-apisix.azurewebsites.net/api/HttpTrigger",
+            "authorization": {
+                "apikey": "<Generated API key to access the Azure-Function>"
+            }
+        }
+    },
+    "uri": "/azure"
+}'
+```
+
+通过上述示例配置插件后,任何对 `/azure` URI 的请求(`HTTP/1.1`、`HTTPS`、`HTTP2`)都将调用已配置的 Azure Functions 的 URI,并且会将响应信息返回给客户端。
+
+下述命令的含义是:Azure Function 从请求中获取 `name` 参数,并返回一条 `"Hello $name"` 消息:
+
+```shell
+curl -i -XGET http://localhost:9080/azure\?name=APISIX
+```
+
+正常返回结果:
+
+```shell
+HTTP/1.1 200 OK
+Content-Type: text/plain; charset=utf-8
+...
+Hello, APISIX
+```
+
+以下示例是客户端通过 HTTP/2 协议与 APISIX 进行通信。
+
+在进行测试之前,由于该 `enable_http2: true` 默认是禁用状态,你可以通过在 `./conf/config.yaml` 中添加 `apisix.node_listen` 下的 `- port: 9081` 和 `enable_http2: true` 字段启用。示例如下:
+
+```yaml
+apisix:
+  admin_key:
+...
+  node_listen:                      # 支持监听多个端口
+    - 9080
+    - port: 9081
+      enable_http2: true            # 该字段如果不设置,默认值为 `false`
+```
+
+使用 `curl` 命令测试:
+
+```shell
+curl -i -XGET --http2 --http2-prior-knowledge http://localhost:9081/azure\?name=APISIX
+```
+
+正常返回结果:
+
+```shell
+HTTP/2 200
+content-type: text/plain; charset=utf-8
+...
+Hello, APISIX
+```
+
+### 配置路径转发
+
+`azure-functions` 插件在代理请求到 Azure Functions 上游时也支持 URL 路径转发。基本请求路径的扩展被附加到插件配置中指定的 `function_uri` 字段上。
+
+:::info 注意

Review Comment:
   ```suggestion
   :::info IMPORTANT
   ```



##########
docs/zh/latest/plugins/azure-functions.md:
##########
@@ -0,0 +1,202 @@
+---
+title: azure-functions
+keywords:
+  - APISIX
+  - Plugin
+  - Azure Functions
+  - azure-functions
+description: 本文介绍了关于 Apache APISIX `azure-functions` 插件的基本信息及使用方法。
+---
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+`azure-functions` 插件用于将 [Azure Serverless Function](https://azure.microsoft.com/en-in/services/functions/) 作为动态上游集成至 APISIX,从而实现将访问指定 URI 的请求代理到 Microsoft Azure 云服务。
+
+启用 `azure-functions` 插件后,该插件会终止对已配置 URI 的请求,并代表客户端向 Azure Functions 发起一个新的请求。该新请求中携带了之前配置的授权详细信息,包括请求头、请求体和参数(以上参数都是从原始请求中传递的)。之后便会通过 `azure-functions` 插件,将带有响应头、状态码和响应体的信息返回给使用 APISIX 发起请求的客户端。
+
+## 属性
+
+| 名称                   | 类型    | 必选项 | 默认值 | 有效值     | 描述                                                         |
+| ---------------------- | ------- | ------ | ------ | ---------- | ------------------------------------------------------------ |
+| function_uri           | string  | 是     |        |            | 触发 Serverless Functions 的 Azure Functions 端点。例如 `http://test-apisix.azurewebsites.net/api/HttpTrigger`。 |
+| authorization          | object  | 否     |        |            | 访问 Azure Functions 的授权凭证。                            |
+| authorization.apikey   | string  | 否     |        |            | 授权凭证内的字段。生成 API 密钥来授权对端点的请求。          |
+| authorization.clientid | string  | 否     |        |            | 授权凭证内的字段。生成客户端 ID(Azure Active Directory)来授权对端点的请求。 |
+| timeout                | integer | 否     | 3000   | [100,...]  | 代理请求超时(以毫秒为单位)。                               |
+| ssl_verify             | boolean | 否     | true   | true/false | 当设置为 `true` 时执行 SSL 验证。                            |
+| keepalive              | boolean | 否     | true   | true/false | 当设置为 `true` 时,保持连接的活动状态以便重复使用。         |
+| keepalive_pool         | integer | 否     | 5      | [1,...]    | 连接断开之前,可接收的最大请求数。                           |
+| keepalive_timeout      | integer | 否     | 60000  | [1000,...] | 当连接空闲时,保持该连接处于活动状态的时间(以毫秒为单位)。 |
+
+## 元数据
+
+| 名称            | 类型   | 必选项 | 默认值 | 描述                                                         |
+| --------------- | ------ | ------ | ------ | ------------------------------------------------------------ |
+| master_apikey   | string | 否     | ""     | 可用于访问 Azure Functions URI 的 API 密钥。                 |
+| master_clientid | string | 否     | ""     | 可用于授权 Azure Functions URI 的客户 ID(Active Directory)。 |
+
+`azure-functions` 插件的元数据提供了授权回退的功能。它定义了 `master_apikey` 和 `master_clientid` 字段,用户可以为关键任务的应用部署声明 API 密钥或客户端 ID。因此,如果在 `azure-functions` 插件属性中没有找到相关授权凭证,此时元数据中的授权凭证就会发挥作用。
+
+:::note
+
+授权方式优先级排序如下:
+
+- 首先,`azure-functions` 插件在 Apache APISIX 代理的请求头中寻找 `x-functions-key` 或 `x-functions-clientid` 键。
+- 如果没有找到,`azure-functions` 插件会检查插件属性中的授权凭证。如果授权凭证存在,`azure-functions` 插件会将相应的授权标头添加到发送到 Azure cloud function 的请求中。
+- 如果在 `azure-functions` 插件属性中没有找到授权凭证,Apache APISIX 将获取插件元数据配置并使用 API 密钥。

Review Comment:
   ```suggestion
   1. 首先,`azure-functions` 插件在 APISIX 代理的请求头中寻找 `x-functions-key` 或 `x-functions-clientid` 键。
   2. 如果没有找到,`azure-functions` 插件会检查插件属性中的授权凭证。如果授权凭证存在,`azure-functions` 插件会将相应的授权标头添加到发送到 Azure Functions 的请求中。
   3. 如果未配置 `azure-functions` 插件的授权凭证属性,APISIX 将获取插件元数据配置并使用 API 密钥。
   ```



##########
docs/zh/latest/plugins/azure-functions.md:
##########
@@ -0,0 +1,202 @@
+---
+title: azure-functions
+keywords:
+  - APISIX
+  - Plugin
+  - Azure Functions
+  - azure-functions
+description: 本文介绍了关于 Apache APISIX `azure-functions` 插件的基本信息及使用方法。
+---
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+`azure-functions` 插件用于将 [Azure Serverless Function](https://azure.microsoft.com/en-in/services/functions/) 作为动态上游集成至 APISIX,从而实现将访问指定 URI 的请求代理到 Microsoft Azure 云服务。
+
+启用 `azure-functions` 插件后,该插件会终止对已配置 URI 的请求,并代表客户端向 Azure Functions 发起一个新的请求。该新请求中携带了之前配置的授权详细信息,包括请求头、请求体和参数(以上参数都是从原始请求中传递的)。之后便会通过 `azure-functions` 插件,将带有响应头、状态码和响应体的信息返回给使用 APISIX 发起请求的客户端。
+
+## 属性
+
+| 名称                   | 类型    | 必选项 | 默认值 | 有效值     | 描述                                                         |
+| ---------------------- | ------- | ------ | ------ | ---------- | ------------------------------------------------------------ |
+| function_uri           | string  | 是     |        |            | 触发 Serverless Functions 的 Azure Functions 端点。例如 `http://test-apisix.azurewebsites.net/api/HttpTrigger`。 |
+| authorization          | object  | 否     |        |            | 访问 Azure Functions 的授权凭证。                            |
+| authorization.apikey   | string  | 否     |        |            | 授权凭证内的字段。生成 API 密钥来授权对端点的请求。          |
+| authorization.clientid | string  | 否     |        |            | 授权凭证内的字段。生成客户端 ID(Azure Active Directory)来授权对端点的请求。 |
+| timeout                | integer | 否     | 3000   | [100,...]  | 代理请求超时(以毫秒为单位)。                               |
+| ssl_verify             | boolean | 否     | true   | true/false | 当设置为 `true` 时执行 SSL 验证。                            |
+| keepalive              | boolean | 否     | true   | true/false | 当设置为 `true` 时,保持连接的活动状态以便重复使用。         |
+| keepalive_pool         | integer | 否     | 5      | [1,...]    | 连接断开之前,可接收的最大请求数。                           |
+| keepalive_timeout      | integer | 否     | 60000  | [1000,...] | 当连接空闲时,保持该连接处于活动状态的时间(以毫秒为单位)。 |
+
+## 元数据
+
+| 名称            | 类型   | 必选项 | 默认值 | 描述                                                         |
+| --------------- | ------ | ------ | ------ | ------------------------------------------------------------ |
+| master_apikey   | string | 否     | ""     | 可用于访问 Azure Functions URI 的 API 密钥。                 |
+| master_clientid | string | 否     | ""     | 可用于授权 Azure Functions URI 的客户 ID(Active Directory)。 |
+
+`azure-functions` 插件的元数据提供了授权回退的功能。它定义了 `master_apikey` 和 `master_clientid` 字段,用户可以为关键任务的应用部署声明 API 密钥或客户端 ID。因此,如果在 `azure-functions` 插件属性中没有找到相关授权凭证,此时元数据中的授权凭证就会发挥作用。
+
+:::note
+
+授权方式优先级排序如下:
+
+- 首先,`azure-functions` 插件在 Apache APISIX 代理的请求头中寻找 `x-functions-key` 或 `x-functions-clientid` 键。
+- 如果没有找到,`azure-functions` 插件会检查插件属性中的授权凭证。如果授权凭证存在,`azure-functions` 插件会将相应的授权标头添加到发送到 Azure cloud function 的请求中。
+- 如果在 `azure-functions` 插件属性中没有找到授权凭证,Apache APISIX 将获取插件元数据配置并使用 API 密钥。
+
+:::
+
+如果你想添加一个新的 API 密钥,请向 `/apisix/admin/plugin_metadata` 端点发出请求,并附上所需的元数据。示例如下:
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/plugin_metadata/azure-functions -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "master_apikey" : "<Your Azure master access key>"
+}'
+```
+
+## 启用插件
+
+以下示例展示了如何在指定路由上启用 `azure-functions` 插件。请确保你的 Azure Functions 已提前部署好,并正常提供服务。
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "plugins": {
+        "azure-functions": {
+            "function_uri": "http://test-apisix.azurewebsites.net/api/HttpTrigger",
+            "authorization": {
+                "apikey": "<Generated API key to access the Azure-Function>"
+            }
+        }
+    },
+    "uri": "/azure"
+}'
+```
+
+通过上述示例配置插件后,任何对 `/azure` URI 的请求(`HTTP/1.1`、`HTTPS`、`HTTP2`)都将调用已配置的 Azure Functions 的 URI,并且会将响应信息返回给客户端。
+
+下述命令的含义是:Azure Function 从请求中获取 `name` 参数,并返回一条 `"Hello $name"` 消息:
+
+```shell
+curl -i -XGET http://localhost:9080/azure\?name=APISIX
+```
+
+正常返回结果:
+
+```shell
+HTTP/1.1 200 OK
+Content-Type: text/plain; charset=utf-8
+...
+Hello, APISIX
+```
+
+以下示例是客户端通过 HTTP/2 协议与 APISIX 进行通信。
+
+在进行测试之前,由于该 `enable_http2: true` 默认是禁用状态,你可以通过在 `./conf/config.yaml` 中添加 `apisix.node_listen` 下的 `- port: 9081` 和 `enable_http2: true` 字段启用。示例如下:
+
+```yaml
+apisix:
+  admin_key:
+...
+  node_listen:                      # 支持监听多个端口
+    - 9080
+    - port: 9081
+      enable_http2: true            # 该字段如果不设置,默认值为 `false`
+```
+
+使用 `curl` 命令测试:
+
+```shell
+curl -i -XGET --http2 --http2-prior-knowledge http://localhost:9081/azure\?name=APISIX
+```
+
+正常返回结果:
+
+```shell
+HTTP/2 200
+content-type: text/plain; charset=utf-8
+...
+Hello, APISIX
+```
+
+### 配置路径转发
+
+`azure-functions` 插件在代理请求到 Azure Functions 上游时也支持 URL 路径转发。基本请求路径的扩展被附加到插件配置中指定的 `function_uri` 字段上。
+
+:::info 注意
+
+因为 APISIX 路由是严格匹配的,所以为了使 `azure-functions` 插件正常工作,在路由上配置的 `uri` 字段必须以 `*` 结尾,`*` 意味着这个 URI 的任何子路径都会被匹配到同一个路由。
+
+:::
+
+以下示例展示了如何通过配置文件实现路径转发:
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "plugins": {
+        "azure-functions": {
+            "function_uri": "http://app-bisakh.azurewebsites.net/api",
+            "authorization": {
+                "apikey": "<Generated API key to access the Azure-Function>"
+            }
+        }
+    },
+    "uri": "/azure/*"
+}'
+```
+
+通过上述示例配置插件后,任何访问 `azure/HttpTrigger1` 的请求都会调用 Azure Function 并转发附加的参数。

Review Comment:
   ```suggestion
   通过上述示例配置插件后,任何访问 `azure/HttpTrigger1` 的请求都会调用 Azure Functions 并转发附加的参数。
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] SylviaBABY commented on a diff in pull request #7120: docs: add azure-functions CN document

Posted by GitBox <gi...@apache.org>.
SylviaBABY commented on code in PR #7120:
URL: https://github.com/apache/apisix/pull/7120#discussion_r881114010


##########
docs/zh/latest/plugins/azure-functions.md:
##########
@@ -0,0 +1,198 @@
+---
+title: azure-functions
+keywords:
+  - APISIX
+  - Plugin
+  - Azure Functions
+  - azure-functions
+description: 本文介绍了关于 Apache APISIX `azure-functions` 插件的基本信息及使用方法。
+---
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+`azure-functions` 插件用于将 [Azure Serverless Function](https://azure.microsoft.com/en-in/services/functions/) 作为动态上游集成至 APISIX,从而实现将访问指定 URI 的请求代理到 Microsoft Azure 云。
+
+启用 `azure-functions` 插件后,该插件会终止对已配置 URI 的请求,并代表客户端向 Azure Functions 发起一个新的请求。这个新请求中携带了之前配置的授权详细信息,包括请求头、请求体和参数(以上参数都是从原始请求中传递的),然后 `azure-functions` 插件会将带有响应头、状态码和响应体的响应信息返回给使用 APISIX 发起请求的客户端。

Review Comment:
   ```suggestion
   启用 `azure-functions` 插件后,该插件会终止对已配置 URI 的请求,并代表客户端向 Azure Functions 发起一个新的请求。该新请求中携带了之前配置的授权详细信息,包括请求头、请求体和参数(以上参数都是从原始请求中传递的)。之后便会通过 `azure-functions` 插件,将带有响应头、状态码和响应体的信息返回给使用 APISIX 发起请求的客户端。
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] hf400159 commented on a diff in pull request #7120: docs: add azure-functions CN document

Posted by GitBox <gi...@apache.org>.
hf400159 commented on code in PR #7120:
URL: https://github.com/apache/apisix/pull/7120#discussion_r882243526


##########
docs/zh/latest/plugins/azure-functions.md:
##########
@@ -0,0 +1,202 @@
+---
+title: azure-functions
+keywords:
+  - APISIX
+  - Plugin
+  - Azure Functions
+  - azure-functions
+description: 本文介绍了关于 Apache APISIX `azure-functions` 插件的基本信息及使用方法。
+---
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+`azure-functions` 插件用于将 [Azure Serverless Function](https://azure.microsoft.com/en-in/services/functions/) 作为动态上游集成至 APISIX,从而实现将访问指定 URI 的请求代理到 Microsoft Azure 云服务。
+
+启用 `azure-functions` 插件后,该插件会终止对已配置 URI 的请求,并代表客户端向 Azure Functions 发起一个新的请求。该新请求中携带了之前配置的授权详细信息,包括请求头、请求体和参数(以上参数都是从原始请求中传递的)。之后便会通过 `azure-functions` 插件,将带有响应头、状态码和响应体的信息返回给使用 APISIX 发起请求的客户端。
+
+## 属性
+
+| 名称                   | 类型    | 必选项 | 默认值 | 有效值     | 描述                                                         |
+| ---------------------- | ------- | ------ | ------ | ---------- | ------------------------------------------------------------ |
+| function_uri           | string  | 是     |        |            | 触发 Serverless Functions 的 Azure Functions 端点。例如 `http://test-apisix.azurewebsites.net/api/HttpTrigger`。 |
+| authorization          | object  | 否     |        |            | 访问 Azure Functions 的授权凭证。                            |
+| authorization.apikey   | string  | 否     |        |            | 授权凭证内的字段。生成 API 密钥来授权对端点的请求。          |
+| authorization.clientid | string  | 否     |        |            | 授权凭证内的字段。生成客户端 ID(Azure Active Directory)来授权对端点的请求。 |
+| timeout                | integer | 否     | 3000   | [100,...]  | 代理请求超时(以毫秒为单位)。                               |
+| ssl_verify             | boolean | 否     | true   | true/false | 当设置为 `true` 时执行 SSL 验证。                            |
+| keepalive              | boolean | 否     | true   | true/false | 当设置为 `true` 时,保持连接的活动状态以便重复使用。         |
+| keepalive_pool         | integer | 否     | 5      | [1,...]    | 连接断开之前,可接收的最大请求数。                           |
+| keepalive_timeout      | integer | 否     | 60000  | [1000,...] | 当连接空闲时,保持该连接处于活动状态的时间(以毫秒为单位)。 |
+
+## 元数据
+
+| 名称            | 类型   | 必选项 | 默认值 | 描述                                                         |
+| --------------- | ------ | ------ | ------ | ------------------------------------------------------------ |
+| master_apikey   | string | 否     | ""     | 可用于访问 Azure Functions URI 的 API 密钥。                 |
+| master_clientid | string | 否     | ""     | 可用于授权 Azure Functions URI 的客户 ID(Active Directory)。 |
+
+`azure-functions` 插件的元数据提供了授权回退的功能。它定义了 `master_apikey` 和 `master_clientid` 字段,用户可以为关键任务的应用部署声明 API 密钥或客户端 ID。因此,如果在 `azure-functions` 插件属性中没有找到相关授权凭证,此时元数据中的授权凭证就会发挥作用。
+
+:::note
+
+授权方式优先级排序如下:
+
+- 首先,`azure-functions` 插件在 Apache APISIX 代理的请求头中寻找 `x-functions-key` 或 `x-functions-clientid` 键。
+- 如果没有找到,`azure-functions` 插件会检查插件属性中的授权凭证。如果授权凭证存在,`azure-functions` 插件会将相应的授权标头添加到发送到 Azure cloud function 的请求中。
+- 如果在 `azure-functions` 插件属性中没有找到授权凭证,Apache APISIX 将获取插件元数据配置并使用 API 密钥。
+
+:::
+
+如果你想添加一个新的 API 密钥,请向 `/apisix/admin/plugin_metadata` 端点发出请求,并附上所需的元数据。示例如下:
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/plugin_metadata/azure-functions -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "master_apikey" : "<Your Azure master access key>"
+}'
+```
+
+## 启用插件
+
+以下示例展示了如何在指定路由上启用 `azure-functions` 插件。请确保你的 Azure Functions 已提前部署好,并正常提供服务。
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "plugins": {
+        "azure-functions": {
+            "function_uri": "http://test-apisix.azurewebsites.net/api/HttpTrigger",
+            "authorization": {
+                "apikey": "<Generated API key to access the Azure-Function>"
+            }
+        }
+    },
+    "uri": "/azure"
+}'
+```
+
+通过上述示例配置插件后,任何对 `/azure` URI 的请求(`HTTP/1.1`、`HTTPS`、`HTTP2`)都将调用已配置的 Azure Functions 的 URI,并且会将响应信息返回给客户端。
+
+下述命令的含义是:Azure Function 从请求中获取 `name` 参数,并返回一条 `"Hello $name"` 消息:
+
+```shell
+curl -i -XGET http://localhost:9080/azure\?name=APISIX
+```
+
+正常返回结果:
+
+```shell
+HTTP/1.1 200 OK
+Content-Type: text/plain; charset=utf-8
+...
+Hello, APISIX
+```
+
+以下示例是客户端通过 HTTP/2 协议与 APISIX 进行通信。
+
+在进行测试之前,由于该 `enable_http2: true` 默认是禁用状态,你可以通过在 `./conf/config.yaml` 中添加 `apisix.node_listen` 下的 `- port: 9081` 和 `enable_http2: true` 字段启用。示例如下:
+
+```yaml
+apisix:
+  admin_key:
+...
+  node_listen:                      # 支持监听多个端口
+    - 9080
+    - port: 9081
+      enable_http2: true            # 该字段如果不设置,默认值为 `false`
+```
+
+使用 `curl` 命令测试:
+
+```shell
+curl -i -XGET --http2 --http2-prior-knowledge http://localhost:9081/azure\?name=APISIX
+```
+
+正常返回结果:
+
+```shell
+HTTP/2 200
+content-type: text/plain; charset=utf-8
+...
+Hello, APISIX
+```
+
+### 配置路径转发
+
+`azure-functions` 插件在代理请求到 Azure Functions 上游时也支持 URL 路径转发。基本请求路径的扩展被附加到插件配置中指定的 `function_uri` 字段上。
+
+:::info 注意
+
+因为 APISIX 路由是严格匹配的,所以为了使 `azure-functions` 插件正常工作,在路由上配置的 `uri` 字段必须以 `*` 结尾,`*` 意味着这个 URI 的任何子路径都会被匹配到同一个路由。
+
+:::
+
+以下示例展示了如何通过配置文件实现路径转发:
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "plugins": {
+        "azure-functions": {
+            "function_uri": "http://app-bisakh.azurewebsites.net/api",
+            "authorization": {
+                "apikey": "<Generated API key to access the Azure-Function>"

Review Comment:
   ```suggestion
                   "apikey": "${Generated API key to access the Azure-Function}"
   ```



##########
docs/zh/latest/plugins/azure-functions.md:
##########
@@ -0,0 +1,202 @@
+---
+title: azure-functions
+keywords:
+  - APISIX
+  - Plugin
+  - Azure Functions
+  - azure-functions
+description: 本文介绍了关于 Apache APISIX `azure-functions` 插件的基本信息及使用方法。
+---
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+`azure-functions` 插件用于将 [Azure Serverless Function](https://azure.microsoft.com/en-in/services/functions/) 作为动态上游集成至 APISIX,从而实现将访问指定 URI 的请求代理到 Microsoft Azure 云服务。
+
+启用 `azure-functions` 插件后,该插件会终止对已配置 URI 的请求,并代表客户端向 Azure Functions 发起一个新的请求。该新请求中携带了之前配置的授权详细信息,包括请求头、请求体和参数(以上参数都是从原始请求中传递的)。之后便会通过 `azure-functions` 插件,将带有响应头、状态码和响应体的信息返回给使用 APISIX 发起请求的客户端。
+
+## 属性
+
+| 名称                   | 类型    | 必选项 | 默认值 | 有效值     | 描述                                                         |
+| ---------------------- | ------- | ------ | ------ | ---------- | ------------------------------------------------------------ |
+| function_uri           | string  | 是     |        |            | 触发 Serverless Functions 的 Azure Functions 端点。例如 `http://test-apisix.azurewebsites.net/api/HttpTrigger`。 |
+| authorization          | object  | 否     |        |            | 访问 Azure Functions 的授权凭证。                            |
+| authorization.apikey   | string  | 否     |        |            | 授权凭证内的字段。生成 API 密钥来授权对端点的请求。          |
+| authorization.clientid | string  | 否     |        |            | 授权凭证内的字段。生成客户端 ID(Azure Active Directory)来授权对端点的请求。 |
+| timeout                | integer | 否     | 3000   | [100,...]  | 代理请求超时(以毫秒为单位)。                               |
+| ssl_verify             | boolean | 否     | true   | true/false | 当设置为 `true` 时执行 SSL 验证。                            |
+| keepalive              | boolean | 否     | true   | true/false | 当设置为 `true` 时,保持连接的活动状态以便重复使用。         |
+| keepalive_pool         | integer | 否     | 5      | [1,...]    | 连接断开之前,可接收的最大请求数。                           |
+| keepalive_timeout      | integer | 否     | 60000  | [1000,...] | 当连接空闲时,保持该连接处于活动状态的时间(以毫秒为单位)。 |
+
+## 元数据
+
+| 名称            | 类型   | 必选项 | 默认值 | 描述                                                         |
+| --------------- | ------ | ------ | ------ | ------------------------------------------------------------ |
+| master_apikey   | string | 否     | ""     | 可用于访问 Azure Functions URI 的 API 密钥。                 |
+| master_clientid | string | 否     | ""     | 可用于授权 Azure Functions URI 的客户 ID(Active Directory)。 |
+
+`azure-functions` 插件的元数据提供了授权回退的功能。它定义了 `master_apikey` 和 `master_clientid` 字段,用户可以为关键任务的应用部署声明 API 密钥或客户端 ID。因此,如果在 `azure-functions` 插件属性中没有找到相关授权凭证,此时元数据中的授权凭证就会发挥作用。
+
+:::note
+
+授权方式优先级排序如下:
+
+- 首先,`azure-functions` 插件在 Apache APISIX 代理的请求头中寻找 `x-functions-key` 或 `x-functions-clientid` 键。
+- 如果没有找到,`azure-functions` 插件会检查插件属性中的授权凭证。如果授权凭证存在,`azure-functions` 插件会将相应的授权标头添加到发送到 Azure cloud function 的请求中。
+- 如果在 `azure-functions` 插件属性中没有找到授权凭证,Apache APISIX 将获取插件元数据配置并使用 API 密钥。
+
+:::
+
+如果你想添加一个新的 API 密钥,请向 `/apisix/admin/plugin_metadata` 端点发出请求,并附上所需的元数据。示例如下:
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/plugin_metadata/azure-functions -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "master_apikey" : "<Your Azure master access key>"
+}'
+```
+
+## 启用插件
+
+以下示例展示了如何在指定路由上启用 `azure-functions` 插件。请确保你的 Azure Functions 已提前部署好,并正常提供服务。
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "plugins": {
+        "azure-functions": {
+            "function_uri": "http://test-apisix.azurewebsites.net/api/HttpTrigger",
+            "authorization": {
+                "apikey": "<Generated API key to access the Azure-Function>"

Review Comment:
   ```suggestion
                   "apikey": "${Generated API key to access the Azure-Function}"
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] SylviaBABY commented on a diff in pull request #7120: docs: add azure-functions CN document

Posted by GitBox <gi...@apache.org>.
SylviaBABY commented on code in PR #7120:
URL: https://github.com/apache/apisix/pull/7120#discussion_r881114224


##########
docs/zh/latest/plugins/azure-functions.md:
##########
@@ -0,0 +1,198 @@
+---
+title: azure-functions
+keywords:
+  - APISIX
+  - Plugin
+  - Azure Functions
+  - azure-functions
+description: 本文介绍了关于 Apache APISIX `azure-functions` 插件的基本信息及使用方法。
+---
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+`azure-functions` 插件用于将 [Azure Serverless Function](https://azure.microsoft.com/en-in/services/functions/) 作为动态上游集成至 APISIX,从而实现将访问指定 URI 的请求代理到 Microsoft Azure 云。
+
+启用 `azure-functions` 插件后,该插件会终止对已配置 URI 的请求,并代表客户端向 Azure Functions 发起一个新的请求。这个新请求中携带了之前配置的授权详细信息,包括请求头、请求体和参数(以上参数都是从原始请求中传递的),然后 `azure-functions` 插件会将带有响应头、状态码和响应体的响应信息返回给使用 APISIX 发起请求的客户端。
+
+## 属性
+
+| 名称                   | 类型    | 必选项 | 默认值 | 有效值     | 描述                                                         |
+| ---------------------- | ------- | ------ | ------ | ---------- | ------------------------------------------------------------ |
+| function_uri           | string  | 是     |        |            | 触发 Serverless Functions 的 Azure Functions 端点。例如,`http://test-apisix.azurewebsites.net/api/HttpTrigger`。 |

Review Comment:
   ```suggestion
   | function_uri           | string  | 是     |        |            | 触发 Serverless Functions 的 Azure Functions 端点。例如`http://test-apisix.azurewebsites.net/api/HttpTrigger`。 |
   ```



##########
docs/zh/latest/plugins/azure-functions.md:
##########
@@ -0,0 +1,198 @@
+---
+title: azure-functions
+keywords:
+  - APISIX
+  - Plugin
+  - Azure Functions
+  - azure-functions
+description: 本文介绍了关于 Apache APISIX `azure-functions` 插件的基本信息及使用方法。
+---
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+`azure-functions` 插件用于将 [Azure Serverless Function](https://azure.microsoft.com/en-in/services/functions/) 作为动态上游集成至 APISIX,从而实现将访问指定 URI 的请求代理到 Microsoft Azure 云。
+
+启用 `azure-functions` 插件后,该插件会终止对已配置 URI 的请求,并代表客户端向 Azure Functions 发起一个新的请求。这个新请求中携带了之前配置的授权详细信息,包括请求头、请求体和参数(以上参数都是从原始请求中传递的),然后 `azure-functions` 插件会将带有响应头、状态码和响应体的响应信息返回给使用 APISIX 发起请求的客户端。
+
+## 属性
+
+| 名称                   | 类型    | 必选项 | 默认值 | 有效值     | 描述                                                         |
+| ---------------------- | ------- | ------ | ------ | ---------- | ------------------------------------------------------------ |
+| function_uri           | string  | 是     |        |            | 触发 Serverless Functions 的 Azure Functions 端点。例如,`http://test-apisix.azurewebsites.net/api/HttpTrigger`。 |

Review Comment:
   ```suggestion
   | function_uri           | string  | 是     |        |            | 触发 Serverless Functions 的 Azure Functions 端点。例如 `http://test-apisix.azurewebsites.net/api/HttpTrigger`。 |
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] SylviaBABY commented on a diff in pull request #7120: docs: add azure-functions CN document

Posted by GitBox <gi...@apache.org>.
SylviaBABY commented on code in PR #7120:
URL: https://github.com/apache/apisix/pull/7120#discussion_r881123861


##########
docs/zh/latest/plugins/azure-functions.md:
##########
@@ -0,0 +1,198 @@
+---
+title: azure-functions
+keywords:
+  - APISIX
+  - Plugin
+  - Azure Functions
+  - azure-functions
+description: 本文介绍了关于 Apache APISIX `azure-functions` 插件的基本信息及使用方法。
+---
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+`azure-functions` 插件用于将 [Azure Serverless Function](https://azure.microsoft.com/en-in/services/functions/) 作为动态上游集成至 APISIX,从而实现将访问指定 URI 的请求代理到 Microsoft Azure 云。
+
+启用 `azure-functions` 插件后,该插件会终止对已配置 URI 的请求,并代表客户端向 Azure Functions 发起一个新的请求。这个新请求中携带了之前配置的授权详细信息,包括请求头、请求体和参数(以上参数都是从原始请求中传递的),然后 `azure-functions` 插件会将带有响应头、状态码和响应体的响应信息返回给使用 APISIX 发起请求的客户端。
+
+## 属性
+
+| 名称                   | 类型    | 必选项 | 默认值 | 有效值     | 描述                                                         |
+| ---------------------- | ------- | ------ | ------ | ---------- | ------------------------------------------------------------ |
+| function_uri           | string  | 是     |        |            | 触发 Serverless Functions 的 Azure Functions 端点。例如,`http://test-apisix.azurewebsites.net/api/HttpTrigger`。 |
+| authorization          | object  | 否     |        |            | 访问 Azure Functions 的授权凭证。                            |
+| authorization.apikey   | string  | 否     |        |            | 授权凭证内的字段。生成 API 密钥来授权对端点的请求。          |
+| authorization.clientid | string  | 否     |        |            | 授权凭证内的字段。生成客户端 ID(Azure Active Directory)来授权对端点的请求。 |
+| timeout                | integer | 否     | 3000   | [100,...]  | 代理请求超时(以毫秒为单位)。                               |
+| ssl_verify             | boolean | 否     | true   | true/false | 当设置为 `true` 时执行 SSL 验证。                            |
+| keepalive              | boolean | 否     | true   | true/false | 当设置为 `true` 时,保持连接的活动状态以便重复使用。         |
+| keepalive_pool         | integer | 否     | 5      | [1,...]    | 连接断开之前,可接收的最大请求数。                           |
+| keepalive_timeout      | integer | 否     | 60000  | [1000,...] | 当连接空闲时,保持该连接处于活动状态的时间(以毫秒为单位)。 |
+
+## 元数据
+
+| 名称            | 类型   | 必选项 | 默认值 | 描述                                                         |
+| --------------- | ------ | ------ | ------ | ------------------------------------------------------------ |
+| master_apikey   | string | 否     | ""     | 可用于访问 Azure Functions URI 的 API 密钥。                 |
+| master_clientid | string | 否     | ""     | 可用于授权 Azure Functions URI 的客户 ID(Active Directory)。 |
+
+`azure-functions` 插件的元数据提供了授权回退的功能。它定义了 `master_apikey` 和 `master_clientid` 字段,用户可以为关键任务的应用部署声明主 API 密钥或客户端 ID。因此,如果在 `azure-functions` 插件属性中没有找到授权凭证,元数据中的授权凭证就会发挥作用。

Review Comment:
   ```suggestion
   `azure-functions` 插件的元数据提供了授权回退的功能。它定义了 `master_apikey` 和 `master_clientid` 字段,用户可以为关键任务的应用部署声明主 API 密钥或客户端 ID。因此,如果在 `azure-functions` 插件属性中没有找到相关授权凭证,此时元数据中的授权凭证就会发挥作用。
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] SylviaBABY commented on a diff in pull request #7120: docs: add azure-functions CN document

Posted by GitBox <gi...@apache.org>.
SylviaBABY commented on code in PR #7120:
URL: https://github.com/apache/apisix/pull/7120#discussion_r881144644


##########
docs/zh/latest/plugins/azure-functions.md:
##########
@@ -0,0 +1,198 @@
+---
+title: azure-functions
+keywords:
+  - APISIX
+  - Plugin
+  - Azure Functions
+  - azure-functions
+description: 本文介绍了关于 Apache APISIX `azure-functions` 插件的基本信息及使用方法。
+---
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+`azure-functions` 插件用于将 [Azure Serverless Function](https://azure.microsoft.com/en-in/services/functions/) 作为动态上游集成至 APISIX,从而实现将访问指定 URI 的请求代理到 Microsoft Azure 云。
+
+启用 `azure-functions` 插件后,该插件会终止对已配置 URI 的请求,并代表客户端向 Azure Functions 发起一个新的请求。这个新请求中携带了之前配置的授权详细信息,包括请求头、请求体和参数(以上参数都是从原始请求中传递的),然后 `azure-functions` 插件会将带有响应头、状态码和响应体的响应信息返回给使用 APISIX 发起请求的客户端。
+
+## 属性
+
+| 名称                   | 类型    | 必选项 | 默认值 | 有效值     | 描述                                                         |
+| ---------------------- | ------- | ------ | ------ | ---------- | ------------------------------------------------------------ |
+| function_uri           | string  | 是     |        |            | 触发 Serverless Functions 的 Azure Functions 端点。例如,`http://test-apisix.azurewebsites.net/api/HttpTrigger`。 |
+| authorization          | object  | 否     |        |            | 访问 Azure Functions 的授权凭证。                            |
+| authorization.apikey   | string  | 否     |        |            | 授权凭证内的字段。生成 API 密钥来授权对端点的请求。          |
+| authorization.clientid | string  | 否     |        |            | 授权凭证内的字段。生成客户端 ID(Azure Active Directory)来授权对端点的请求。 |
+| timeout                | integer | 否     | 3000   | [100,...]  | 代理请求超时(以毫秒为单位)。                               |
+| ssl_verify             | boolean | 否     | true   | true/false | 当设置为 `true` 时执行 SSL 验证。                            |
+| keepalive              | boolean | 否     | true   | true/false | 当设置为 `true` 时,保持连接的活动状态以便重复使用。         |
+| keepalive_pool         | integer | 否     | 5      | [1,...]    | 连接断开之前,可接收的最大请求数。                           |
+| keepalive_timeout      | integer | 否     | 60000  | [1000,...] | 当连接空闲时,保持该连接处于活动状态的时间(以毫秒为单位)。 |
+
+## 元数据
+
+| 名称            | 类型   | 必选项 | 默认值 | 描述                                                         |
+| --------------- | ------ | ------ | ------ | ------------------------------------------------------------ |
+| master_apikey   | string | 否     | ""     | 可用于访问 Azure Functions URI 的 API 密钥。                 |
+| master_clientid | string | 否     | ""     | 可用于授权 Azure Functions URI 的客户 ID(Active Directory)。 |
+
+`azure-functions` 插件的元数据提供了授权回退的功能。它定义了 `master_apikey` 和 `master_clientid` 字段,用户可以为关键任务的应用部署声明主 API 密钥或客户端 ID。因此,如果在 `azure-functions` 插件属性中没有找到授权凭证,元数据中的授权凭证就会发挥作用。
+
+授权方式优先级排序如下:
+
+- 首先,`azure-functions` 插件在 Apache APISIX 代理的请求头中寻找 `x-functions-key` 或 `x-functions-clientid` 键。
+- 如果没有找到,`azure-functions` 插件会检查插件属性中的授权凭证。如果授权凭证存在,`azure-functions` 插件会将相应的授权标头添加到发送到 Azure cloud function 的请求中。
+- 如果在 `azure-functions` 插件属性中没有找到授权凭证,Apache APISIX 将获取插件元数据配置并使用主密钥。
+

Review Comment:
   ```suggestion
   :::
   
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] SylviaBABY commented on a diff in pull request #7120: docs: add azure-functions CN document

Posted by GitBox <gi...@apache.org>.
SylviaBABY commented on code in PR #7120:
URL: https://github.com/apache/apisix/pull/7120#discussion_r881144559


##########
docs/zh/latest/plugins/azure-functions.md:
##########
@@ -0,0 +1,198 @@
+---
+title: azure-functions
+keywords:
+  - APISIX
+  - Plugin
+  - Azure Functions
+  - azure-functions
+description: 本文介绍了关于 Apache APISIX `azure-functions` 插件的基本信息及使用方法。
+---
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+`azure-functions` 插件用于将 [Azure Serverless Function](https://azure.microsoft.com/en-in/services/functions/) 作为动态上游集成至 APISIX,从而实现将访问指定 URI 的请求代理到 Microsoft Azure 云。
+
+启用 `azure-functions` 插件后,该插件会终止对已配置 URI 的请求,并代表客户端向 Azure Functions 发起一个新的请求。这个新请求中携带了之前配置的授权详细信息,包括请求头、请求体和参数(以上参数都是从原始请求中传递的),然后 `azure-functions` 插件会将带有响应头、状态码和响应体的响应信息返回给使用 APISIX 发起请求的客户端。
+
+## 属性
+
+| 名称                   | 类型    | 必选项 | 默认值 | 有效值     | 描述                                                         |
+| ---------------------- | ------- | ------ | ------ | ---------- | ------------------------------------------------------------ |
+| function_uri           | string  | 是     |        |            | 触发 Serverless Functions 的 Azure Functions 端点。例如,`http://test-apisix.azurewebsites.net/api/HttpTrigger`。 |
+| authorization          | object  | 否     |        |            | 访问 Azure Functions 的授权凭证。                            |
+| authorization.apikey   | string  | 否     |        |            | 授权凭证内的字段。生成 API 密钥来授权对端点的请求。          |
+| authorization.clientid | string  | 否     |        |            | 授权凭证内的字段。生成客户端 ID(Azure Active Directory)来授权对端点的请求。 |
+| timeout                | integer | 否     | 3000   | [100,...]  | 代理请求超时(以毫秒为单位)。                               |
+| ssl_verify             | boolean | 否     | true   | true/false | 当设置为 `true` 时执行 SSL 验证。                            |
+| keepalive              | boolean | 否     | true   | true/false | 当设置为 `true` 时,保持连接的活动状态以便重复使用。         |
+| keepalive_pool         | integer | 否     | 5      | [1,...]    | 连接断开之前,可接收的最大请求数。                           |
+| keepalive_timeout      | integer | 否     | 60000  | [1000,...] | 当连接空闲时,保持该连接处于活动状态的时间(以毫秒为单位)。 |
+
+## 元数据
+
+| 名称            | 类型   | 必选项 | 默认值 | 描述                                                         |
+| --------------- | ------ | ------ | ------ | ------------------------------------------------------------ |
+| master_apikey   | string | 否     | ""     | 可用于访问 Azure Functions URI 的 API 密钥。                 |
+| master_clientid | string | 否     | ""     | 可用于授权 Azure Functions URI 的客户 ID(Active Directory)。 |
+
+`azure-functions` 插件的元数据提供了授权回退的功能。它定义了 `master_apikey` 和 `master_clientid` 字段,用户可以为关键任务的应用部署声明主 API 密钥或客户端 ID。因此,如果在 `azure-functions` 插件属性中没有找到授权凭证,元数据中的授权凭证就会发挥作用。
+
+授权方式优先级排序如下:

Review Comment:
   ```suggestion
   :::note
   
   授权方式优先级排序如下:
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] spacewander merged pull request #7120: docs: add azure-functions CN document

Posted by GitBox <gi...@apache.org>.
spacewander merged PR #7120:
URL: https://github.com/apache/apisix/pull/7120


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] SylviaBABY commented on a diff in pull request #7120: docs: add azure-functions CN document

Posted by GitBox <gi...@apache.org>.
SylviaBABY commented on code in PR #7120:
URL: https://github.com/apache/apisix/pull/7120#discussion_r881147871


##########
docs/zh/latest/plugins/azure-functions.md:
##########
@@ -0,0 +1,198 @@
+---
+title: azure-functions
+keywords:
+  - APISIX
+  - Plugin
+  - Azure Functions
+  - azure-functions
+description: 本文介绍了关于 Apache APISIX `azure-functions` 插件的基本信息及使用方法。
+---
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+`azure-functions` 插件用于将 [Azure Serverless Function](https://azure.microsoft.com/en-in/services/functions/) 作为动态上游集成至 APISIX,从而实现将访问指定 URI 的请求代理到 Microsoft Azure 云。
+
+启用 `azure-functions` 插件后,该插件会终止对已配置 URI 的请求,并代表客户端向 Azure Functions 发起一个新的请求。这个新请求中携带了之前配置的授权详细信息,包括请求头、请求体和参数(以上参数都是从原始请求中传递的),然后 `azure-functions` 插件会将带有响应头、状态码和响应体的响应信息返回给使用 APISIX 发起请求的客户端。
+
+## 属性
+
+| 名称                   | 类型    | 必选项 | 默认值 | 有效值     | 描述                                                         |
+| ---------------------- | ------- | ------ | ------ | ---------- | ------------------------------------------------------------ |
+| function_uri           | string  | 是     |        |            | 触发 Serverless Functions 的 Azure Functions 端点。例如,`http://test-apisix.azurewebsites.net/api/HttpTrigger`。 |
+| authorization          | object  | 否     |        |            | 访问 Azure Functions 的授权凭证。                            |
+| authorization.apikey   | string  | 否     |        |            | 授权凭证内的字段。生成 API 密钥来授权对端点的请求。          |
+| authorization.clientid | string  | 否     |        |            | 授权凭证内的字段。生成客户端 ID(Azure Active Directory)来授权对端点的请求。 |
+| timeout                | integer | 否     | 3000   | [100,...]  | 代理请求超时(以毫秒为单位)。                               |
+| ssl_verify             | boolean | 否     | true   | true/false | 当设置为 `true` 时执行 SSL 验证。                            |
+| keepalive              | boolean | 否     | true   | true/false | 当设置为 `true` 时,保持连接的活动状态以便重复使用。         |
+| keepalive_pool         | integer | 否     | 5      | [1,...]    | 连接断开之前,可接收的最大请求数。                           |
+| keepalive_timeout      | integer | 否     | 60000  | [1000,...] | 当连接空闲时,保持该连接处于活动状态的时间(以毫秒为单位)。 |
+
+## 元数据
+
+| 名称            | 类型   | 必选项 | 默认值 | 描述                                                         |
+| --------------- | ------ | ------ | ------ | ------------------------------------------------------------ |
+| master_apikey   | string | 否     | ""     | 可用于访问 Azure Functions URI 的 API 密钥。                 |
+| master_clientid | string | 否     | ""     | 可用于授权 Azure Functions URI 的客户 ID(Active Directory)。 |
+
+`azure-functions` 插件的元数据提供了授权回退的功能。它定义了 `master_apikey` 和 `master_clientid` 字段,用户可以为关键任务的应用部署声明主 API 密钥或客户端 ID。因此,如果在 `azure-functions` 插件属性中没有找到授权凭证,元数据中的授权凭证就会发挥作用。
+
+授权方式优先级排序如下:
+
+- 首先,`azure-functions` 插件在 Apache APISIX 代理的请求头中寻找 `x-functions-key` 或 `x-functions-clientid` 键。
+- 如果没有找到,`azure-functions` 插件会检查插件属性中的授权凭证。如果授权凭证存在,`azure-functions` 插件会将相应的授权标头添加到发送到 Azure cloud function 的请求中。
+- 如果在 `azure-functions` 插件属性中没有找到授权凭证,Apache APISIX 将获取插件元数据配置并使用主密钥。
+
+如果你想添加一个新的主 API Key,请向 `/apisix/admin/plugin_metadata` 端点发出请求,并附上所需的元数据。示例如下:
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/plugin_metadata/azure-functions -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "master_apikey" : "<Your Azure master access key>"
+}'
+```
+
+## 启用插件
+
+以下示例展示了如何在指定路由上启用 `azure-functions` 插件。请确保你的 Azure Functions 已经部署好并提供服务。
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "plugins": {
+        "azure-functions": {
+            "function_uri": "http://test-apisix.azurewebsites.net/api/HttpTrigger",
+            "authorization": {
+                "apikey": "<Generated API key to access the Azure-Function>"
+            }
+        }
+    },
+    "uri": "/azure"
+}'
+```
+
+通过上述示例配置插件后,任何对 `/azure` URI 的请求(`HTTP/1.1`、`HTTPS`、`HTTP2`)都将调用已配置的 Azure Functions 的 URI,并且会将响应信息返回给客户端。
+
+下述命令的含义是:Azure Function 从请求中获取 `name` 参数,并返回一条 `"Hello $name"` 消息:
+
+```shell
+curl -i -XGET http://localhost:9080/azure\?name=APISIX
+```
+
+正常返回结果:
+
+```shell
+HTTP/1.1 200 OK
+Content-Type: text/plain; charset=utf-8
+...
+Hello, APISIX
+```
+
+以下示例是客户端通过 HTTP/2 协议与 APISIX 进行通信。
+
+在进行测试之前,由于该 `enable_http2: true` 默认是禁用状态,你可以通过在 `./conf/config.yaml` 中添加 `apisix.node_listen` 下的 `- port: 9081` 和 `enable_http2: true` 字段启用。示例如下:
+
+```yaml
+apisix:
+  admin_key:
+...
+  node_listen:                      # 支持监听多个端口
+    - 9080
+    - port: 9081
+      enable_http2: true            # 该字段如果不设置,默认值为 `false`
+```
+
+使用 `curl` 命令测试:
+
+```shell
+curl -i -XGET --http2 --http2-prior-knowledge http://localhost:9081/azure\?name=APISIX
+```
+
+正常返回结果:
+
+```shell
+HTTP/2 200
+content-type: text/plain; charset=utf-8
+...
+Hello, APISIX
+```
+
+### 配置路径转发
+
+`azure-functions` 插件在代理请求到 Azure Functions 上游时也支持 URL 路径转发。基本请求路径的扩展被附加到插件配置中指定的 `function_uri` 字段上。
+
+:::info IMPORTANT

Review Comment:
   ```suggestion
   :::info 注意
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] SylviaBABY commented on a diff in pull request #7120: docs: add azure-functions CN document

Posted by GitBox <gi...@apache.org>.
SylviaBABY commented on code in PR #7120:
URL: https://github.com/apache/apisix/pull/7120#discussion_r881147038


##########
docs/zh/latest/plugins/azure-functions.md:
##########
@@ -0,0 +1,198 @@
+---
+title: azure-functions
+keywords:
+  - APISIX
+  - Plugin
+  - Azure Functions
+  - azure-functions
+description: 本文介绍了关于 Apache APISIX `azure-functions` 插件的基本信息及使用方法。
+---
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+`azure-functions` 插件用于将 [Azure Serverless Function](https://azure.microsoft.com/en-in/services/functions/) 作为动态上游集成至 APISIX,从而实现将访问指定 URI 的请求代理到 Microsoft Azure 云。
+
+启用 `azure-functions` 插件后,该插件会终止对已配置 URI 的请求,并代表客户端向 Azure Functions 发起一个新的请求。这个新请求中携带了之前配置的授权详细信息,包括请求头、请求体和参数(以上参数都是从原始请求中传递的),然后 `azure-functions` 插件会将带有响应头、状态码和响应体的响应信息返回给使用 APISIX 发起请求的客户端。
+
+## 属性
+
+| 名称                   | 类型    | 必选项 | 默认值 | 有效值     | 描述                                                         |
+| ---------------------- | ------- | ------ | ------ | ---------- | ------------------------------------------------------------ |
+| function_uri           | string  | 是     |        |            | 触发 Serverless Functions 的 Azure Functions 端点。例如,`http://test-apisix.azurewebsites.net/api/HttpTrigger`。 |
+| authorization          | object  | 否     |        |            | 访问 Azure Functions 的授权凭证。                            |
+| authorization.apikey   | string  | 否     |        |            | 授权凭证内的字段。生成 API 密钥来授权对端点的请求。          |
+| authorization.clientid | string  | 否     |        |            | 授权凭证内的字段。生成客户端 ID(Azure Active Directory)来授权对端点的请求。 |
+| timeout                | integer | 否     | 3000   | [100,...]  | 代理请求超时(以毫秒为单位)。                               |
+| ssl_verify             | boolean | 否     | true   | true/false | 当设置为 `true` 时执行 SSL 验证。                            |
+| keepalive              | boolean | 否     | true   | true/false | 当设置为 `true` 时,保持连接的活动状态以便重复使用。         |
+| keepalive_pool         | integer | 否     | 5      | [1,...]    | 连接断开之前,可接收的最大请求数。                           |
+| keepalive_timeout      | integer | 否     | 60000  | [1000,...] | 当连接空闲时,保持该连接处于活动状态的时间(以毫秒为单位)。 |
+
+## 元数据
+
+| 名称            | 类型   | 必选项 | 默认值 | 描述                                                         |
+| --------------- | ------ | ------ | ------ | ------------------------------------------------------------ |
+| master_apikey   | string | 否     | ""     | 可用于访问 Azure Functions URI 的 API 密钥。                 |
+| master_clientid | string | 否     | ""     | 可用于授权 Azure Functions URI 的客户 ID(Active Directory)。 |
+
+`azure-functions` 插件的元数据提供了授权回退的功能。它定义了 `master_apikey` 和 `master_clientid` 字段,用户可以为关键任务的应用部署声明主 API 密钥或客户端 ID。因此,如果在 `azure-functions` 插件属性中没有找到授权凭证,元数据中的授权凭证就会发挥作用。
+
+授权方式优先级排序如下:
+
+- 首先,`azure-functions` 插件在 Apache APISIX 代理的请求头中寻找 `x-functions-key` 或 `x-functions-clientid` 键。
+- 如果没有找到,`azure-functions` 插件会检查插件属性中的授权凭证。如果授权凭证存在,`azure-functions` 插件会将相应的授权标头添加到发送到 Azure cloud function 的请求中。
+- 如果在 `azure-functions` 插件属性中没有找到授权凭证,Apache APISIX 将获取插件元数据配置并使用主密钥。
+
+如果你想添加一个新的主 API Key,请向 `/apisix/admin/plugin_metadata` 端点发出请求,并附上所需的元数据。示例如下:

Review Comment:
   这里的 API Key,包括前文的 `主 API 密钥`、`主密钥` 等用词,是否需要统一一下。如果是同一个意思,建议统一保留一种格式



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] SylviaBABY commented on a diff in pull request #7120: docs: add azure-functions CN document

Posted by GitBox <gi...@apache.org>.
SylviaBABY commented on code in PR #7120:
URL: https://github.com/apache/apisix/pull/7120#discussion_r881144559


##########
docs/zh/latest/plugins/azure-functions.md:
##########
@@ -0,0 +1,198 @@
+---
+title: azure-functions
+keywords:
+  - APISIX
+  - Plugin
+  - Azure Functions
+  - azure-functions
+description: 本文介绍了关于 Apache APISIX `azure-functions` 插件的基本信息及使用方法。
+---
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+`azure-functions` 插件用于将 [Azure Serverless Function](https://azure.microsoft.com/en-in/services/functions/) 作为动态上游集成至 APISIX,从而实现将访问指定 URI 的请求代理到 Microsoft Azure 云。
+
+启用 `azure-functions` 插件后,该插件会终止对已配置 URI 的请求,并代表客户端向 Azure Functions 发起一个新的请求。这个新请求中携带了之前配置的授权详细信息,包括请求头、请求体和参数(以上参数都是从原始请求中传递的),然后 `azure-functions` 插件会将带有响应头、状态码和响应体的响应信息返回给使用 APISIX 发起请求的客户端。
+
+## 属性
+
+| 名称                   | 类型    | 必选项 | 默认值 | 有效值     | 描述                                                         |
+| ---------------------- | ------- | ------ | ------ | ---------- | ------------------------------------------------------------ |
+| function_uri           | string  | 是     |        |            | 触发 Serverless Functions 的 Azure Functions 端点。例如,`http://test-apisix.azurewebsites.net/api/HttpTrigger`。 |
+| authorization          | object  | 否     |        |            | 访问 Azure Functions 的授权凭证。                            |
+| authorization.apikey   | string  | 否     |        |            | 授权凭证内的字段。生成 API 密钥来授权对端点的请求。          |
+| authorization.clientid | string  | 否     |        |            | 授权凭证内的字段。生成客户端 ID(Azure Active Directory)来授权对端点的请求。 |
+| timeout                | integer | 否     | 3000   | [100,...]  | 代理请求超时(以毫秒为单位)。                               |
+| ssl_verify             | boolean | 否     | true   | true/false | 当设置为 `true` 时执行 SSL 验证。                            |
+| keepalive              | boolean | 否     | true   | true/false | 当设置为 `true` 时,保持连接的活动状态以便重复使用。         |
+| keepalive_pool         | integer | 否     | 5      | [1,...]    | 连接断开之前,可接收的最大请求数。                           |
+| keepalive_timeout      | integer | 否     | 60000  | [1000,...] | 当连接空闲时,保持该连接处于活动状态的时间(以毫秒为单位)。 |
+
+## 元数据
+
+| 名称            | 类型   | 必选项 | 默认值 | 描述                                                         |
+| --------------- | ------ | ------ | ------ | ------------------------------------------------------------ |
+| master_apikey   | string | 否     | ""     | 可用于访问 Azure Functions URI 的 API 密钥。                 |
+| master_clientid | string | 否     | ""     | 可用于授权 Azure Functions URI 的客户 ID(Active Directory)。 |
+
+`azure-functions` 插件的元数据提供了授权回退的功能。它定义了 `master_apikey` 和 `master_clientid` 字段,用户可以为关键任务的应用部署声明主 API 密钥或客户端 ID。因此,如果在 `azure-functions` 插件属性中没有找到授权凭证,元数据中的授权凭证就会发挥作用。
+
+授权方式优先级排序如下:

Review Comment:
   ```suggestion
   :::note
   授权方式优先级排序如下:
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] SylviaBABY commented on a diff in pull request #7120: docs: add azure-functions CN document

Posted by GitBox <gi...@apache.org>.
SylviaBABY commented on code in PR #7120:
URL: https://github.com/apache/apisix/pull/7120#discussion_r881149956


##########
docs/zh/latest/plugins/azure-functions.md:
##########
@@ -0,0 +1,198 @@
+---
+title: azure-functions
+keywords:
+  - APISIX
+  - Plugin
+  - Azure Functions
+  - azure-functions
+description: 本文介绍了关于 Apache APISIX `azure-functions` 插件的基本信息及使用方法。
+---
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 描述
+
+`azure-functions` 插件用于将 [Azure Serverless Function](https://azure.microsoft.com/en-in/services/functions/) 作为动态上游集成至 APISIX,从而实现将访问指定 URI 的请求代理到 Microsoft Azure 云。
+
+启用 `azure-functions` 插件后,该插件会终止对已配置 URI 的请求,并代表客户端向 Azure Functions 发起一个新的请求。这个新请求中携带了之前配置的授权详细信息,包括请求头、请求体和参数(以上参数都是从原始请求中传递的),然后 `azure-functions` 插件会将带有响应头、状态码和响应体的响应信息返回给使用 APISIX 发起请求的客户端。
+
+## 属性
+
+| 名称                   | 类型    | 必选项 | 默认值 | 有效值     | 描述                                                         |
+| ---------------------- | ------- | ------ | ------ | ---------- | ------------------------------------------------------------ |
+| function_uri           | string  | 是     |        |            | 触发 Serverless Functions 的 Azure Functions 端点。例如,`http://test-apisix.azurewebsites.net/api/HttpTrigger`。 |
+| authorization          | object  | 否     |        |            | 访问 Azure Functions 的授权凭证。                            |
+| authorization.apikey   | string  | 否     |        |            | 授权凭证内的字段。生成 API 密钥来授权对端点的请求。          |
+| authorization.clientid | string  | 否     |        |            | 授权凭证内的字段。生成客户端 ID(Azure Active Directory)来授权对端点的请求。 |
+| timeout                | integer | 否     | 3000   | [100,...]  | 代理请求超时(以毫秒为单位)。                               |
+| ssl_verify             | boolean | 否     | true   | true/false | 当设置为 `true` 时执行 SSL 验证。                            |
+| keepalive              | boolean | 否     | true   | true/false | 当设置为 `true` 时,保持连接的活动状态以便重复使用。         |
+| keepalive_pool         | integer | 否     | 5      | [1,...]    | 连接断开之前,可接收的最大请求数。                           |
+| keepalive_timeout      | integer | 否     | 60000  | [1000,...] | 当连接空闲时,保持该连接处于活动状态的时间(以毫秒为单位)。 |
+
+## 元数据
+
+| 名称            | 类型   | 必选项 | 默认值 | 描述                                                         |
+| --------------- | ------ | ------ | ------ | ------------------------------------------------------------ |
+| master_apikey   | string | 否     | ""     | 可用于访问 Azure Functions URI 的 API 密钥。                 |
+| master_clientid | string | 否     | ""     | 可用于授权 Azure Functions URI 的客户 ID(Active Directory)。 |
+
+`azure-functions` 插件的元数据提供了授权回退的功能。它定义了 `master_apikey` 和 `master_clientid` 字段,用户可以为关键任务的应用部署声明主 API 密钥或客户端 ID。因此,如果在 `azure-functions` 插件属性中没有找到授权凭证,元数据中的授权凭证就会发挥作用。
+
+授权方式优先级排序如下:
+
+- 首先,`azure-functions` 插件在 Apache APISIX 代理的请求头中寻找 `x-functions-key` 或 `x-functions-clientid` 键。
+- 如果没有找到,`azure-functions` 插件会检查插件属性中的授权凭证。如果授权凭证存在,`azure-functions` 插件会将相应的授权标头添加到发送到 Azure cloud function 的请求中。
+- 如果在 `azure-functions` 插件属性中没有找到授权凭证,Apache APISIX 将获取插件元数据配置并使用主密钥。
+
+如果你想添加一个新的主 API Key,请向 `/apisix/admin/plugin_metadata` 端点发出请求,并附上所需的元数据。示例如下:
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/plugin_metadata/azure-functions -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "master_apikey" : "<Your Azure master access key>"
+}'
+```
+
+## 启用插件
+
+以下示例展示了如何在指定路由上启用 `azure-functions` 插件。请确保你的 Azure Functions 已经部署好并提供服务。
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+    "plugins": {
+        "azure-functions": {
+            "function_uri": "http://test-apisix.azurewebsites.net/api/HttpTrigger",
+            "authorization": {
+                "apikey": "<Generated API key to access the Azure-Function>"
+            }
+        }
+    },
+    "uri": "/azure"
+}'
+```
+
+通过上述示例配置插件后,任何对 `/azure` URI 的请求(`HTTP/1.1`、`HTTPS`、`HTTP2`)都将调用已配置的 Azure Functions 的 URI,并且会将响应信息返回给客户端。
+
+下述命令的含义是:Azure Function 从请求中获取 `name` 参数,并返回一条 `"Hello $name"` 消息:
+
+```shell
+curl -i -XGET http://localhost:9080/azure\?name=APISIX
+```
+
+正常返回结果:
+
+```shell
+HTTP/1.1 200 OK
+Content-Type: text/plain; charset=utf-8
+...
+Hello, APISIX
+```
+
+以下示例是客户端通过 HTTP/2 协议与 APISIX 进行通信。
+
+在进行测试之前,由于该 `enable_http2: true` 默认是禁用状态,你可以通过在 `./conf/config.yaml` 中添加 `apisix.node_listen` 下的 `- port: 9081` 和 `enable_http2: true` 字段启用。示例如下:
+
+```yaml
+apisix:
+  admin_key:
+...
+  node_listen:                      # 支持监听多个端口
+    - 9080
+    - port: 9081
+      enable_http2: true            # 该字段如果不设置,默认值为 `false`
+```
+
+使用 `curl` 命令测试:
+
+```shell
+curl -i -XGET --http2 --http2-prior-knowledge http://localhost:9081/azure\?name=APISIX
+```
+
+正常返回结果:
+
+```shell
+HTTP/2 200
+content-type: text/plain; charset=utf-8
+...
+Hello, APISIX
+```
+
+### 配置路径转发
+
+`azure-functions` 插件在代理请求到 Azure Functions 上游时也支持 URL 路径转发。基本请求路径的扩展被附加到插件配置中指定的 `function_uri` 字段上。
+
+:::info IMPORTANT

Review Comment:
   reference this, so here in Chinese content, we need use `注意`, and in EN version you can use `IMPORTANT`
   <img width="435" alt="image" src="https://user-images.githubusercontent.com/39793568/170164621-6ca82269-b9ad-49bc-b49d-ac89dac0b950.png">
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org