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/26 03:35:05 UTC

[GitHub] [apisix] juzhiyuan commented on a diff in pull request #7097: docs: add aws-lambda CN document

juzhiyuan commented on code in PR #7097:
URL: https://github.com/apache/apisix/pull/7097#discussion_r882285492


##########
docs/zh/latest/plugins/aws-lambda.md:
##########
@@ -0,0 +1,217 @@
+---
+title: aws-lambda
+keywords:
+  - APISIX
+  - Plugin
+  - AWS Lambda
+  - aws-lambda
+description: 本文介绍了关于 Apache APISIX `aws-lambda` 插件的基本信息及使用方法。
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## 描述
+
+`aws-lambda` 插件用于将 [AWS Lambda](https://aws.amazon.com/lambda/) 作为动态上游集成至 APISIX,从而实现将访问指定 URI 的请求代理到 AWS 云。
+
+启用 `aws-lambda` 插件后,该插件会终止对已配置 URI 的请求,并代表客户端向 AWS Lambda Gateway URI 发起一个新的请求。这个新请求中携带了之前配置的授权详细信息,包括请求头、请求体和参数(以上参数都是从原始请求中传递的),然后 `aws-lambda` 插件会将带有响应头、状态码和响应体的响应信息返回给使用 APISIX 发起请求的客户端。
+
+该插件支持通过 AWS API key 和 AWS IAM secrets 进行授权。
+
+## 属性
+
+| 名称                   | 类型     | 必选项 | 默认值  | 有效值       | 描述                                                 |
+| ------------------- | ------- | ------ | ------- | ------------ | ------------------------------------------------------------ |
+| function_uri         | string  | 是       |         |              | 触发 lambda serverless 函数的 AWS API Gateway 端点。        |
+| authorization        | object  | 否       |         |              | 访问云函数的授权凭证。                                       |
+| authorization.apikey | string  | 否       |         |              | 生成的 API 密钥,用于授权对 AWS Gateway 端点的请求。         |
+| authorization.iam    | object  | 否       |         |              | 用于通过 AWS v4 请求签名执行的基于 AWS IAM 角色的授权。 请参考 [IAM 授权方案](#IAM授权方案)。 |
+| 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,...]   | 当连接空闲时,保持该连接处于活动状态的时间(以毫秒为单位)。           |
+
+### IAM 授权方案
+
+| 名称       | 类型    | 必选项   | 默认值         | 描述                                                  |
+| ---------- | ------ | -------- | ------------- | ------------------------------------------------------------ |
+| accesskey  | string | 是       |               | 从 AWS IAM 控制台生成的访问密钥 ID。                     |
+| secret_key | string | 是       |               | 从 AWS IAM 控制台生成的访问密钥。                          |
+| aws_region | string | 否       | "us-east-1"   | 发出请求的 AWS 区域。                                    |
+| service    | string | 否       | "execute-api" | 接收该请求的服务。请注意,对于 HTTP 触发器是 `"execute-api"`。 |

Review Comment:
   Could we link a doc to describe this field?



##########
docs/zh/latest/plugins/aws-lambda.md:
##########
@@ -0,0 +1,217 @@
+---
+title: aws-lambda
+keywords:
+  - APISIX
+  - Plugin
+  - AWS Lambda
+  - aws-lambda
+description: 本文介绍了关于 Apache APISIX `aws-lambda` 插件的基本信息及使用方法。

Review Comment:
   ```suggestion
   description: 本文介绍了关于 Apache APISIX aws-lambda 插件的基本信息及使用方法。
   ```



##########
docs/zh/latest/plugins/aws-lambda.md:
##########
@@ -0,0 +1,217 @@
+---
+title: aws-lambda
+keywords:
+  - APISIX
+  - Plugin
+  - AWS Lambda
+  - aws-lambda
+description: 本文介绍了关于 Apache APISIX `aws-lambda` 插件的基本信息及使用方法。
+---
+
+<!--
+#
+# 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.
+#
+-->
+
+## 描述
+
+`aws-lambda` 插件用于将 [AWS Lambda](https://aws.amazon.com/lambda/) 作为动态上游集成至 APISIX,从而实现将访问指定 URI 的请求代理到 AWS 云。
+
+启用 `aws-lambda` 插件后,该插件会终止对已配置 URI 的请求,并代表客户端向 AWS Lambda Gateway URI 发起一个新的请求。这个新请求中携带了之前配置的授权详细信息,包括请求头、请求体和参数(以上参数都是从原始请求中传递的),然后 `aws-lambda` 插件会将带有响应头、状态码和响应体的响应信息返回给使用 APISIX 发起请求的客户端。
+
+该插件支持通过 AWS API key 和 AWS IAM secrets 进行授权。
+
+## 属性
+
+| 名称                   | 类型     | 必选项 | 默认值  | 有效值       | 描述                                                 |
+| ------------------- | ------- | ------ | ------- | ------------ | ------------------------------------------------------------ |
+| function_uri         | string  | 是       |         |              | 触发 lambda serverless 函数的 AWS API Gateway 端点。        |
+| authorization        | object  | 否       |         |              | 访问云函数的授权凭证。                                       |
+| authorization.apikey | string  | 否       |         |              | 生成的 API 密钥,用于授权对 AWS Gateway 端点的请求。         |
+| authorization.iam    | object  | 否       |         |              | 用于通过 AWS v4 请求签名执行的基于 AWS IAM 角色的授权。 请参考 [IAM 授权方案](#IAM授权方案)。 |
+| 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,...]   | 当连接空闲时,保持该连接处于活动状态的时间(以毫秒为单位)。           |
+
+### IAM 授权方案
+
+| 名称       | 类型    | 必选项   | 默认值         | 描述                                                  |
+| ---------- | ------ | -------- | ------------- | ------------------------------------------------------------ |
+| accesskey  | string | 是       |               | 从 AWS IAM 控制台生成的访问密钥 ID。                     |
+| secret_key | string | 是       |               | 从 AWS IAM 控制台生成的访问密钥。                          |
+| aws_region | string | 否       | "us-east-1"   | 发出请求的 AWS 区域。                                    |

Review Comment:
   Do we have a region list?



-- 
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