检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
标签对日志进行过滤筛选。 表4 FuncVpc 参数 是否必选 参数类型 描述 domain_id 否 String 域名id。 namespace 否 String 租户的project id。 vpc_name 否 String 虚拟私有云名称。 vpc_id 是 String
Resource Name),唯一标识函数。 func_name String 函数名称。 domain_id String 域名id。 namespace String 租户的project id。 project_name String 租户的project name。 package
步骤五:搭建函数更新流水线 此流水线的主要作用是将functions仓库的helloworld函数代码配置发布更新到FunctionGraph平台。 新建构建任务 在“构建&发布 > 编译构建”页面,单击“新建任务”。 源码仓库选择functions仓库,构建模板选择“空白构建模板”。
环境变量 参数“access_log_path”是日志文件的地址,此处配置为“/home/test/access_log.log”。 文件系统是绝对路径,使用文件系统时需在前面添加“/”;如不挂载文件系统,则无需添加“/”,则参数配置为“code/access_log.log”。
标签对日志进行过滤筛选。 表4 FuncVpc 参数 是否必选 参数类型 描述 domain_id 否 String 域名id。 namespace 否 String 租户的project id。 vpc_name 否 String 虚拟私有云名称。 vpc_id 是 String
d" : "0", "agency_name" : "" } 响应示例 状态码: 200 create application successfully { "application_id" : "cca14689-2a40-425a-86f8-14556a0fff9c"
连接DCS集群实例 from redis.cluster import RedisCluster as Redis from redis.cluster import ClusterNode redis_client = None def create_redis_client(context):
执行结果 最小长度:1 最大长度:64 枚举值: success fail error 否 String 错误信息 最小长度:1 最大长度:64 output 是 Object 工作流的执行结果,JSON格式,仅在status为success时有值 响应参数 状态码: 200 表4 响应Body参数
} ], "retries" : [ { "name" : "test" } ] } 响应示例 状态码: 200 Success { "id" : "48aff955-ea10-4ffd-b426-190bc192dc14", "workflow_urn"
步骤四:搭建函数部署脚本更新流水线 此流水线的主要作用是将函数部署脚本deploy.py发布到部署主机上,供函数更新流水线使用。 新建构建任务 在“构建&制品 > 编译构建”页面,单击“新建任务”。 源码仓库选择“functions仓库”,构建模板选择“空白构建模板”,完成单击“确定”。
Resource Name),唯一标识函数。 func_name String 函数名称。 domain_id String 域名id。 namespace String 租户的project id。 project_name String 租户的project name。 package
Resource Name),唯一标识函数。 func_name String 函数名称。 domain_id String 域名id。 namespace String 租户的project id。 project_name String 租户的project name。 package
"func_name": "test", "domain_id": "cff01_hk", "namespace": "7aad83af3e8d42e99ac194e8419e2c9b", "project_name":
String 流程执行最终状态 最小长度:1 最大长度:64 枚举值: success fail timeout output Object 工作流的执行结果,JSON格式,仅在status为success时有值 errors Array of SyncExecutionNodeErrorDetail
/v2/{project_id}/fgs/application/templates/{id} 响应示例 状态码: 200 get template successfully { "name" : "AI Drawing Stable-Diffusion", "description" :
/v2/{project_id}/fgs/applications 响应示例 状态码: 200 list applications successfully { "applications" : [ { "id" : "a2685d64-9bf6-481d-8845-0482271f99cc"
"arg1" : "argument_1", "arg2" : "argument_2" } } 响应示例 状态码: 200 Success { "execution_id" : "48aff955-ea10-4ffd-b426-190bc192dc14" } SDK代码示例
from redis.cluster import RedisCluster rc = RedisCluster(host='localhost', port=6379, retry=Retry(ExponentialBackoff(), 6), cluster_error_retry_attempts=1)
模式时,如果密钥信息不是default,需要添加 access参数,例如s cli fgs alias get --region cn-north-4 --function-name fg-test --alias-name pre --access xxxx 上述命令的执行结果示例: fg-test:
/v2/{project_id}/fgs/application/templates 响应示例 状态码: 200 list templates successfully { "templates" : [ { "id" : "5351xxxx-xxxx-xxxx-xxxx-xxxxxxfa2d27"