Updated on 2024-05-22 GMT+08:00

Querying All Elastic Resource Pools

Function

This API is used to query all elastic resource pools.

URI

  • URI format

    GET /v3/{project_id}/elastic-resource-pools

  • Parameter description
    Table 1 URI parameter

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID, which is used for resource isolation. For details about how to obtain its value, see Obtaining a Project ID.

    Table 2 query parameters

    Parameter

    Mandatory

    Type

    Description

    limit

    No

    Integer

    Page size. The default value is 100.

    name

    No

    String

    Fuzzy match based on the elastic resource pool name.

    offset

    No

    Integer

    Offset. The default value is 0.

    status

    No

    String

    Status of the elastic resource pool. Possible values are as follows:

    • AVAILABLE
    • SCALING
    • CREATING
    • FAILED

    tags

    No

    String

    Query results are filtered by tag.

Request

None

Response

Table 3 Response parameters

Parameter

Mandatory

Type

Description

is_success

No

Boolean

Whether the request is successfully executed. Value true indicates that the request is successfully executed.

message

No

String

System prompt. If execution succeeds, the message may be left blank.

count

No

Long

Total number of records.

elastic_resource_pools

No

Array of objects

Elastic resource pool information. For details, see Table 4.

Table 4 elastic_resource_pools parameters

Parameter

Mandatory

Type

Description

owner

No

String

Account used to create an elastic resource pool.

elastic_resource_pool_name

No

String

Elastic resource pool name.

description

No

String

Elastic resource pool description information.

max_cu

No

Integer

Maximum number of CUs.

min_cu

No

Integer

Minimum number of CUs.

actual_cu

No

Integer

Actual number of CUs.

cidr_in_vpc

No

String

Subnet information of the elastic resource pool.

create_time

No

Long

Time when the elastic resource pool is created.

update_time

No

Long

Time when the elastic resource pool is updated.

current_cu

No

Integer

Number of current CUs.

status

No

String

Status of the elastic resource pool. Possible values are as follows:

  • AVAILABLE
  • SCALING
  • CREATING
  • FAILED

resource_id

No

String

Resource ID of the elastic resource pool.

fail_reason

No

String

Cause of the elastic resource pool creation failure.

enterprise_project_id

No

String

Enterprise project ID.

prepay_cu

No

Integer

Number of prepaid CUs.

charging_mode

No

Integer

Billing mode.

queues

No

Array of Strings

Information about the queue the elastic resource pool belongs to.

manager

No

String

Type of the elastic resource pool.

label

No

Map<string, string>

Label used to identify the elastic resource pool. Currently, only the developer label is supported. The value is "label": {"billing_spec_code":"developer"}.

id

No

Long

ID of the elastic resource pool

Example Request

None

Example Response

{
  "is_success": true,
  "message": "",
  "count": 2,
  "elastic_resource_pools": [
    {
      "owner": "ei_dlics_d00352221",
      "id": 1026,
      "elastic_resource_pool_name": "elastic_pool_0622_10",
      "description": "",
      "max_cu": 0,
      "min_cu": 0,
      "actual_cu": 0,
      "cidr_in_vpc": "172.16.0.0/12",
      "create_time": 1624366266826,
      "current_cu": 64,
      "status": "AVAILABLE",
      "resource_id": "ecc98d89-3fd1-4dec-b572-aa6e2ef82391",
      "fail_reason": "",
      "enterprise_project_id": "0",
      "prepay_cu": 0,
      "charging_mode": 1
    },
    {
      "owner": "ei_dlics_d00352221",
      "id": 1002,
      "elastic_resource_pool_name": "elastic_pool_0622_0",
      "description": "test",
      "max_cu": 684,
      "min_cu": 0,
      "actual_cu": 0,
      "cidr_in_vpc": "172.16.0.0/12",
      "create_time": 1624353878084,
      "status": "AVAILABLE",
      "resource_id": "ecc98d89-3fd1-4dec-b572-aa6e2ef82391",
      "fail_reason": "",
      "enterprise_project_id": "0",
      "prepay_cu": 0,
      "charging_mode": 1
    }
  ]
}

Status Codes

Status Code

Description

200

OK

Error Codes

If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see Error Codes.