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

获取工作负载列表

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

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

本接口用于获取工作负载列表。

请求参数

名称

类型

是否必选

示例值

描述

Action

String

ListWorkloads

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

application_identity

String

veecc-4000252292242221****

边缘应用 ID。

name

String

工作负载1

工作负载名称,模糊匹配。

identity

String

res-6910460211010082****

工作负载 ID,模糊匹配。

page

Int32

1

工作负载列表的页码,最小为1。

  • 若未指定 pagelimit 参数:返回全量数据;
  • 若仅指定 page,未指定 limit:返回全量数据;
  • 若仅指定 limit,未指定 page :返回第 1 页数据;
  • 若指定 pagelimit :返回符合条件的数据。

limit

Int32

10

分页查询时设置的每页行数。

  • 若未指定 pagelimit 参数:返回全量数据;
  • 若仅指定 page,未指定 limit:返回全量数据;
  • 若仅指定 limit,未指定 page :返回第 1 页数据;
  • 若指定 pagelimit :返回符合条件的数据。

order_by

Int32

1

查询出来的工作负载的按创建时间的排列顺序。取值范围:

  • 1:按照降序排列。
  • 2:按照升序排列。

version_no

String

1.0.0

工作负载版本号,默认取值为 latest。

返回数据

名称

类型

示例值

描述

workloads

[ ]WorkloadResp

请参见返回示例

工作负载列表。

total_count

Int64

100

工作负载总数。

请求示例

GET https://veecc.volcengineapi.com/?Action=ListWorkloads
&application_identity=veecc-3728752022535555****
&page=1
&limit=10
&order_by=1
&<公共请求参数>

返回示例

{
  "ResponseMetadata": {
    "RequestId": "2021102215554401022511001102AB****",
    "Action": "ListWorkloads",
    "Version": "2022-10-01",
    "Service": "veecc",
    "Region": "cn-north-1"
  },
  "Result": {
    "workloads": [
      {
        "identity": "res-2280220251525133****",
        "name": "wwww11****",
        "type": 1,
        "spec_name": "veECC.C1.4-8large",
        "remark": "",
        "deploy_strategy": 2,
        "rolling_size": 1,
        "max_disable_size": 1,
        "enable_nat": false, 
        "bandwidth_billing_method": "DailyPeak",
        "workload_access": {
          "access_public_network": true,
          "access_type": 1,
          "access_services": null
        },
        "create_time": 1661239676,
        "update_time": 1663728754,
        "spec_info": {
          "spec_name": "veECC.C1.4-8large",
          "cpu": "4.0",
          "mem": "8GB",
          "pps": "4000000",
          "bandwidth": "30000M"
        },
        "workload_storage_volumes": [
          {
            "identity": "res-0239259020990231****",
            "name": "aa",
            "class": 1,
            "type": 4,
            "capacity": 2000
          }
        ],
      }
    ],
    "total_count": 1
  }
}