---
title: "获取资源配额列表"
method: GET
path: "/api/v1/k8s/cluster/{id}/namespaces/{namespaceName}/resourcequotas"
tags: ["K8s命名空间管理"]
---

# 获取资源配额列表

`GET /api/v1/k8s/cluster/{id}/namespaces/{namespaceName}/resourcequotas`

获取指定命名空间的所有资源配额

## Path parameters

- `id` integer, required
- `namespaceName` string, required

## Response `200`

获取成功

- object
  - `code` integer — 状态码
  - `data` object — 返回的数据
    - `resourceQuotas` ModelResourceQuotaDetail[]
      - `cpuQuota` ModelQuotaInfo
        - `hard` string — 限制值
        - `used` string — 已使用值
      - `createdAt` string — 创建时间
      - `hard` object — 硬限制
      - `memoryQuota` ModelQuotaInfo
        - `hard` string — 限制值
        - `used` string — 已使用值
      - `name` string — ResourceQuota名称
      - `storageQuota` ModelQuotaInfo
        - `hard` string — 限制值
        - `used` string — 已使用值
      - `used` object — 已使用
    - `total` integer
  - `message` string — 提示信息

## Other responses

- `400` — 参数错误
- `404` — 命名空间不存在
- `500` — 服务器错误

---

[API](https://skmtc.dev/opsre/apis/devops.md) · [All operations](https://skmtc.dev/opsre/apis/devops/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/opsre/devops/revisions/25cac8835c4c/schema)
