检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
无认证模式,所有用户均可访问。 None 请求协议 必选参数。 API的请求协议分为两种类型: HTTP:数据在传输过程中不被加密。 HTTPS:数据在传输过程中被加密。 HTTPS 请求方法 必选参数。 请求方法有以下类型: GET POST DELETE PUT PATCH HEAD OPTIONS
URI:POST /v2/{project_id}/fgs/functions API文档详情请参见:创建函数 请求示例 POST https://{Endpoint}/v2/{project_id}/fgs/functions { "code_filename": "index
发布环境:选择“RELEASE”。 安全认证:此处为方便测试,选择“None”,实际业务请选择更安全的认证方式,例如IAM认证等。 请求协议:选择“HTTPS”。 后端超时(毫秒):填写最大值60000毫秒。 配置完成后,单击“确定”。 父主题: 使用Next.js项目构建HTTP函数
务。 创建新服务。 使用huawei-nodejs模板创建新服务。 serverless create --template-url https://github.com/zy-linn/examples/tree/v3/legacy/huawei-nodejs --path my-service
使用RabbitMQ触发器 本节介绍如何通过函数工作流控制台创建RabbitMQ触发器(当前只支持fanout路由模式),以实现FunctionGraph在RabbitMQ实例中,指定交换机绑定的队列下的新消息进行定期轮询。FunctionGraph会将轮询得到的消息作为参数,用于调用相应函数。
"code_type" : "obs", "code_url" : "https:xxx" } 创建名为xxx的自定义镜像函数,内存大小为128MB,超时时间3s,代码由SWR上传。 POST https://{Endpoint}/v2/{project_id}/fgs/functions
使用EventGrid触发器(RabbitMQ自定义事件源) 本节介绍如何通过函数工作流控制台创建EventGrid触发器(RabbitMQ自定义事件源),实现使用RabbitMQ自定义事件源触发函数执行。 关于EventGrid触发器事件源的具体介绍,请参见支持的事件源。 约束与限制
描述 error_code String 错误码 error_msg String 错误信息 请求示例 当前租户依赖包列表。 GET https://{Endpoint}/v2/{project_id}/fgs/dependencies/{depend_id}/version/{version}
描述 error_code String 错误码 error_msg String 错误信息 请求示例 删除下沉入口。 DELETE https://{Endpoint}/v2/{project_id}/fgs/vpc-endpoint/{vpc_id}/{subnet_id} 响应示例
参数类型 描述 error_code String 错误码 error_msg String 错误信息 请求示例 更新函数置顶状态。 PUT https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/collect/true
quests": "1", "host": "xxx", "x-forwarded-proto": "https", "pragma": "no-cache", "cache-control": "no-cache"
描述 error_code String 错误码 error_msg String 错误信息 请求示例 删除指定测试事件。 DELETE https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/events/{event_id}
描述 error_code String 错误码 error_msg String 错误信息 请求示例 删除依赖包版本。 DELETE https://{Endpoint}/v2/{project_id}/fgs/dependencies/{depend_id}/version/{version}
e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getErrorCode());
s_test为例,在函数的环境变量配置中添加:“SMN_Topic”:“fss_test”。 订阅主题可选择通过邮件、短信、HTTP/HTTPS等形式推送告警消息 本案例中推送告警消息的事件是:当日志事件通过LTS触发器触发函数执行时,函数中过滤告警日志,产生的告警消息推送至SMN主题的订阅终端。
String 错误码 error_msg String 错误信息 请求示例 获取 rds 类型 bridge函数可用的版本。 GET https://{Endpoint}/v2/{project_id}/fgs/servicebridge/version?type=rds 响应示例
描述 error_code String 错误码 error_msg String 错误信息 请求示例 删除指定触发器。 DELETE https://{Endpoint}/v2/{project_id}/fgs/triggers/{function_urn}/{trigger_t
参数类型 描述 error_code String 错误码 error_msg String 错误信息 请求示例 查询测试事件列表。 GET https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/events 响应示例
错误信息 请求示例 更新函数别名{alias_name}绑定的函数版本为latest,且配置v1为灰度版本,流量比例为9:1。 PUT https://{Endpoint}/v2/{project_id}/fgs/functions/{function_urn}/aliases/{alias_name}
构建FunctionGraph函数来处理SMN的通知,相关内容请参考消息通知服务用户指南。 API网关(API Gateway) 通过HTTPS调用FunctionGraph函数,使用API Gateway自定义REST API和终端节点来实现。相关内容请参考API网关用户指南。