检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
开发事件函数 Java函数开发指南(使用Eclipse工具) Java函数开发指南(使用IDEA工具普通Java项目) Java函数开发指南(使用IDEA工具maven项目) 父主题: Java
error_code String 错误码 error_msg String 错误信息 请求示例 更新指定测试事件内容为{"k":"v"}。 PUT https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/events/{event_id}
使用Redis连接池进一步复用已创建的连接,有效提升程序性能;同时,Redis提供了最大连接数配置确保连接资源的使用保持在一个可控范围内,并且能够确保线程安全。 最大连接数配置区间:在FunctionGraph函数配置Redis最大连接数建议在如下区间选取一个值: 最大连接数下限 =(函数单实例
无认证模式,所有用户均可访问。 None 请求协议 必选参数。 触发器请求协议分为两种类型: HTTP:数据在传输过程中不被加密。 HTTPS:数据在传输过程中被加密。 HTTPS 请求方法 必选参数。 触发器的请求方法。本例使用ANY。 ANY 后端超时(毫秒) 必选参数。 后端超时设置范围为
OBS事件 华为云函数可以由不同的event源触发。这些事件源可以通过event定义和配置。 OBS事件 此示例设置一个OBS事件,每当对象上传到my-service-resource时,该事件将触发first函数。 # serverless.yml functions: first:
错误码 error_msg String 错误信息 请求示例 创建名为event-xx,内容为{"k":"v"}的测试事件。 POST https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/events {
great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted
great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted
great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted
great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted
定义代码示例中的代码并单击“部署”,更新函数。 配置测试事件,测试用于前端自定义认证的函数。单击“配置测试事件”,选择事件模板。根据实际情况修改后保存测试模板(本示例在"headers"中添加"auth":"abc"),完成后单击“创建”。 图1 配置测试事件 单击“测试”,执行
描述 error_code String 错误码 error_msg String 错误信息 请求示例 查询租户预留实例列表。 GET https://{Endpoint}/v2/{project_id}/fgs/functions/reservedinstances 响应示例 状态码:
请求示例 创建键值对分别为"testKey1:testValue1"、"testKey2:testValue2"的资源标签。 POST https://{Endpoint}/v2/{project_id}/{resource_type}/{resource_id}/tags/create
部署和使用AI对话ChatGLM3应用 本章节介绍如何通过函数工作流控制台部署AI对话ChatGLM3应用。部署成功后,即可使用内置默认模型和临时域名开始AI对话体验。 前提条件 完成部署AI对话ChatGLM3准备工作,委托中包含“SWR Admin”、“VPC Administrator”和“Server
开发HTTP函数 本章节通过HTTP函数部署koa框架,更多HTTP详情,请参见创建HTTP函数。 约束与限制 HTTP函数只能绑定APIG/APIC触发器,根据函数和APIG/APIC之间的转发协议,函数的返回合法的http响应报文中必须包含body(String)、statu
添加事件源 创建LTS触发器 选择准备中创建的日志组和日志主题,创建LTS触发器。LTS触发器配置如图1所示。 LTS日志服务的消费端在日志累积大小或日志累积时间满足条件时消费LTS日志数据,并根据订阅该组LTS日志数据的函数URN触发函数执行。 图1 创建LTS触发器 父主题:
great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted
great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted
添加事件源 创建LTS触发器 选择准备中创建的日志组和日志流,创建LTS触发器,LTS触发器配置如图1所示。 图1 创建LTS触发器 云日志服务LTS的消费端在日志累积大小或日志累积时间满足条件时消费LTS日志数据,并根据订阅该组LTS日志数据的函数URN触发函数执行。 父主题:
great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted