本接口用于获取工作负载信息。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | GetWorkload | 要执行的操作。取值:GetWorkload。 |
application_identity | String | 是 | veecc-2218310225222318**** | 边缘应用ID。 |
identity | String | 是 | res-2408111003101822**** | 工作负载 ID。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
workload | 参考 WorkloadResp | 工作负载信息。 | |
containers | [ ] ContainerResp | 容器列表。 |
GET https://veecc.volcengineapi.com/?Action=GetWorkload &application_identity=veecc-2589326236023531**** &identity=res-3203139131356131**** &<公共请求参数>
{ "ResponseMetadata": { "RequestId": "202301301601570938F71214DDD02A****", "Action": "GetWorkload", "Version": "2022-10-01", "Service": "veecc", "Region": "cn-north-1" }, "Result": { "workload": { "identity": "res-3203139131356131****", "name": "ccccc111", "type": 1, "spec_name": "veECC.C1.0-1large", "remark": "", "deploy_strategy": 2, "rolling_size": 1, "max_disable_size": 1, "workload_access": { "access_public_network": true, "access_type": 1, "access_services": null }, "create_time": 1675163936, "update_time": 1675163936, "spec_info": { "spec_name": "veECC.C1.0-1large", "cpu": "0.5", "mem": "1GB", "pps": "50000", "bandwidth": "1000M" }, "app_id": "veecc-2589326236023531****", "workload_storage_volumes": null, "enable_public_ip": false, "public_ip_type": 0, "public_ip_bandwidth": 0, "kata_kernel_version": "kata-default" "enable_nat": false, "bandwidth_billing_method": "DailyPeak" }, "containers": [ { "identity": "res-5028231638912603****", "name": "cccc222", "image_version": "latest", "cpu": 0.5, "mem": 1, "storage_volumes": null, "ports": null, "cmd": null, "envs": null, "mount_configs": null, "liveness_probe": null, "readiness_probe": null, "post_start": null, "pre_stop": null, "image_domain": "example-domain", "image_pull_secret_identity": "res-1705570270102522****", "privileged": false } ] } }
如果响应正文中包含 Error 字段,则表示 API 请求失败。关于错误码的更多信息,参见公共错误码。