本接口用于编辑工作负载。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | EditWorkload | 要执行的操作。取值:EditWorkload。 |
application_identity | String | 是 | veecc-2218310225222318**** | 边缘应用 ID。 |
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" } }
如果响应正文中包含 Error 字段,则表示 API 请求失败。关于错误码的更多信息,参见公共错误码。