You need to enable JavaScript to run this app.
导航

获取工作负载

最近更新时间2023.10.11 10:11:23

首次发布时间2023.02.22 17:09:42

本接口用于获取工作负载信息。

请求参数

名称

类型

是否必选

示例值

描述

Action

String

GetWorkload

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

application_identity

String

veecc-2218310225222318****

边缘应用ID。

identity

String

res-2408111003101822****

工作负载 ID。

返回数据

名称

类型

示例值

描述

workload

WorkloadResp

参考 WorkloadResp

工作负载信息。

containers

[ ] ContainerResp

参考 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
      }
    ]
  }
}