/serverless/v1/functions/<函数URN>/invocations
+Content-Type: application/json
+{
+ "key" : "value"
+}
+```
+
+## 响应示例
+
+- 成功示例
+
+```shell
+HTTP/1.1 200 OK
+Content-Type: application/json
+X-Billing-Duration: <计费信息>
+X-Inner-Code: 0
+X-Invoke-Summary: <执行摘要>
+X-Log-Result: <执行日志>
+{
+ "key" : "value"
+}
+```
+
+- 失败示例
+
+```shell
+HTTP/1.1 500 Internal Server Error
+Content-Type: application/json
+X-Inner-Code: <错误码>
+{
+ "code" : <错误码>,
+ "message" : <错误信息>
+}
+```
\ No newline at end of file
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_configuration/config_env.md b/docs/multi_language_function_programming_interface/FaaS/function_configuration/config_env.md
new file mode 100644
index 0000000000000000000000000000000000000000..815cf609461d732c8dc012e5f2bddf5a96967f46
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_configuration/config_env.md
@@ -0,0 +1,93 @@
+# 环境变量
+
+可以使用环境变量,在不修改代码的前提下执行不同的代码片段。环境变量作为函数配置的一部分,以字符串键值对的方式存储,不同函数拥有独立的环境变量。本文介绍环境变量的基本信息、配置方式。
+
+> 环境变量在openYuanrong系统中使用 AES256 ( Advanced Encryption Standard 256 )标准加密存储,在初始化函数实例时,会将环境变量解密后注入到函数实例上下文中。
+
+## 使用限制
+
+1. 字符集规则
+ - Key 的字符集:必须以大小写字母开头,只能包含大小写字母、数字。
+
+## 配置环境变量
+
+参考[创建事件函数](../function_management/create_faasFunc.md) 创建openYuanrong函数时,请求参数中新增 environment 即可给函数实例设置环境变量
+
+### URI
+
+```text
+POST /serverless/v1/functions
+```
+
+### 请求参数
+
+
+
+
+ | 参数 |
+ 类型 |
+ 是否必填 |
+ 约束 |
+ 描述 |
+
+
+
+
+ | environment |
+ map |
+ 否 |
+
+ key-value 格式,key 和 value 均为 string。
+ |
+
+ 需要使用JSON格式。
+ |
+
+
+
+
+### 举例
+
+
+{
+ "name": "0@faaspy@example1",
+ "runtime": "python3.9",
+ "description": "this is a FaaS function",
+ "handler": "handler.my_handler",
+ "kind": "faas",
+ "cpu": 600,
+ "memory": 512,
+ "timeout": 600,
+ "customResources": {},
+ "environment": {
+ "env1": "value"
+ },
+ "extendedHandler": {
+ "initializer": "handler.init",
+ "pre_stop": "handler.prestop"
+ },
+ "extendedTimeout": {
+ "initializer": 600,
+ "pre_stop": 10
+ },
+ "minInstance": "0",
+ "maxInstance": "10",
+ "concurrentNum": "2",
+ "storageType": "local",
+ "codePath": "/home/example/create_faasFunc/"
+}
+
+
+## 使用环境变量
+
+在 FaaS 函数中调用获取环境变量,以 python 为例(获取环境变量名为 env1 的环境变量):
+
+```python
+context.getUserData(env1)
+```
+
+以 java 为例(获取环境变量名为 env1 的环境变量):
+
+```java
+context.getUserData(env1);
+```
\ No newline at end of file
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_configuration/config_layer.md b/docs/multi_language_function_programming_interface/FaaS/function_configuration/config_layer.md
new file mode 100644
index 0000000000000000000000000000000000000000..6471de971e16e65f2ff34b8196f4a188ff3497cf
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_configuration/config_layer.md
@@ -0,0 +1,12 @@
+# 函数层
+
+## 概念介绍
+
+与函数包不同,层中通常用来存储不经常变更的静态文件或三方依赖库。比如 node_modules 、 python 依赖包等。
+使用层管理,您可以将依赖放在层中而不是部署包中,可确保部署包保持较小的体积。
+
+## 配置函数层
+
+当前版本暂不支持
+
+参考 [发布层](http://7.227.34.194:8888/development/source_zh_ch/7_command_line_tool/clilist/layermanagement/%E5%8F%91%E5%B8%83%E5%B1%82.html)
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_configuration/config_max_instance.md b/docs/multi_language_function_programming_interface/FaaS/function_configuration/config_max_instance.md
new file mode 100644
index 0000000000000000000000000000000000000000..aa8cf25353cf263d66d5b0df5afc1ab400ee7a92
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_configuration/config_max_instance.md
@@ -0,0 +1,67 @@
+# 最大实例数
+
+最大实例指openYuanrong分配给用户 FaaS 函数的实例个数(计算资源数量)上限,在请求量增多时,openYuanrong会根据实例负载情况进行扩容,上限的实例个数为最大实例个数。
+
+## 配置最大实例数
+
+参考[创建事件函数](../function_management/create_faasFunc.md) 创建openYuanrong函数时,请求参数中新增 maxInstance 即可给函数设置最大实例数。
+
+### URI
+
+```text
+POST /serverless/v1/functions
+```
+
+### 请求参数
+
+
+
+
+ | 参数 |
+ 类型 |
+ 是否必填 |
+ 约束 |
+
+
+
+
+ | maxInstance |
+ string |
+ 否 |
+
+ 字符串形式的数字
+ |
+
+
+
+### 举例
+
+
+{
+ "name": "0@faaspy@example1",
+ "runtime": "python3.9",
+ "description": "this is a FaaS function",
+ "handler": "handler.my_handler",
+ "kind": "faas",
+ "cpu": 600,
+ "memory": 512,
+ "timeout": 600,
+ "customResources": {},
+ "environment": {
+ "env1": "value"
+ },
+ "extendedHandler": {
+ "initializer": "handler.init",
+ "pre_stop": "handler.prestop"
+ },
+ "extendedTimeout": {
+ "initializer": 600,
+ "pre_stop": 10
+ },
+ "minInstance": "0",
+ "maxInstance": "10",
+ "concurrentNum": "2",
+ "storageType": "local",
+ "codePath": "/home/example/create_faasFunc/"
+}
+
\ No newline at end of file
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_configuration/config_reserve_instance.md b/docs/multi_language_function_programming_interface/FaaS/function_configuration/config_reserve_instance.md
new file mode 100644
index 0000000000000000000000000000000000000000..df765b9240ccd81b1879b1b065c91f0e1fb9230b
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_configuration/config_reserve_instance.md
@@ -0,0 +1,69 @@
+# 预留实例
+
+预留实例指openYuanrong分配给用户 FaaS 函数的最小实例个数(计算资源数量),函数实例最少运行的数量。
+
+函数创建完成后,就会预先拉起对应数量的函数实例。openYuanrong会在请求规模降低时对函数实例进行缩容,但是至少保持最小实例个数的实例处理用户请求。
+
+## 配置预留实例
+
+参考[创建事件函数](../function_management/create_faasFunc.md) 创建openYuanrong函数时,请求参数中新增 minInstance 即可给函数设置预留实例。
+
+### URI
+
+```text
+POST /serverless/v1/functions
+```
+
+### 请求参数
+
+
+
+
+ | 参数 |
+ 类型 |
+ 是否必填 |
+ 约束 |
+
+
+
+
+ | minInstance |
+ string |
+ 否 |
+
+ 字符串形式的数字
+ |
+
+
+
+### 举例
+
+
+{
+ "name": "0@faaspy@example1",
+ "runtime": "python3.9",
+ "description": "this is a FaaS function",
+ "handler": "handler.my_handler",
+ "kind": "faas",
+ "cpu": 600,
+ "memory": 512,
+ "timeout": 600,
+ "customResources": {},
+ "environment": {
+ "env1": "value"
+ },
+ "extendedHandler": {
+ "initializer": "handler.init",
+ "pre_stop": "handler.prestop"
+ },
+ "extendedTimeout": {
+ "initializer": 600,
+ "pre_stop": 10
+ },
+ "minInstance": "0",
+ "maxInstance": "10",
+ "concurrentNum": "2",
+ "storageType": "local",
+ "codePath": "/home/example/create_faasFunc/"
+}
+
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_configuration/config_scale_policy.md b/docs/multi_language_function_programming_interface/FaaS/function_configuration/config_scale_policy.md
new file mode 100644
index 0000000000000000000000000000000000000000..3d0d7451bb1f38ace07d178b678897a85d2c7a08
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_configuration/config_scale_policy.md
@@ -0,0 +1,11 @@
+# 弹性策略
+
+openYuanrong支持基于并发度的弹性策略,当并发度达到配置的单实例并发度时,触发实例扩容。
+
+当前函数并发与实例数的关系如图:
+
+
+
+## 配置弹性策略
+
+当前openYuanrong不支持其他弹性策略,默认使用基于并发度的弹性。
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_configuration/config_scheduling_policy.md b/docs/multi_language_function_programming_interface/FaaS/function_configuration/config_scheduling_policy.md
new file mode 100644
index 0000000000000000000000000000000000000000..9d4a4a70a9965b82f8330e1873e4a2d99feb427b
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_configuration/config_scheduling_policy.md
@@ -0,0 +1,29 @@
+# 请求调度策略
+
+## 概念介绍
+
+openYuanrong支持为函数配置不同的调度策略当前支持 concurrency 、 round-robin 和 microservice 。
+
+### concurrency
+
+concurrency 调度策略即为根据当前实例的并发度情况完成调度,请求会被优先调度到并发度较低的实例上。
+
+### round-robin
+
+round-robin 调度策略即轮询调度,请求会被轮流分配给不同的实例。
+
+### microservice
+
+microservice 调度策略代表您没有为单个函数指定调度策略,具体使用什么调度策略将在openYuanrong集群部署时指定。
+
+### 最小连接数
+
+TODO
+
+### 随机调度
+
+TODO
+
+## 配置调度策略
+
+TODO
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_configuration/config_single_concurrency.md b/docs/multi_language_function_programming_interface/FaaS/function_configuration/config_single_concurrency.md
new file mode 100644
index 0000000000000000000000000000000000000000..9100beae57eb1d0f4362b09b125b16aba99f5fad
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_configuration/config_single_concurrency.md
@@ -0,0 +1,75 @@
+# 单实例并发度
+
+## 概念介绍
+
+并发度指openYuanrong分配给用户 FaaS 函数的单个实例的最大线程数,即每个实例同时处理的请求个数。
+
+单实例单并发:函数实例在同一时间只能处理 1 个请求, 1 个请求处理完了再处理下一个请求。计费时长从处理第一个请求开始,到最后一个请求结束为止。
+
+单实例多并发:多个请求在一个实例并发处理时,以实例的实际占用时间作为计费的执行时长,即从第一个请求开始,到最后一个请求结束期间的时长。
+
+应用场景:单实例多并发功能使用与函数中有较多时间在等待下游服务响应的场景,等待响应一般不消耗资源,在一个实例内并发处理可以节省费用。
+
+## 配置并发度
+
+参考[创建事件函数](../function_management/create_faasFunc.md)创建openYuanrong函数时,请求参数中新增 concurrentNum 即可给函数实例设置单实例并发度。
+
+### URI
+
+```text
+POST /serverless/v1/functions
+```
+
+### 请求参数
+
+
+
+
+ | 参数 |
+ 类型 |
+ 是否必填 |
+ 约束 |
+
+
+
+
+ | concurrentNum |
+ string |
+ 否 |
+
+ 字符串形式的数字
+ |
+
+
+
+### 举例
+
+
+{
+ "name": "0@faaspy@example1",
+ "runtime": "python3.9",
+ "description": "this is a FaaS function",
+ "handler": "handler.my_handler",
+ "kind": "faas",
+ "cpu": 600,
+ "memory": 512,
+ "timeout": 600,
+ "customResources": {},
+ "environment": {
+ "env1": "value"
+ },
+ "extendedHandler": {
+ "initializer": "handler.init",
+ "pre_stop": "handler.prestop"
+ },
+ "extendedTimeout": {
+ "initializer": 600,
+ "pre_stop": 10
+ },
+ "minInstance": "0",
+ "maxInstance": "10",
+ "concurrentNum": "2",
+ "storageType": "local",
+ "codePath": "/home/example/create_faasFunc/"
+}
+
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_configuration/index.md b/docs/multi_language_function_programming_interface/FaaS/function_configuration/index.md
new file mode 100644
index 0000000000000000000000000000000000000000..4cafda36e9c362b04a357ad8f2f89046aa693b71
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_configuration/index.md
@@ -0,0 +1,16 @@
+# 配置 FaaS 函数
+
+```{eval-rst}
+.. toctree::
+ :glob:
+ :maxdepth: 1
+ :hidden:
+
+ config_scale_policy
+ config_single_concurrency
+ config_max_instance
+ config_reserve_instance
+ config_env
+ config_scheduling_policy
+ config_layer
+```
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_development/build_layer/index.md b/docs/multi_language_function_programming_interface/FaaS/function_development/build_layer/index.md
new file mode 100644
index 0000000000000000000000000000000000000000..26f9ff0c714e37fe13ba55ec752d2daee5a1b5dc
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_development/build_layer/index.md
@@ -0,0 +1,3 @@
+# 制作函数层
+
+TODO
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_development/build_package/build_package.md b/docs/multi_language_function_programming_interface/FaaS/function_development/build_package/build_package.md
new file mode 100644
index 0000000000000000000000000000000000000000..c34cae9b0c71c3871bf9d673441f3c70006f159c
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_development/build_package/build_package.md
@@ -0,0 +1,36 @@
+# 打包
+
+代码开发完成后,需要压缩成 zip 格式包后上传。
+
+## 解释型语言打包
+
+例如 python 、 nodejs 等解释型语言,不需要对工程编译,只需要将源码进行打包即可。如果函数类型是 http 函数,则还需要将 bootstrap 文件也打包进行 zip 包中。
+
+函数入口文件,建议放在根目录下,例如 Nodejs 的入口函数文件是 index.js ,则其打包的目录结构如:
+
+```text
+|yrnodejsfunc
+ index.js
+ xxx...
+```
+
+则我们仅需要将 index.js 以及同目录下的其他代码文件也压缩即可
+*注*:需要在 yrnodejsfunc 目录下进行压缩,不要把 yrnodejsfunc 文件夹名也打包进去。
+
+event 类型的 Node.js 函数的打包可以参考[event Node.js 部署](../event_function/Node.js/部署.md)
+event 类型的 python 语言的打包可以参考[event Python 部署](../event_function/Python/部署.md)。
+
+http 类型 Node.js 函数的打包可以参考[http Node.js 部署](../http_function/Node.js.md)
+http 类型的 python 语言的打包可以参考 todo 。
+
+## 编译型语言打包
+
+例如 Java 等编译型语言,需要对工程编译后,将二进制文件打包上传即可。如果函数类型是 http 函数,则还需要将 bootstrap 文件也打包进行 zip 包中。
+与解释型语言不同的是,函数入口文件不需要放在根目录下。
+
+event 类型的 Java 函数打包可以参考[event Java 部署](../event_function/Java/编译部署.md)
+http 类型的 Java 函数打包可以参考[http Java 部署](../http_function/Java.md)
+
+## 自定义镜像语言打包
+
+自定义镜像函数其实没有打包概念,其需要先将镜像推送到镜像仓后,获取对应镜像名即可。镜像名填入对应的函数部署的对应字段。openYuanrong在该函数实例启动时会自动去镜像仓库拉取镜像。
\ No newline at end of file
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_development/build_package/index.md b/docs/multi_language_function_programming_interface/FaaS/function_development/build_package/index.md
new file mode 100644
index 0000000000000000000000000000000000000000..fbabbc0f924fe017a547d5c7dfb038e261882a07
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_development/build_package/index.md
@@ -0,0 +1,9 @@
+# 制作函数代码包
+
+```{eval-rst}
+.. toctree::
+ :glob:
+ :hidden:
+
+ build_package
+```
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_development/customimage_function/index.md b/docs/multi_language_function_programming_interface/FaaS/function_development/customimage_function/index.md
new file mode 100644
index 0000000000000000000000000000000000000000..545dc4a87c3aee13acde6761af9936ffec84b1f8
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_development/customimage_function/index.md
@@ -0,0 +1,43 @@
+# 开发自定义镜像函数
+
+openYuanrong支持用户自定义容器镜像来提供函数的代码包及运行时环境,相比代码包形式发布的函数,自定义镜像拥有更大的用户自定义空间。
+
+## 函数入口
+
+自定义镜像函数需要在镜像拉起后启动一个 HTTP 服务端进程,作为用户的函数入口,从openYuanrong函数系统接收函数调用请求并传递返回值。
+
+### 函数入口的约束
+
+- HTTP 服务端进程监听的端口必须是 8000
+- 作为调用入口的 Path 必须是 /invoke , Method 必须是 POST
+- 作为调用事件的 HTTP 请求 Body 体必须使用 APIGTriggerEvent 格式
+- 作为调用结果的 HTTP 返回 Body 体会被封装 APIGTriggerResponse 格式
+
+### 格式参考
+
+APIGTriggerEvent
+
+```json
+{
+ "isBase64Encoded": "<是否使用 Base64 编码>",
+ "httpMethod": "",
+ "path": "",
+ "pathParameters": "",
+ "queryStringParameters": "",
+ "headers": "",
+ "body": "",
+ "requestContext": "<请求上下文>",
+ "user_data": "<用户数据>"
+}
+```
+
+APIGTriggerResponse
+
+```json
+{
+ "isBase64Encoded": "<是否使用 Base64 编码>",
+ "headers": "",
+ "body": "",
+ "statusCode": "<请求返回码>"
+}
+```
\ No newline at end of file
diff --git "a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/C++/C++\350\277\220\350\241\214\346\227\266\344\273\213\347\273\215.md" "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/C++/C++\350\277\220\350\241\214\346\227\266\344\273\213\347\273\215.md"
new file mode 100644
index 0000000000000000000000000000000000000000..1e369588df8b7791b4928bbb8bba18a6c31165c7
--- /dev/null
+++ "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/C++/C++\350\277\220\350\241\214\346\227\266\344\273\213\347\273\215.md"
@@ -0,0 +1,29 @@
+# C++ 运行时介绍
+
+本文介绍 FaaS 场景下编写 C++ 运行时函数。
+
+## 背景信息
+
+C++ 需要编译后打包上传至云平台运行。
+
+## Cpp 运行时
+
+FaaS 目前支持的 C++ 运行环境如下:
+
+| 版本 | 操作系统系统 | 架构 |
+|---------------|--------------------------|-----------------------|
+| C++17 gcc 10.3.1 | Linux | x86_64、arm |
+
+需要提前安装好 gcc 环境。
+
+```bash
+$ gcc -v
+Using built-in specs.
+COLLECT_GCC=gcc
+COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-linux-gnu/10.3.1/lto-wrapper
+Target: x86_64-linux-gnu
+Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,fortran,lto --enable-plugin --enable-initfini-array --disable-libgcj --without-isl --without-cloog --enable-gnu-indirect-function --build=x86_64-linux-gnu --with-stage1-ldflags=' -Wl,-z,relro,-z,now' --with-boot-ldflags=' -Wl,-z,relro,-z,now' --disable-bootstrap --with-tune=generic --with-arch_32=x86-64 --enable-multilib
+Thread model: posix
+Supported LTO compression algorithms: zlib
+gcc version 10.3.1 (GCC)
+```
\ No newline at end of file
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/C++/index.rst b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/C++/index.rst
new file mode 100644
index 0000000000000000000000000000000000000000..7cff038ad64788c6e7d22e83a484850183ef570b
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/C++/index.rst
@@ -0,0 +1,24 @@
+:orphan:
+
+.. Copyright (c) 2022 Huawei Technologies Co., Ltd
+ This software is licensed under Mulan PSL v2.
+ You can use this software according to the terms and conditions of the Mulan PSL v2.
+ You may obtain a copy of Mulan PSL v2 at:
+ http://license.coscl.org.cn/MulanPSL2
+ THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
+ EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
+ MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
+ See the Mulan PSL v2 for more details.
+
+Cpp
+==============================
+
+.. toctree::
+ :glob:
+ :hidden:
+
+ C++运行时介绍
+ 函数入口
+ 上下文
+ 日志
+ 编译部署
\ No newline at end of file
diff --git "a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/C++/\344\270\212\344\270\213\346\226\207.md" "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/C++/\344\270\212\344\270\213\346\226\207.md"
new file mode 100644
index 0000000000000000000000000000000000000000..eaab73121b57f2c8f5e654edacf7f8d957c19c81
--- /dev/null
+++ "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/C++/\344\270\212\344\270\213\346\226\207.md"
@@ -0,0 +1,31 @@
+# 上下文
+
+Context 类中提供了许多上下文方法供用户使用,包含一些函数的运行时信息,例如:request id、临时 access key 等。其声明和功能如表 1 所示。
+
+表 1 Context 类上下文方法说明
+
+| 方法名 | 方法说明 |
+|-----------------------------------|------------------------------------------------------------------------|
+| GetAccessKey() | 获取用户委托的 AccessKey(有效期 24 小时),使用该方法需要给函数配置委托。 |
+| GetSecretKey() | 获取用户委托的 SecretKey(有效期 24 小时),使用该方法需要给函数配置委托。 |
+| GetSecurityAccessKey() | 获取用户委托的 SecurityAccessKey(有效期 24 小时),使用该方法需要给函数配置委托。 |
+| GetSecuritySecretKey() | 获取用户委托的 SecuritySecretKey(有效期 24 小时),使用该方法需要给函数配置委托。 |
+| GetToken() | 获取函数 token 。 |
+| GetAlias() | 获取函数的别名。 |
+| GetTraceId() | 获取用户 Trace ID 。 |
+| GetInvokeId() | 获取用户 Invoke ID 。 |
+| GetLogger() | 获取 context 提供的 logger 方法,返回一个日志输出类,通过使用其 info 方法按“时间-请求 ID-输出内容”的格式输出日志。 |
+| GetState() | 获取函数状态 。 |
+| GetInstanceId() | 获取实例 ID 。 |
+| GetInstanceLabel() | 获取示例标签。 |
+| SetState(const std::string &state) | 设置函数状态。 |
+| GetRequestID() | 获取当前函数的请求 ID 。 |
+| GetUserData(string key) | 获取用户数据? |
+| GetFunctionName() | 获取函数名称。 |
+| GetRemainingTimeInMilliSeconds() | 获取函数超时时间(毫秒)。 |
+| GetRunningTimeInSeconds() | 获取函数超时时间(秒)。 |
+| GetVersion() | 获取函数的版本。 |
+| GetMemorySize() | 获取函数占用的内存。 |
+| GetCPUNumber() | 获取函数占用的 CPU 资源。 |
+| GetProjectID() | 获取函数的 Project ID。 |
+| GetPackage() | 获取函数包的名称的。 |
diff --git "a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/C++/\345\207\275\346\225\260\345\205\245\345\217\243.md" "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/C++/\345\207\275\346\225\260\345\205\245\345\217\243.md"
new file mode 100644
index 0000000000000000000000000000000000000000..4053d61652807f3a42911b8ccc74bdf9cbf5731e
--- /dev/null
+++ "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/C++/\345\207\275\346\225\260\345\205\245\345\217\243.md"
@@ -0,0 +1,74 @@
+# 函数入口
+
+对于 C++ ,openYuanrong运行时支持 C++17 (gcc 10.3.1) 版本。
+
+## 执行方法
+
+函数有明确的接口定义,如下所示。
+
+```cpp
+std::string HandleRequest(const std::string &request, Function::Context &context);
+```
+
+入口函数名(HandleRequest):入口函数名称,需和函数执行入口处用户自定义的入口函数名称一致。
+
+执行事件(request):函数执行界面由用户输入的执行事件参数, 格式为 JSON 对象。
+
+上下文环境(context):Runtime 提供的函数执行上下文,其接口定义在上下文章节说明。
+
+## initializer 入口介绍
+
+### 功能说明
+
+当函数实例被拉起时,函数初始化入口方法会首先被执行(函数实例生命周期中只会执行一次)当初始化入口执行完成,才会执行函数调用的方法。注意 Initializer 不是必须的
+
+### 函数原型
+
+```cpp
+void Initializer(Function::Context &context);
+```
+
+用户实现 Initializer 方法后,通过`RegisterInitializerFunction`方法注册
+
+```cpp
+void Initializer(Function::Context &context) {
+ // 初始化的逻辑
+}
+
+Function::Runtime rt;
+rt.RegisterInitializerFunction(Initializer);
+```
+
+### initializer 接口的优点
+
+- 分离初始化逻辑和请求处理逻辑
+- 用户函数代码更新时,系统能够保证用户函数的平滑升级,减少应用层初始化冷启动带来的性能损耗。新的函数实例启动后能够自动执行用户的初始化逻辑,在初始化完成后再处理请求
+- 在应用负载上升、需要增加更多函数实例时,系统能够识别函数应用层初始化的开销,由此更准确的计算资源伸缩的时机和所需的资源量、让请求延时更加平稳
+
+## InitState 介绍
+
+### 功能说明
+
+当调用函数时,如果该函数是一个有状态函数,会触发状态初始化方法的调用,然后才会执行函数调用请求。
+
+### 函数原型
+
+```cpp
+void InitState(const std::string& state, Function::Context& context);
+```
+
+状态数据 state: 当进行有状态函数互调时,可以将 state 信息放入 request 里。该参数可忽略,业务自己在该方法中实现状态相关逻辑。
+
+上下文环境 context : runtime 构造的变量,用户可以通过 context 进行日志打印、获取环境变量等,具体可以参考上下文章节的说明
+
+对于有状态函数,用户需要自行实现 InitState 方法,并通过 InitState 方法注册
+
+```cpp
+void InitState(const std::string& request, Function::Context& context) {
+ // 业务逻辑
+ context.SetState(stateString); // 必须
+}
+
+Function::Runtime rt;
+rt.InitState(InitState);
+```
\ No newline at end of file
diff --git "a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/C++/\346\227\245\345\277\227.md" "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/C++/\346\227\245\345\277\227.md"
new file mode 100644
index 0000000000000000000000000000000000000000..04b85a2212a81b5b90ca84074acff6412e77965b
--- /dev/null
+++ "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/C++/\346\227\245\345\277\227.md"
@@ -0,0 +1,45 @@
+# 日志
+
+## 使用 stdout 打印日志
+
+使用该方法打印日志会将内容原样输出到日志中。代码示例如下所示。
+
+```cpp
+std::string HandleRequest(const std::string &request, Function::Context &context)
+{
+ std::cout << "hello world" << std::endl;
+ return "done";
+}
+```
+
+执行以上代码,输出的日志内容如下所示。
+
+```bash
+hello world
+```
+
+## 使用 context().GetLogger 打印日志
+
+使用 context.getLogger 打印日志,以通过 request id 区分各并发请求的日志。代码示例如下所示。
+
+```cpp
+std::string HandleRequest(const std::string &request, Function::Context &context)
+{
+ Function::FunctionLogger logger = context.GetLogger();
+ logger.setLevel("INFO");
+ logger.Debug("hello cpp %s ", "user debug log");
+ logger.Info("hello cpp %s ", "user info log");
+ logger.Warn("hello cpp %s ", "user warn log");
+ logger.Error("hello cpp %s ", "user error log");
+ return "done";
+}
+```
+
+执行以上代码,输出的日志内容如下所示。
+
+```bash
+2025-xx-xx xx:xx:xx xxxxxxxx-xxxx-xxxx-xxxx-xxxxx****xx [DEBUG] hello cpp user debug log
+2025-xx-xx xx:xx:xx xxxxxxxx-xxxx-xxxx-xxxx-xxxxx****xx [INFO] hello cpp user info log
+2025-xx-xx xx:xx:xx xxxxxxxx-xxxx-xxxx-xxxx-xxxxx****xx [WARNING] hello cpp user warn log
+2025-xx-xx xx:xx:xx xxxxxxxx-xxxx-xxxx-xxxx-xxxxx****xx [ERROR] hello cpp user error log
+```
\ No newline at end of file
diff --git "a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/C++/\347\274\226\350\257\221\351\203\250\347\275\262.md" "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/C++/\347\274\226\350\257\221\351\203\250\347\275\262.md"
new file mode 100644
index 0000000000000000000000000000000000000000..3cf1b580a3c9321527fc17c4e6baf44d4f21d726
--- /dev/null
+++ "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/C++/\347\274\226\350\257\221\351\203\250\347\275\262.md"
@@ -0,0 +1,151 @@
+# 部署
+
+## Step 1. 部署基于 k8s 的openYuanrong集群
+
+部署使用openYuanrong的 FaaS 能力,当前需要基于 k8s 的部署方式,请参考 [k8s 部署快速起步](../../../../../../deploy/deploy_on_k8s/single-node-deployment.md) 章节。
+
+## Step 2. 创建一个 Cpp 的 faas 工程
+
+在自己的工作目录 (例如 `/home/user/faas`)下创建一个 cpp 工程。目录如下
+
+```bash
+$ tree
+faascpp
+├── CMakeLists.txt
+└── main.cpp
+
+0 directories, 2 files
+```
+
+`main.cpp`内容如下
+
+```cpp
+#include
+#include
+#include "Function.h"
+#include "Runtime.h"
+
+std::string HandleRequest(const std::string &request, Function::Context &context)
+{
+ std::string traceID = context.GetTraceId();
+ std::string RequestID = context.GetRequestID();
+ std::string FunctionName = context.GetFunctionName();
+ std::cout << "hello faas!" << std::endl;
+
+ nlohmann::json j = {
+ {"traceID", traceID},
+ {"RequestID", RequestID},
+ {"FunctionName", FunctionName}
+ };
+ return j.dump();
+}
+
+void Initializer(Function::Context &context) {
+ return;
+}
+
+int main(int argc, char *argv[])
+{
+ Function::Runtime rt;
+ rt.RegisterHandler(HandleRequest);
+ rt.RegisterInitializerFunction(Initializer);
+ rt.Start(argc, argv);
+ return 0;
+}
+```
+
+`CMakeLists.txt` 内容如下。注意替换 `YUANRONG_DIR` 为自己本地 yuanrong 目录
+
+```cmake
+cmake_minimum_required(VERSION 3.16.1)
+project("faas-cpp" LANGUAGES C CXX)
+set(CMAKE_CXX_STANDARD 17)
+
+include_directories(
+ ${YUANRONG_DIR}/runtime/sdk/cpp/include
+)
+
+link_directories(
+ ${YUANRONG_DIR}/runtime/sdk/cpp/lib
+)
+
+add_executable(handler main.cpp)
+target_link_libraries(handler functionsdk)
+```
+
+然后编译
+
+```bash
+mkdir build
+cd build
+cmake ..
+make -j8
+```
+
+## Step 3. 打包可执行文件并通过 Meta-Service 创建函数
+
+```bash
+cd /home/user/faas/faascpp/build
+ldd ./handler | awk '/=>/ {print $3}' | grep -v '^$' | tr '\n' '\0' | xargs zip -j faascpp.zip ./handler
+```
+
+把这个 zip 文件上传到自定义的 s3 路径,例如`https://x.x.x.x:xxx` 的 bucket `my-bucket-id` 下。然后编写下方 json 连接 Meta-Service。
+
+```json
+{
+ "name": "0@faascpp@hello",
+ "runtime": "posix-custom-runtime",
+ "handler": "handler",
+ "kind": "faas",
+ "cpu": 600,
+ "memory": 512,
+ "timeout": 600,
+ "storageType": "s3",
+ "s3CodePath": {
+ "bucketId": "my-bucket-id",
+ "objectId": "faascpp.zip",
+ "bucketUrl": "https://x.x.x.x:xxx"
+ }
+}
+```
+
+### 请求示例
+
+```bash
+META_SERVICE_ADDR="http://$(kubectl get nodes -o jsonpath='{.items[0].status.addresses[?(@.type=="InternalIP")].address}'):$(kubectl get svc meta-service -o jsonpath='{.spec.ports[0].nodePort}')"
+
+curl -X POST -H "Content-Type: application/json" -d \
+'{
+ "name": "0@faascpp@hello",
+ "runtime": "posix-custom-runtime",
+ "handler": "handler",
+ "kind": "faas",
+ "cpu": 600,
+ "memory": 512,
+ "timeout": 600,
+ "storageType": "s3",
+ "s3CodePath": {
+ "bucketId": "my-bucket-id",
+ "objectId": "faascpp.zip",
+ "bucketUrl": "https://x.x.x.x:xxx"
+ }
+}' \
+http://${META_SERVICE_ADDR}/serverless/v1/functions
+```
+
+## Step 4. 访问函数
+
+在 FaaS 函数发布后,openYuanrong会生成一个访问链接,可以通过这个链接触发 FaaS 函数的访问。这里用`json`格式传入 event 的 name 字段。这个参数将从响应中体现。
+
+### 请求示例
+
+```bash
+curl -X POST -H "Content-Type: application/json" -d '{"name": "faas"}' \
+ -i ${META_SERVICE_ADDR}/serverless/v1/functions/sn:cn:yrk:12345678901234561234567890123456:function:0@faascpp@hello:latest/invocations
+```
+
+### 响应示例
+
+```bash
+hello faas!
+```
diff --git "a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Java/Java\350\277\220\350\241\214\346\227\266\344\273\213\347\273\215.md" "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Java/Java\350\277\220\350\241\214\346\227\266\344\273\213\347\273\215.md"
new file mode 100644
index 0000000000000000000000000000000000000000..5a3481d9988e6a55311357eaa778c7aca0727c27
--- /dev/null
+++ "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Java/Java\350\277\220\350\241\214\346\227\266\344\273\213\347\273\215.md"
@@ -0,0 +1,24 @@
+# Java 运行时介绍
+
+本文介绍 FaaS 场景下编写 Java 运行时函数。
+
+## 背景信息
+
+Java 语言是编译型语言,需要编译后在 JVM 虚拟机中运行,有如下限制: 【 todo -改完编译后上传】
+
+- 不支持代码在线编译,使用 Java 语言仅支持上传已经开发完成编译打包后的 zip 包【 todo -待确定是否两种方式都支持】。
+- 不支持代码在线编辑,由于不支持上传代码,所以不支持在线编辑代码。
+
+## Java 运行时
+
+FaaS 目前支持的 Java 运行环境如下:
+
+| 版本 | 操作系统系统 | 架构 |
+|---------|--------------------------|-----------------------|
+| Java 8 | Linux | x86_64、arm |
+| Java 11 | Linux | x86_64、arm |
+| Java 17 | Linux | x86_64、arm |
+| Java 21 | Linux | x86_64、arm |
+
+FaaS 提供 Java SDK,提供函数互调【 todo java sdk 的功能还需要补充】等功能。
+【todo】如何部署时候指定 Java 版本
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Java/index.rst b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Java/index.rst
new file mode 100644
index 0000000000000000000000000000000000000000..3c29fad9a4db660f2b27dbfc3799df181e521cfe
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Java/index.rst
@@ -0,0 +1,24 @@
+:orphan:
+
+.. Copyright (c) 2022 Huawei Technologies Co., Ltd
+ This software is licensed under Mulan PSL v2.
+ You can use this software according to the terms and conditions of the Mulan PSL v2.
+ You may obtain a copy of Mulan PSL v2 at:
+ http://license.coscl.org.cn/MulanPSL2
+ THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
+ EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
+ MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
+ See the Mulan PSL v2 for more details.
+
+Java
+==============================
+
+.. toctree::
+ :glob:
+ :hidden:
+
+ Java运行时介绍
+ 函数入口
+ 上下文
+ 日志
+ 编译部署
\ No newline at end of file
diff --git "a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Java/\344\270\212\344\270\213\346\226\207.md" "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Java/\344\270\212\344\270\213\346\226\207.md"
new file mode 100644
index 0000000000000000000000000000000000000000..053154745fd22519d741b58fdc32af69c03cfa3a
--- /dev/null
+++ "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Java/\344\270\212\344\270\213\346\226\207.md"
@@ -0,0 +1,122 @@
+# 上下文
+
+在执行函数初始化方法或者执行方法时,Java 运行时会传递 context 参数, context 中包含函数和请求的信息以及 Java Runtime 提供给函数的功能。
+context 的引入方式为:*import com.xxx.services.runtime.Context;*
+
+## 上下文介绍
+
+context 以方法形式提供信息和功能。
+
+``` java
+
+ // 获取本次请求的requestId
+ public String getRequestID()
+
+ // 获取本次请求剩余执行时间,单位毫秒
+ public int getRemainingTimeInMilliSeconds()
+
+ // 获取ak
+ public String getAccessKey()
+
+ // 获取sk
+ public String getSecretKey()
+
+ // 根据key查询环境变量
+ public String getUserData(String key)
+
+ // 获取函数名
+ public String getFunctionName()
+
+ // 获取请求超时时间,单位秒
+ public int getRunningTimeInSeconds()
+
+ // 获取函数版本
+ public String getVersion()
+
+ // 获取函数的内存大小
+ public int getMemorySize()
+
+ // 获取函数的cpu大小
+ public int getCPUNumber()
+
+ // 获取函数的projectId
+ public String getProjectID()
+
+ // 获取token // todo 不确定
+ public String getToken()
+
+ // 获取安全token // todo 不确定
+ public String getSecurityToken()
+
+ // 获取本租户所有的别名 // todo 不确定
+ public String getAlias()
+
+ // 获取日志方法,用于日志打印
+ public RuntimeLogger getLogger()
+
+ // 获取Java运行时的实例名
+ public String getInstanceID()
+
+ // 获取请求的traceId
+ public String getTraceID()
+
+ // 获取当前实例的InstanceLabel
+ public String getInstanceLabel() {}
+```
+
+## 通过 context 获取请求上下文示例
+
+```java
+package programmingmodel;
+
+import java.io.UnsupportedEncodingException;
+import java.util.HashMap;
+import java.util.Map;
+import java.io.*;
+import com.google.gson.Gson;
+import com.google.gson.JsonObject;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+
+import com.xxx.services.runtime.Context;
+
+public class Testyrjavacontext001 {
+ public String myHandler(String name, Context context) throws Exception {
+
+ Map headers = new HashMap();
+ headers.put("Content-Type", "application/json");
+
+ Map bodyDict = new HashMap();
+
+ bodyDict.put("getRequestID",context.getRequestID());
+ bodyDict.put("getRemainingTimeInMilliSeconds",String.valueOf(context.getRemainingTimeInMilliSeconds()));
+ bodyDict.put("getAccessKey",context.getAccessKey());
+ bodyDict.put("getSecretKey",context.getSecretKey());
+ bodyDict.put("getUserData",context.getUserData("key"));
+ bodyDict.put("getFunctionName",context.getFunctionName());
+ bodyDict.put("getRunningTimeInSeconds",String.valueOf(context.getRunningTimeInSeconds()));
+ bodyDict.put("getVersion",context.getVersion());
+ bodyDict.put("getMemorySize",String.valueOf(context.getMemorySize()));
+ bodyDict.put("getCPUNumber",String.valueOf(context.getCPUNumber()));
+ bodyDict.put("getProjectID",context.getProjectID());
+ bodyDict.put("getPackage",context.getPackage());
+ bodyDict.put("instanceLabel",context.getInstanceLabel());
+
+ try {
+ BufferedReader reader=new BufferedReader(new FileReader("/tmp/initializer.log"));
+ String initializer_file_data = reader.readLine();
+ bodyDict.put("initializer_file_data",initializer_file_data);
+ reader.close();
+ }
+ catch (IOException e){
+ System.out.print("==========================================!!!!!!!!!!!!!!!! error read /tmp/initializer.log error ");
+ throw new Exception("=====!!!!!!!!!!!!!!!! error read /tmp/initializer.log error");
+ }
+
+ Gson gson = new Gson();
+ String res = gson.toJson(bodyDict);
+ return res;
+ }
+}
+
+```
\ No newline at end of file
diff --git "a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Java/\345\207\275\346\225\260\345\205\245\345\217\243.md" "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Java/\345\207\275\346\225\260\345\205\245\345\217\243.md"
new file mode 100644
index 0000000000000000000000000000000000000000..29f7d432bf4011d01a977c4fd60fe0babad4e8bc
--- /dev/null
+++ "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Java/\345\207\275\346\225\260\345\205\245\345\217\243.md"
@@ -0,0 +1,89 @@
+# 函数入口
+
+函数入口包含两种方法:执行方法和初始化方法。定义 Java 函数入口,格式为: *[包名].[类名].[方法名]* 或者 *[包名].[类名]::[方法名]*
+
+例如,包名是 com.example , 类名是 FaaSHandler ,函数名是 handler ,则方法为*com.example.FaaSHandler.handler*或者是*com.example.FaaSHandler::handler*。
+
+如下,functions.yrjavafunc.handler 定义了执行方法,functions.yrjavafunc.initializer 定义了初始化方法。**注:yrjavafunc 为自定义的函数名**
+
+```text
+service: yrjavatest
+kind: faas
+description: Java Faas示例
+functions:
+ yrjavafunc:
+ handler: com.example.FaaSHandler::handler
+ initializer: com.example.FaaSHandler.initializer
+ description: java function example
+ runtime: java1.8
+ memory: 256
+ timeout: 900
+ cpu: 400
+```
+
+## 执行方法
+
+执行方法是 Java 运行时处理函数请求时调用的方法,即函数请求执行入口。在函数部署时**必须**指定执行方法。
+执行方法的示例:
+
+```java
+package com.example;
+
+import com.xxx.services.runtime.Context;
+import com.xxx.services.runtime.RuntimeLogger;
+import com.google.gson.JsonObject;
+
+public class FaaSHandler{
+ public JsonObject handler(JsonObject args, Context context) {
+ JsonObject res = new JsonObject();
+
+ res.add("body",new JsonObject());
+ res.addProperty("contentType", "application/json");
+ res.addProperty("statusCode", "200");
+ return res;
+ }
+
+ public void initializer(Context context) {
+
+ }
+}
+```
+
+Java 执行方法不必要实现某个接口。其入参有 args,context 。
+
+- args 是用调用函数的事件数据,其类型可以根据您需要自定义,不必指定为 JsonObject。
+- context 是此次请求执行的上下文信息,其类型*必须*为*com.xxx.services.runtime.Context*,其具体内容可以参考下一节:上下文。
+
+Java 执行方法的出参有一个
+
+- 出参的类型可以根据您的需要自定义。
+
+## 初始化方法
+
+初始化方法是 Java 运行时启动后调用该方法,完成函数必要的准备工作,即函数初始化入口,该方法仅会调用一次。在函数部署时**按需**指定初始化方法。
+初始化方法的示例:
+
+```java
+package com.example;
+
+import com.xxx.services.runtime.Context;
+import com.xxx.services.runtime.RuntimeLogger;
+import com.google.gson.JsonObject;
+
+public class FaaSHandler{
+ public JsonObject handler(JsonObject args, Context context) {
+ return new JsonObject();
+ }
+
+ public void initializer(Context context) {
+
+ }
+}
+```
+
+Java 初始化方法不必要实现某个接口。其入参有 context。
+
+- context 是此次调用的上下文信息,其类型*必须*为*com.xxx.services.runtime.Context*,其具体内容可以参考下一节:上下文。
+ Java 初始化方法的出参有一个
+- 出参的类型为 void。
+
diff --git "a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Java/\346\227\245\345\277\227.md" "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Java/\346\227\245\345\277\227.md"
new file mode 100644
index 0000000000000000000000000000000000000000..adf56c13327a624aed4e1019022e9ca4fa7e8152
--- /dev/null
+++ "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Java/\346\227\245\345\277\227.md"
@@ -0,0 +1,58 @@
+# 日志
+
+context 中也提供了日志功能,日志对运维和问题定位有重要作用。
+
+## 日志使用
+
+示例:
+
+```java
+package programmingmodel;
+
+import com.google.gson.JsonObject;
+import com.xxx.services.runtime.Context;
+import com.xxx.services.runtime.RuntimeLogger;
+
+public class YRLog
+{
+ public String myHandler(String name, Context context)
+ {
+
+ RuntimeLogger runtimeLog = context.getLogger();
+ runtimeLog.log(name);
+ runtimeLog.log(System.getenv().toString());
+ runtimeLog.log(context.getRequestID());
+ String rep = "a";
+ rep = rep.repeat(6291456);
+ return rep;
+ }
+}
+
+```
+
+日志需要引入*import com.xxx.services.runtime.RuntimeLogger;*,类型为 RuntimeLogger 。其接口如下:
+
+```java
+ // 设置日志显示的级别,默认是INFO,level可以设置为DEBUG、INFO、WARN、ERROR
+ public void setLevel(String level)
+
+ // 打印日志,级别为info,功能同info()函数
+ public void log(String message)
+
+ // 打印info级别的日志
+ public void info(String message)
+
+ // 打印debug级别的日志
+ public void debug(String message)
+
+ // 打印warn级别的日志
+ public void warn(String message)
+
+ // 打印error级别的日志
+ public void error(String message)
+
+```
+
+## 日志显示
+
+该功能暂未实现
\ No newline at end of file
diff --git "a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Java/\347\274\226\350\257\221\351\203\250\347\275\262.md" "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Java/\347\274\226\350\257\221\351\203\250\347\275\262.md"
new file mode 100644
index 0000000000000000000000000000000000000000..04644377beb8b4c5c73ed494bd83f850a0a2403a
--- /dev/null
+++ "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Java/\347\274\226\350\257\221\351\203\250\347\275\262.md"
@@ -0,0 +1,194 @@
+# 编译部署
+
+## Java 工程准备
+
+```text
+|yrjavatest
+ |service.yaml
+ |yrjavafunc
+ |pom.xml
+ |src
+ |main
+ |assembly
+ |zip_file.xml
+ |java
+ |com
+ |example
+ |FaaSHandler.java
+```
+
+## service.yaml 示例
+
+```text
+service: yrjavatest
+kind: faas
+description: Java Faas示例
+functions:
+ yrjavafunc:
+ handler: com.example.FaaSHandler::handler
+ initializer: com.example.FaaSHandler.initializer
+ description: java function example
+ runtime: java1.8
+ memory: 256
+ timeout: 900
+ cpu: 400
+```
+
+## 入口函数
+
+```java
+package com.example;
+
+import com.xxx.services.runtime.Context;
+import com.xxx.services.runtime.RuntimeLogger;
+import com.google.gson.Gson;
+import com.google.gson.JsonObject;
+
+public class FaaSHandler{
+ public JsonObject handler(JsonObject args, Context context) {
+ JsonObject jsonObject = new JsonObject();
+ jsonObject.addProperty("func","hello");
+
+ JsonObject res = new JsonObject();
+
+ JsonObject p1 = new JsonObject();
+ p1.addProperty("faas-content-type", "json");
+ p1.addProperty("res-type", "context.env");
+ JsonObject p2 = new JsonObject();
+ p2.add("result",jsonObject);
+
+ res.add("headers",p1);
+ res.addProperty("isBase64Encoded",false);
+ res.add("body",p2);
+ res.addProperty("contentType", "application/json");
+ res.addProperty("statusCode", "200");
+ return res;
+ }
+
+ public void initializer(Context context) {
+
+ }
+}
+```
+
+```xml
+
+
+
+ 4.0.0
+
+ com.example
+ faas-example
+ 1.0.0
+ fass-udf-example
+
+
+ UTF-8
+ 1.8
+ 1.8
+ yyyyMMddHHmmss
+ example
+ target
+
+
+
+
+ com.xxx.yuanrong
+ faas-function-sdk
+ 1.0.0
+
+
+ com.google.code.gson
+ gson
+ 2.9.0
+
+
+ org.json
+ json
+ 20190722
+
+
+ junit
+ junit
+ 4.11
+ test
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-assembly-plugin
+ 2.2
+
+
+
+ true
+
+
+ false
+
+
+
+ auto-deploy
+ package
+
+ single
+
+
+
+ src/main/assembly/zip_file.xml
+
+ ${package.finalName}
+ ${package.outputDirectory}
+
+ 0700
+ 0600
+ 0700
+
+
+
+
+
+
+
+
+```
+
+zipfile
+
+```xml
+
+
+
+
+ auto-deploy
+
+
+ zip
+
+
+
+
+ src/main/resources/
+ config
+
+ **
+
+ 0600
+ 0700
+
+
+
+
+
+
+ lib
+ runtime
+
+
+
+```
\ No newline at end of file
diff --git "a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Node.js/Node.js\350\277\220\350\241\214\346\227\266\344\273\213\347\273\215.md" "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Node.js/Node.js\350\277\220\350\241\214\346\227\266\344\273\213\347\273\215.md"
new file mode 100644
index 0000000000000000000000000000000000000000..2925edc0130c20e0feee5b94de5e8088dc811e8c
--- /dev/null
+++ "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Node.js/Node.js\350\277\220\350\241\214\346\227\266\344\273\213\347\273\215.md"
@@ -0,0 +1,22 @@
+# Node.js 运行时介绍
+
+本文介绍 FaaS 场景下编写 Node.js 运行时函数。
+
+## 背景信息
+
+Node.js 语言是解释型语言,可以直接打包上传至云平台运行。
+
+## Node.js 运行时
+
+FaaS 目前支持的 Node.js 运行环境如下:
+
+| 版本 | 操作系统系统 | 架构 |
+|---------------|--------------------------|-----------------------|
+| Node.js 6.10 | Linux | x86_64、arm |
+| Node.js 8.10 | Linux | x86_64、arm |
+| Node.js 10.16 | Linux | x86_64、arm |
+| Node.js 12.13 | Linux | x86_64、arm |
+| Node.js 14.18 | Linux | x86_64、arm |
+| Node.js 16.17 | Linux | x86_64、arm |
+| Node.js 18.15 | Linux | x86_64、arm |
+
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Node.js/index.rst b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Node.js/index.rst
new file mode 100644
index 0000000000000000000000000000000000000000..5fa02776f5a587f19c5ce11f55cc74d99212fdc3
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Node.js/index.rst
@@ -0,0 +1,22 @@
+.. Copyright (c) 2022 Huawei Technologies Co., Ltd
+ This software is licensed under Mulan PSL v2.
+ You can use this software according to the terms and conditions of the Mulan PSL v2.
+ You may obtain a copy of Mulan PSL v2 at:
+ http://license.coscl.org.cn/MulanPSL2
+ THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
+ EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
+ MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
+ See the Mulan PSL v2 for more details.
+
+Node.js
+==============================
+
+.. toctree::
+ :glob:
+ :hidden:
+
+ Node.js运行时介绍
+ 函数入口
+ 上下文
+ 日志
+ 部署
\ No newline at end of file
diff --git "a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Node.js/\344\270\212\344\270\213\346\226\207.md" "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Node.js/\344\270\212\344\270\213\346\226\207.md"
new file mode 100644
index 0000000000000000000000000000000000000000..3ba9e8567ac252293759aba082e6f46c384ea824
--- /dev/null
+++ "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Node.js/\344\270\212\344\270\213\346\226\207.md"
@@ -0,0 +1,80 @@
+# 上下文
+
+在执行函数初始化方法或者执行方法时, Node.js 运行时会传递 context 参数, context 中包含函数和请求的信息以及 Node.js Runtime 提供给函数的功能。
+
+## 上下文介绍
+
+context 以方法形式提供信息和功能。
+
+```javascript
+
+ // 获取本次请求的requestId
+ getRequestID()
+
+ // 获取本次请求剩余执行时间,单位毫秒
+ getRemainingTimeInMilliSeconds()
+
+ // 获取ak
+ getAccessKey()
+
+ // 获取sk
+ getSecretKey()
+
+ // 根据key查询环境变量
+ getUserData(key)
+
+ // 获取函数名
+ getFunctionName()
+
+ // 获取请求超时时间,单位秒
+ getRunningTimeInSeconds()
+
+ // 获取函数版本
+ getVersion()
+
+ // 获取函数的内存大小
+ getMemorySize()
+
+ // 获取函数的cpu大小
+ getCPUNumber()
+
+ // 获取函数的projectId
+ getProjectID()
+
+ // 获取函数的别名
+ getAlias()
+
+ // 获取日志方法,用于日志打印
+ getLogger()
+
+```
+
+## 通过 context 获取请求上下文示例
+
+通过 context 获取函数名示例
+
+```javascript
+var isInitializer = false;
+
+exports.init = function (context, callback) {
+ isInitializer = true;
+ let data = isInitializer;
+ callback(null, data);
+};
+
+exports.my_handler = (event, context, callback) => {
+ const output =
+ {
+ 'statusCode': 200,
+ 'headers':
+ {
+ 'Content-Type': 'application/json'
+ 'functinName': context.getFunctionName()
+ },
+ 'isBase64Encoded': false,
+ 'body': JSON.stringify(event),
+ }
+ let err = null;
+ callback(err, output);
+
+```
\ No newline at end of file
diff --git "a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Node.js/\345\207\275\346\225\260\345\205\245\345\217\243.md" "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Node.js/\345\207\275\346\225\260\345\205\245\345\217\243.md"
new file mode 100644
index 0000000000000000000000000000000000000000..47b1d60eb518752da3add0555f23047b9de8e169
--- /dev/null
+++ "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Node.js/\345\207\275\346\225\260\345\205\245\345\217\243.md"
@@ -0,0 +1,104 @@
+# 函数入口
+
+函数入口包含两种方法:执行方法和初始化方法。定义 Node.js 函数入口,格式为: *[文件名].[函数名]*
+例如,文件名是*handler.js*, 函数名是*my_handler*,,则方法为*handler.my_handler*。
+如下,`functions.yrnodejsfunc.handler`定义了执行方法,`functions.yrnodejsfunc.init`定义了初始化方法。
+**注:`yrjavafunc`为自定义的函数名**
+
+```text
+service: yrnodejstest
+kind: faas
+description: this is a empty service
+functions:
+ yrnodejsfunc:
+ handler: handler.my_handler
+ initializer: handler.init
+ description: empty function
+ runtime: nodejs10.15.2
+ concurrentNum: 1
+ maxInstance: 30
+ memory: 512
+ timeout: 900
+ cpu: 600
+```
+
+## 执行方法
+
+执行方法是 Nodejs 运行时处理函数请求时调用的方法,即函数请求执行入口。在函数部署时**必须**指定执行方法。
+执行方法的示例:
+
+```javascript
+var isInitializer = false;
+
+exports.init = function (context, callback) {
+ isInitializer = true;
+ let data = isInitializer;
+ callback(null, data);
+};
+
+exports.my_handler = (event, context, callback) => {
+ // log.info("isInitializer %s", isInitializer)
+ const output =
+ {
+ 'statusCode': 200,
+ 'headers':
+ {
+ 'Content-Type': 'application/json'
+ },
+ 'isBase64Encoded': false,
+ 'body': JSON.stringify(event),
+ }
+ let err = null;
+ callback(err, output);
+}
+```
+
+Nodejs 的执行方法入参有 event ,context ,callback。
+
+- event 是用调用函数的事件数据,格式为 JSON 对象。
+- context 是此次请求执行的上下文信息,其具体内容可以参考下一节:上下文。
+- callback 是回调函数,其完整声明是 callback(err, message)。通过此方法可以将执行的结果返回,message 表示执行的结果,err 不为空,表示此次结果失败,err 为空,表示此次结果成功。
+
+## 初始化方法
+
+初始化方法是 Node.js 运行时启动后调用该方法,完成函数必要的准备工作,即函数初始化入口,该方法仅会调用一次。在函数部署时**按需**指定初始化方法。
+初始化方法的示例:
+
+```javascript
+var isInitializer = false;
+
+exports.init = function (context, callback) {
+ isInitializer = true;
+ let data = isInitializer;
+ callback(null, data);
+};
+
+exports.my_handler = (event, context, callback) => {
+ console.log("isInitializer %s", isInitializer)
+ const output =
+ {
+ 'statusCode': 200,
+ 'headers':
+ {
+ 'Content-Type': 'application/json'
+ },
+ 'isBase64Encoded': false,
+ 'body': JSON.stringify(event),
+ }
+ let err = null;
+ callback(err, output);
+}
+```
+
+Node.js 的初始化方法入参有 context,callback 。
+
+- context 是函数执行的的上下文信息,其具体内容可以参考下一节:上下文。
+- callback 为回调函数,其完整声明是 callback(err, message) 。通过此方法可以将执行的结果返回,message 表示执行的结果,err 不为空,表示此次结果失败,err 为空,表示此次结果成功。
+
+## async 函数
+
+除了 Node.js 6.10 外,其余 Node.js 版本支持以 async 的异步形式作为函数入口。
+例如:
+`export.my_handler = async (event, context, callback) => {return data;}`
+
+此时 callback 为可选参数
\ No newline at end of file
diff --git "a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Node.js/\346\227\245\345\277\227.md" "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Node.js/\346\227\245\345\277\227.md"
new file mode 100644
index 0000000000000000000000000000000000000000..1799a339ff6d8b354fef4a69fafbf0db9b753e96
--- /dev/null
+++ "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Node.js/\346\227\245\345\277\227.md"
@@ -0,0 +1,46 @@
+# 日志
+
+context 中也提供了日志功能,日志对运维和问题定位有重要作用。
+
+## 日志使用
+
+示例:
+
+```javascript
+exports.my_handler = (event, context, callback) => {
+ let logger = context.getLogger()
+ logger.debug("debug level message")
+ logger.info("info level message")
+ logger.warn("warn level message")
+ logger.error("error level message")
+ const output =
+ {
+ 'statusCode': 200,
+ 'headers':
+ {
+ 'Content-Type': 'application/json'
+ 'functinName': context.getFunctionName()
+ },
+ 'isBase64Encoded': false,
+ 'body': JSON.stringify(event),
+ }
+ let err = null;
+ callback(err, output);
+
+```
+
+日志可以通过 context.getLogger() 获得,其提供如下方法:
+
+```js
+ debug(msg)
+
+ info(msg)
+
+ warn(msg)
+
+ error(msg)
+```
+
+## 日志显示
+
+该功能暂未实现
\ No newline at end of file
diff --git "a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Node.js/\351\203\250\347\275\262.md" "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Node.js/\351\203\250\347\275\262.md"
new file mode 100644
index 0000000000000000000000000000000000000000..02927bbf85ccf85c1561214debb0aaba9d374c11
--- /dev/null
+++ "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Node.js/\351\203\250\347\275\262.md"
@@ -0,0 +1,57 @@
+# 编译部署
+
+## Node.js 工程准备
+
+```text
+|yrnodejstest
+ |service.yaml
+ |yrnodejsfunc
+ handler.js
+```
+
+## service.yaml 示例
+
+```yaml
+service: yrnodejstest
+kind: faas
+description: this is a empty service
+functions:
+ yrnodejsfunc:
+ handler: handler.my_handler
+ initializer: handler.init
+ description: empty function
+ runtime: nodejs10.15.2
+ concurrentNum: 1
+ maxInstance: 30
+ memory: 512
+ timeout: 900
+ cpu: 600
+```
+
+## 入口函数
+
+```javascript
+var isInitializer = false;
+
+exports.init = function (context, callback) {
+ isInitializer = true;
+ let data = isInitializer;
+ callback(null, data);
+};
+
+exports.my_handler = (event, context, callback) => {
+ // log.info("isInitializer %s", isInitializer)
+ const output =
+ {
+ 'statusCode': 200,
+ 'headers':
+ {
+ 'Content-Type': 'application/json'
+ },
+ 'isBase64Encoded': false,
+ 'body': JSON.stringify(event),
+ }
+ let err = null;
+ callback(err, output);
+}
+```
\ No newline at end of file
diff --git "a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Python/Python\350\277\220\350\241\214\346\227\266\344\273\213\347\273\215.md" "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Python/Python\350\277\220\350\241\214\346\227\266\344\273\213\347\273\215.md"
new file mode 100644
index 0000000000000000000000000000000000000000..3f2f9d028ebdaee0c531686d6cb91f97e8034754
--- /dev/null
+++ "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Python/Python\350\277\220\350\241\214\346\227\266\344\273\213\347\273\215.md"
@@ -0,0 +1,26 @@
+# Python 运行时介绍
+
+本文介绍 FaaS 场景下编写 Python 运行时函数。
+
+## 背景信息
+
+Python 语言是解释型语言,可以直接打包上传至云平台运行。
+
+## Python 运行时
+
+FaaS 目前支持的 Python 运行环境如下:
+
+| 版本 | 操作系统系统 | 架构 |
+|-------------|--------------------------|-----------------------|
+| Python 3.9 | Linux | x86_64、arm |
+| Python 3.10 | Linux | x86_64、arm |
+| Python 3.11 | Linux | x86_64、arm |
+
+需要提前安装好 python3.9 等软件环境。
+
+```bash
+Python 3.9.0 (default, Xxx x xxxx, 12:00:00)
+[GCC 9.3.0] on linux
+Type "help", "copyright", "credits" or "license" for more information.
+>>>
+```
\ No newline at end of file
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Python/index.rst b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Python/index.rst
new file mode 100644
index 0000000000000000000000000000000000000000..96275cccfbd76c958c2add981e91c4aa2db4c260
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Python/index.rst
@@ -0,0 +1,24 @@
+:orphan:
+
+.. Copyright (c) 2022 Huawei Technologies Co., Ltd
+ This software is licensed under Mulan PSL v2.
+ You can use this software according to the terms and conditions of the Mulan PSL v2.
+ You may obtain a copy of Mulan PSL v2 at:
+ http://license.coscl.org.cn/MulanPSL2
+ THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
+ EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
+ MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
+ See the Mulan PSL v2 for more details.
+
+Python
+==============================
+
+.. toctree::
+ :glob:
+ :hidden:
+
+ Python运行时介绍
+ 函数入口
+ 上下文
+ 日志
+ 部署
\ No newline at end of file
diff --git "a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Python/\344\270\212\344\270\213\346\226\207.md" "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Python/\344\270\212\344\270\213\346\226\207.md"
new file mode 100644
index 0000000000000000000000000000000000000000..5bf4a2e6abbd0269895906768decbf45da315a86
--- /dev/null
+++ "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Python/\344\270\212\344\270\213\346\226\207.md"
@@ -0,0 +1,27 @@
+# 上下文 {#faaspythoncontextanchor}
+
+Context 类中提供了许多上下文方法供用户使用,包含一些函数的运行时信息,例如:request id、临时 access key、function meta 等。其声明和功能如表 1 所示。
+
+`getToken()`、`getAccessKey()`和`getSecretKey()`方法返回的内容包含敏感信息,请谨慎使用,避免造成用户敏感信息的泄露。
+
+表 1 Context 类上下文方法说明
+
+| 方法名 | 方法说明 |
+|-----------------------------------|------------------------------------------------------------------------|
+| getRequestID() | 获取请求 ID。 |
+| getRemainingTimeInMilliSeconds() | 获取函数剩余运行时间。 |
+| getAccessKey() | 获取用户委托的 AccessKey(有效期 24 小时),使用该方法需要给函数配置委托。**当前已停止维护 Runtime SDK 中 getAccessKey 接口,您将无法使用 getAccessKey 获取临时 AK。** |
+| getSecretKey() | 获取用户委托的 SecretKey(有效期 24 小时),使用该方法需要给函数配置委托。**当前已停止维护 Runtime SDK 中 getSecretKey 接口,您将无法使用 getSecretKey 获取临时 SK。** |
+| getSecurityAccessKey() | 获取用户委托的 SecurityAccessKey(有效期 24 小时),使用该方法需要给函数配置委托。 |
+| getSecuritySecretKey() | 获取用户委托的 SecuritySecretKey(有效期 24 小时),使用该方法需要给函数配置委托。 |
+| getSecurityToken() | 获取用户委托的 SecurityToken(有效期 24 小时),使用该方法需要给函数配置委托。 |
+| getUserData(string key) | 通过 key 获取用户通过环境变量传入的值。 |
+| getFunctionName() | 获取函数名称。 |
+| getRunningTimeInSeconds() | 获取函数超时时间。 |
+| getVersion() | 获取函数的版本。 |
+| getMemorySize() | 分配的内存。 |
+| getCPUNumber() | 获取函数占用的 CPU 资源。 |
+| getPackage() | 获取函数组。 |
+| getAuthToken() | 获取用户委托的 token(有效期 24 小时),使用该方法需要给函数配置委托。 |
+| getLogger() | 获取 context 提供的 logger 方法,返回一个日志输出类,通过使用其 info 方法按“时间-请求 ID-输出内容”的格式输出日志。如调用 info 方法输出日志:`log = context.getLogger(); log.info("test")` |
+| getAlias() | 获取函数的别名。 |
diff --git "a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Python/\345\207\275\346\225\260\345\205\245\345\217\243.md" "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Python/\345\207\275\346\225\260\345\205\245\345\217\243.md"
new file mode 100644
index 0000000000000000000000000000000000000000..a65ecb27fba0efa53022901f7b53dd2c11763d38
--- /dev/null
+++ "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Python/\345\207\275\346\225\260\345\205\245\345\217\243.md"
@@ -0,0 +1,32 @@
+# 函数入口
+
+对于 Python ,openYuanrong运行时支持 Python3.9 版本。
+
+## 执行方法
+
+函数有明确的接口定义,如下所示。
+
+```python
+def handler(event, context)
+```
+
+入口函数名(handler):入口函数名称,需和函数执行入口处用户自定义的入口函数名称一致。
+
+执行事件(event): 函数执行界面由用户输入的执行事件参数, 格式为 JSON 对象。
+
+上下文环境(context):Runtime 提供的函数执行上下文,其接口定义在上下文章节中说明。
+
+## initializer 入口介绍
+
+initializer 接口的优点:
+
+- 分离初始化逻辑和请求处理逻辑
+- 用户函数代码更新时,系统能够保证用户函数的平滑升级,减少应用层初始化冷启动带来的性能损耗。新的函数实例启动后能够自动执行用户的初始化逻辑,在初始化完成后再处理请求
+- 在应用负载上升、需要增加更多函数实例时,系统能够识别函数应用层初始化的开销,由此更准确的计算资源伸缩的时机和所需的资源量、让请求延时更加平稳
+
+使用openYuanrong编写 Python initializer,需要定义一个 Python 函数作为 initializer 入口,一个最简单的 initializer(以 Python 3.9 版本为例)示例如下。
+
+```python
+def initializer(context):
+ print('hello world!')
+```
diff --git "a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Python/\346\227\245\345\277\227.md" "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Python/\346\227\245\345\277\227.md"
new file mode 100644
index 0000000000000000000000000000000000000000..ac2d8444189de81b4b81f18c3ba554d81e99551b
--- /dev/null
+++ "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Python/\346\227\245\345\277\227.md"
@@ -0,0 +1,52 @@
+# 日志
+
+## 使用 logging 模块打印日志
+
+使用此方法打印的每条日志中都包含时间、request id 和日志级别等信息,request id 可用于出错时定位问题日志。代码示例如下所示。
+
+```python
+import logging
+
+def handler(event, context):
+ logger = logging.getLogger()
+ logger.info('hello world')
+ return 'done'
+```
+
+执行以上代码,输出的日志内容如下所示。
+
+```bash
+2025-xx-xxTxx:xx:xx.xxxZ xxxxxxxx-xxxx-xxxx-xxxx-xxxxx****xx [INFO] hello world
+```
+
+## 使用 print 打印日志
+
+使用该方法打印日志会将内容原样输出到日志中。代码示例如下所示。
+
+```python
+def handler(event, context):
+ print('hello world')
+ return 'done'
+```
+
+执行以上代码,输出的日志内容如下所示。
+
+```bash
+hello world
+```
+
+## 使用 context.getLogger 打印日志
+
+使用 context.getLogger 打印日志,以通过 request id 区分各并发请求的日志。代码示例如下所示。
+
+```python
+def handler(event, context):
+ context.getLogger().info("hello world")
+ return 'done'
+```
+
+执行以上代码,输出的日志内容如下所示。
+
+```bash
+2025-xx-xx xx:xx:xx xxxxxxxx-xxxx-xxxx-xxxx-xxxxx****xx [INFO] hello world
+```
\ No newline at end of file
diff --git "a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Python/\351\203\250\347\275\262.md" "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Python/\351\203\250\347\275\262.md"
new file mode 100644
index 0000000000000000000000000000000000000000..8a66eb31ca8da2d05fdb0ea96265a1037f8e68a8
--- /dev/null
+++ "b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/Python/\351\203\250\347\275\262.md"
@@ -0,0 +1,204 @@
+# 部署
+
+## Step 1. 部署基于 k8s 的openYuanrong集群
+
+部署使用openYuanrong的 FaaS 能力,当前需要基于 k8s 的部署方式,请参考 [k8s 部署快速起步](../../../../../../deploy/deploy_on_k8s/single-node-deployment.md) 章节。
+
+## Step 2. 创建一个 Python 的 faas 工程
+
+在自己的工作目录 (例如 `/home/user/faas`)下创建一个`main.py`,内容如下
+
+```python
+def handler(event, context):
+ context.getLogger().info("this is handler")
+ return f'hello {event.get("name", "world")}!'
+
+def init(context):
+ context.getLogger().info("this is initializer")
+```
+
+Initializer 入口格式为 **[文件名].[initializer 名]**。extendedHandler.initializer 需要与实现 initializer 的接口相对应。如果实现 initializer 接口时指定的 Initializer 入口为 main.initializer,那么函数服务会去加载 main.py 中定义的 initializer 函数。例如,在请求体重实现 initializer 接口时指定的 Initializer 入口为 main.initializer,那么openYuanrong会去加载 main.py 中定义的 initializer 函数。
+
+## Step 3. 打包代码文件并通过 Meta-Service 创建函数
+
+```bash
+cd /home/user/faas
+zip -j faascpp.zip main.py
+```
+
+把这个 zip 文件上传到自定义的 s3 路径,例如`https://x.x.x.x:xxx` 的 bucket `my-bucket-id` 下。然后编写下方 json 连接 Meta-Service。
+
+```json
+{
+ "name": "0@faaspy@hello",
+ "runtime": "python3.9",
+ "handler": "main.handler",
+ "kind": "faas",
+ "cpu": 600,
+ "memory": 512,
+ "timeout": 600,
+ "extendedHandler": {
+ "initializer": "main.init"
+ },
+ "storageType": "s3",
+ "s3CodePath": {
+ "bucketId": "my-bucket-id",
+ "objectId": "faascpp.zip",
+ "bucketUrl": "https://x.x.x.x:xxx"
+ }
+}
+```
+
+openYuanrong使用 NodePort 的方式暴露了一个 k8s service (meta-service) 提供集群外的访问,你可以通过这个 service 提交任务到集群中。可以通过 kubectl 命令来获取openYuanrong在 k8s 上提供的 service 的地址并通过这些地址连接到openYuanrong。
+
+### 请求示例
+
+```bash
+META_SERVICE_ADDR="http://$(kubectl get nodes -o jsonpath='{.items[0].status.addresses[?(@.type=="InternalIP")].address}'):$(kubectl get svc meta-service -o jsonpath='{.spec.ports[0].nodePort}')"
+
+curl -X POST -H "Content-Type: application/json" -d \
+'{
+ "name": "0@faaspy@hello",
+ "runtime": "python3.9",
+ "handler": "main.handler",
+ "kind": "faas",
+ "cpu": 600,
+ "memory": 512,
+ "timeout": 600,
+ "extendedHandler": {
+ "initializer": "main.init"
+ },
+ "storageType": "s3",
+ "s3CodePath": {
+ "bucketId": "my-bucket-id",
+ "objectId": "faascpp.zip",
+ "bucketUrl": "https://x.x.x.x:xxx"
+ }
+}' \
+http://${META_SERVICE_ADDR}/serverless/v1/functions
+```
+
+### 响应示例
+
+```json
+{
+ "code": 0,
+ "message": "SUCCESS",
+ "function": {
+ "id": "sn:cn:yrk:12345678901234561234567890123456:function:0@faaspy@hello:latest",
+ "createTime": "2025-xx-xx xx:xx:xx.xxx UTC",
+ "updateTime": "",
+ "functionUrn": "sn:cn:yrk:12345678901234561234567890123456:function:0@faaspy@hello",
+ "name": "0@faaspy@hello",
+ "tenantId": "12345678901234561234567890123456",
+ "businessId": "yrk",
+ "productId": "",
+ "reversedConcurrency": 0,
+ "description": "",
+ "tag": null,
+ "functionVersionUrn": "sn:cn:yrk:12345678901234561234567890123456:function:0@faaspy@hello:latest",
+ "revisionId": "2025xxxxxxxxxxxxx",
+ "codeSize": 0,
+ "codeSha256": "",
+ "bucketId": "",
+ "objectId": "",
+ "handler": "main.handler",
+ "layers": null,
+ "cpu": 600,
+ "memory": 512,
+ "runtime": "python3.9",
+ "timeout": 600,
+ "versionNumber": "latest",
+ "versionDesc": "latest",
+ "environment": {},
+ "customResources": null,
+ "statefulFlag": 0,
+ "lastModified": "",
+ "Published": "2025-xx-xx xx:xx:xx.xxx UTC",
+ "minInstance": 0,
+ "maxInstance": 100,
+ "concurrentNum": 100,
+ "funcLayer": [],
+ "status": "",
+ "instanceNum": 0,
+ "device": {},
+ "created": ""
+ }
+}
+```
+
+## Step 4. 查询函数
+
+使用 Meta-Service API 查询函数
+
+### 请求示例
+
+```bash
+curl -X GET http://${META_SERVICE_ADDR}/serverless/v1/functions/0@faaspy@hello?versionNumber=latest
+```
+
+### 响应示例
+
+```json
+{
+ "code": 0,
+ "message": "SUCCESS",
+ "function": {
+ "id": "sn:cn:yrk:12345678901234561234567890123456:function:0@faaspy@hello:latest",
+ "createTime": "2025-xx-xx xx:xx:xx.xxx UTC",
+ "updateTime": "",
+ "functionUrn": "sn:cn:yrk:12345678901234561234567890123456:function:0@faaspy@hello",
+ "name": "0@faaspy@hello",
+ "tenantId": "12345678901234561234567890123456",
+ "businessId": "yrk",
+ "productId": "",
+ "reversedConcurrency": 0,
+ "description": "",
+ "tag": null,
+ "functionVersionUrn": "sn:cn:yrk:12345678901234561234567890123456:function:0@faaspy@hello:latest",
+ "revisionId": "2025xxxxxxxxxxxxx",
+ "codeSize": 0,
+ "codeSha256": "",
+ "bucketId": "",
+ "objectId": "",
+ "handler": "main.handler",
+ "layers": null,
+ "cpu": 600,
+ "memory": 512,
+ "runtime": "python3.9",
+ "timeout": 600,
+ "versionNumber": "latest",
+ "versionDesc": "latest",
+ "environment": {},
+ "customResources": null,
+ "statefulFlag": 0,
+ "lastModified": "2025-xx-xx xx:xx:xx.xxx UTC",
+ "Published": "2025-xx-xx xx:xx:xx.xxx UTC",
+ "minInstance": 0,
+ "maxInstance": 100,
+ "concurrentNum": 100,
+ "funcLayer": null,
+ "status": "unavailable",
+ "instanceNum": 0,
+ "device": {},
+ "created": "2025-02-06 09:12:07.086 UTC"
+ }
+}
+```
+
+## Step 5. 访问函数
+
+在 FaaS 函数发布后,openYuanrong会生成一个访问链接,可以通过这个链接触发 FaaS 函数的访问。这里用`json`格式传入 event 的 name 字段。这个参数将从响应中体现。
+
+### 请求示例
+
+```bash
+curl -X POST -H "Content-Type: application/json" -d '{"name": "faas"}' \
+ -i ${META_SERVICE_ADDR}/serverless/v1/functions/sn:cn:yrk:12345678901234561234567890123456:function:0@faaspy@hello:latest/invocations
+```
+
+### 响应示例
+
+```bash
+hello faas!
+```
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/index.md b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/index.md
new file mode 100644
index 0000000000000000000000000000000000000000..3a639af5c5c3849a8eef4a02e46485b9712ba214
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_development/event_function/index.md
@@ -0,0 +1,13 @@
+# 开发事件函数
+
+```{eval-rst}
+.. toctree::
+ :glob:
+ :maxdepth: 1
+ :hidden:
+
+ Python/index.rst
+ Java/index.rst
+ Node.js/index.rst
+ C++/index.rst
+```
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_development/http_function/Java.md b/docs/multi_language_function_programming_interface/FaaS/function_development/http_function/Java.md
new file mode 100644
index 0000000000000000000000000000000000000000..58726371ec23288726ed06b1e6e9a205dcbcd1b1
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_development/http_function/Java.md
@@ -0,0 +1,157 @@
+# Java 示例
+
+## 简介
+
+以 Java 语言为例,创建 http 函数。http 函数实质是要求用户开启一个 http server 进程。
+
+## 约束
+
+要求监听地址为 127.0.0.1,开放端口 8000。
+要求提供 bootstrap 文件,作为 http 函数的启动文件。
+
+## 前提条件
+
+准备一个 bootstrap 启动文件,举例如下:
+
+``` shell
+/opt/function/runtime/java1.8/rtsp/java/bin/java $RUNTIME_CODE_ROOT/my-http-server.jar
+```
+
+- `/opt/function/runtime/java1.8/rtsp/java/bin/java`:表示 Java 编译环境所在路径。
+- `$RUNTIME_CODE_ROOT`:系统变量,表示容器中项目代码存放路径`/opt/function/code`。
+- `my-http-server.jar`:项目入口文件,可自定义名称。
+
+目前支持的 Java 语言和对应的路径请参见下表:
+
+| 版本 | 路径 |
+|---------|---------------------------------------------------|
+| Java 8 | /opt/function/runtime/java1.8/rtsp/java/bin/java |
+| Java 11 | /opt/function/runtime/java1.11/rtsp/java/bin/java |
+| Java 17 | /opt/function/runtime/java1.17/rtsp/java/bin/java |
+| Java 21 | /opt/function/runtime/java1.21/rtsp/java/bin/java |
+
+## 项目准备
+
+以 spring boot web 应用为例
+
+- 创建项目文件夹
+
+``` text
+http-server-example
+```
+
+- 项目结构。
+
+``` text
+my-http-server/
+├── src/
+│ └── main/
+│ ├── java/
+│ │ └── com/
+│ │ └── example/
+│ │ └── MyHttpServerApplication.java
+│ └── resources/
+│ └── application.properties
+├── pom.xml
+└── README.md
+```
+
+- 添加依赖( Maven )
+ 在*pom.xml*文件中,添加 Spring Boot 的依赖。以下是基本的*pom.xml*配置:
+
+```xml
+
+
+ 4.0.0
+
+ com.example
+ my-http-server
+ 1.0-SNAPSHOT
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.7.1
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+
+```
+
+- 创建主应用程序类。
+
+在*src/main/java/com/example/MyHttpServerApplication.java*中,创建主应用程序类:
+
+```java
+package com.example;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@SpringBootApplication
+public class MyHttpServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(MyHttpServerApplication.class, args);
+ }
+
+ @RestController
+ public static class HelloWorldController {
+
+ @GetMapping("/hello")
+ public String hello() {
+ return "Hello, World!";
+ }
+ }
+}
+```
+
+- 配置属性
+ 在 src/main/resources/application.properties 中,可以配置一些基本的服务器属性,例如端口号:
+
+```text
+server.port=8080
+```
+
+- 打包
+
+使用 maven 命令进行打包,如果没有安装请从[maven 官网](https://maven.apache.org/download.cgi)下载并安装。
+在项目根目录下,执行
+
+```shell
+mvn clean package
+```
+
+并在生成的 jar 包的 target 目录下,创建 bootstrap 文件,
+
+```shell
+/opt/function/runtime/java1.8/rtsp/java/bin/java $RUNTIME_CODE_ROOT/my-http-server.jar
+```
+
+将 jar 包和 bootstrap 文件打包成 zip 包。
\ No newline at end of file
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_development/http_function/Node.js.md b/docs/multi_language_function_programming_interface/FaaS/function_development/http_function/Node.js.md
new file mode 100644
index 0000000000000000000000000000000000000000..e663530dd23303e3d94fe93d3c76af5937b2787d
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_development/http_function/Node.js.md
@@ -0,0 +1,84 @@
+# Node.js 示例
+
+## 简介
+
+以 Node.js 语言为例,创建 http 函数。http 函数实质是要求用户开启一个 http server 进程。
+
+## 约束
+
+要求监听地址为 127.0.0.1,开放端口 8000。
+要求提供 bootstrap 文件,作为 http 函数的启动文件。
+
+## 前提条件
+
+准备一个 bootstrap 启动文件,举例如下:
+
+```shell
+/opt/function/runtime/nodejs6.10/rtsp/nodejs/bin/node $RUNTIME_CODE_ROOT/example.js
+```
+
+- `/opt/function/runtime/nodejs6.10/rtsp/nodejs/bin/node`:表示 Node.js 编译环境所在路径。
+- `$RUNTIME_CODE_ROOT`:系统变量,表示容器中项目代码存放路径`/opt/function/code`。
+- `example.js`:项目入口文件,可自定义名称。
+
+目前支持的 Node.js 语言和对应的路径请参见下表:
+
+| 版本 | 路径 |
+|---------------|--------------------------------------------------------|
+| Node.js 6.10 | /opt/function/runtime/nodejs6.10/rtsp/nodejs/bin/node |
+| Node.js 8.10 | /opt/function/runtime/nodejs8.10/rtsp/nodejs/bin/node |
+| Node.js 10.16 | /opt/function/runtime/nodejs10.16/rtsp/nodejs/bin/node |
+| Node.js 12.13 | /opt/function/runtime/nodejs12.13/rtsp/nodejs/bin/node |
+| Node.js 14.18 | /opt/function/runtime/nodejs14.18/rtsp/nodejs/bin/node |
+| Node.js 16.17 | /opt/function/runtime/nodejs16.17/rtsp/nodejs/bin/node |
+| Node.js 18.15 | /opt/function/runtime/nodejs18.15/rtsp/nodejs/bin/node |
+
+## 项目准备
+
+以 koa web 应用为例
+
+- 创建项目文件夹
+
+```text
+koa-example
+```
+
+- 初始化 Node.js 项目,下载 koa 框架,文件夹中会新增 node_modules 文件夹和 package.json 、 package-lock.json 文件。
+
+``` shell
+npm init -y
+npm i koa
+```
+
+- 创建 index.js 文件,在 index.js 文件中引入 koa 框架,koa 框架[使用参考](https://koajs.github.net.cn/)
+
+代码示例:
+
+```js
+const Koa = require("koa");
+const app = new Koa();
+const main = (ctx) =>{
+ if (ctx.request.path == ("/koa")) {
+ ctx.response.type = " application/json";
+ ctx.response.body = "Hello World, user!";
+ ctx.response.status = 200;
+ } else {
+ ctx.response.type = " application/json";
+ ctx.response.body = 'Hello World!';
+ ctx.response.status = 200;
+ }
+};
+app.use(main);
+app.listen(8000, '127.0.0.1');
+console.log('Node.js web server at port 8000 is running..')
+```
+
+- 创建 bootstrap 文件。
+
+```shell
+/opt/function/runtime/nodejs14.18/rtsp/nodejs/bin/node $RUNTIME_CODE_ROOT/index.js
+```
+
+- 打包
+
+将项目下所有文件打包,形成 zip 包。
\ No newline at end of file
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_development/http_function/index.md b/docs/multi_language_function_programming_interface/FaaS/function_development/http_function/index.md
new file mode 100644
index 0000000000000000000000000000000000000000..ccf0b7ba19adb553255eeb313701936378af925e
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_development/http_function/index.md
@@ -0,0 +1,10 @@
+# 开发 HTTP 函数
+
+```{eval-rst}
+.. toctree::
+ :glob:
+ :hidden:
+
+ Java
+ Node.js
+```
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_development/index.md b/docs/multi_language_function_programming_interface/FaaS/function_development/index.md
new file mode 100644
index 0000000000000000000000000000000000000000..b732290c79b37b2f45b0c09a64065cd1542cfb5c
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_development/index.md
@@ -0,0 +1,14 @@
+# 开发 FaaS 函数
+
+```{eval-rst}
+.. toctree::
+ :glob:
+ :maxdepth: 1
+ :hidden:
+
+ event_function/index
+ http_function/index
+ customimage_function/index
+ build_package/index
+ build_layer/index
+```
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_management/create_faasFunc.md b/docs/multi_language_function_programming_interface/FaaS/function_management/create_faasFunc.md
new file mode 100644
index 0000000000000000000000000000000000000000..0fdad4dd2af933b21cb29f53a28c228c367d2cc1
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_management/create_faasFunc.md
@@ -0,0 +1,170 @@
+# 创建函数
+
+当前 FaaS 服务支持创建事件、 HTTP、 自定义镜像三种函数类型,本节介绍如何通过 HTTP 接口创建 FaaS 函数。
+
+| 类型 | 定义 | 约束 |
+|---------|--------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| 事件函数 | 事件是指用于触发函数,通常为 JSON 格式的请求。 | 仅支持部分语言 |
+| HTTP 函数 | HTTP 函数专注于优化 Web 服务场景,用户可以直接发送 HTTP 请求到 URL 触发函数执行,从而使用自己的 Web 服务。 | 1. HTTP 函数当前不区分编程语言,函数执行入口必须在 bootstrap 文件中设置,用户直接写启动命令,端口统一开放成 8000 ,绑定 IP 为 127.0.0.1。2. bootstrap 文件是 HTTP 函数的启动文件, HTTP 函数仅支持读取 bootstrap 作为启动文件名称,其它名称将无法正常启动服务, bootstrap 启动文件请参见 [http Node.js 部署](../http_function/Node.js.md) 里的 bootstrap 文件示例。3. HTTP 函数支持多种开发语言。4. 用户函数需要返回一个合法的 http 响应报文。 |
+| 自定义镜像函数 | 用户在本地环境打包容器镜像,将包含 HTTP Server 的容器镜像作为函数的交付物。 | 内部不限制语言 |
+
+## 编写函数
+
+【TODO】跳转至如何写代码的章节
+
+## 上传代码包
+
+【TODO】如何上传代码包
+
+## 创建事件函数
+
+此处我们调用 meta_service 的接口创建 FaaS 函数
+
+【TODO】如何调用 meta_service API
+
+### 功能介绍
+
+该 API 用于在openYuanrong集群创建函数。
+
+### URI
+
+```text
+POST /serverless/v1/functions
+```
+
+### Table.1 请求参数
+
+| 参数 | 类型 | 是否必填 | 约束 | 描述 |
+|-----------------|------------------|----------|----------------------------------------------------------------------|----------------------------------------------------------------------|
+| name | string | 是 | 其中 ServiceName 为 1 - 16 位字母、数字组合;funcName 为小写字母开头,可使用小写字母、数字、中划线组合,长度不超过 127 位。 | 函数名称,FaaS 函数格式按照 @{serviceName}@{funcName} 格式填写,需要唯一。 |
+| runtime | string | 是 | 当前支持版本见 Table.3 | 函数 runtime 类型 |
+| description | string | 否 | | 函数描述 |
+| handler | string | 是 | | call handler |
+| kind | string | 是 | | 函数类型,取值 faas |
+| cpu | int | 是 | | 函数 CPU 大小,单位:m(毫核) |
+| memory | int | 是 | | 函数 MEM 大小,单位:MB |
+| timeout | int | 是 | 最大值 8640000 s,参数超过最大值时,自动设置为最大值,不填默认 900 s | 函数调用超时时间 |
+| extendedHandler | ExtendedHandler | 否 | | 配置 init handler 信息 |
+| storageType | string | 是 | 取值 local, s3, copy | 代码包存储类型 |
+| codePath | string | 否 | 代码包本地路径,storageType 配置为 local, copy 时生效 | |
+
+__特别说明:__
+当 storageType 配置为 copy 时,openYuanrong会将 codePath 里的代码包拷贝到容器其他目录,请确保目录有权限被容器内 sn 用户拷贝,建议设置权限为 755;
+
+### Table.2 ExtendedHandler
+
+| 参数 | 类型 | 是否必填 | 约束 | 描述|
+|-------------| -------- | -------- | ---- | -----------------------------------|
+| initializer | string | 否 | | 初始化接口,FaaS 函数按需配置|
+| pre_stop | string | 否 | | 停止接口,函数停止之前执行的退出逻辑,FaaS 函数按需配置|
+
+### Table.3 runtime 支持的编程语言说明
+
+| 运行时语言 | 支持版本|
+|---------|----------------|
+| Node.js | 6.10(6.10.1)、8.10(8.10.0)、10.16(10.16.1)、12.13(12.13.1)、14.18(14.18.1)、16.17(16.17.1)、18.15(18.15.0) |
+| Python | 3.9(3.9.2)|
+| Java | 8、11、17、21|
+| Go | 1.x|
+| C# | .NET Core 2.1、.NET Core 3.1|
+| PHP | 7.3|
+| Cangjie | 1.0|
+
+### 其它参数可见
+
+ API 参考:注册函数
+
+### 请求示例
+
+```json
+{
+ "name": "0@faaspy@example1",
+ "runtime": "python3.9",
+ "description": "this is a FaaS function",
+ "handler": "handler.my_handler",
+ "kind": "faas",
+ "cpu": 600,
+ "memory": 512,
+ "timeout": 600,
+ "customResources": {},
+ "environment": {},
+ "extendedHandler": {
+ "initializer": "handler.init",
+ "pre_stop": "handler.prestop"
+ },
+ "extendedTimeout": {
+ "initializer": 600,
+ "pre_stop": 10
+ },
+ "minInstance": "0",
+ "maxInstance": "10",
+ "concurrentNum": "2",
+ "storageType": "local",
+ "codePath": "/home/example/create_faasFunc/"
+}
+```
+
+### 响应示例
+
+正常响应
+
+```json
+{
+ "code": 0,
+ "message": "SUCCESS",
+ "function": {
+ "id": "sn:cn:yrk:12345678901234561234567890123456:function:0@faaspy@example1:latest",
+ "createTime": "2025-01-23 02:38:53.364 UTC",
+ "updateTime": "",
+ "functionUrn": "sn:cn:yrk:12345678901234561234567890123456:function:0@faaspy@example1",
+ "name": "0@faaspy@example1",
+ "tenantId": "12345678901234561234567890123456",
+ "businessId": "yrk",
+ "productId": "",
+ "reversedConcurrency": 0,
+ "description": "this is a FaaS function",
+ "tag": null,
+ "functionVersionUrn": "sn:cn:yrk:12345678901234561234567890123456:function:0@faaspy@example1:latest",
+ "revisionId": "20250123023853364",
+ "codeSize": 0,
+ "codeSha256": "",
+ "bucketId": "",
+ "objectId": "",
+ "handler": "handler.my_handler",
+ "layers": null,
+ "cpu": 600,
+ "memory": 512,
+ "runtime": "python3.9",
+ "timeout": 600,
+ "versionNumber": "latest",
+ "versionDesc": "latest",
+ "environment": {},
+ "customResources": null,
+ "statefulFlag": 0,
+ "lastModified": "",
+ "Published": "2025-01-23 02:38:53.364 UTC",
+ "minInstance": 0,
+ "maxInstance": 10,
+ "concurrentNum": 2,
+ "funcLayer": [],
+ "status": "",
+ "instanceNum": 0,
+ "device": {},
+ "created": ""
+ }
+}
+```
+
+错误响应
+
+```json
+{
+ "code": 4101,
+ "message": "the function name already exists. rename your function"
+}
+```
+
+## 创建 HTTP 函数
+
+## 创建自定义镜像函数
+
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_management/delete_faasFunc.md b/docs/multi_language_function_programming_interface/FaaS/function_management/delete_faasFunc.md
new file mode 100644
index 0000000000000000000000000000000000000000..13235abfa0f08cbb4ed60c18e7774349ecc7cd17
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_management/delete_faasFunc.md
@@ -0,0 +1,48 @@
+# 删除函数
+
+本节介绍如何通过 HTTP 接口删除指定的 FaaS 函数。
+
+1、此处我们调用 meta_service 的接口创建 FaaS 函数
+
+【TODO】如何调用 meta_service API
+
+## 功能介绍
+
+该 API 用于在openYuanrong集群删除函数,如果函数存在多个版本,均会删除。
+
+## URI
+
+```text
+DELETE /serverless/v1/functions/{name}?versionNumber={version}
+```
+
+## 路径参数
+
+| 参数 | 类型 | 是否必填 | 约束 | 描述 |
+|------------|--------|----------|------|------------|
+| name | string | 是 | | 函数名称 |
+| version | string | 否 | | 函数版本 |
+
+## 请求示例
+
+```text
+curl -X DELETE http://X.X.X.X:X/serverless/v1/functions/0@faaspy@example1
+```
+
+## 响应示例
+
+正常响应
+
+```json
+{}
+```
+
+错误响应
+
+```json
+{
+ "code": 4115,
+ "message": "function [0@faaspy@example1] is not found. check input parameters"
+}
+```
+
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_management/index.md b/docs/multi_language_function_programming_interface/FaaS/function_management/index.md
new file mode 100644
index 0000000000000000000000000000000000000000..30bdce5916b5fe463074c056a800a9fd4a1ef1a6
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_management/index.md
@@ -0,0 +1,13 @@
+# 管理 FaaS 函数
+
+```{eval-rst}
+.. toctree::
+ :glob:
+ :hidden:
+
+ create_faasFunc
+ update_faasFunc
+ publish/index
+ delete_faasFunc
+ search_faasFunc
+```
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_management/publish/index.rst b/docs/multi_language_function_programming_interface/FaaS/function_management/publish/index.rst
new file mode 100644
index 0000000000000000000000000000000000000000..fe4fd4c43d18ccbda867ce927dc3d4ff77cc616f
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_management/publish/index.rst
@@ -0,0 +1,20 @@
+.. Copyright (c) 2022 Huawei Technologies Co., Ltd
+ This software is licensed under Mulan PSL v2.
+ You can use this software according to the terms and conditions of the Mulan PSL v2.
+ You may obtain a copy of Mulan PSL v2 at:
+ http://license.coscl.org.cn/MulanPSL2
+ THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
+ EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
+ MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
+ See the Mulan PSL v2 for more details.
+
+发布函数
+==============================
+.. toctree::
+ :glob:
+ :maxdepth: 1
+ :hidden:
+
+ 版本管理.md
+ 别名管理.md
+ 灰度发布.md
\ No newline at end of file
diff --git "a/docs/multi_language_function_programming_interface/FaaS/function_management/publish/\345\210\253\345\220\215\347\256\241\347\220\206.md" "b/docs/multi_language_function_programming_interface/FaaS/function_management/publish/\345\210\253\345\220\215\347\256\241\347\220\206.md"
new file mode 100644
index 0000000000000000000000000000000000000000..e54ce5e9dc153593f5168adbf6c078310f496d80
--- /dev/null
+++ "b/docs/multi_language_function_programming_interface/FaaS/function_management/publish/\345\210\253\345\220\215\347\256\241\347\220\206.md"
@@ -0,0 +1,36 @@
+# 别名管理
+
+FaaS 支持为函数版本创建别名。结合别名和版本功能,实现软件开发生命周期中的持续集成和发布。本节介绍别名的含义以及如何通 FaaS 控制台管理别名。
+
+## 什么是别名
+
+FaaS 支持为函数的版本创建别名。别名可以理解为指向特定版本的指针。您可以利用别名来轻松实现发布、回滚以及灰度发布等功能。别名无法脱离函数或版本单独存在。使用别名访问函数时,函数计算会将别名解析为其指向的版本,调用方无需了解别名指向的具体版本。
+
+以 HTTP 触发器为例,如果没有别名,每次新版本上线,您需要手动修改 HTTP 触发器关联的版本号,在修改的过程中会影响客户端的使用。如果使用别名进行版本管理,您可以实现版本的平滑升级。如下图所示,将别名 PROD 指向稳定的版本 1 。客户端可以直接通过别名 PROD 调用版本 1 下的函数。
+
+### 图 1. 发布版本 1
+
+
+
+版本 1 发布后,您可以继续在 lastest 版本上开发新功能。由于客户端是通过别名调用对应版本下的函数,当需要发布新版本 2 时,只需要将别名 PROD 更新为指向版本 2 ,此时,客户端通过别名 PROD 调用函数时解析出的版本即为版本 2 ,这样就可以完成版本的更新迭代。
+
+您也可以将别名 PROD 重新指向版本 1 ,回滚到之前的版本,此操作不会影响客户端的使用。
+
+### 图 2. 发布版本 2
+
+
+
+您还可以通过别名来控制流量灰度,将 5 %的线上流量通过别名发送到新版本 2 进行灰度验证,然后逐步切换流量到版本 2 ,从而降低部署新版本的风险。
+
+### 图 3 . 灰度发布
+
+
+
+## 前提条件
+
+创建函数
+发布版本
+
+## 创建别名
+
+【todo】如何创建别名
\ No newline at end of file
diff --git "a/docs/multi_language_function_programming_interface/FaaS/function_management/publish/\347\201\260\345\272\246\345\217\221\345\270\203.md" "b/docs/multi_language_function_programming_interface/FaaS/function_management/publish/\347\201\260\345\272\246\345\217\221\345\270\203.md"
new file mode 100644
index 0000000000000000000000000000000000000000..58d0bb4e66189c971424ecc7d82ca339a8504d4b
--- /dev/null
+++ "b/docs/multi_language_function_programming_interface/FaaS/function_management/publish/\347\201\260\345\272\246\345\217\221\345\270\203.md"
@@ -0,0 +1,15 @@
+# 灰度发布
+
+您可以为函数发布一个或多个版本,版本就相当于函数的快照,当您发布版本时,函数计算会为您的函数生成快照,并自动分配一个版本号与其关联。您还可以为函数的版本创建别名,指向该版本。结合函数的版本和别名,您可以轻松实现发布、回滚以及灰度发布等功能。
+
+## 灰度发布流程
+
+
+
+## 前提条件
+
+创建函数
+
+## 灰度发布
+
+【todo】如何灰度发布
\ No newline at end of file
diff --git "a/docs/multi_language_function_programming_interface/FaaS/function_management/publish/\347\211\210\346\234\254\347\256\241\347\220\206.md" "b/docs/multi_language_function_programming_interface/FaaS/function_management/publish/\347\211\210\346\234\254\347\256\241\347\220\206.md"
new file mode 100644
index 0000000000000000000000000000000000000000..676e883ba1bcd137d7203f845cfac1f867d877ed
--- /dev/null
+++ "b/docs/multi_language_function_programming_interface/FaaS/function_management/publish/\347\211\210\346\234\254\347\256\241\347\220\206.md"
@@ -0,0 +1,156 @@
+# 版本管理
+
+FaaS 函数持版本管理功能,帮助您更高效地管理函数以及触发器。您可以通过版本管理功能发布多个版本的函数,实现软件开发生命周期中的持续集成和发布,确保函数的稳定性和可靠性。
+
+## 什么是版本
+
+我们提供函数级别的版本控制功能,支持您为自己的函数发布一个或多个版本。版本相当于函数的快照,包括函数代码及函数配置,不包括触发器。当您发布版本时,函数计算会为函数生成快照,并自动分配一个版本号与其关联,以供后续使用。
+
+如果没有版本功能,您在函数上的每次改动都会影响到生产环境,无法控制发布的时机。有了版本功能,您可以在测试稳定后发布函数版本,用稳定的版本来服务线上请求,并且可以继续在 LATEST 版本上开发测试。实现原理,如下图所示。
+
+
+
+## 注意事项
+
+新创建的函数,默认只有一个 latest 版本,在未发布任何版本前, latest 版本是您拥有的唯一函数版本, latest 版本不能被删除。
+
+版本发布后,已发布的版本不可更改。且版本号单调递增,不会被重复使用。
+
+## 前提条件
+
+创建函数
+
+## 发布版本
+
+本节介绍如何通过 HTTP 接口发布函数版本。
+
+1、此处我们调用 meta_service 的接口更新 FaaS 函数
+
+【todo】如何调用 meta_service API
+
+## 功能介绍
+
+该 API 用于在openYuanrong集群发布函数。
+
+## 接口约束
+
+使用默认生成版本号发布时,多次发布间隔须大于 1 s。当前默认版本号生成依据为当前时间,短时间多次发布会生成重复版本号,会返回重复版本号错误。
+
+## URI
+
+```text
+POST /serverless/v1/functions/{name}/versions
+```
+
+### 路径参数
+
+| 参数 | 类型 | 是否必填 | 约束 | 描述 |
+|------|--------|----------|------|------------|
+| name | string | 是 | - | 函数名称 |
+
+## 请求参数
+
+### 请求 Header 参数
+
+| 参数 | 类型 | 是否必填 | 约束 | 描述 |
+|----------------|-----------|----------|------|--------------------------------------------|
+| Content-Type | string | 是 | - | 消息体类型;建议填写 `application/json` |
+
+### 请求 Body 参数
+
+| 参数 | 类型 | 是否必填 | 约束 | 描述 |
+|------------------|-----------|----------|----------------------------------------------------------------------|----------------------------------------------------------------------|
+| revisionId | string | 是 | - | 函数 revisionId,需要为 latest 版本的 |
+| versionNumber | string | 否 | 字母数字开头结尾,可包含字母数字,中划线 (-),下划线 (_) 及点 (.) ,长度不超过 42;为空时默认生成格式形如 “v20060102-150405” | 版本号 |
+| versionDesc | string | 否 | - | 版本描述 |
+| kind | string | 是 | - | 函数类型,取值 faas |
+
+## 响应参数
+
+| 参数 | 类型 | 是否必填 | 约束 | 描述 |
+|---------------|--------------------------|----------|------|--------------------------------|
+| code | int | 是 | - | 返回码,0 表示更新成功,非 0 则更新失败 |
+| message | string | 是 | - | 返回错误信息 |
+| function | PublishFunctionResult | 是 | - | 更新结果 |
+
+### PublishFunctionResult
+
+| 参数 | 类型 | 是否必填 | 约束 | 描述 |
+|--------------------------|--------------------------|----------|------|------------------------------------|
+| id | int | 是 | - | 函数 ID |
+| functionVersionUrn | string | 是 | - | 函数版本 URN,用于调用函数 |
+| revisionId | PublishFunctionResult | 是 | - | 函数 revisionId,用于发布函数 |
+
+## 请求示例
+
+__提示:__
+revisionId 可以从查询函数接口中获取
+
+```json
+{
+ "revisionId": "2025012312054261",
+ "versionDesc": "try-mod-version2",
+ "versionNumber": "B.2233",
+ "kind": "faas"
+}
+```
+
+## 请求响应
+
+正常响应
+
+```json
+{
+ "code": 0,
+ "message": "SUCCESS",
+ "function": {
+ "id": "sn:cn:yrk:12345678901234561234567890123456:function:0@faaspy@example1:B.2233",
+ "createTime": "2025-01-23 02:38:53.364 UTC",
+ "updateTime": "2025-01-23 12:05:42.610 UTC",
+ "functionUrn": "sn:cn:yrk:12345678901234561234567890123456:function:0@faaspy@example1",
+ "name": "0@faaspy@example1",
+ "tenantId": "12345678901234561234567890123456",
+ "businessId": "yrk",
+ "productId": "",
+ "reversedConcurrency": 0,
+ "description": "this is a function",
+ "tag": null,
+ "functionVersionUrn": "sn:cn:yrk:12345678901234561234567890123456:function:0@faaspy@example1:B.2233",
+ "revisionId": "2025012312054261",
+ "codeSize": 0,
+ "codeSha256": "",
+ "bucketId": "",
+ "objectId": "",
+ "handler": "handler.my_handler",
+ "layers": null,
+ "cpu": 600,
+ "memory": 512,
+ "runtime": "python3.9",
+ "timeout": 600,
+ "versionNumber": "B.2233",
+ "versionDesc": "try-mod-version2",
+ "environment": {},
+ "customResources": {},
+ "statefulFlag": 0,
+ "lastModified": "2025-01-23 12:05:42.610 UTC",
+ "Published": "2025-01-23 12:11:31.134 UTC",
+ "minInstance": 0,
+ "maxInstance": 10,
+ "concurrentNum": 2,
+ "funcLayer": null,
+ "status": "unavailable",
+ "instanceNum": 0,
+ "device": {},
+ "created": "2025-01-23 02:38:53.364 UTC"
+ }
+}
+```
+
+错误响应
+
+```json
+{
+ "code": 4134,
+ "message": "revisionId is non latest version"
+}
+```
\ No newline at end of file
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_management/search_faasFunc.md b/docs/multi_language_function_programming_interface/FaaS/function_management/search_faasFunc.md
new file mode 100644
index 0000000000000000000000000000000000000000..cbcf679166f497549ff733bd4280d4de0c640366
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_management/search_faasFunc.md
@@ -0,0 +1,95 @@
+# 查找函数
+
+本节介绍如何通过 HTTP 接口查找 FaaS 函数。
+
+1、此处我们调用 meta_service 的接口创建 FaaS 函数
+
+【todo】如何调用 meta_service API
+
+## 功能介绍
+
+该 API 用于在openYuanrong集群删除函数,如果函数存在多个版本,均会删除。
+
+## URI
+
+```text
+GET /serverless/v1/functions/{name}?versionNumber={version}
+```
+
+## 路径参数
+
+|参数 | 类型 | 是否必填 | 约束 | 描述|
+|---- | ------ | -------- | ---- | ----|
+|name | string | 是 | | 函数名称|
+
+## 查询参数
+
+| 参数 | 类型 | 是否必填 | 约束 | 描述|
+|----------| ------ | -------- | ---- | ----|
+| version | string | 是 | | 函数版本|
+
+## 请求示例
+
+```text
+curl -X GET http://X.X.X.X:X/serverless/v1/functions/0@faaspy@example1?versionNumber=latest
+```
+
+## 响应示例
+
+正常响应
+
+```json
+{
+ "code": 0,
+ "message": "SUCCESS",
+ "function": {
+ "id": "sn:cn:yrk:12345678901234561234567890123456:function:0@faaspy@example1:latest",
+ "createTime": "2025-01-23 02:38:53.364 UTC",
+ "updateTime": "",
+ "functionUrn": "sn:cn:yrk:12345678901234561234567890123456:function:0@faaspy@example1",
+ "name": "0@faaspy@example1",
+ "tenantId": "12345678901234561234567890123456",
+ "businessId": "yrk",
+ "productId": "",
+ "reversedConcurrency": 0,
+ "description": "this is a faas function",
+ "tag": null,
+ "functionVersionUrn": "sn:cn:yrk:12345678901234561234567890123456:function:0@faaspy@example1:latest",
+ "revisionId": "20250123023853364",
+ "codeSize": 0,
+ "codeSha256": "",
+ "bucketId": "",
+ "objectId": "",
+ "handler": "handler.my_handler",
+ "layers": null,
+ "cpu": 600,
+ "memory": 512,
+ "runtime": "python3.9",
+ "timeout": 600,
+ "versionNumber": "latest",
+ "versionDesc": "latest",
+ "environment": {},
+ "customResources": {},
+ "statefulFlag": 0,
+ "lastModified": "2025-01-23 02:38:53.364 UTC",
+ "Published": "2025-01-23 02:38:53.364 UTC",
+ "minInstance": 0,
+ "maxInstance": 10,
+ "concurrentNum": 2,
+ "funcLayer": null,
+ "status": "unavailable",
+ "instanceNum": 0,
+ "device": {},
+ "created": "2025-01-23 02:38:53.364 UTC"
+ }
+}
+```
+
+错误响应
+
+```json
+{
+ "code":4115,
+ "message":"function [X] is not found. check input parameters"
+}
+```
diff --git a/docs/multi_language_function_programming_interface/FaaS/function_management/update_faasFunc.md b/docs/multi_language_function_programming_interface/FaaS/function_management/update_faasFunc.md
new file mode 100644
index 0000000000000000000000000000000000000000..ef524adafb4492c84472303a017566715a4b75d8
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/function_management/update_faasFunc.md
@@ -0,0 +1,158 @@
+# 更新函数
+
+本文介绍如何通过 HTTP 接口更新 FaaS 函数。
+
+1、此处我们调用 meta_service 的接口更新 FaaS 函数
+
+【todo】如何调用 meta_service API
+
+## 功能介绍
+
+该 API 用于在openYuanrong集群更新函数。
+
+## URI
+
+```text
+PUT /serverless/v1/functions/{name}
+```
+
+## 路径参数
+
+| 参数 | 类型 | 是否必填 | 约束 | 描述|
+|-------| ------ | -------- | ---- | ----|
+| name | string | 是 | | 函数名称|
+
+## Table.1 请求参数
+
+| 参数 | 类型 | 是否必填 | 约束 | 描述 |
+|---------------|-----------|----------|----------------------------------------------------------------------|----------------------------------------------------------------------|
+| name | string | 是 | 其中 `ServiceName` 为 1 - 16 位字母、数字组合;`funcName` 为小写字母开头,可使用小写字母、数字、中划线组合,长度不超过 127 位。 | 函数名称,faas 函数格式按照 `@{serviceName}@{funcName}` 格式填写,需要唯一。 |
+| runtime | string | 是 | 当前支持版本见 Table.3 | 函数 runtime 类型 |
+| description | string | 否 | - | 函数描述 |
+| handler | string | 是 | - | call handler |
+| kind | string | 是 | - | 函数类型,取值 faas |
+| cpu | int | 是 | - | 函数 CPU 大小,单位:m(毫核) |
+| memory | int | 是 | - | 函数 MEM 大小,单位:MB |
+| timeout | int | 是 | 最大值 8640000 s,参数超过最大值时,自动设置为最大值,不填默认 900 s | 函数调用超时时间 |
+| extendedHandler | ExtendedHandler | 否 | - | 配置 init handler 信息 |
+| storageType | string | 是 | 取值 local, s3, copy | 代码包存储类型 |
+| codePath | string | 否 | 代码包本地路径,`storageType` 配置为 local, copy 时生效 | - |
+
+__特别说明:__
+当 storageType 配置为 copy 时,openYuanrong会将 codePath 里的代码包拷贝到容器其他目录,请确保目录有权限被容器内 sn 用户拷贝,建议设置权限为 755;
+
+## Table.2 ExtendedHandler
+
+| 参数 | 类型 | 是否必填 | 约束 | 描述 |
+|------------|-----------|----------|------|----------------------------------------------------------------------|
+| initializer | string | 否 | - | 初始化接口,faas 函数按需配置 |
+| pre_stop | string | 否 | - | 停止接口,函数停止之前执行的退出逻辑,faas 函数按需配置 |
+
+## Table.3 runtime 支持的编程语言说明
+
+| 运行时语言 | 支持版本 |
+|------------|--------------------------------------------------------------------------|
+| Node.js | 6.10(6.10.1)、8.10(8.10.0)、10.16(10.16.1)、12.13(12.13.1)、14.18(14.18.1)、16.17(16.17.1)、18.15(18.15.0) |
+| Python | 2.7(2.7.15)、3.6(3.6.8)、3.9(3.9.2)、3.11(3.11.4) |
+| Java | 8、11、17、21 |
+| Go | 1.x |
+| C# | .NET Core 2.1、.NET Core 3.1 |
+| PHP | 7.3 |
+| 定制运行时 | - |
+| Cangjie | 1.0 |
+
+## 其它参数可见
+
+ API 参考:注册函数
+
+## 请求示例
+
+__提示:__
+revisionId 可以从查询函数接口中获取
+
+```json
+{
+ "revisionId": "20250123120507733",
+ "name": "0@faaspy@example1",
+ "runtime": "python3.9",
+ "description": "this is a function",
+ "handler": "handler.my_handler",
+ "kind": "faas",
+ "cpu": 600,
+ "memory": 512,
+ "timeout": 600,
+ "customResources": {},
+ "environment": {},
+ "extendedHandler": {
+ "initializer": "handler.init",
+ "pre_stop": "test.prestop"
+ },
+ "extendedTimeout": {
+ "initializer": 600,
+ "pre_stop": 10
+ },
+ "minInstance": "0",
+ "maxInstance": "10",
+ "concurrentNum": "2",
+ "storageType": "local",
+ "codePath": "/home/example/create_faasFunc/"
+}
+```
+
+## 请求示例
+
+正常响应
+
+```json
+{
+ "code": 0,
+ "message": "",
+ "result": {
+ "createTime": "2025-01-23 02:38:53.364 UTC",
+ "updateTime": "2025-01-23 12:05:42.610 UTC",
+ "functionUrn": "sn:cn:yrk:12345678901234561234567890123456:function:0@faaspy@example1",
+ "name": "0@faaspy@example1",
+ "tenantId": "12345678901234561234567890123456",
+ "businessId": "yrk",
+ "productId": "",
+ "reversedConcurrency": 0,
+ "description": "this is a function",
+ "tag": null,
+ "functionVersionUrn": "sn:cn:yrk:12345678901234561234567890123456:function:0@faaspy@example1:latest",
+ "revisionId": "2025012312054261",
+ "codeSize": 0,
+ "codeSha256": "",
+ "bucketId": "",
+ "objectId": "",
+ "handler": "handler.my_handler",
+ "layers": null,
+ "cpu": 600,
+ "memory": 512,
+ "runtime": "python3.9",
+ "timeout": 600,
+ "versionNumber": "latest",
+ "versionDesc": "latest",
+ "environment": {},
+ "customResources": null,
+ "statefulFlag": 0,
+ "lastModified": "",
+ "Published": "2025-01-23 02:38:53.364 UTC",
+ "minInstance": 0,
+ "maxInstance": 10,
+ "concurrentNum": 2,
+ "funcLayer": [],
+ "status": "",
+ "instanceNum": 0,
+ "device": {}
+ }
+}
+```
+
+错误响应
+
+```json
+ {
+ "code": 4134,
+ "message": "revisionID is not the same"
+ }
+```
diff --git a/docs/multi_language_function_programming_interface/FaaS/index.md b/docs/multi_language_function_programming_interface/FaaS/index.md
new file mode 100644
index 0000000000000000000000000000000000000000..1ff644b5896ed2c0d07467cc3bbdc222edad56ab
--- /dev/null
+++ b/docs/multi_language_function_programming_interface/FaaS/index.md
@@ -0,0 +1,12 @@
+# FaaS 函数
+
+```{eval-rst}
+.. toctree::
+ :glob:
+ :hidden:
+
+ function_management/index.md
+ function_development/index.md
+ function_configuration/index.md
+ function_call/index.md
+```