路网数字化服务 DRIS-创建应用版本:请求示例

时间:2024-10-24 18:13:03

请求示例

POST https://{endpoint}/v1/{project_id}/v2x-edge-apps/{edge_app_id}/versions
Content-Type:application/json
X-Auth-Token:********
Instance-Id:********

{
  "args" : [ "args" ],
  "description" : "description",
  "version" : "1.0.11",
  "command" : [ "start" ],
  "container_settings" : {
    "configs" : {
      "privileged" : false,
      "host_network" : true,
      "restart_policy" : "Always",
      "container_port_list" : [ {
        "container_port" : 8082,
        "host_ip" : "127.0.0.1",
        "host_port" : 8083
      } ]
    },
    "image_url" : "example.com/huawei/edge:1.0.0",
    "volumes" : [ {
      "read_only" : true,
      "name" : "config",
      "destination" : "destination_1",
      "source" : "/opt/host/iot",
      "type" : " LOG "
    } ],
    "envs" : {
      "test" : "test"
    },
    "resources" : {
      "requests" : {
        "npu" : 4,
        "memory" : 2,
        "cpu" : 1,
        "gpu" : 3
      },
      "limits" : {
        "npu" : 9,
        "memory" : 7,
        "cpu" : 6,
        "gpu" : 8
      }
    },
    "ext_devices" : [ {
      "destination" : "/destination",
      "cgroup_permissions" : "MRW",
      "source" : "/source"
    } ]
  }
}
support.huaweicloud.com/api-v2x/v2x_04_0038.html