You need to enable JavaScript to run this app.
导航
编辑工作负载
最近更新时间:2023.10.11 10:11:23首次发布时间:2023.02.22 17:09:42

本接口用于编辑工作负载。

请求参数

名称

类型

是否必选

示例值

描述

Action

String

EditWorkload

要执行的操作。取值:EditWorkload。

application_identity

String

veecc-2218310225222318****

边缘应用 ID。

workload

Workload

参考 Workload

工作负载信息。

containers

[ ] Container

参考 Container

容器列表。

返回数据


请求示例

POST https://veecc.volcengineapi.com/?Action=EditWorkload
&<公共请求参数>
{
  "application_identity": "veecc-2218310225222318****",
  "containers": [
    {
      "identity": "res-2408111003101822****",
      "name": "cccccc",
      "image_domain": "example-domain",
      "image_pull_secret_identity": "",
      "image_version": "v1.0.2",
      "storage_volumes": [
        {
          "class": 1,
          "type": 2,
          "capacity": 10,
          "mount_path": "/store",
          "volume_name": "storage1"
        }
      ],
      "ports": [
        {
          "name": "port11",
          "protocol": "TCP",
          "port": 90
        }
      ],
      "envs": [
        {
          "type": 1,
          "key": "key1",
          "value": "value1"
        },
        {
          "type": 2,
          "key": "",
          "value": "res-1111511150015255****"
        }
      ],
      "mount_configs": [],
      "post_start": null,
      "pre_stop": null,
      "readiness_probe": null,
      "liveness_probe": null,
      "cpu": 2,
      "mem": 4
    }
  ],
  "workload": {
    "workload_access": {
      "access_public_network": true,
      "access_type": 1
    },
    "deploy_strategy": 2,
    "identity": "res-3101001015111502****",
    "max_disable_size": 1,
    "name": "wwwww1111",
    "remark": "",
    "replicas": 1,
    "rolling_size": 1,
    "spec_name": "veECC.C1.2-4large",
    "type": 1,
    "workload_storage_volumes": [
      {
        "identity": "res-2351001321340818****",
        "name": "storage1",
        "class": 1,
        "type": 2,
        "capacity": 10
      }
    ]
  }
}

返回示例

{
  "ResponseMetadata": {
    "RequestId": "202301301601570938F71214DDD02A****",
    "Action": "EditWorkload",
    "Version": "2022-10-01",
    "Service": "veecc",
    "Region": "cn-north-1"
  }
}