- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- UsableSubnetwork
- UsableSubnetworkSecondaryRange
- Status
- Try it!
Lists subnetworks that are usable for creating clusters in a project.
HTTP request
GET https://container.googleapis.com/v1/{parent=projects/*}/aggregated/usableSubnetworks
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
parent |
The parent project where subnetworks are usable. Specified in the format |
Query parameters
Parameters | |
---|---|
filter |
Filtering currently only supports equality on the networkProjectId and must be in the form: "networkProjectId=[PROJECTID]", where |
page |
The max number of results per page that should be returned. If the number of available results is larger than |
page |
Specifies a page token to use. Set this to the nextPageToken returned by previous list requests to get the next page of results. |
Request body
The request body must be empty.
Response body
ListUsableSubnetworksResponse is the response of ListUsableSubnetworksRequest.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"subnetworks": [
{
object ( |
Fields | |
---|---|
subnetworks[] |
A list of usable subnetworks in the specified network project. |
next |
This token allows you to get the next page of results for list requests. If the number of results is larger than |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
UsableSubnetwork
UsableSubnetwork resource returns the subnetwork name, its associated network and the primary CIDR range.
JSON representation |
---|
{
"subnetwork": string,
"network": string,
"ipCidrRange": string,
"secondaryIpRanges": [
{
object ( |
Fields | |
---|---|
subnetwork |
Subnetwork Name. Example: projects/my-project/regions/us-central1/subnetworks/my-subnet |
network |
Network Name. Example: projects/my-project/global/networks/my-network |
ip |
The range of internal addresses that are owned by this subnetwork. |
secondary |
Secondary IP ranges. |
status |
A human readable status message representing the reasons for cases where the caller cannot use the secondary ranges under the subnet. For example if the secondaryIpRanges is empty due to a permission issue, an insufficient permission message will be given by statusMessage. |
UsableSubnetworkSecondaryRange
Secondary IP range of a usable subnetwork.
JSON representation |
---|
{
"rangeName": string,
"ipCidrRange": string,
"status": enum ( |
Fields | |
---|---|
range |
The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. |
ip |
The range of IP addresses belonging to this subnetwork secondary range. |
status |
This field is to determine the status of the secondary range programmably. |
Status
Status shows the current usage of a secondary IP range.
Enums | |
---|---|
UNKNOWN |
UNKNOWN is the zero value of the Status enum. It's not a valid status. |
UNUSED |
UNUSED denotes that this range is unclaimed by any cluster. |
IN_USE_SERVICE |
IN_USE_SERVICE denotes that this range is claimed by cluster(s) for services. User-managed services range can be shared between clusters within the same subnetwork. |
IN_USE_SHAREABLE_POD |
IN_USE_SHAREABLE_POD denotes this range was created by the network admin and is currently claimed by a cluster for pods. It can only be used by other clusters as a pod range. |
IN_USE_MANAGED_POD |
IN_USE_MANAGED_POD denotes this range was created by GKE and is claimed for pods. It cannot be used for other clusters. |