:original_name: ListCommonPools.html
.. _ListCommonPools:
Querying Common Pools
=====================
Function
--------
This API is used to query common pools. (This API is not supported in **eu-nl**.)
URI
---
GET /v3/{project_id}/eip/publicip-pools/common-pools
.. table:: **Table 1** Path parameter
+-----------------+-----------------+-----------------+------------------------+
| Parameter | Mandatory | Type | Description |
+=================+=================+=================+========================+
| project_id | Yes | String | - Project ID. |
| | | | |
| | | | Minimum length: **0** |
| | | | |
| | | | Maximum length: **32** |
+-----------------+-----------------+-----------------+------------------------+
.. table:: **Table 2** Query parameters
+---------------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------+
| Parameter | Mandatory | Type | Description |
+=====================+=================+=================+======================================================================================================================================+
| fields | No | String | - Field. Format: "fields=id&fields=name&.." |
| | | | - Supported fields: **id**, **name**, **status**, **type**, **used**, **allow_share_bandwidth_types**, and **public_border_group**. |
| | | | |
| | | | Minimum length: **0** |
| | | | |
| | | | Maximum length: **1024** |
+---------------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------+
| name | No | String | - Common pool name. |
| | | | |
| | | | Minimum length: **0** |
| | | | |
| | | | Maximum length: **36** |
+---------------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------+
| public_border_group | No | String | - Whether the common pool is in a central region or an edge site. |
| | | | |
| | | | Minimum length: **0** |
| | | | |
| | | | Maximum length: **64** |
+---------------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------+
Request Parameter
-----------------
None
Response Parameters
-------------------
**Status code: 200**
.. table:: **Table 3** Response body parameters
+--------------+---------------------------------------------------------------------------------------------------------------------------------------------+--------------+
| Parameter | Type | Description |
+==============+=============================================================================================================================================+==============+
| common_pools | Array of :ref:`CommonPoolDict ` objects | Common pool. |
+--------------+---------------------------------------------------------------------------------------------------------------------------------------------+--------------+
| request_id | String | Request ID. |
+--------------+---------------------------------------------------------------------------------------------------------------------------------------------+--------------+
.. _listcommonpools__en-us_topic_0000001543023733_en-us_topic_0000001455540341_response_commonpooldict:
.. table:: **Table 4** CommonPoolDict
+-----------------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| Parameter | Type | Description |
+=============================+=======================+=================================================================================================================================================+
| name | String | - Common pool name. |
| | | |
| | | Minimum length: **0** |
| | | |
| | | Maximum length: **36** |
+-----------------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| status | String | - Common pool status |
| | | |
| | | Minimum length: **0** |
| | | |
| | | Maximum length: **36** |
+-----------------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| type | String | - Common pool type, such as **bgp**. |
| | | |
| | | Minimum length: **0** |
| | | |
| | | Maximum length: **36** |
+-----------------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| used | Integer | - Number of used EIPs. |
| | | |
| | | Minimum value: **0** |
| | | |
| | | Maximum value: **99999** |
+-----------------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| public_border_group | String | - Whether the resource is in a central region or an edge site. |
| | | - The value can be **center** or an edge site name. |
| | | - This resource can only be associated with an EIP of the same region. |
| | | |
| | | Minimum length: **1** |
| | | |
| | | Maximum length: **64** |
+-----------------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| id | String | - Common pool ID. The parameter is not displayed by default. |
| | | |
| | | Minimum length: **0** |
| | | |
| | | Maximum length: **36** |
+-----------------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| allow_share_bandwidth_types | Array of strings | - Types of the shared bandwidth that an EIP can be added to. If this parameter is left blank, the EIP cannot be added to any shared bandwidth. |
| | | - The EIP can be added only to the shared bandwidth of these types. |
| | | |
| | | Maximum length: **64** |
+-----------------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
Example Request
---------------
None
Example Response
----------------
**Status code: 200**
Normal response to the GET operation
.. code-block::
{
"common_pools" : [ {
"name" : "5_bgp",
"status" : "active",
"type" : "bgp",
"used" : 99,
"public_border_group" : "center",
"allow_share_bandwidth_types" : [ "share" ]
} ],
"request_id" : "4a06c169-cc67-4d94-a786-2d70ef09b100"
}
Status Codes
------------
See :ref:`Status Codes `.
Error Codes
-----------
See :ref:`Error Codes `.