检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
"code_type" : "inline", "func_code" : { "file" : "UEsDBAoAAAAIAPQ1M1gNImPLrAAAAAEBAAAIAAAAaW5kZXgucHlNjtEOgjAMRd/5igVfxDAlxhjDo0S/wB+YrMgMdMvWG
定时触发类型(TIMER触发器参数)。TIMER触发器此参数必填 Rate:指定固定频率(分钟、小时、天数)定期调用函数,单位为分钟时,输入值不能超过60;单位为小时时,输入值不能超过24;单位为天时,输入值不能超过30。 Cron:指定Cron表达式定期调用函数 枚举值: Rate Cron schedule 否 String
程序文件解压后的源代码大小不能超过1.5G,如需部署超大代码请提交工单联系客服处理。 当您部署的代码大于20M时,在线编辑器将不展示代码,但您仍可以测试您的函数。 图1 编辑器不展示代码 更多函数资源的限制,请参见使用限制。 操作步骤 以使用对象存储服务OBS控制台为例,介绍如何获取存储在OBS桶
last_modified String 函数最后一次更新时间。 ephemeral_storage Integer 临时存储大小。默认情况下会为函数的/tmp目录分配512MB的空间。您可以通过临时存储设置将函数的/tmp目录大小调整为10G。 枚举值: 512 10240 func_vpc FuncVpc
public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great
public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great
环境变量应用示例 使用环境变量设置以下信息:安装文件的目录、存储输出的位置、存储连接和日志记录设置等。这些设置与应用程序逻辑解耦,在需要变更设置时,无需更新函数代码。 设置环境变量obs_output_bucket,用于灵活设置存储输出图片的OBS桶。 图2 环境变量 在函数代码中使用环境变量。
public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great
"custom-container-http-example", "version": "1.0.0", "description": "An example of a custom container http function", "main": "main.js",
并放开限制,否则将无法进行授信。 42.202.130.147 49.4.3.11 122.112.212.206 139.159.226.153 49.4.85.127 124.70.46.237 部署主机安全组配置流程 进入创建IP地址组页面。 根据界面提示设置IP地址组参数
allow_ephemeral_storage Boolean 是否支持配置临时存储。 ephemeral_storage Integer 临时存储大小。 默认情况下会为函数的/tmp目录分配512MB的空间。您可以通过临时存储设置将函数的/tmp目录大小调整为10G。 枚举值: 512 10240
初始化超时时间,超时函数将被强行停止,范围1~90秒。 ephemeral_storage 否 Integer 临时存储大小。默认情况下会为函数的/tmp目录分配512MB的空间。您可以通过临时存储设置将函数的/tmp目录大小调整为10G。 枚举值: 512 10240 enterprise_project_id
public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great
"custom-container-event-example", "version": "1.0.0", "description": "An example of a custom container event function", "main": "main.js",
String 自定义日志查询流id type String v2表示为正式版本,v1为废弃版本。 枚举值: v1 v2 fail_count Integer 函数最近1天内执行失败的次数。 is_bridge_function Boolean 是否为bridge函数 bind_bridge_funcUrns
FuncDestinationConfig object 当函数执行成功时,函数计算将调用该配置对应的目标。 on_failure FuncDestinationConfig object 当函数执行失败(系统错误或函数内部错误)时,函数计算将调用该配置对应的目标。 表9 FuncDestinationConfig
String 自定义日志查询流id type String v2表示为正式版本,v1为废弃版本。 枚举值: v1 v2 fail_count Integer 函数最近1天内执行失败的次数。 is_bridge_function Boolean 是否为bridge函数 bind_bridge_funcUrns
中getAccessKey接口,您将无法使用getAccessKey获取临时AK。 getSecretKey() 获取用户委托的SecretKey(有效期24小时),使用该方法需要给函数配置委托。 当前函数工作流已停止维护Runtime SDK 中getSecretKey接口,您将无法使用getSecretKey获取临时SK。
public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great
FuncDestinationConfig object 当函数执行成功时,函数计算将调用该配置对应的目标。 on_failure 否 FuncDestinationConfig object 当函数执行失败(系统错误或函数内部错误)时,函数计算将调用该配置对应的目标。 表5 FuncDestinationConfig