Updated on 2023-03-17 GMT+08:00

Querying EIP Pools

Function

This API is used to query EIP pools.

URI

GET /v3/{project_id}/eip/publicip-pools

Table 1 Path parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

  • Project ID.

Minimum length: 0

Maximum length: 32

Table 2 Query parameters

Parameter

Mandatory

Type

Description

marker

No

String

  • Start resource ID of pagination query. If the parameter is left blank, only resources on the first page are queried.

Minimum length: 0

Maximum length: 36

limit

No

Integer

  • Number of records returned on each page.
  • The value ranges from 0 to 2,000. The maximum value varies by region.

Minimum value: 0

Maximum value: 2000

fields

No

String

  • Field. Format: "fields=id&fields=name&..."
  • Supported fields: id, name, size, used, project_id, status, billing_info, created_at, updated_at, type, shared, is_common, description, tags, enterprise_project_id, allow_share_bandwidth_types, and public_border_group.

Minimum length: 0

Maximum length: 1024

sort_key

No

String

  • Sort. Format: "sort_key=id&sort_dir=asc"
  • Supported fields: id, name, created_at, updated_at, and public_border_group.

Minimum length: 0

Maximum length: 36

sort_dir

No

String

  • Sorting direction.
  • The value can be asc or desc

Minimum length: 0

Maximum length: 16

id

No

String

  • Filter by id.

Minimum length: 0

Maximum length: 36

name

No

String

  • Filter by name.

Minimum length: 0

Maximum length: 128

size

No

Integer

  • Filter by size.

Minimum value: 0

Maximum value: 999999

status

No

String

  • Filter by status.

Minimum length: 0

Maximum length: 36

type

No

String

  • Filter by type.

Minimum length: 0

Maximum length: 36

description

No

String

  • Filter by description.

Minimum length: 0

Maximum length: 1024

public_border_group

No

String

  • Filter by public_border_group.

Minimum length: 0

Maximum length: 64

Request Parameter

Table 3 Request header parameter

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. The token can be obtained by calling the IAM API used for obtaining a user token. The value of X-Subject-Token in the response header is the user token.

Minimum length: 0

Maximum length: 4096

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

publicip_pools

Array of PublicipPoolShowResp objects

EIP pool.

request_id

String

Request ID.

page_info

PageInfoOption object

Pagination page number information.

Table 5 PublicipPoolShowResp

Parameter

Type

Description

id

String

  • EIP pool ID.

Minimum length: 1

Maximum length: 36

name

String

  • EIP pool name.

Minimum length: 0

Maximum length: 64

status

String

  • EIP pool status.

Minimum length: 0

Maximum length: 36

type

String

  • EIP pool type.
  • The value can be:
    • spec_bgp: Dynamic
    • spec_sbgp: Static

Enumerated values:

  • spec_bgp
  • spec_sbgp

description

String

  • Supplementary information about the EIP pool.

Minimum length: 0

Maximum length: 1024

project_id

String

  • Tenant ID.

Minimum length: 1

Maximum length: 36

size

Integer

  • EIP pool size.

Minimum value: 0

Maximum value: 999999

used

Integer

  • Number of used EIPs.

Minimum value: 0

Maximum value: 999999

created_at

String

  • Time when an EIP pool is assigned.

Minimum length: 0

Maximum length: 64

updated_at

String

  • Time when an EIP pool is updated.

Minimum length: 0

Maximum length: 64

billing_info

BillingInfoDict object

Order information, which is available only for yearly/monthly resources.

public_border_group

String

  • Whether the EIP pool is in a central region or an edge site. The value can be center.

Minimum length: 0

Maximum length: 64

shared

Boolean

  • Whether the EIP pool is shared.

is_common

Boolean

  • Whether the EIP pool is a common pool.

tags

Array of TagsInfo objects

  • User tag. (The parameter is not displayed by default.)

enterprise_project_id

String

  • Enterprise project ID. The value is 0 or a string that contains a maximum of 36 characters in UUID format with hyphens (-). This is the ID of the enterprise project that you associate with the EIP when you assign the EIP.

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

Table 6 BillingInfoDict

Parameter

Type

Description

order_id

String

  • Order information.

Minimum length: 0

Maximum length: 64

product_id

String

  • Product ID.

Minimum length: 0

Maximum length: 64

Table 7 TagsInfo

Parameter

Type

Description

key

String

  • Key. The tag key of a resource must be unique.

Minimum length: 0

Maximum length: 64

value

String

  • Values.

Minimum length: 0

Maximum length: 256

Table 8 PageInfoOption

Parameter

Type

Description

previous_marker

String

Marker value of the previous page.

Minimum length: 0

Maximum length: 36

next_marker

String

Marker value of the next page.

Minimum length: 0

Maximum length: 36

current_count

Integer

Total number of data records on the current page.

Minimum value: 0

Maximum value: 99999

Example Request

None

Example Response

Status code: 200

Normal response to the GET operation

{
  "publicip_pools" : [ {
    "id" : "f588ccfa-8750-4d7c-bf5d-2ede24414706",
    "name" : "test_pool_xxx",
    "status" : "active",
    "shared" : true,
    "is_common" : false,
    "enterprise_project_id" : 0,
    "type" : "spec_bgp",
    "project_id" : "8b7e35ad379141fc9df3e178bd64f55c",
    "size" : 100,
    "used" : 20,
    "billing_info" : {
      "order_id" : "CS20081917179HW3H",
      "product_id" : "00301-335034-0--0"
    },
    "created_at" : "2020-07-17T09:25:53Z",
    "updated_at" : "2020-07-17T09:25:53Z",
    "description" : "test",
    "public_border_group" : "center",
    "allow_share_bandwidth_types" : [ "share" ]
  } ],
  "request_id" : "4a06c169-cc67-4d94-a786-2d70ef09b100",
  "page_info" : {
    "previous_marker" : "f588ccfa-8750-4d7c-bf5d-2ede24414706",
    "current_count" : 1
  }
}

Status Codes

See Status Codes.

Error Codes

See Error Codes.