华为云用户手册

  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json” X-Auth-Token 是 String 用户Token。 通过调用 IAM 服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json” X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值
  • 响应示例 状态码: 200 ok { "rule" : { "name" : "eventbus-to-dis", "description" : "", "source_resource" : { "node_id" : "5a98f0d8-6827-45e8-871d-b865111fbe68", "topic" : "ed202955e111444e8ced21a1bd75fc59/nodes/5a98f0d8-6827-45e8-871d-b865111fbe68/user/aaa" }, "target_resource" : { "channel" : "dis-I5QG" }, "in_using" : true, "ief_instance_id" : "", "id" : "18bcb8bb-019b-4a5b-835b-6a444b3b04e9", "project_id" : "ed202955e111444e8ced21a1bd75fc59", "created_at" : "2022-06-07T03:09:03Z", "updated_at" : "2022-06-07T03:09:03Z", "source" : { "name" : "SystemEventBus", "description" : "", "type" : "eventbus", "properties" : { }, "ief_instance_id" : "", "is_shared" : true, "id" : "6bf2fda9-810c-40ed-8623-ff9396fe357d", "project_id" : "9ff38382ccc546ac9635800c3315a5e2", "created_at" : "2019-03-09T11:42:45Z", "updated_at" : "2021-10-11T09:16:09Z" }, "target" : { "name" : "test", "description" : "", "type" : "dis", "properties" : { "domain_id" : "d0857ebddc514a7381c3673363e61337" }, "ief_instance_id" : "", "is_shared" : false, "id" : "da14393a-b65a-4303-b74d-4cdf1dc44784", "project_id" : "ed202955e111444e8ced21a1bd75fc59", "created_at" : "2022-06-07T03:06:03Z", "updated_at" : "2022-06-07T03:06:03Z" }, "fail_messages" : 0, "success_messages" : 0 }}
  • 响应示例 状态码: 200 查询成功 { "systemevent" : { "id" : "e99ec7d8-82ab-4950-a05b-0e3fcefb4b38", "project_id" : "xxx", "created_at" : "2022-09-14T17:20:43.642043+08:00", "updated_at" : "2022-09-14T17:20:43.642043+08:00", "name" : "test1", "description" : "", "in_using" : true, "events" : "edgeNode/offline", "target" : { "name" : "test-huyurui", "description" : "", "type" : "apigw", "properties" : { "domain_id" : "d0857ebddc514a7381c3673363e61337" }, "ief_instance_id" : "", "is_shared" : false, "id" : "0ee2e86e-1912-4144-be5a-d9153347d8c2", "project_id" : "xxxx", "created_at" : "2022-09-14T15:44:04.755785+08:00", "updated_at" : "2022-09-14T15:44:04.755785+08:00" }, "target_resource" : { "resource" : "xxxx" }, "fail_messages" : 14, "success_messages" : 0, "delete_at" : 0 }}
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json”
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json”
  • URI GET /v3/{project_id}/edgemgr/deployments 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID 表2 Query参数 参数 是否必选 参数类型 描述 limit 否 Long 每页显示的条目数量,最大100,默认值10 offset 否 Long 查询的起始位置,默认值0 sort 否 String 查询结果排序,如按照创建时间降序排序为created_at:desc,升序排序为created_at:asc name 否 String deployment名称(支持模糊匹配) node_id 否 String 节点ID,查询部署在该节点下的应用列表,和group_id不可同时请求 group_id 否 String 节点组ID,查询部署在该节点组的应用列表,和node_id不可同时请求
  • 响应示例 状态码: 200 ok { "count" : 1, "deployments" : [ { "id" : "3e64d98a-37c5-43a6-9bfe-052b9083e362", "name" : "app-test", "replicas" : 1, "ready_replicas" : 1, "description" : "this is a test app", "group_id" : "", "node_ids" : [ "29d20c18-c20c-4a45-a087-42c766fc5d97" ], "tags" : [ { "key" : "app", "value" : "test" } ], "api_version" : "v3", "source" : "userdefine", "project_id" : "bcd83056c918480f8f190844bd425b23", "created_at" : "2019-10-10T02:20:40.630Z", "updated_at" : "2019-10-10T02:20:40.630Z", "template" : { "configs" : { "host_network" : true, "host_pid" : true, "migration" : true, "restart_policy" : "Always", "toleration_seconds" : 300 }, "init_containers" : [ ], "containers" : [ { "name" : "container-0", "image_url" : "swr.cn-north-1.myhuaweicloud.com/ief-test/nginx:0705", "args" : [ "-c", "sleep 1000" ], "command" : [ "/bin/bash" ], "resources" : { "limits" : { "cpu" : "0.25", "memory" : "500", "gpu" : "500" }, "requests" : { "cpu" : "0.25", "memory" : "500", "gpu" : "500" } }, "envs" : [ { "name" : "CERT_PATH", "value" : "/opt/cert" } ], "ports" : [ { "container_port" : 80, "host_port" : 80 } ], "privileged" : true, "readiness_probe" : { "http_get" : { "path" : "/", "port" : 80, "scheme" : "http" }, "initial_delay_seconds" : 10, "timeout_seconds" : 10 }, "liveness_probe" : { "http_get" : { "path" : "/", "port" : 80, "scheme" : "http" }, "initial_delay_seconds" : 10, "timeout_seconds" : 10 }, "version" : "1.0", "npu_type" : "", "volumes" : [ { "name" : "log-volume", "type" : "hostPath", "read_only" : false, "source" : "/var/IEF", "destination" : "/var/IEF" } ] } ] } } ]} 状态码: 400 error { "error_code" : "IEF.100001", "error_msg" : "PROJECT_ID not found"} 状态码: 500 error { "error_code" : "IEF.100158", "error_msg" : "Fail to extract gpu infomation"}
  • 请求参数 表3 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json” X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json” X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值
  • 响应示例 状态码: 201 创建成功 { "product" : { "id" : "52b7e862-7b86-4b4d-b805-f580c4a25b0b", "name" : "a", "description" : "", "attributes" : { }, "project_id" : "ed202955e111444e8ced21a1bd75fc59", "created_at" : 1667214079, "private_key" : "", "certificate" : "", "ca" : "", "package" : "" }}
  • 响应示例 状态码: 200 查询成功 { "product" : { "id" : "52b7e862-7b86-4b4d-b805-f580c4a25b0b", "name" : "a", "description" : "", "attributes" : { }, "project_id" : "ed202955e111444e8ced21a1bd75fc59", "created_at" : 1667214079 }}
  • 响应示例 状态码: 201 ok { "device" : { "id" : "1398f13d-f24d-4de4-8cd3-5905db1d6d9f", "name" : "device", "access_protocol" : "", "project_id" : "05e1aef9040010e22fccc009adecb056", "description" : "", "created_at" : "2020-09-23T02:00:22.858736Z", "updated_at" : "", "access_config" : { }, "connection_type" : "edge" }}
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json” X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值
  • 响应示例 状态码: 200 查询成功 { "endpoint" : { "name" : "SystemEventBus", "description" : "", "type" : "eventbus", "properties" : { }, "ief_instance_id" : "default", "is_shared" : true, "id" : "6bf2fda9-810c-40ed-8623-ff9396fe357d", "project_id" : "op_svc_ief_container1", "created_at" : "2021-04-20T22:02:34.604985+08:00", "updated_at" : "2022-09-09T10:48:32.293802+08:00" }}
  • 响应示例 状态码: 200 查询成功 { "endpoints" : [ { "name" : "SystemREST", "description" : "", "type" : "rest", "properties" : { "public" : "stargate-elb.ief-system.svc.cluster.local" }, "ief_instance_id" : "38898a99-d67c-41f8-a8cb-8c53d6d297ba", "is_shared" : true, "id" : "94150bf3-457e-4c93-8cd1-7cd3b203634b", "project_id" : "ed202955e111444e8ced21a1bd75fc59", "created_at" : "2022-04-29T18:27:28.048855+08:00", "updated_at" : "2022-04-29T18:27:28.048855+08:00" }, { "name" : "SystemEventBus", "description" : "", "type" : "eventbus", "properties" : { }, "ief_instance_id" : "default", "is_shared" : true, "id" : "383b985e-402b-4ed0-924c-911a787ff9b7", "project_id" : "op_svc_ief_container1", "created_at" : "2021-05-12T20:39:34.553763+08:00", "updated_at" : "2022-09-02T17:11:55.792879+08:00" } ]}
  • URI GET /v2/{project_id}/routemgr/endpoints 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID 表2 Query参数 参数 是否必选 参数类型 描述 name 否 String 端点名称 type 否 String 端点类型 枚举值: dis servicebus apigw is_shared 否 String 端点是否共享 limit 否 Integer 查询返回记录的数量限制 offset 否 Integer 偏移量,表示查询该偏移量后面的记录
  • 请求参数 表3 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json” X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json” X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值
  • 响应消息 响应参数 表5 响应Body参数 名称 参数类型 说明 deployment 表18 object 部署详细信息 upgrade_ret String 升级结果 reason String 升级结果描述 响应示例 { "reason":null, "upgrade_ret":"success", "deployment":{ "name":"test1203", "envs":[ { "name":"IP", "value":"127.0.0.1" }, { "name":"PORT", "value":"9090" }, { "name":"VERSION", "value":"2.1.0" } ], "liveness_probe":{ "timeout_seconds":10, "http_get":{ "path":"/", "host":"127.0.0.1", "scheme":"HTTP", "port":9090 }, "initial_delay_seconds":10 }, "instances":[ { "name":"test-app-version", "state":"PENDING", "restarts":0, "reason":null, "is_ready":null, "message":null, "id":"56149553-d7b4-486d-92b2-0a691123551c" } ], "version":"1.0", "image_url":"xxx.xxx.xxx/edgecloud/version:v1", "volumes":[ ], "readiness_probe":{ "timeout_seconds":10, "http_get":{ "path":"/", "host":"127.0.0.1", "scheme":"HTTP", "port":9090 }, "initial_delay_seconds":10 }, "configs":{ "host_network":true, "restart_policy":"Always", "privileged":false, "ports":null }, "id":"8f900fa3-5dd4-48e1-a0f3-7b7af8c6d54c", "resources":{ "requests":{ "cpu":0.25, "memory":512 }, "limits":{ "cpu":1, "memory":512 } } } }
  • 响应示例 状态码: 200 ok { "configmap" : { "id" : "12ns9eb6cc0d49a0941df2f31283mds8 ", "name" : "test-cm", "description" : "this is a test cm2", "configs" : { "key1" : "val1", "key3" : "val3" }, "project_id" : "d16e6eb6cc0d49a0941df2f31285757a", "created_at" : "2018-07-16T13:41:25.347335", "updated_at" : "2018-07-19T13:41:25.347335" }}
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json” X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json” X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值
  • 响应示例 状态码: 200 查询成功 { "job_count" : 2, "jobs" : [ { "job_name" : "aaa", "job_type" : "deployment_deploy", "job_id" : "66273c66-f72e-4607-8769-3663d255fb83", "status" : "Successful", "created_at" : 1667218308, "status_last_updated_at" : 1667218329, "task_total_count" : 2, "task_failed_count" : 0, "task_success_count" : 2, "description" : "" }, { "job_name" : "test0929-pm", "job_type" : "deployment_deploy", "job_id" : "0a95c8df-eab5-4a8b-a63b-df9f208ad0ce", "status" : "Successful", "created_at" : 1664444410, "status_last_updated_at" : 1664444411, "task_total_count" : 1, "task_failed_count" : 0, "task_success_count" : 1, "description" : "" } ]}
  • 请求参数 表3 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json”
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 job_count Integer 数目 jobs Array of BatchJobForList objects 批量处理作业详情 表5 BatchJobForList 参数 参数类型 描述 job_id String 批量处理作业ID job_name String 批量处理作业名称 job_type String 批量处理作业类型,支持以下选项: node_upgrade: 节点升级 deployment_deploy:应用部署 deployment_upgrade:应用升级 created_at Integer 创建时间戳 status String 执行状态 task_total_count Integer 任务总数 task_success_count Integer 任务项执行成功数 task_failed_count Integer 任务项执行失败数 status_last_updated_at Integer 状态更新时间戳 description String 任务描述
  • URI GET /v2/{project_id}/productmgr/jobs 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID 表2 Query参数 参数 是否必选 参数类型 描述 job_type 否 String 批量处理作业类型,支持以下选项: node_upgrade: 节点升级 deployment_deploy:应用部署 deployment_upgrade:应用升级 limit 否 Integer 查询返回记录的数量限制 offset 否 Integer 偏移量,表示查询该偏移量后面的记录 sort 否 String 查询结果排序,如按照创建时间降序排序为created_at:desc,升序排序为created_at:asc
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json” X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json” X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值
  • 响应示例 状态码: 200 查询成功 { "id" : "e4f9c0d6-e1d7-41d5-a108-f38aa8372ffd", "name" : "test1", "description" : "", "created_at" : "2022-06-07 08:21:05.794205 +0000 UTC", "updated_at" : "2022-06-07 08:21:05.794217 +0000 UTC", "project_id" : "xxx", "iam_role" : "", "memory" : 8595, "cpu" : 5, "gpu_num" : 0, "nodes" : [ { "id" : "024e05a8-89bf-46d8-b298-700a2af69605", "project_id" : "xxx", "name" : "test1", "description" : "", "created_at" : "2022-08-05 02:14:52.351802 +0000 UTC", "updated_at" : "2022-10-31 19:19:37.104359 +0000 UTC", "state" : "RUNNING", "master_addr" : "xxx/xxx", "arch" : "x86_64", "enable_gpu" : false, "gpu_info" : [ ], "gpu_num" : 0, "memory" : 990, "os_version" : "3.10.0-1062.12.1.el7.x86_64", "os_name" : "CentOS Linux 7 (Core)", "device_infos" : null, "os_type" : "linux", "pause_docker_image" : "", "host_name" : "test1", "cpu" : 1, "log_configs" : [ { "level" : "on", "rotate_num" : 5, "component" : "app", "rotate_period" : "yearly", "type" : "LTS", "id" : "", "size" : 50 }, { "level" : "info", "rotate_num" : 5, "component" : "system", "rotate_period" : "yearly", "type" : "LTS", "id" : "", "size" : 50 }, { "level" : "", "rotate_num" : 5, "component" : "app", "rotate_period" : "daily", "type" : "local", "id" : "", "size" : 50 }, { "level" : "info", "rotate_num" : 5, "component" : "system", "rotate_period" : "daily", "type" : "local", "id" : "", "size" : 50 } ], "host_ips" : [ "192.168.0.x" ], "edged_version" : "2.1.0", "deployment_num" : 1, "device_num" : 2, "upgrade_history" : [ { "to_version" : "2.55.8", "upgrade_time" : 1659694662, "id" : 0, "result" : "install_success", "from_version" : "", "dur_time" : 0 }, { "to_version" : "2.55.9", "upgrade_time" : 1660642318, "id" : 1, "result" : "upgrade_success", "from_version" : "2.55.8", "dur_time" : 30 }, { "to_version" : "2.56.0", "upgrade_time" : 1662019732, "id" : 2, "result" : "upgrade_success", "from_version" : "2.55.9", "dur_time" : 29 }, { "to_version" : "2.56.0", "upgrade_time" : 1663125401, "id" : 3, "result" : "upgrade_failed_rollback_success", "from_version" : "2.56.0", "dur_time" : 3 } ], "ief_node_version" : "2.3.0", "upgrade_flag" : false, "comment" : "", "ca" : "", "relation" : "", "certificate" : "", "private_key" : "", "attributes" : null, "package" : "", "tags" : null, "product_id" : "", "mqtt_mode" : "internal", "mqtt_internal" : "", "mqtt_external" : "", "enable_npu" : false, "npu_type" : "", "docker_enable" : null, "npu_num" : 0, "npu_info" : [ ], "node_type" : "", "ntp_configs" : null, "nics" : null, "error_reason" : "", "container_runtime_version" : "", "purchase_id" : "", "state_details" : { "register_stat" : "", "purchase_stat" : "", "purchase_error" : "" }, "cert_remaining_valid_time" : 0 }, { "id" : "de5d81fe-a58e-4ec4-be9d-f3906d7fe356", "project_id" : "xxx", "name" : "cjq-test-1008", "description" : "", "created_at" : "2022-10-07 23:19:18.147956 +0000 UTC", "updated_at" : "2022-10-27 23:20:09.631153 +0000 UTC", "state" : "RUNNING", "master_addr" : "xxx", "arch" : "x86_64", "enable_gpu" : false, "gpu_info" : [ ], "gpu_num" : 0, "memory" : 7805, "os_version" : "3.10.0-862.14.1.5.h408.eulerosv2r7.x86_64", "os_name" : "EulerOS 2.0 (SP5)", "device_infos" : null, "os_type" : "linux", "pause_docker_image" : "", "host_name" : "ecs-81ba", "cpu" : 4, "log_configs" : null, "host_ips" : [ "192.168.0.161" ], "edged_version" : "2.1.0", "deployment_num" : 1, "device_num" : 0, "upgrade_history" : [ { "to_version" : "2.53.4", "upgrade_time" : 1665215216, "id" : 0, "result" : "install_success", "from_version" : "", "dur_time" : 0 }, { "to_version" : "2.56.5", "upgrade_time" : 1666839798, "id" : 1, "result" : "upgrade_success", "from_version" : "2.56.4", "dur_time" : 22 }, { "to_version" : "2.56.6", "upgrade_time" : 1666872187, "id" : 2, "result" : "upgrade_success", "from_version" : "2.56.5", "dur_time" : 23 } ], "ief_node_version" : "2.56.6", "upgrade_flag" : false, "comment" : "", "ca" : "", "relation" : "", "certificate" : "", "private_key" : "", "attributes" : null, "package" : "", "tags" : null, "product_id" : "", "mqtt_mode" : "internal", "mqtt_internal" : "", "mqtt_external" : "", "enable_npu" : false, "npu_type" : "", "docker_enable" : null, "npu_num" : 0, "npu_info" : [ ], "node_type" : "", "ntp_configs" : null, "nics" : null, "error_reason" : "", "container_runtime_version" : "", "purchase_id" : "", "state_details" : { "register_stat" : "", "purchase_stat" : "", "purchase_error" : "" }, "cert_remaining_valid_time" : 0 } ], "deployments" : [ ], "attributes" : [ ], "failed_node_add" : null, "failed_node_del" : null, "success_node_add" : null, "success_node_del" : null}
共100000条