IOT边缘 IOTEDGE-创建应用版本:请求示例

时间:2024-06-20 17:14:27

请求示例

POST https://{endpoint}/v2/{project_id}/edge-apps/{edge_app_id}/versions

{
  "version" : "1.0.0",
  "description" : "string",
  "sdk_version" : "string",
  "deploy_type" : "docker",
  "deploy_multi_instance" : false,
  "container_settings" : {
    "configs" : {
      "privileged" : false,
      "host_network" : true,
      "restart_policy" : "string",
      "container_port_list" : [ {
        "container_port" : 65535,
        "host_port" : 65535,
        "host_ip" : "string"
      } ]
    },
    "image_url" : "string",
    "envs" : { },
    "volumes" : [ {
      "name" : "string",
      "type" : "string",
      "source" : "string",
      "destination" : "string",
      "read_only" : true
    } ],
    "npu_type" : "D310",
    "resources" : {
      "limits" : {
        "cpu" : 1000,
        "memory" : 1024000,
        "gpu" : 1024000,
        "npu" : 1000
      },
      "requests" : {
        "cpu" : 1000,
        "memory" : 1024000,
        "gpu" : 1024000,
        "npu" : 1000
      }
    },
    "ext_devices" : [ {
      "source" : "string",
      "destination" : "string",
      "cgroup_permissions" : "string"
    } ]
  },
  "liveness_probe" : {
    "exec_command" : "string",
    "tcp_socket" : {
      "port" : 65535
    },
    "http_get" : {
      "path" : "string",
      "port" : 65535,
      "host" : "string",
      "scheme" : "HTTP"
    },
    "initial_delay_seconds" : 3600,
    "timeout_seconds" : 3600,
    "period_seconds" : 30,
    "failure_threshold" : 3
  },
  "readiness_probe" : {
    "exec_command" : "string",
    "tcp_socket" : {
      "port" : 65535
    },
    "http_get" : {
      "path" : "string",
      "port" : 65535,
      "host" : "string",
      "scheme" : "HTTP"
    },
    "initial_delay_seconds" : 3600,
    "timeout_seconds" : 3600,
    "period_seconds" : 30,
    "failure_threshold" : 3
  },
  "arch" : { },
  "command" : { },
  "args" : { },
  "outputs" : { },
  "inputs" : { },
  "services" : { },
  "supplier" : "华为",
  "tpl_id" : "sys_general_opcua"
}
support.huaweicloud.com/api-iotedge/CreateEdgeApplicationVersion.html