Help Center/ Virtual Private Cloud/ API Reference/ VPC APIs (V3)/ Subnet CIDR Reservations/ Querying the List of Subnet CIDR Reservations
Updated on 2025-08-19 GMT+08:00

Querying the List of Subnet CIDR Reservations

Function

This API is used to query the list of subnet CIDR reservations of a tenant.

Constraints

You can query all subnet CIDR reservations under your account. A maximum of 2,000 records can be returned for each query. If the number of records exceeds 2,000, the pagination marker will be returned.

Calling Method

For details, see Calling APIs.

URI

GET /v3/{project_id}/vpc/virsubnet-cidr-reservations

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

For details about how to obtain a project ID, see Obtaining a Project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

  • Number of records returned on each page.

  • Value range: 0 to 2000

marker

No

String

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

id

No

Array of strings

  • ID of a subnet CIDR reservation. This parameter can be used to filter subnet CIDR reservations. Multiple IDs can be specified.

virsubnet_id

No

Array of strings

  • ID of the virtual subnet that a subnet CIDR reservation belongs to. This parameter can be used to filter subnet CIDR reservations. Multiple IDs can be specified.

cidr

No

Array of strings

  • Subnet CIDR reservation. This parameter can be used to filter subnet CIDR reservations. Multiple CIDR blocks can be specified.

ip_version

No

Array of integers

  • IP version of the subnet that a subnet CIDR reservation belongs to. This parameter can be used to filter subnet CIDR reservations.

  • The value can be 4 or 6.

name

No

Array of strings

  • Name of a subnet CIDR reservation. This parameter can be used to filter subnet CIDR reservations. Multiple names can be specified.

description

No

Array of strings

  • Description of a subnet CIDR reservation. This parameter can be used to filter subnet CIDR reservations. Multiple descriptions can be specified.

enterprise_project_id

No

String

  • Enterprise project ID. This parameter is used to filter subnet CIDR reservations of an enterprise project.

  • The project ID can be 0 or a string that contains a maximum of 36 characters in UUID format with hyphens (-). 0 indicates the default enterprise project.

  • To obtain the subnet CIDR reservations associated with all enterprise projects, specify all_granted_eps.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

virsubnet_cidr_reservations

Array of VirsubnetCidrReservation objects

Response body of the subnet CIDR reservation list.

request_id

String

Request ID.

page_info

PageInfo object

Pagination information.

Table 4 VirsubnetCidrReservation

Parameter

Type

Description

id

String

  • Unique ID of a subnet CIDR reservation.

  • The value is in UUID format with hyphens (-).

virsubnet_id

String

  • ID of the virtual subnet that a subnet CIDR reservation belongs to.

  • The value is in UUID format with hyphens (-).

vpc_id

String

  • ID of the VPC that a subnet CIDR reservation belongs to.

  • The value is in UUID format with hyphens (-).

ip_version

Integer

  • IP version of a subnet CIDR reservation.

  • The value can be:

    • 4: IPv4

    • 6: IPv6

cidr

String

  • Subnet CIDR reservation.

  • The value is in CIDR block format. The minimum netmask value is the subnet netmask value plus 2, and the maximum netmask value is 32 (IPv4) or 128 (IPv6).

name

String

  • Name of a subnet CIDR reservation.

  • The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.).

description

String

  • Description of a subnet CIDR reservation.

  • The value can contain no more than 255 characters and cannot contain angle brackets (< or >).

project_id

String

  • ID of the project that a subnet CIDR reservation belongs to.

created_at

String

  • The time when a subnet CIDR reservation is created.

  • UTC time in the format of yyyy-MM-ddTHH:mm:ssZ

updated_at

String

  • The time when a subnet CIDR reservation is updated.

  • UTC time in the format of yyyy-MM-ddTHH:mm:ssZ

Table 5 PageInfo

Parameter

Type

Description

previous_marker

String

Definition:

The first record on the current page.

Range:

N/A

current_count

Integer

Definition:

Total number of resources on the current page.

Range:

N/A

next_marker

String

Definition:

The last record on the current page. The next_marker field does not exist if the page is the last one.

Range:

N/A

Example Requests

Query the list of subnet CIDR reservations.

GET https://{Endpoint}/v3/{project_id}/vpc/virsubnet-cidr-reservations

Example Responses

Status code: 200

The GET operation is successful. For more status codes, see Status Codes.

{
    "virsubnet_cidr_reservations": [
        {
            "id": "987d7959-9c48-ad49-2fdd-bf4146d6ebc4",
            "virsubnet_id": "fb0e2bd6-190f-0d1a-7728-a5f6b1d8dd19",
            "vpc_id": "cef5d621-6c20-d5df-74e8-746271fba734",
            "ip_version": 4,
            "cidr": "192.168.21.96/28",
            "name": "test",
            "description": "for test",
            "project_id": "11e8dd119c77479db890e266e68c1ecf",
            "created_at": "2024-09-09T10:20:35Z",
            "updated_at": "2024-09-09T10:20:35Z",
        },
        {
            "id": "ed4edb94-754c-7848-bb77-2d381906c535",
            "virsubnet_id": "fb0e2bd6-190f-0d1a-7728-a5f6b1d8dd19",
            "vpc_id": "cef5d621-6c20-d5df-74e8-746271fba734",
            "ip_version": 4,
            "cidr": "192.168.21.128/27",
            "name": "test2",
            "description": "for test",
            "project_id": "11e8dd119c77479db890e266e68c1ecf",
            "created_at": "2024-09-09T11:56:27Z",
            "updated_at": "2024-09-09T11:56:27Z",
        }
    ],
    "page_info": {
        "previous_marker": "987d7959-9c48-ad49-2fdd-bf4146d6ebc4",
        "current_count": 2
    },
    "request_id": "5cd6bbc22313ccb6933540d6f9302d81"
}

Status Codes

Status Code

Description

200

The GET operation is successful. For more status codes, see Status Codes.

Error Codes

See Error Codes.