Updated on 2024-09-11 GMT+08:00

Querying Resource Quotas

Function

This API is used to obtain the resource quotas of a specified enterprise project. Before calling this API:

This API will be unavailable on March 31, 2025. You are advised to switch workloads to the new API (Querying the Resource Quotas of a Specified Enterprise Project) before then.

URI

  • URI format

    GET https://{endpoint}/mysql/v3/{project_id}/quotas

  • Example

    GET https://{endpoint}/mysql/v3/619d3e78f61b4be68bc5aa0b59edcf7b/quotas

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Project ID of a tenant in a region.

    To obtain this value, see Obtaining a Project ID.

    offset

    No

    Index offset. If offset is set to N, the resource query starts from the N+1 piece of data. The value is 0 by default, indicating that the query starts from the first piece of data. The value cannot be a negative number.

    limit

    No

    Number of records to be queried. The default value is 10. The value must be a positive integer. The minimum value is 1 and the maximum value is 100.

    enterprise_project_name

    No

    Enterprise project name.

Request

None

Response

  • Parameter description
    Table 2 Parameter description

    Name

    Type

    Description

    quota_list

    Array of objects

    Quota information list.

    For details, see Table 3.

    total_count

    Integer

    Number of quota records.

    Table 3 quota_list field data structure description

    Name

    Type

    Description

    enterprise_project_id

    String

    Enterprise project ID.

    enterprise_project_name

    String

    Enterprise project name.

    instance_quota

    Integer

    Quota of the DB instance quantity.

    vcpus_quota

    Integer

    Quota of vCPUs.

    ram_quota

    Integer

    Memory quota in GB.

    availability_instance_quota

    Integer

    Remaining quota of DB instances.

    availability_vcpus_quota

    Integer

    Remaining quota of vCPUs.

    availability_ram_quota

    Integer

    Remaining memory quota.

  • Example response
    "quota_list": [
      {
        "enterprise_project_id": "0",
        "enterprise_project_name":"default",
        "instance_quota": 20,
        "vcpus_quota": 20,
        "ram_quota": 40,
        "availability_instance_quota": 1,
        "availability_vcpus_quota ": 4,
        "availability_ram_quota": 8
      },
      {
        "enterprise_project_id": "d72ebb42-9110-464c-a8e2-f9b9f349f80f",
        "enterprise_project_name":"eps_auto_test",
        "instance_quota": 0,
        "vcpus_quota": 0,
        "ram_quota": 0,
        "availability_instance_quota ": 1,
        "availability_vcpus_quota ": 4,
        "availability_ram_quota ": 8
      }
    ],
    "total_count": 2
    }

Status Code

For details, see Status Codes.

Error Code

For details, see Error Codes.