检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
上传至OBS桶。如需修改函数执行入口,请参见修改函数执行入口。 约束与限制 请确保函数与OBS桶所在区域一致。 函数工作流控制台支持上传ZIP格式和JAR格式(仅限Java运行时)的代码文件。 程序文件解压后的源代码大小不能超过1.5G,如需部署超大代码请提交工单处理。 当代码编
examples_python2.7.zip”,如图1所示。 图1 打包 创建FunctionGraph函数,上传程序包。 登录FunctionGraph控制台,创建Python函数,上传fss_examples_python2.7.zip文件。如图2所示。 图2 上传程序包 函
inline: UI在线编辑代码。 zip: 函数代码为zip包。 obs: 函数代码来源于obs存储。 jar: 函数代码为jar包,主要针对Java函数。 Custom-Image-Swr: 函数代码来源于SWR自定义镜像。 枚举值: inline zip obs jar Custom-Image-Swr
577118, "name" : "python-kafka", "description" : "python支持kafka操作的库", "file_name" : "python-kafka.zip", "version" : 0, "last_modified" :
great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted
stack_id String 资源栈id repo_name String 存储库名称 description String 应用描述 repo RepoInfo object 存储库信息 pipeline_id String 管道id project_id String 项目id apig_url
模板id type Integer 模板类型 title String 模板标题 template_name String 模板名称 description String 模板描述 runtime String 模板执行运行时 handler String 模板函数执行入口 code_type
great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted
文件内容中的version为项目属性中的目标框架的版本号,2.0则为2.0.0 ,2.1则为2.1.0。 将文件打包为netcoreapp2.0.zip压缩包。(压缩包文件名称可随意,但是一定为.zip格式。) 测试示例 在华为云FunctionGraph控制台新建一个C#(.NET 2.1)函数,上传打包完成的代码包,如图11所示。
name String 应用名称 status String 应用状态 last_modified_time Long 最后修改时间 description String 应用描述 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码
ListVersionAliasResult 参数 参数类型 描述 name String 要获取的别名名称。 version String 别名对应的版本名称。 description String 别名描述信息。 last_modified String 别名最后修改时间。 alias_urn String 版本别名唯一标识。
消息体的类型(格式) 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 name String 模板名称 description String 模板描述 runtime String 模板执行运行时 category String 模板使用场景 params
响应Body参数 参数 参数类型 描述 name String 要获取的别名名称。 version String 别名对应的版本名称。 description String 别名描述信息。 last_modified String 别名最后修改时间。 alias_urn String 版本别名唯一标识。
inline: UI在线编辑代码。 zip: 函数代码为zip包。 obs: 函数代码来源于obs存储。 jar: 函数代码为jar包,主要针对Java函数。 Custom-Image-Swr: 函数代码来源于SWR自定义镜像。 枚举值: inline zip obs jar Custom-Image-Swr
inline: UI在线编辑代码。 zip: 函数代码为zip包。 obs: 函数代码来源于obs存储。 jar: 函数代码为jar包,主要针对Java函数。 Custom-Image-Swr: 函数代码来源于SWR自定义镜像。 枚举值: inline zip obs jar Custom-Image-Swr
执行shell命令 # 构建函数部署包 cd helloworld zip helloworld_deploy.zip cam.yaml # 构建函数代码压缩包 cd code zip -rp helloworld.zip * 图1 执行shell命令 上传函数压缩包到OBS 图2 上传函数压缩包到OBS
inline: UI在线编辑代码。 zip: 函数代码为zip包。 obs: 函数代码来源于obs存储。 jar: 函数代码为jar包,主要针对Java函数。 Custom-Image-Swr: 函数代码来源于SWR自定义镜像。 枚举值: inline zip obs jar Custom-Image-Swr
模板id name String 模板名称 runtime String 模板执行运行时 category String 模板使用场景 description String 模板描述 image String 模板镜像文件(base64编码) 状态码: 400 表6 响应Body参数 参数
模板id type Integer 模板类型 title String 模板标题 template_name String 模板名称 description String 模板描述 runtime String 模板执行运行时 handler String 模板函数执行入口 code_type
请求参数 表2 请求Body参数 参数 是否必选 参数类型 描述 name 是 String 函数流名称 最小长度:1 最大长度:64 description 否 String 函数流描述 最小长度:1 最大长度:512 start 是 String 流程开始节点ID 最小长度:1 最大长度:256