检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getRequestId());
digest String 函数代码SHA512 hash值,用于判断函数是否变化。 version String 函数版本号,由系统自动生成,规则:vYYYYMMDD-HHMMSS(v+年月日-时分秒)。 image_name String 函数版本的内部标识。 xrole String
安全 责任共担 资产识别与管理 身份认证与访问控制 数据保护技术 审计与日志 服务韧性 监控安全风险 认证证书 代码签名
工程编译打包。 在命令行窗口执行如下命令进行编译打包。 mvn package assembly:single 编译完成后在target目录会生成一个demo-jar-with-dependencies.jar。 创建java函数,上传jar包,如图4所示。 图4 创建函数 测试函数
e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getRequestId());
e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getRequestId());
e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getRequestId());
描述 error_code String 错误码 error_msg String 错误信息 请求示例 获取指定函数代码信息。 GET https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/code 响应示例
整个扩展进程由用户自己编写,扩展进程中必须完成以下工作才能成功启用扩展功能: 启动一个httpClient,向FunctionGraph函数发送注册请求。 启动一个httpServer,接收FunctionGraph函数发送过来的调用请求。 API方法 父主题: 扩展API
API文档详情请参见:创建函数 请求示例 POST https://{Endpoint}/v2/{project_id}/fgs/functions { "code_type": "obs", "code_url": "https://test.obs.example.example
e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getRequestId());
1:8081。 FunctionGraph需要使用扩展的完整文件名来验证扩展是否已完成引导启动,且扩展注册的请求头必须包含本扩展启动的httpServer的地址和端口。例如,请求头的格式为: headers = { 'Content-type': 'application/json'
e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getRequestId());
digest String 函数代码SHA512 hash值,用于判断函数是否变化。 version String 函数版本号,由系统自动生成,规则:vYYYYMMDD-HHMMSS(v+年月日-时分秒)。 image_name String 函数版本的内部标识。 xrole String
e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getRequestId());
以实现对OBS源桶中上传或更新的图片自动进行压缩。 步骤四:验证图片压缩 上传原始图片到OBS源桶,图片压缩函数自动执行,在OBS目标桶中生成压缩后的图片,验证图片压缩函数正常运行。 步骤一:创建两个OBS桶 登录对象存储服务控制台,进入“对象存储”页签。 单击“创建桶”,进入“创建桶”界面。
e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getRequestId());
e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getRequestId());
e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getRequestId());
"code_type" : "obs", "code_url" : "https:xxx" } 创建名为xxx的自定义镜像函数,内存大小为128MB,超时时间3s,代码由SWR上传。 POST https://{Endpoint}/v2/{project_id}/fgs/functions