• Virtual Private Cloud

vpc
  1. Help Center
  2. Virtual Private Cloud
  3. API Reference
  4. OpenStack Neutron APIs
  5. Subnet Pool
  6. Querying Subnet Pools

Querying Subnet Pools

Function

This interface is used to query subnet pools. Pagination query is supported.

URI

GET /v2.0/subnetpools

Example:

/v2.0/subnetpools?fields=id&fields=name&fields=prefixes&fields=default_prefixlen&fields=address_scope_id&fields=is_default

Request Message

None

Response Message

Table 1 Response parameter

Parameter

Type

Description

subnetpools

List(subnetpool)

Specifies the subnet pool object list. For details, see Table 1.

Example:

Example request

None

Example response

{
    "subnetpools": [
        {
            "min_prefixlen": 64,
            "address_scope_id": null,
            "default_prefixlen": 64,
            "id": "03f761e6-eee0-43fc-a921-8acf64c14988",
            "max_prefixlen": 64,
            "name": "my-subnet-pool-ipv6",
            "default_quota": null,
            "is_default": false,
            "project_id": "9fadcee8aa7c40cdb2114fff7d569c08",
            "tenant_id": "9fadcee8aa7c40cdb2114fff7d569c08",
            "prefixes": [
                "2001:db8:0:2::/64",
                "2001:db8::/63"
            ],
            "ip_version": 6,
            "shared": false,
            "description": "",
            "revision_number": 2,
            "created_at": "2018-09-20T02:15:34",
            "updated_at": "2018-09-20T02:15:34"
        },
        {
            "min_prefixlen": 24,
            "address_scope_id": null,
            "default_prefixlen": 25,
            "id": "f49a1319-423a-4ee6-ba54-1d95a4f6cc68",
            "max_prefixlen": 30,
            "name": "my-subnet-pool-ipv4",
            "default_quota": null,
            "is_default": false,
            "project_id": "9fadcee8aa7c40cdb2114fff7d569c08",
            "tenant_id": "9fadcee8aa7c40cdb2114fff7d569c08",
            "prefixes": [
                "10.10.0.0/21",
                "192.168.0.0/16"
            ],
            "ip_version": 4,
            "shared": false,
            "description": "",
            "revision_number": 2,
            "created_at": "2018-09-20T02:15:34",
            "updated_at": "2018-09-20T02:15:34"
        }
    ]
}

Status Codes

For details, see section Status Codes.