华为云用户手册

  • 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
  • 请求参数 表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删除。 不能为空,只能包含大小写字母,数字,中划线“-”,下划线“_”。
  • 响应参数 状态码: 200 表7 响应Body参数 参数 参数类型 描述 resources Array of Resource objects 资源实例 total_count Integer 总记录数 表8 Resource 参数 参数类型 描述 resource_id String 资源ID tags Array of ResourceTag objects 标签列表,没有标签默认为空数组 resource_name String 资源名称,资源没有名称时默认为空字符串。 表9 ResourceTag 参数 参数类型 描述 key String 键。最大长度36个unicode字符。 不能为空,只能包含大小写字母,数字,中划线“-”,下划线“_”。 value String 值。每个值最大长度43个unicode字符,删除时如果value有值按照key/value删除,如果value没值,则按照key删除。 不能为空,只能包含大小写字母,数字,中划线“-”,下划线“_”。
  • 请求示例 查询资源实例,按照过滤条件查询,搜索字段为“resource_name”,标签键值为“test”,值为“value1,value2”。 { "action" : "filter", "limit" : "10", "offset" : "0", "matches" : [ { "key" : "resource_name", "value" : "q" } ], "tags" : [ { "key" : "test", "values" : [ "value1", "value2" ] } ]}
  • 响应示例 状态码: 200 ok { "total_count" : 2, "resources" : [ { "tags" : [ { "value" : "", "key" : "testtest" }, { "value" : "value2", "key" : "test" } ], "resource_name" : "node_test_0108_1", "resource_id" : "e25307d4-bd25-4c29-ba7f-176376ed2f99" }, { "tags" : [ { "value" : "value1", "key" : "key1" }, { "value" : "", "key" : "test" } ], "resource_name" : "node_test-0109_1", "resource_id" : "fc3aeee8-24e1-4912-bf7a-54854251d0e5" } ]}
  • URI POST /v2/{project_id}/{resource_type}/resource_instances/action 表1 路径参数 参数 是否必选 参数类型 描述 project_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参数 参数 是否必选 参数类型 描述 tags 否 Array of Tag objects 包含标签,最多包含20个key,每个key下面的value最多10个,每个key对应的value可以为空数组但结构体不能缺失。Key不能重复,同一个key中values不能重复。结果返回包含所有标签的资源列表,key之间是与的关系,key-value结构中value是或的关系。如tags_any和tags字段同时存在,则去重后返回两者并集。无tag过滤条件时返回全量数据。 tags_any 否 Array of Tag objects 包含任意标签,最多包含20个key,每个key下面的value最多10个。Key不能重复,同一个key中values不能重复。结果返回包含标签的资源列表,key之间是或的关系,key-value结构中value是或的关系。如tags_any和tags字段同时存在,则去重后返回两者并集。无过滤条件时返回全量数据。 not_tags 否 Array of Tag objects 不包含标签,最多包含20个key,每个key下面的value最多10个。Key不能重复,同一个key中values不能重复。结果返回不包含标签的资源列表,key之间是与的关系,key-value结构中value是或的关系。无过滤条件时返回全量数据。 not_tags_any 否 Array of Tag objects 不包含任意标签,最多包含20个key,每个key下面的value最多10个。Key不能重复,同一个key中values不能重复。结果返回不包含标签的资源列表,key之间是或的关系,key-value结构中value是或的关系。无过滤条件时返回全量数据。 limit 否 String 查询记录数(action为count时无此参数)如果action为filter默认为1000,limit最多为1000,不能为负数,最小值为1 offset 否 String 索引位置,偏移量(action为count时无此参数)从第一条数据偏移offset条数据后开始查询,如果action为filter默认为0(偏移0条数据,表示从第一条数据开始查询),必须为数字,不能为负数 action 是 String 操作标识(仅限于filter,count):filter(过滤),count(查询总条数) 如果是filter就按照过滤条件查询,如果是count,只需要返回总条数,禁止返回其他字段。 matches 否 Array of Matches objects 搜索字段,key为要匹配的字段,如resource_name等。value为匹配的值。key为固定字典值,不能包含重复的key或不支持的key。根据key的值确认是否需要模糊匹配,如resource_name默认为模糊搜索(不区分大小写,不支持*,支持字符串匹配),如果value为空字符串则返回空列表(IEF服务不存在资源名称为空的情况,因此这类情况返回空列表)。 console 否 Boolean 确认是否请求源是否为console,通过该字段来判断是否返回resource_detail内容,如果为true则返回,如果为false或者不带该参数则返回空列表。 sorted 否 Sorted object 按标签过滤资源后返回结果的排序方式 表4 Tag 参数 是否必选 参数类型 描述 key 是 String 标签key值,长度取值范围为1~36, 仅允许大小写英文字母、数字、下划线、中划线 values 否 Array of strings 标签value值,长度取值范围为0~43, 仅允许大小写英文字母、数字、下划线、中划线 表5 Matches 参数 是否必选 参数类型 描述 key 是 String 键。限定为resource_name,后续扩展。 value 否 String 值。每个值最大长度64个unicode字符。不校验字符集范围。 表6 Sorted 参数 是否必选 参数类型 描述 key 否 String 按key值对请求内容进行排序 reverse 否 Boolean 是否采用倒序
  • 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,专业版实例为空值 表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 GET /v2/{project_id}/edgemgr/configmaps 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID 表2 Query参数 参数 是否必选 参数类型 描述 name 否 String 配置项名称,模糊匹配 limit 否 String 每页显示的条目数量,取值范围1~1000,默认为1000 offset 否 String 查询的起始位置,取值范围为非负整数,默认为0
  • 响应示例 状态码: 200 ok { "count" : 1, "configmaps" : [ { "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" } ]}
  • 请求参数 表3 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json” X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值
  • 响应示例 状态码: 201 ok { "configmap" : { "id" : "12ns9eb6cc0d49a0941df2f31283mds8 ", "name" : "test-cm", "description" : "this is a test cm", "configs" : { "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" }}
  • 响应示例 状态码: 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" }}
  • URI DELETE /v2/{project_id}/edgemgr/deployments/{deployment_id} 表1 Path参数 名称 是否必选 说明 project_id 是 项目ID,获取方法请参见获取项目ID。 deployment_id 是 应用部署ID force_delete 否 如果force_delete=true,将强制删除应用部署,主要应对实例无法正常删除的场景
  • 响应示例 状态码: 200 ok { "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:21:38.489Z", "updated_at" : "2019-10-10T02:21:38.489Z", "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", "npu_type" : "", "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" } ] }} 状态码: 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"}
  • 请求示例 更新应用部署,应用部署副本数为1,应用实例启用主机网络,重启策略为“always”。 { "deployment" : { "replicas" : 1, "template" : { "configs" : { "host_network" : true, "host_pid" : true, "migration" : true, "restart_policy" : "Always", "toleration_seconds" : 300 }, "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" } ] } }, "description" : "this is a test app"}
  • URI GET /v2/{project_id}/edgemgr/deployments?{name=xxx,limit=xxx,offset=xxx} 表1 Path参数 名称 是否必选 说明 project_id 是 项目ID,获取方法请参见获取项目ID。 表2 查询参数 名称 是否必选 参数类型 说明 limit 否 String 每页显示的条目数量 offset 否 String 查询的起始位置 name 否 String deployment的名称 node_id 否 String 节点ID tags 否 String 标签的key和value通过点连接,多个标签通过逗号连接,如:tags=key1.value1,key2.value2 如果不携带任何检索参数,将返回该租户的所有实例信息。 tags可以和多个其他检索参数同时生效。
  • 响应消息 响应参数 表5 响应Body参数 名称 参数类型 说明 deployment 表18 object 部署详细信息 响应示例 { "deployment": { "description": "This is a test deployment", "created_at": "2019-07-10T07:12:44.020393", "updated_at": null, "visibility": null, "instances": [ { "restarts": 0, "name": "test-hw", "envs": [], "liveness_probe": { "timeout_seconds": 10, "exec_command": "/bin/bash", "initial_delay_seconds": 10 }, "state": "PENDING_CREATE", "group_name": null, "configs": { "host_network": false, "restart_policy": "Always", "privileged": false, "ports": [ { "host_port": 88, "container_port": 8888 } ] }, "reason": null, "version": "1.0.0", "image_url": "100.95.181.176:5300/op_svc_ief_container1/sample:latest", "resources": { "requests": { "cpu": 0.25, "memory": 512.0 }, "limits": { "cpu": 1.0, "memory": 512.0 } }, "volumes": [], "is_ready": null, "readiness_probe": null, "message": null, "group_id": null, "id": "f4f87339-fe33-483a-a838-6d5250a96fc5", "node_id": "09dafd3e-63df-47a8-b7c6-119563fefa85" } ], "project_id": "9ff38382ccc546ac9635800c3315a5e2", "id": "8170e363-0232-44eb-b89c-dab6b6e915ff", "name": "deployment-test" }}
  • 响应消息 响应参数 表3 响应Body参数 名称 参数类型 说明 deployment 表18 object 部署详细信息 响应示例 { "deployment": { "description": "a@aaa", "created_at": "2018-07-20T15:18:42", "updated_at": null, "instances": [ { "name": "test17", "envs": [], "state": "PENDING_CREATE", "version": "", "image_url": "camerachecker:1.5.31", "resources": { "requests": { "gpu": 2, "cpu": 3, "memory": 2 }, "limits": { "gpu": 2, "cpu": 3, "memory": 2 } }, "volumes": [ { "read_only": true, "source": "/tmp", "destination": "/tmp0", "type": "hostPath", "name": "test" }, { "read_only": true, "source": "/tmp", "destination": "/tmp2", "type": "hostPath", "name": "test1" } ], "reason": "CrashLoopBackOff ", "message": null, "configs": { "host_network": true, "restart_policy": "Always", "privileged": false }, "is_ready": "NORMAL", "restarts": 0, "node_id": "2fac08a3-f1b0-4326-a1e9-77f0f4f6df43", "liveness_probe": { "http_get": { "path": "/v1", "port": 8080, "host": "", "scheme": "HTTP" }, "initial_delay_seconds": 5, "timeout_seconds": 5 }, "readiness_probe": { "http_get": { "path": "/v1", "port": 9090, "host": "", "scheme": "HTTP" }, "initial_delay_seconds": 5, "timeout_seconds": 5 } } ], "project_id": "d16e6eb6cc0d49a0941df2f31285757a", "id": "12529bc1-7146-43cc-a24f-9199743d7dc6", "name": "test6" }}
  • 响应示例 状态码: 201 ok { "created_at" : "2020-09-23 02:38:17.894471458 +0000 UTC", "replicas" : 1, "ready_replicas" : 0, "description" : "this is a test app", "group_id" : "", "node_ids" : [ "9ebd8efb-9fdd-44a1-abda-9cdbc287a867" ], "id" : "66a7fe7e-699a-41b2-9119-f9468a5ed78e", "name" : "app", "source" : "", "template" : { "configs" : { "host_network" : true, "host_pid" : true, "restart_policy" : "Always", "migration" : false, "toleration_seconds" : 300 }, "init_containers" : [ ], "containers" : [ { "name" : "container-0", "image_url" : "nginx:alpine", "npu_type" : "", "resources" : { "limits" : { "cpu" : "0.25", "memory" : "500" }, "requests" : { "cpu" : "0.25", "memory" : "500" } }, "privileged" : false, "version" : "" } ] }, "state" : "", "project_id" : "05e1aef9040010e22fccc009adecb056", "updated_at" : "2020-09-23 02:38:17.894471458 +0000 UTC", "api_version" : "v3", "source_id" : ""} 状态码: 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"}
  • 请求示例 创建部署,应用部署到指定节点,容器网络为主机网络。 { "name" : "app", "description" : "this is a test app", "node_ids" : [ "9ebd8efb-9fdd-44a1-abda-9cdbc287a867" ], "tags" : [ { "key" : "app", "value" : "test" } ], "deployment" : { "replicas" : 1, "template" : { "configs" : { "host_network" : true, "host_pid" : true, "restart_policy" : "Always", "toleration_seconds" : 300 }, "containers" : [ { "name" : "container-0", "image_url" : "nginx:alpine", "resources" : { "limits" : { "cpu" : "0.25", "memory" : "500" }, "requests" : { "cpu" : "0.25", "memory" : "500" } } } ] } }}
  • 响应消息 响应参数 表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 } } } }
  • 请求参数 表2 请求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, "versions" : [ { "envs" : [ ], "created_at" : "2018-07-26T07:31:29+08:00", "updated_at" : null, "version" : "v1", "image_url" : "busybox:latest", "volumes" : [ ], "npu_type" : "", "readiness_probe" : null, "configs" : { "host_network" : true, "restart_policy" : "Always", "privileged" : false }, "project_id" : "{project_id}", "liveness_probe" : null, "id" : "bc35aaff-bdd8-49e8-ace0-a25be2b09380", "resources" : { "requests" : { "cpu" : 0.25, "memory" : 512 }, "limits" : { "cpu" : 1, "memory" : 512 } } } ]}
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 versions Array of AppVersionDetail objects app详情 count Integer 满足条件的应用版本个数 表5 AppVersionDetail 参数 参数类型 描述 id String 应用版本ID version String 应用版本号 created_at String 创建时间 updated_at String 更新时间 只有更新后才会出现该字段 project_id String 项目ID image_url String 镜像存储地址 envs Array of Env objects 环境变量 volumes Array of Volumes objects 卷配置 configs AppConfigs object 容器特殊参数 resources Resources object 容器使用的资源 arch String 架构 command Array of strings 启动命令 args Array of strings 参数 liveness_probe ProbeDetail object 工作负载存活探针 readiness_probe ProbeDetail object 工作负载业务探针 npu_type String NPU芯片类型,可填:D310,D910 表6 Env 参数 参数类型 描述 name String 环境变量的key,由大小写字母或下划线开头,由数字、大小写字母、下划线组成,最大长度2048个字符,不允许重复 value String 环境变量的value,最大长度20480个字符。value、value_from和field_path必须三选一使用。 value_from ValueFrom object 环境变量可使用配置项和密钥导入 field_path String 该参数目前只支持赋值"status.hostIP",即引用边缘节点的IP地址作为环境变量。 表7 ValueFrom 参数 参数类型 描述 secret Secrets object 环境变量引用密钥时使用。使用ValueFrom时,secret与configmap必须二选一。 configmap ConfigsMap object 环境变量引用配置项时使用。 表8 Secrets 参数 参数类型 描述 name String 密钥的名称 key String 密钥的属性名 表9 ConfigsMap 参数 参数类型 描述 name String 配置项的名称 key String 配置项的属性名 表10 Volumes 参数 参数类型 描述 name String 卷名称,小写字母或数字,最长63个字符 type String 卷的类型,支持configMap,secret,emptyDir,hostPath source String 卷来源,type为hostPath时输入路径,要求以/开头,后面可包含中划线,反斜杠,下划线,点号,字母,数字; secret时输入secret名称,configMap时输入configMap名称,emptyDir时输入disk或memory destination String 卷挂载路径,必须是合法的路径 read_only Boolean 读写权限,configMap和secret类型只支持读权限 表11 AppConfigs 参数 参数类型 描述 privileged Boolean 默认为false,表示是否开启特权模式 run_as_user Integer 容器运行用户ID,输入范围为0~65534的整数 host_network Boolean 默认为true,其中true表示主机网络,而false表示端口映射 restart_policy String 应用实例重启模式: Always:当容器终止退出后,总是重启容器 Onfailure:容器异常退出(退出码非0)时才重启容器 Never:容器终止退出后,不重启容器 ports Array of Ports objects 容器端口映射值 host_pid Boolean 应用实例是否与主机共PID命名空间,默认值false dns_policy String 应用实例DNS策略,可选值Default、ClusterFirst、ClusterFirstWithHostNet,默认为Default。应用实例启用主机网络时只能选填Default、ClusterFirstWithHostNet,不启用主机网络时只能选填Default、ClusterFirst 表12 Ports 参数 参数类型 描述 container_port Integer 构成一堆映射的容器端口 host_port Integer 构成一对映射的物理机对应网卡端口 host_ip String 对应网卡地址 表13 Resources 参数 参数类型 描述 limits LimitsRequests object 允许容器使用的最大资源 requests LimitsRequests object 容器需要使用的最小资源 表14 LimitsRequests 参数 参数类型 描述 cpu Float cpu核数,大于等于0.01,最大1000;请求不需要带单位 memory Float 内存大小,单位兆,大于等于0.01,最大1024000。注意:内存的limits值最小为4;请求不需要带单位 gpu Float Gpu显存大小,单位兆,大于等于0.01,最大1024000;请求不需要带单位 npu Integer Npu个数,大于0,最大1000;请求不需要带单位 表15 ProbeDetail 参数 参数类型 描述 exec_command String 执行探测的命令行命令,长度1-10240内的字符串 http_get HttpGetDetail object 执行http探测 initial_delay_seconds Integer 表示从工作负载启动后从多久开始探测,大于0且不大于3600的整数,默认为10 timeout_seconds Integer 表示探测超时时间,大于0且不大于3600的整数,默认为1 表16 HttpGetDetail 参数 参数类型 描述 path String 必须要以/开头,构造结果为:协议类型://主机地址:端口路径 port Integer 探测的http端口,1到65535之间的整数 host String 请求的主机地址,默认为容器IP scheme String 协议类型,HTTP或HTTPS,默认HTTP
  • 请求参数 表3 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 是 String 消息体的类型(格式),默认取值为“application/json” X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 ief-instance-id 否 String 铂金版实例ID,专业版实例为空值
  • URI GET /v2/{project_id}/edgemgr/apps/{app_id}/versions 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID app_id 是 String 应用模板ID 表2 Query参数 参数 是否必选 参数类型 描述 limit 否 String 每页显示的条目数量,取值范围1~1000,默认为1000 offset 否 String 查询的起始位置,取值范围为非负整数,默认为0
共100000条