华为云用户手册

  • 请求参数 表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" }}
  • 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,专业版实例为空值
  • 响应示例 状态码: 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" } ]}
  • 请求参数 表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,专业版实例为空值
  • 请求参数 表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 任务描述
  • 响应示例 状态码: 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" : "" } ]}
  • 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,专业版实例为空值
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json” 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}
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json” X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值
  • URI DELETE /v2/{project_id}/{resource_type}/{resource_id}/tags/{key} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID resource_type 是 String 资源类型 ief-edge_node ief-deployment ief-application ief-device resource_id 是 String 资源id key 是 String 标签key
  • 响应示例 状态码: 201 创建成功 { "systemevent" : { "id" : "b79f4d8e-4549-4da4-9a9c-a9d13452c7d6", "project_id" : "ed202955e111444e8ced21a1bd75fc59", "created_at" : "2022-11-02T07:17:01.372735871Z", "updated_at" : "2022-11-02T07:17:01.372735998Z", "name" : "aa", "description" : "", "in_using" : true, "events" : "edgeNode/online", "target" : { "name" : "apigw", "description" : "", "type" : "apigw", "properties" : { "domain_id" : "d0857ebddc514a7381c3673363e61337" }, "ief_instance_id" : "38898a99-d67c-41f8-a8cb-8c53d6d297ba", "is_shared" : false, "id" : "591ba510-8c62-41b8-a0c3-d94262ef97ef", "project_id" : "ed202955e111444e8ced21a1bd75fc59", "created_at" : "2022-06-02T11:15:26.29972+08:00", "updated_at" : "2022-06-02T11:15:26.29972+08:00" }, "target_resource" : { "resource" : "https://www.fake.com" }, "fail_messages" : 0, "success_messages" : 0, "delete_at" : 0 }}
  • 请求示例 创建系统订阅,订阅的系统主题为节点上线。 { "systemevent" : { "name" : "aa", "description" : "", "events" : "edgeNode/online", "target_resource" : { "resource" : "https://www.fake.com" }, "target" : "591ba510-8c62-41b8-a0c3-d94262ef97ef" }}
  • 响应示例 状态码: 200 ok { "encrypt_data" : { "id" : "f8d1bdcc-2090-976c-1931-c90a39c0f12f", "name" : "test-demo", "description" : "example", "config" : [ { "name" : "a", "value" : "00000001000000015005F6399D69B268551A78D994EB7755B1FE47AE5EE02C0A1C2BA9E456F856ED", "is_encrypted" : true } ], "project_id" : "fake_id", "ief_instance_id" : "", "domain_id" : "fake_id", "created_time" : 1663917971, "updated_time" : 1663918375 }}
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json” X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 encrypt_data EncryptData object 加密数据信息 表4 EncryptData 参数 参数类型 描述 id String 加密数据ID name String 加密数据名称 description String 加密数据描述 config Array of EncryptDataItem objects 加密数据项配置 project_id String 项目ID ief_instance_id String 铂金版实例ID,专业版实例为default domain_id String 租户账户ID created_time Long 加密数据创建时间 updated_time Long 加密数据更新时间 表5 EncryptDataItem 参数 参数类型 描述 name String 加密数据项键名,小写英文字母、数字、中划线,以小写字母或数字开头,最大长度为32个字符,不能为空 value String 加密数据项键值 is_encrypted Boolean 加密数据项键值是否已加密,默认为true
  • URI GET /v2/{project_id}/edgemgr/device-templates 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID 表2 Query参数 参数 是否必选 参数类型 描述 name 否 String 终端设备名称,模糊匹配 offset 否 String 查询的起始位置,取值范围为非负整数,默认为0 limit 否 String 每页显示的条目数量,取值范围1~1000,默认为1000
  • 响应示例 状态码: 200 ok { "count" : 1, "device_templates" : [ { "property_visitors" : { }, "description" : "", "tags" : { "key1" : "value1" }, "created_at" : "2019-10-09T00:51:11.890571+08:00", "updated_at" : null, "access_protocol" : "userdefine", "twin" : { }, "attributes" : { "ggg" : { "optional" : true, "value" : "ggg", "metadata" : { "type" : "string" } } }, "project_id" : "13b43583216e426b9dc9fad4000e9e1a", "id" : "3950b024-7716-4580-8b85-4ab4bd3eeef0", "name" : "mmmmmmm" } ]}
  • 请求参数 表3 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json” X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值
  • 响应示例 状态码: 200 查询成功 { "job_name" : "aaa", "job_id" : "66273c66-f72e-4607-8769-3663d255fb83", "job_type" : "deployment_deploy", "target_type" : "node", "description" : "", "targets" : [ { "target_id" : "72eb5df1-295b-41f6-baed-d1a56728b0e0", "extension_info" : [ { "key" : "node_name", "value" : "test1" } ] }, { "target_id" : "b1c0e722-ee98-4ae3-9224-881224cb32c9", "extension_info" : [ { "key" : "node_name", "value" : "test2" } ] } ], "task_data" : "{\"deployment\":{\"replicas\":1,\"template\":{\"configs\":{\"host_network\":false,\"restart_policy\":\"Always\",\"host_pid\":false},\"containers\":[{\"name\":\"container-06fefd36\",\"version\":\"latest\",\"image_url\":\"sample:latest\",\"envs\":[],\"volumes\":[],\"resources\":{\"limits\":{\"cpu\":\"0.25\",\"memory\":\"512\"},\"requests\":{\"cpu\":\"0.25\",\"memory\":\"512\"}},\"privileged\":false,\"ports\":[]}]}},\"source\":\"userdefined\",\"name_prex\":\"aaa\",\"tags\":[],\"description\":\"\"}", "status" : "Successful", "created_at" : 1667218308, "status_last_updated_at" : 1667218329, "tasks" : [ { "task_name" : "aaa-c530d", "task_id" : "382cca3e-88e6-4a7c-bf23-b637a99761f9", "target_id" : "72eb5df1-295b-41f6-baed-d1a56728b0e0", "status" : "Successful", "created_at" : 1667218324, "reason" : "", "extension_info" : [ { "key" : "deployment_id", "value" : "9bdefd92-c724-41f4-b07a-4b1061e096d6" } ] }, { "task_name" : "aaa-ce854", "task_id" : "ac04605b-c286-4f23-97e0-fe08366c36f5", "target_id" : "b1c0e722-ee98-4ae3-9224-881224cb32c9", "status" : "Successful", "created_at" : 1667218325, "reason" : "", "extension_info" : [ { "key" : "deployment_id", "value" : "4b4c7b0c-7ee8-4a7e-b79e-9291b7fd365d" } ] } ], "task_total_count" : 2, "task_failed_count" : 2, "task_success_count" : 0}
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 job_id String 批量处理作业ID job_name String 批量处理作业名称 job_type String 批量作业类型,支持以下选项: - node_upgrade: 节点升级 - deployment_deploy:应用部署 - deployment_upgrade:应用升级 description String 描述 created_at Integer 创建时间戳 status String 执行状态 task_total_count Integer 任务总数 task_failed_count Integer 任务项执行成功数 task_success_count Integer 任务项执行失败数 target_type String 批量作业对象类型,支持如下选项: - node:边缘节点 - node_group:边缘节点组 - deployment:边缘应用 task_data String 批量作业内容,仅在批量应用部署和批量应用升级时需要填写,填入的内容为:使用json结构体编写的创建应用部署接口请求体deployment参数,并将其转换为字符串 tasks Array of Task objects 任务项详情 targets Array of Target objects 批量处理对象详情 status_last_updated_at Integer 状态更新时间戳 表4 Task 参数 参数类型 描述 task_id String 任务项ID task_name String 任务项名称 status String 任务项状态 reason String 任务项失败的原因 created_at Integer 创建时间戳 target_id String 批量处理对象ID extension_info Array of Extension objects 批量处理对象基本信息 表5 Target 参数 参数类型 描述 extension_info Array of Extension objects 批量处理对象基本信息 target_id String 批量处理对象ID 表6 Extension 参数 参数类型 描述 key String 属性名,可填:node_name value String 属性值
共99354条