huawei-cloud-api-definitions-FunctionGraph 0.1.20250124

Huawei Cloud API definitions, generated from OpenAPI spec
Documentation
1
{"base_path":null,"components":null,"consumes":"[\"application/json\"]","definitions":{"ApigTriggerFuncInfo":{"description":"APIG触发器函数工作流后端详情(APIG触发器参数)。APIG触发器此参数必填。","properties":{"function_urn":{"description":"函数的URN,详细解释见FunctionGraph函数模型的描述。","example":"urn:fss:xxxxx:46b6f338fc3445b8846c71dfb1fbxxxx:function:default:test2-0:latest","type":"string"},"invocation_type":{"description":"调用函数执行方式。\n- sync:同步执行\n- async:异步执行","enum":["sync","async"],"example":"sync","type":"string"},"timeout":{"description":"API网关请求函数服务的超时时间(毫秒)。APIG触发器此参数必填。","example":5000,"format":"int32","maximum":60000,"minimum":1,"type":"integer"},"version":{"description":"函数版本信息。","example":"latest","type":"string"}},"required":["timeout"]},"CreateFunctionTriggerRequestBody":{"properties":{"event_data":{"$ref":"#/definitions/TriggerEventDataRequestBody"},"event_type_code":{"description":"消息代码。","example":"MessageCreated","type":"string"},"trigger_status":{"description":"触发器状态,取值为ACTIVE,DISABLED。","enum":["ACTIVE","DISABLED"],"example":"ACTIVE","type":"string"},"trigger_type_code":{"description":"触发器类型。\n\n- TIMER: 定时触发器。\n- APIG: APIGW触发器。\n- CTS: 云审计触发器,需要先开通云审计服务。\n- DDS: 文档数据库触发器,需要开启函数vpc。\n- DMS: 分布式消息服务触发器,需要配置dms委托。\n- DIS: 数据接入服务触发器,需要配置dis委托。\n- LTS: 云审计日志服务触发器,需要配置lts委托。\n- OBS: 对象存储服务触发器。\n- KAFKA: 专享版本kafka触发器。","enum":["TIMER","APIG","CTS","DDS","DMS","DIS","LTS","OBS","SMN","KAFKA","RABBITMQ","DEDICATEDGATEWAY","OPENSOURCEKAFKA","APIC","GAUSSMONGO","EVENTGRID"],"example":"TIMER","type":"string"}},"required":["event_data","trigger_type_code"]},"CreateFunctionTriggerResponseBody":{"properties":{"created_time":{"description":"触发器创建时间。","example":"2019-08-09T10:42:07+08:00","format":"date-time","type":"string"},"event_data":{"$ref":"#/definitions/TriggerEventDataResponseBody"},"last_updated_time":{"description":"最后更新时间。","example":"2019-08-09T10:42:07+08:00","format":"date-time","type":"string"},"trigger_id":{"description":"触发器ID。","example":"1b3b264db3b849118d007884b9bc8a60","type":"string"},"trigger_status":{"description":"\"触发器状态\"\n\n- ACTIVE: 启用状态。\n- DISABLED: 禁用状态。","enum":["ACTIVE","DISABLED"],"example":"ACTIVE","type":"string"},"trigger_type_code":{"description":"触发器类型。\n\n- TIMER: \"定时触发器。\"\n- APIG: \"APIG触发器。\"\n- CTS: \"云审计服务触发器。\"\n- DDS: \"文档数据库服务触发器。\"\n- DMS: \"分布式服务触发器。\"\n- DIS: \"数据接入服务触发器。\"\n- LTS: \"云日志服务触发器。\"\n- OBS: \"对象存储触发器。\"\n- SMN: \"消息通知服务触发器。\"\n- KAFKA: \"专享版消息通知服务触发器。\"","enum":["TIMER","APIG","CTS","DDS","DMS","DIS","LTS","OBS","SMN","KAFKA","RABBITMQ","DEDICATEDGATEWAY","OPENSOURCEKAFKA","APIC","GAUSSMONGO","EVENTGRID"],"example":"APIG","type":"string"}},"required":["created_time","event_data","last_updated_time","trigger_id","trigger_status","trigger_type_code"]},"ErrorResp":{"properties":{"error_code":{"description":"错误码","type":"string"},"error_msg":{"description":"错误信息","type":"string"}}},"TriggerEventDataRequestBody":{"description":"触发器源事件。","properties":{"Key_encode":{"description":"EG obs触发器是否对对象加密(EVENTGRID触发器参数)。","example":true,"type":"boolean","x-open-region-cloud":"hws"},"access_password":{"description":"RABBITMQ账户密码(RABBITMQ触发器参数)。RABBITMQ触发器此参数必填。","example":"xxx","type":"string"},"access_user":{"description":"RABBITMQ账户名(RABBITMQ触发器参数)。","example":"rabbitmq-user","type":"string"},"agency":{"description":"使用的代理(EVENTGRID触发器参数)。","example":"xxx","type":"string","x-open-region-cloud":"hws"},"auth":{"description":"API的认证方式(APIG触发器参数)。APIG触发器此参数必填。\n- IAM:IAM认证,只允许IAM用户能访问,安全级别中等\n- APP:采用Appkey&Appsecret认证,安全级别高,推荐使用\n- NONE:无认证模式,所有用户均可访问,不推荐使用","enum":["IAM","APP","NONE"],"type":"string"},"backend_type":{"description":"API的后端类型(APIG触发器参数)。","enum":["FUNCTION"],"type":"string"},"batch_size":{"description":"批处理大小,单次函数执行处理的最大数据量。DIS、DDS、KAFKA、RABBITMQ触发器此参数必填。\n- DDS触发器:批处理大小设置1-10,000的范围内\n- DIS触发器:批处理大小设置1-10,000的范围内\n- KAFKA触发器:批处理大小设置1-1,000的范围内\n- RABBITMQ触发器:批处理大小设置1-1,000的范围内","example":100,"format":"int32","type":"integer"},"bucket":{"description":"桶名称(OBS触发器参数),用作事件源的OBS存储桶,不能和本用户已有桶重名;不能和其他用户已有的桶重名;创建成功后不支持修改。OBS触发器此参数必填。","example":"test-bucket","maxLength":64,"minLength":1,"type":"string"},"channel_id":{"description":"通道id(EVENTGRID触发器参数)。","type":"string","x-open-region-cloud":"hws"},"channel_name":{"description":"通道名称(EVENTGRID触发器参数)。","type":"string","x-open-region-cloud":"hws"},"collection_name":{"description":"集合名称(DDS触发器参数)。DDS触发器此参数必填。","example":"collection1","type":"string"},"connect_address":{"description":"实例连接IP地址(RABBITMQ触发器参数)。","example":"192.168.0.1","type":"string"},"consumer_group_id":{"description":"消费组id(DMS触发器参数)。DMS触发器此参数必填。","example":"3kdb11xxxxxx","type":"string"},"created_time":{"description":"创建时间(EVENTGRID触发器参数)。","format":"date-time","type":"string","x-open-region-cloud":"hws"},"db_name":{"description":"文档数据库名称(DDS触发器参数)。DDS触发器此参数必填。","example":"testdb","type":"string"},"db_password":{"description":"文档数据库密码(DDS触发器参数)。DDS触发器此参数必填。","example":"xxx","type":"string"},"env_id":{"description":"API的发布环境id(APIG触发器参数)。APIG触发器此参数必填。","example":"DEFAULT_ENVIRONMENT_RELEASE_ID","type":"string"},"env_name":{"description":"API的发布环境(APIG触发器参数)。APIG触发器此参数必填。","example":"RELEASE","type":"string"},"event_types":{"description":"事件类型(EVENTGRID触发器参数)。","example":["OBS:DWR:ObjectCreated:COPY"],"items":{"type":"string"},"type":"array","x-open-region-cloud":"hws"},"events":{"description":"触发事件(OBS触发器参数)。OBS触发器此参数必填。\n- ObjectCreated:表示所有创建对象的操作,包含Put、Post、Copy对象以及合并段\n- Put:使用Put方法上传对象\n- Post:使用Post方法上传对象\n- Copy:使用copy方法复制对象\n- CompleteMultipartUpload:表示合并分段任务\n- ObjectRemoved:表示删除对象\n- Delete:指定对象版本号删除对象\n- DeleteMarkerCreated:不指定对象版本号删除对象","example":["s3:ObjectCreated:*"],"items":{"type":"string"},"type":"array"},"exchange_name":{"description":"交换机名称(RABBITMQ触发器参数)。RABBITMQ触发器此参数必填。","example":"exchange1","type":"string"},"func_info":{"$ref":"#/definitions/ApigTriggerFuncInfo"},"group_id":{"description":"API所属的分组编号(APIG触发器参数)。APIG触发器此参数必填。","example":"fa508db2d5654b8a91ff7axxxxxxxxxxx","type":"string"},"group_name":{"description":"API所属的分组名称","example":"default","type":"string"},"instance_id":{"description":"实例id。DDS、KAFKA、RABBITMQ触发器此参数必填。\n- APIG触发器:apig实例id\n- DDS触发器:文档数据库实例id\n- KAFKA触发器:KAFKA实例id\n- RABBITMQ触发器:RABBITMQ实例id","example":"xxx","type":"string"},"is_serial":{"description":"串行处理数据(DIS触发器参数),如果开启该选项,取一次数据处理完之后才会取下一次数据;否则只要拉取周期到了就会取数据进行处理。DIS触发器此参数必填。","enum":["true","false"],"example":"true","type":"string"},"kafka_connect_address":{"description":"KAFKA实例连接IP地址(KAFKA触发器参数)。","example":"192.168.1.116,192.168.1.152,192.168.1.78","type":"string"},"kafka_password":{"description":"KAFKA账户密码(KAFKA触发器参数)。","example":"xxx","type":"string"},"kafka_ssl_enable":{"description":"KAFKA连接是否开启安全认证(KAFKA触发器参数)。","example":true,"type":"boolean"},"kafka_user":{"description":"KAFKA账户名(KAFKA触发器参数)。","example":"kafka-user","type":"string"},"log_group_id":{"description":"日志组id(LTS触发器参数)。LTS触发器此参数必填。","example":"5079xxxx-49xx-4axx-81xx-ab3b9exxxxxx","type":"string"},"log_topic_id":{"description":"日志流id(LTS触发器参数)。LTS触发器此参数必填。","example":"1437xxxx-7fxx-40xx-9exx-e614aaxxxxxx","type":"string"},"match_mode":{"description":"API的匹配方式(APIG触发器参数)。APIG触发器此参数必填。\n- SWA:前缀匹配\n- NORMAL:正常匹配(绝对匹配)","enum":["SWA","NORMAL"],"example":"SWA","type":"string"},"max_fetch_bytes":{"description":"最大提取字节数(DIS触发器参数)。","example":4194304,"format":"int32","maximum":4194304,"minimum":0,"type":"integer"},"name":{"description":"- TIMER触发器:触发器名称\n- APIG触发器:API名称\n- CTS触发器:通知名称\n- OBS触发器:事件通知名称,默认值为触发器id","example":"xxx","type":"string"},"operations":{"description":"自定义操作(CTS触发器参数)。CTS触发器此参数必填。\nCTS云审计服务类型和操作订阅所需要的事件通知,当CTS云审计服务获取已订阅的操作记录后,通过CTS触发器将采集到的操作记录作为参数传递来调用FunctionGraph函数。","example":["FunctionGraph:Functions:createFunction"],"items":{"type":"string"},"type":"array"},"path":{"description":"APIG接口PATH路径(APIG触发器参数)。APIG触发器此参数必填。","example":"/test-function","type":"string"},"polling_interval":{"description":"拉取周期。DIS、DMS触发器此参数必填。","example":30,"format":"int32","type":"integer"},"polling_unit":{"description":"拉取周期单位(DIS触发器参数)。DIS触发器此参数必填。\n- s:秒\n- ms:毫秒","enum":["s","ms"],"type":"string"},"prefix":{"description":"前缀(OBS触发器参数),输入一个可选性前缀来限制对以此关键字开头的对象的通知。","example":"images/","maxLength":1024,"minLength":0,"type":"string"},"protocol":{"description":"API的请求协议(APIG触发器参数)。APIG触发器此参数必填。","enum":["HTTP","HTTPS"],"example":"HTTPS","type":"string"},"queue_id":{"description":"队列id(DMS触发器参数)。DMS触发器此参数必填。","example":"3kdb11xxxxxx","type":"string"},"req_method":{"description":"API的请求方式(APIG触发器参数)。APIG触发器此参数必填。","enum":["GET","POST","PUT","DELETE","HEAD","PATCH","OPTIONS","ANY"],"example":"ANY","type":"string"},"schedule":{"description":"定时触发规则(TIMER触发器参数)。TIMER触发器此参数必填。\n- 触发类型为Rate时对应定时规则\n- 触发类型为Cron时对应Cron表达式","example":"3m","type":"string"},"schedule_type":{"description":"定时触发类型(TIMER触发器参数)。TIMER触发器此参数必填\n- Rate:指定固定频率(分钟、小时、天数)定期调用函数,单位为分钟时,输入值不能超过60;单位为小时时,输入值不能超过24;单位为天时,输入值不能超过30。\n- Cron:指定Cron表达式定期调用函数","enum":["Rate","Cron"],"example":"Rate","type":"string"},"sharditerator_type":{"description":"起始位置(DIS触发器参数)。DIS触发器此参数必填。\n- TRIM_HORIZON:从最早被存储至分区的有效记录开始读取。\n- LATEST:从分区中的最新记录开始读取,此设置可以保证总是读到分区中最新记录。","enum":["TRIM_HORIZON","LATEST"],"type":"string"},"sl_domain":{"description":"APIG系统默认分配的子域名(APIG触发器参数)。","example":"fa508db2d5654bxxx.apig.{region-id}.xxx.com","maxLength":255,"minLength":1,"type":"string"},"source_name":{"description":"事件源名称(EVENTGRID触发器参数)。","type":"string","x-open-region-cloud":"hws"},"ssl_enable":{"description":"RABBITMQ连接是否开启安全认证(RABBITMQ触发器参数)。","example":true,"type":"boolean"},"status":{"description":"触发器状态(EVENTGRID触发器参数)。","enum":["ACTIVE","DISABLE"],"type":"string","x-open-region-cloud":"hws"},"stream_name":{"description":"通道名称(DIS触发器参数)。DIS触发器此参数必填。","example":"dis-0130","type":"string"},"suffix":{"description":"后缀(OBS触发器参数),输入一个可选性后缀来限制对以此关键字结尾的对象的通知","example":"jpg","maxLength":1024,"minLength":0,"type":"string"},"topic_ids":{"description":"KAFKA主题id列表(KAFKA触发器参数)。KAFKA触发器此参数必填。","example":["topic-fgs"],"items":{"type":"string"},"type":"array"},"topic_urn":{"description":"主题URN(SMN触发器参数)。SMN触发器此参数必填。","example":"urn:smn:{region-id}:{project-id}:{topic-name}","maxLength":255,"minLength":1,"type":"string"},"trigger_name":{"description":"触发器名称(EVENTGRID触发器参数)。","type":"string","x-open-region-cloud":"hws"},"type":{"description":"API接口类型(APIG触发器参数)。APIG触发器此参数必填。\n- 1:公有API\n- 2:私有API","example":1,"format":"int32","type":"integer"},"user_event":{"description":"附加信息(TIMER触发器参数)。\n当Timer触发器触发函数执行时,执行事件(函数的event参数)为:\n{\"version\": \"v1.0\", \n \"time\": \"2018-06-01T08:30:00+08:00\", \n \"trigger_type\": \"TIMER\", \n \"trigger_name\": \"Timer_001\", \n \"user_event\": \"您输入的附加信息\"}","example":"user test event","type":"string"},"vhost":{"description":"虚拟机名称(RABBITMQ触发器参数)。","example":"host1","type":"string"}}},"TriggerEventDataResponseBody":{"description":"触发器源事件。","properties":{"Key_encode":{"description":"EG obs触发器是否对对象加密(EVENTGRID触发器参数)。","example":true,"type":"boolean","x-open-region-cloud":"hws"},"access_password":{"description":"RABBITMQ账户密码(RABBITMQ触发器参数)。","example":"xxx","type":"string"},"access_user":{"description":"RABBITMQ账户名(RABBITMQ触发器参数)。","example":"rabbitmq-user","type":"string"},"agency":{"description":"使用的代理(EVENTGRID触发器参数)。","example":"xxx","type":"string","x-open-region-cloud":"hws"},"api_id":{"description":"API编号(APIG触发器参数)。","example":"edd2647f68f749eea7c4ac0xxxxxxxxxx","type":"string"},"api_name":{"description":"API名称(APIG触发器参数)。","example":"API_test","type":"string"},"auth":{"description":"API的认证方式(APIG触发器参数)。\n- IAM:IAM认证,只允许IAM用户能访问,安全级别中等\n- APP:采用Appkey&Appsecret认证,安全级别高,推荐使用\n- NONE:无认证模式,所有用户均可访问,不推荐使用","enum":["IAM","APP","NONE"],"type":"string"},"backend_type":{"description":"API的后端类型(APIG触发器参数)。","enum":["FUNCTION"],"type":"string"},"batch_size":{"description":"批处理大小,单次函数执行处理的最大数据量。DIS、DDS、KAFKA、RABBITMQ触发器此参数必填。\n- DDS触发器:批处理大小设置1-10,000的范围内\n- DIS触发器:批处理大小设置1-10,000的范围内\n- KAFKA触发器:批处理大小设置1-1,000的范围内\n- RABBITMQ触发器:批处理大小设置1-1,000的范围内","example":100,"format":"int32","type":"integer"},"bucket":{"description":"桶名称(OBS触发器参数),用作事件源的OBS存储桶,不能和本用户已有桶重名;不能和其他用户已有的桶重名;创建成功后不支持修改。","example":"test-bucket","maxLength":64,"minLength":1,"type":"string"},"channel_id":{"description":"通道id(EVENTGRID触发器参数)。","type":"string","x-open-region-cloud":"hws"},"channel_name":{"description":"通道名称(EVENTGRID触发器参数)。","type":"string","x-open-region-cloud":"hws"},"collection_name":{"description":"集合名称(DDS触发器参数)。","example":"collection1","type":"string"},"connect_address":{"description":"实例连接IP地址(RABBITMQ触发器参数)。","example":"192.168.0.1","type":"string"},"consumer_group_id":{"description":"消费组id(DMS触发器参数)。","example":"3kdb11xxxxxx","type":"string"},"created_time":{"description":"创建时间(EVENTGRID触发器参数)。","format":"date-time","type":"string","x-open-region-cloud":"hws"},"db_name":{"description":"文档数据库名称(DDS触发器参数)。","example":"testdb","type":"string"},"db_password":{"description":"文档数据库密码(DDS触发器参数)。","example":"xxx","type":"string"},"db_user":{"description":"文档数据库用户名(DDS触发器参数)。","example":"dbuser","type":"string"},"env_id":{"description":"API的发布环境id(APIG触发器参数)。","example":"DEFAULT_ENVIRONMENT_RELEASE_ID","type":"string"},"env_name":{"description":"API的发布环境(APIG触发器参数)。","example":"RELEASE","type":"string"},"event_types":{"description":"事件类型(EVENTGRID触发器参数)。","example":["OBS:DWR:ObjectCreated:COPY"],"items":{"type":"string"},"type":"array","x-open-region-cloud":"hws"},"events":{"description":"触发事件(OBS触发器参数)。\n- ObjectCreated:表示所有创建对象的操作,包含Put、Post、Copy对象以及合并段\n- Put:使用Put方法上传对象\n- Post:使用Post方法上传对象\n- Copy:使用copy方法复制对象\n- CompleteMultipartUpload:表示合并分段任务\n- ObjectRemoved:表示删除对象\n- Delete:指定对象版本号删除对象\n- DeleteMarkerCreated:不指定对象版本号删除对象","example":["s3:ObjectCreated:*"],"items":{"type":"string"},"type":"array"},"exchange_name":{"description":"交换机名称(RABBITMQ触发器参数)。","example":"exchange1","type":"string"},"func_info":{"$ref":"#/definitions/ApigTriggerFuncInfo"},"group_id":{"description":"API所属的分组编号(APIG触发器参数)。","example":"fa508db2d5654b8a91ff7axxxxxxxxxxx","type":"string"},"group_name":{"description":"API所属的分组名称(APIG触发器参数)。","example":"default","type":"string"},"instance_addrs":{"description":"文档数据库实例地址(DDS触发器参数)。","example":["192.xxx.xxx.1"],"items":{"type":"string"},"type":"array"},"instance_id":{"description":"实例id。DDS、KAFKA、RABBITMQ触发器此参数必填。\n- APIG触发器:apig实例id\n- DDS触发器:文档数据库实例id\n- KAFKA触发器:KAFKA实例id\n- RABBITMQ触发器:RABBITMQ实例id","example":"xxx","type":"string"},"invoke_url":{"description":"API调用地址(APIG触发器参数)。","example":"https://xxx.apig.{region_id}.xxx.com/test","type":"string"},"is_serial":{"description":"串行处理数据(DIS触发器参数),如果开启该选项,取一次数据处理完之后才会取下一次数据;否则只要拉取周期到了就会取数据进行处理。","enum":["true","false"],"example":"true","type":"string"},"kafka_connect_address":{"description":"KAFKA实例连接IP地址(KAFKA触发器参数)。","example":"192.168.1.116,192.168.1.152,192.168.1.78","type":"string"},"kafka_password":{"description":"KAFKA账户密码(KAFKA触发器参数)。","example":"xxx","type":"string"},"kafka_ssl_enable":{"description":"KAFKA连接是否开启安全认证(KAFKA触发器参数)。","example":true,"type":"boolean"},"kafka_user":{"description":"KAFKA账户名(KAFKA触发器参数)。","example":"user","type":"string"},"log_group_id":{"description":"日志组id(LTS触发器参数)。","example":"5079xxxx-49xx-4axx-81xx-ab3b9exxxxxx","type":"string"},"log_topic_id":{"description":"日志流id(LTS触发器参数)。","example":"1437xxxx-7fxx-40xx-9exx-e614aaxxxxxx","type":"string"},"match_mode":{"description":"API的匹配方式(APIG触发器参数)。\n- SWA:前缀匹配\n- NORMAL:正常匹配(绝对匹配)","enum":["SWA","NORMAL"],"example":"SWA","type":"string"},"max_fetch_bytes":{"description":"最大提取字节数(DIS触发器参数)。","example":4194304,"format":"int32","maximum":4194304,"minimum":0,"type":"integer"},"mode":{"description":"文档数据库实例类型(DDS触发器参数)。\n- Sharding:集群实例\n- ReplicaSet:副本集实例\n- Single:单节点实例","example":"Sharding","type":"string"},"name":{"description":"触发器名称","example":"xxx","type":"string"},"operations":{"description":"自定义操作(CTS触发器参数)。\nCTS云审计服务类型和操作订阅所需要的事件通知,当CTS云审计服务获取已订阅的操作记录后,通过CTS触发器将采集到的操作记录作为参数传递来调用FunctionGraph函数。","example":["FunctionGraph:Functions:createFunction"],"items":{"type":"string"},"type":"array"},"path":{"description":"APIG接口PATH路径(APIG触发器参数)。","example":"/test-function","type":"string"},"polling_interval":{"description":"拉取周期。","example":30,"format":"int32","type":"integer"},"polling_unit":{"description":"拉取周期单位(DIS触发器参数)。\n- s:秒\n- ms:毫秒","enum":["s","ms"],"type":"string"},"prefix":{"description":"前缀(OBS触发器参数),输入一个可选性前缀来限制对以此关键字开头的对象的通知。","example":"images/","maxLength":1024,"minLength":0,"type":"string"},"protocol":{"description":"API的请求协议(APIG触发器参数)。","enum":["HTTP","HTTPS"],"example":"HTTPS","type":"string"},"queue_id":{"description":"队列id(DMS触发器参数)。","example":"3kdb11xxxxxx","type":"string"},"req_method":{"description":"API的请求方式(APIG触发器参数)。","enum":["GET","POST","PUT","DELETE","HEAD","PATCH","OPTIONS","ANY"],"example":"ANY","type":"string"},"roma_app_id":{"description":"API归属的集成应用编号。(APIG触发器参数)","example":"xxx","type":"string"},"schedule":{"description":"定时触发规则(TIMER触发器参数)。\n- 触发类型为Rate时对应定时规则\n- 触发类型为Cron时对应Cron表达式","example":"3m","type":"string"},"schedule_type":{"description":"定时触发类型(TIMER触发器参数)。\n- Rate:指定固定频率(分钟、小时、天数)定期调用函数,单位为分钟时,输入值不能超过60;单位为小时时,输入值不能超过24;单位为天时,输入值不能超过30。\n- Cron:指定Cron表达式定期调用函数","enum":["Rate","Cron"],"example":"Rate","type":"string"},"sharditerator_type":{"description":"起始位置(DIS触发器参数)。\n- TRIM_HORIZON:从最早被存储至分区的有效记录开始读取。\n- LATEST:从分区中的最新记录开始读取,此设置可以保证总是读到分区中最新记录。","enum":["TRIM_HORIZON","LATEST"],"type":"string"},"sl_domain":{"description":"APIG系统默认分配的子域名(APIG触发器参数)。","example":"fa508db2d5654bxxx.apig.{region-id}.xxx.com","maxLength":255,"minLength":1,"type":"string"},"source_name":{"description":"事件源名称(EVENTGRID触发器参数)。","type":"string","x-open-region-cloud":"hws"},"ssl_enable":{"description":"RABBITMQ连接是否开启安全认证(RABBITMQ触发器参数)。","example":true,"type":"boolean"},"status":{"description":"触发器状态(EVENTGRID触发器参数)。","enum":["ACTIVE","DISABLE"],"type":"string","x-open-region-cloud":"hws"},"stream_name":{"description":"通道名称(DIS触发器参数)。","example":"dis-0130","type":"string"},"suffix":{"description":"后缀(OBS触发器参数),输入一个可选性后缀来限制对以此关键字结尾的对象的通知","example":"jpg","maxLength":1024,"minLength":0,"type":"string"},"topic_ids":{"description":"KAFKA主题id列表(KAFKA触发器参数)。","example":["topic-fgs"],"items":{"type":"string"},"type":"array"},"topic_urn":{"description":"主题URN(SMN触发器参数)。","example":"urn:smn:{region-id}:{project-id}:{topic-name}","maxLength":255,"minLength":1,"type":"string"},"trigger_name":{"description":"触发器名称(EVENTGRID触发器参数)。","type":"string","x-open-region-cloud":"hws"},"triggerid":{"description":"APIG触发器id。(APIG触发器参数)","example":"c7b8b11abd694f00acd23xxxxxxxxxx","type":"string"},"type":{"description":"API接口类型(APIG触发器参数)。\n- 1:公有API\n- 2:私有API","example":1,"format":"int32","type":"integer"},"user_event":{"description":"附加信息(TIMER触发器参数)。\n当Timer触发器触发函数执行时,执行事件(函数的event参数)为:\n{\"version\": \"v1.0\", \n \"time\": \"2018-06-01T08:30:00+08:00\", \n \"trigger_type\": \"TIMER\", \n \"trigger_name\": \"Timer_001\", \n \"user_event\": \"您输入的附加信息\"}","example":"user test event","type":"string"},"vhost":{"description":"虚拟机名称(RABBITMQ触发器参数)。","example":"host1","type":"string"}}}},"description":null,"group_id":"cb46b925a4eb40a192520da4fc33b990","host":"functiongraph.cn-north-4.myhuaweicloud.com","id":"0f9ba919beb340f8a2dabd8150f98247","info_version":"v2","method":"post","name":"CreateFunctionTrigger","parameters":{"Content-Type":{"default":"application/json","description":"消息体的类型(格式)","in":"header","name":"Content-Type","required":true,"type":"string","x-example":"application/json"},"X-Auth-Token":{"description":"用户Token。\n\n通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。","in":"header","name":"X-Auth-Token","required":true,"type":"string","x-example":"MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXX..."},"function_urn":{"description":"函数的URN,详细解释见FunctionGraph函数模型的描述。","in":"path","name":"function_urn","required":true,"type":"string","x-example":"urn:fss:{region}:46b6f338fc3445b8846c71dfb1fbxxxx:function:csharp:test2-0:latest"},"project_id":{"description":"租户项目 ID,获取方式请参见[获取项目ID](functiongraph_06_0260.xml)。","in":"path","name":"project_id","required":true,"type":"string","x-example":"46b6f338fc3445b8846c71dfb1fbd9e8"}},"paths":{"/v2/{project_id}/fgs/triggers/{function_urn}":{"post":{"description":"创建触发器。\n\n- 可以创建的触发器类型包括TIMER、APIG、CTS、DDS、DMS、DIS、LTS、OBS、SMN、KAFKA。\n- DDS和KAFKA触发器创建时默认为DISABLED状态,其他触发器默认为ACTIVE状态。\n- TIMER、DDS、DMS、KAFKA、LTS触发器支持禁用,其他触发器不支持。","operationId":"CreateFunctionTrigger","parameters":[{"$ref":"#/parameters/project_id"},{"$ref":"#/parameters/function_urn"},{"$ref":"#/parameters/X-Auth-Token"},{"$ref":"#/parameters/Content-Type"},{"description":"创建触发器请求体","in":"body","name":"CreateFunctionTriggerRequestBody","required":true,"schema":{"$ref":"#/definitions/CreateFunctionTriggerRequestBody"}}],"responses":{"201":{"description":"Created","examples":{"application/json":{"created_time":"2019-10-29T17:15:53+08:00","event_data":{"name":"Timer-cpg3","schedule":"3m","schedule_type":"Rate"},"last_updated_time":"2019-10-29T17:15:53+08:00","trigger_id":"9a14fae1-78cf-4185-ac7a-429eb6dc41fb","trigger_status":"ACTIVE","trigger_type_code":"TIMER"}},"schema":{"$ref":"#/definitions/CreateFunctionTriggerResponseBody"}},"400":{"description":"Bad Request 请求错误。","schema":{"$ref":"#/definitions/ErrorResp"}},"401":{"description":"Unauthorized 鉴权失败。","schema":{"$ref":"#/definitions/ErrorResp"}},"403":{"description":"Forbidden 没有操作权限。","schema":{"$ref":"#/definitions/ErrorResp"}},"404":{"description":"Not Found 找不到资源。","schema":{"$ref":"#/definitions/ErrorResp"}},"500":{"description":"Internal Server Error 服务内部错误。","schema":{"$ref":"#/definitions/ErrorResp"}}},"summary":"创建触发器","tags":["函数触发器"],"x-produc-type":"functiongraph","x-request-examples-1":{"event_data":{"bucket":"input-picture2","events":["s3:ObjectCreated:*"],"name":"obs-event-1ec7"},"trigger_status":"ACTIVE","trigger_type_code":"OBS"},"x-request-examples-2":{"event_data":{"auth":"NONE","backend_type":"FUNCTION","env_id":"DEFAULT_ENVIRONMENT_RELEASE_ID","env_name":"RELEASE","func_info":{"timeout":5000},"group_id":"318b09eb214a41488c667ecd51667e3x","match_mode":"SWA","name":"API_test_function","path":"/test_gxz_v1_billing","protocol":"HTTPS","req_method":"ANY","sl_domain":"318b09eb214a41488c667ecd51667e3x.apig.{region}.xxx.com","type":1},"trigger_status":"ACTIVE","trigger_type_code":"APIG"},"x-request-examples-3":{"event_data":{"auth":"IAM","backend_type":"FUNCTION","env_id":"DEFAULT_ENVIRONMENT_RELEASE_ID","env_name":"RELEASE","func_info":{"timeout":5000},"group_id":"5106210cf79e4xxxx","match_mode":"SWA","name":"API_test_function","path":"/test_gxz_v1_billing","protocol":"HTTPS","req_method":"ANY","sl_domain":"5106210cf79e4xxxx.apic.{region_id}.xxx.com","type":1},"trigger_status":"ACTIVE","trigger_type_code":"DEDICATEDGATEWAY"},"x-request-examples-4":{"event_data":{"batch_size":100,"instance_id":"86ad3efc-c019-460e-91e7-317b1a89f95x","topic_ids":["PUSH_TOKEN_RECORD"]},"trigger_status":"DISABLED","trigger_type_code":"KAFKA"},"x-request-examples-5":{"event_data":{"name":"Timer-l8v2","schedule":"3m","schedule_type":"Rate"},"trigger_status":"ACTIVE","trigger_type_code":"TIMER"},"x-request-examples-6":{"event_data":{"log_group_id":"ccd3fa30-7c86-4590-8a9d-XXX","log_topic_id":"5b4944dd-9603-481d-9b91-XXX"},"trigger_status":"ACTIVE","trigger_type_code":"LTS"},"x-request-examples-7":{"event_data":{"topic_urn":"urn:smn:{region}:{project_id}:Failed_times"},"trigger_status":"ACTIVE","trigger_type_code":"SMN"},"x-request-examples-description-1":"创建名为obs-event-1ec7的obs触发器,触发事件为input-picture2桶中有新文件上传。","x-request-examples-description-2":"创建名为API_test_function的apig共享版触发器,创建无认证方式的临时域名,超时时间为5000s。","x-request-examples-description-3":"创建名为API_test_function的apig专享版触发器,创建无认证方式的临时域名,超时时间为5000s。","x-request-examples-description-4":"创建86ad3efcxx实例的kafka触发器,从PUSH_TOKEN_RECORD消费组中拉取消息触发函数执行。","x-request-examples-description-5":"创建timer触发器,每3分钟触发一次函数执行。","x-request-examples-description-6":"创建指定lts触发器(需配置访问LTS服务权限的委托)。","x-request-examples-description-7":"创建指定smn触发器。","x-request-examples-url-1":"POST https://{Endpoint}/v2/{project_id}/fgs/triggers/{function_urn}","x-request-examples-url-2":"POST https://{Endpoint}/v2/{project_id}/fgs/triggers/{function_urn}","x-request-examples-url-3":"POST https://{Endpoint}/v2/{project_id}/fgs/triggers/{function_urn}","x-request-examples-url-4":"POST https://{Endpoint}/v2/{project_id}/fgs/triggers/{function_urn}","x-request-examples-url-5":"POST https://{Endpoint}/v2/{project_id}/fgs/triggers/{function_urn}","x-request-examples-url-6":"POST https://{Endpoint}/v2/{project_id}/fgs/triggers/{function_urn}","x-request-examples-url-7":"POST https://{Endpoint}/v2/{project_id}/fgs/triggers/{function_urn}","x-support-sdk":"Y"}}},"product_short":"FunctionGraph","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"创建触发器","tags":"函数触发器","uri":null,"version":"2.0"}