华为云用户手册

  • 请求参数 表3 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json” X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值
  • 响应示例 状态码: 200 ok { "count" : 1, "secrets" : [ { "id" : "12ns9eb6cc0d49a0941df2f31283mds8 ", "name" : "test-secret", "description" : "this is a test secret", "secrets" : { "key1" : "val1", "key3" : "val3" }, "project_id" : "d16e6eb6cc0d49a0941df2f31285757a", "created_at" : "2018-07-16T13:41:25.347335", "updated_at" : "2018-07-19T13:41:25.347335", "type" : "Opaque" } ] }
  • URI GET /v2/{project_id}/edgemgr/secrets 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID 表2 Query参数 参数 是否必选 参数类型 描述 name 否 String 密钥名称,模糊匹配 limit 否 String 每页显示的条目数量,取值范围1~1000,默认值为1000。 offset 否 String 查询的起始位置,取值范围为非负整数,默认为0 sort 否 String 排序方式,可根据名称、创建时间、更新时间排序 枚举值: name created_at updated_at 默认升序,如sort=name,降序:sort=name%3Adesc
  • 响应示例 状态码: 200 ok { "twin" : { "devicestate" : { "expected" : { "value" : "running", "metadata" : { "timestamp" : 1523514289 } }, "actual" : { "value" : "stop", "metadata" : { "timestamp" : 1523514289 } }, "optional" : true, "metadata" : { "type" : "string" } } }, "property_visitors" : { } }
  • 响应示例 状态码: 201 边缘节点详细信息 { "node" : { "id" : "86715318-a5a7-4507-a289-7238d53d5fed", "project_id" : "05041fffa40025702f6dc009cc6f8f33", "name" : "node_test", "description" : "This is a test node", "created_at" : "2020-08-11T01:23:55.527805447Z", "updated_at" : "", "state" : "UNCONNECTED", "master_addr" : "https://ief2-placement.cn-north-4.myhuaweicloud.com:443", "arch" : "", "enable_gpu" : false, "gpu_info" : [ ], "gpu_num" : 0, "memory" : 0, "os_version" : "", "os_name" : "", "device_infos" : [ ], "os_type" : "", "pause_docker_image" : "swr.cn-north-4.myhuaweicloud.com/huawei-ief-internal-app/pause", "host_name" : "", "cpu" : 0, "log_configs" : [ { "level" : "", "rotate_num" : 5, "component" : "app", "rotate_period" : "daily", "type" : "local", "id" : "9b795f5e-01b7-47e8-b1ae-6dc59b9c0005", "size" : 100 }, { "level" : "false", "rotate_num" : 5, "component" : "app", "rotate_period" : "daily", "type" : "LTS", "id" : "e419ab7f-17ea-4757-b62e-311fc777af69", "size" : 50 }, { "level" : "", "rotate_num" : 5, "component" : "system", "rotate_period" : "daily", "type" : "local", "id" : "56dabbb7-4fb1-46cc-85df-dc80a2bd24f8", "size" : 50 }, { "level" : "false", "rotate_num" : 5, "component" : "system", "rotate_period" : "daily", "type" : "LTS", "id" : "0f6935c1-e59d-4b0d-a0db-1ba07b2ac8d1", "size" : 50 } ], "host_ips" : [ ], "edged_version" : "", "deployment_num" : 0, "device_num" : 0, "upgrade_history" : [ ], "ief_node_version" : "", "comment" : "", "ca" : "", "relation" : "", "certificate" : "", "private_key" : "", "attributes" : [ ], "package" : "", "tags" : null, "product_id" : "", "mqtt_mode" : "internal", "mqtt_internal" : "tls://docker0:8883,tls://127.0.0.1:8883", "mqtt_external" : "", "enable_npu" : false, "docker_enable" : true, "npu_num" : 0, "npu_info" : [ ], "node_type" : "", "ntp_configs" : null, "nics" : [ ], "error_reason" : "", "container_runtime_version" : "" } }
  • 请求示例 注册边缘节点,不开启GPU,将部署到边缘节点上的应用,生成的日志发送到本地。 { "node" : { "name" : "node_test", "description" : "This is a test node", "enable_gpu" : false, "log_configs" : [ { "component" : "app", "type" : "local", "level" : "debug", "size" : 100, "rotate_num" : 5, "rotate_period" : "daily" } ] } }
  • 请求参数 表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 表3 响应Body参数 参数 参数类型 描述 tags Array of ResourceTag objects 标签属性 count Integer 标签数量 表4 ResourceTag 参数 参数类型 描述 key String 键。最大长度36个unicode字符。 不能为空,只能包含大小写字母,数字,中划线“-”,下划线“_”。 value String 值。每个值最大长度43个unicode字符,删除时如果value有值按照key/value删除,如果value没值,则按照key删除。 不能为空,只能包含大小写字母,数字,中划线“-”,下划线“_”。
  • URI GET /v2/{project_id}/{resource_type}/{resource_id}/tags 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID resource_id 是 String 资源ID resource_type 是 String 资源类型 ief-edge_node ief-deployment ief-application ief-device
  • 请求示例 添加终端设备的边缘节点,指定节点ID。 { "nodes" : { "added" : { "node_ids" : [ "592ede18-d030-4cc1-afb8-34ac1bae47f6" ], "relation" : "abcd", "comment" : "hello world" }, "removed" : [ ] } }
  • 响应示例 状态码: 200 更新成功 { "update_nodes" : { "removed" : [ ], "added" : { "comment" : "hello world", "relation" : "abcd", "node_ids" : [ "592ede18-d030-4cc1-afb8-34ac1bae47f6" ] } } }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json” X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值
  • 响应示例 状态码: 200 查询成功 { "node" : { "edged_version" : "2.6.0", "mqtt_internal" : "tls://0.0.0.0:8883", "ca" : null, "updated_at" : "2019-07-24T06:11:54.649516+08:00", "node_type" : null, "docker_enable" : true, "device_infos" : [ ], "upgrade_history" : [ { "to_version" : "2.3.0", "upgrade_time" : 1557987888, "result" : "install_success", "id" : 0 }, { "from_version" : "2.3.0", "to_version" : "2.3.0", "result" : "install_success", "dur_time" : 2248264, "upgrade_time" : 1560236152, "id" : 1 }, { "from_version" : "2.3.0", "to_version" : "2.3.0", "result" : "install_success", "dur_time" : 87129, "upgrade_time" : 1560323281, "id" : 2 }, { "from_version" : "2.3.0", "to_version" : "2.3.0", "result" : "install_success", "dur_time" : 158246, "upgrade_time" : 1560481527, "id" : 3 }, { "from_version" : "2.3.0", "to_version" : "2.5.0", "result" : "install_success", "dur_time" : 1466742, "upgrade_time" : 1561948269, "id" : 4 }, { "from_version" : "2.5.0", "to_version" : "2.5.0", "result" : "install_success", "dur_time" : 884941, "upgrade_time" : 1562833210, "id" : 5 }, { "from_version" : "2.5.0", "to_version" : "2.6.0", "result" : "install_success", "dur_time" : 1106868, "upgrade_time" : 1563940078, "id" : 6 } ], "pause_docker_image" : null, "ntp_configs" : { "ntp_servers" : [ "10.127.1.0", "ntp.myhuaweicloud.com" ], "ntp_enabled" : true }, "ief_node_version" : "2.6.0", "id" : "699de693-8493-4912-89dc-882134c5bf13", "device_num" : 0, "certificate" : null, "nics" : [ { "interface" : "eth0", "ip" : "10.0.0.41" } ], "gpu_num" : 0, "os_version" : "3.10.0-957.21.3.el7.x86_64", "state" : "RUNNING", "error_reason" : null, "memory" : 990, "mqtt_mode" : "internal", "project_id" : "", "private_key" : null, "os_name" : "CentOS Linux 7 (Core)", "description" : "", "gpu_info" : [ ], "mqtt_external" : null, "arch" : "x86_64", "host_ips" : [ "10.0.0.41" ], "enable_gpu" : false, "enable_npu" : false, "npu_type" : "", "name" : "ief-node", "deployment_num" : 0, "package" : null, "container_runtime_version" : "docker://19.03.0", "created_at" : "2019-05-16T06:19:10.303502+08:00", "cpu" : 1, "product_id" : null, "host_name" : "iefnode", "attributes" : [ ], "os_type" : "linux", "log_configs" : [ { "level" : "info", "rotate_num" : 5, "component" : "system", "rotate_period" : "daily", "type" : "local", "id" : "ccc1080e-e156-48d2-b2d0-20044900d6ac", "size" : 50 }, { "level" : "on", "rotate_num" : 5, "component" : "app", "rotate_period" : "daily", "type" : "local", "id" : "e42f9c75-e010-4320-ad2d-a7501a3aa543", "size" : 50 }, { "level" : "off", "rotate_num" : 5, "component" : "system", "rotate_period" : "yearly", "type" : "LTS", "id" : "b29659b5-364a-4d7e-8447-b5525b6b46d0", "size" : 50 }, { "level" : "off", "rotate_num" : 5, "component" : "app", "rotate_period" : "yearly", "type" : "LTS", "id" : "c4ac8c83-64f5-4b84-b163-33581f08b1a8", "size" : 50 } ] } }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json” X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值 表3 请求Body参数 参数 是否必选 参数类型 描述 tags 否 Array of ResourceTag objects 标签列表 action 是 String 操作标识:仅限于create(创建)、delete(删除) 表4 ResourceTag 参数 是否必选 参数类型 描述 key 否 String 键。最大长度36个unicode字符。 不能为空,只能包含大小写字母,数字,中划线“-”,下划线“_”。 value 否 String 值。每个值最大长度43个unicode字符,删除时如果value有值按照key/value删除,如果value没值,则按照key删除。 不能为空,只能包含大小写字母,数字,中划线“-”,下划线“_”。
  • URI POST /v2/{project_id}/{resource_type}/{resource_id}/tags/action 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID resource_type 是 String 资源类型 ief-edge_node ief-deployment ief-application ief-device resource_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,专业版实例为空值
  • 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
  • 响应示例 状态码: 200 更新成功 { "node" : { "edged_version" : null, "ca" : null, "updated_at" : "2018-11-08T04:11:02.138839+08:00", "device_infos" : [ ], "upgrade_history" : [ ], "pause_docker_image" : null, "ief_node_version" : null, "id" : "59710cd5-2ade-4b87-b2f8-5752f308a25b", "device_num" : 1, "certificate" : null, "gpu_num" : null, "os_version" : null, "state" : "UNCONNECTED", "memory" : null, "project_id" : "{project_id}", "private_key" : null, "os_name" : null, "description" : "This is a new test node.", "gpu_info" : [ ], "arch" : null, "host_ips" : [ ], "enable_gpu" : false, "name" : "node_test7", "deployment_num" : 0, "package" : null, "container_runtime_version" : null, "created_at" : "2018-11-08T04:03:43.215561+08:00", "cpu" : null, "host_name" : null, "os_type" : null, "log_configs" : [ { "level" : "off", "rotate_num" : null, "component" : "app", "rotate_period" : null, "type" : "LTS", "id" : "79a1d6fb-4411-4e7e-8d15-b3d5c1b8612b", "size" : null }, { "level" : null, "rotate_num" : 5, "component" : "system", "rotate_period" : "daily", "type" : "local", "id" : "7e6419ac-05e8-4264-a082-f0824cbcd3bb", "size" : 50 }, { "level" : "off", "rotate_num" : null, "component" : "system", "rotate_period" : null, "type" : "LTS", "id" : "b5150a39-325a-4872-8b1c-d4585424875e", "size" : null }, { "level" : "on", "rotate_num" : 5, "component" : "app", "rotate_period" : "daily", "type" : "local", "id" : "4a19d570-05b6-49e5-9851-cc25f33eb1c3", "size" : 100 } ] } }
  • 请求参数 表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 { "secret" : { "id" : "12ns9eb6cc0d49a0941df2f31283mds8 ", "name" : "test-secret", "description" : "this is a test secret", "secrets" : { "key1" : "val-1", "key2" : "val-2" }, "project_id" : "d16e6eb6cc0d49a0941df2f31285757a", "created_at" : "2018-07-16T13:41:25.347335", "updated_at" : "2018-07-18T13:41:25.347335", "type" : "Opaque" } }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json” X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值
  • URI POST /v2/{project_id}/{resource_type}/{resource_id}/tags 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID resource_id 是 String 资源ID resource_type 是 String 资源类型 ief-edge_node ief-deployment ief-application ief-device
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json” X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值 表3 请求Body参数 参数 是否必选 参数类型 描述 tag 是 ResourceTag object 标签属性 表4 ResourceTag 参数 是否必选 参数类型 描述 key 否 String 键。最大长度36个unicode字符。 不能为空,只能包含大小写字母,数字,中划线“-”,下划线“_”。 value 否 String 值。每个值最大长度43个unicode字符,删除时如果value有值按照key/value删除,如果value没值,则按照key删除。 不能为空,只能包含大小写字母,数字,中划线“-”,下划线“_”。
  • 请求示例 更新终端设备,修改终端设备描述,标识属性为“true”。 { "device" : { "description" : "new description", "attributes" : { "username" : { "optional" : true, "value" : "test-new", "metadata" : { "type" : "string" } } } } }
  • 响应示例 状态码: 200 ok { "device" : { "id" : "1398f13d-f24d-4de4-8cd3-5905db1d6d9f", "name" : "device", "access_protocol" : "", "project_id" : "05e1aef9040010e22fccc009adecb056", "description" : "new description", "created_at" : "2020-09-23T02:00:22.858736Z", "updated_at" : "2020-09-23T02:12:46Z", "access_config" : { }, "attributes" : { "username" : { "value" : "test-new", "optional" : true, "metadata" : { "type" : "string" } } }, "connection_type" : "edge" } }
  • 请求示例 创建秘钥,秘钥类型为“Opaque”,秘钥对中key值为“key1”,value值为“val1”。 { "secret" : { "name" : "test-secret", "description" : "this is a test secret", "type" : "Opaque", "secrets" : { "key1" : "val1", "key2" : "val2 " } } }
  • 响应示例 状态码: 201 ok { "secret" : { "id" : "12ns9eb6cc0d49a0941df2f31283mds8 ", "name" : "test-secret", "description" : "this is a test secret", "secrets" : { "key1" : "val-1", "key2" : "val-2" }, "project_id" : "d16e6eb6cc0d49a0941df2f31285757a", "created_at" : "2018-07-16T13:41:25.347335", "updated_at" : "2018-07-18T13:41:25.347335", "type" : "Opaque" } }
  • 响应示例 状态码: 200 ok { "device" : { "id" : "1398f13d-f24d-4de4-8cd3-5905db1d6d9f", "name" : "device", "access_protocol" : "", "project_id" : "05e1aef9040010e22fccc009adecb056", "description" : "new description", "created_at" : "2020-09-23T02:00:22.858736Z", "updated_at" : "2020-09-23T02:12:46Z", "access_config" : { }, "attributes" : { }, "connection_type" : "edge" } }
共100000条