Method: projects.aggregated.usableSubnetworks.list

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

string

The parent project where subnetworks are usable. Specified in the format projects/*.

Query parameters

Parameters
filter

string

Filtering currently only supports equality on the networkProjectId and must be in the form: "networkProjectId=[PROJECTID]", where networkProjectId is the project which owns the listed subnetworks. This defaults to the parent project ID.

pageSize

integer

The max number of results per page that should be returned. If the number of available results is larger than pageSize, a nextPageToken is returned which can be used to get the next page of results in subsequent requests. Acceptable values are 0 to 500, inclusive. (Default: 500)

pageToken

string

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 (UsableSubnetwork)
    }
  ],
  "nextPageToken": string
}
Fields
subnetworks[]

object (UsableSubnetwork)

A list of usable subnetworks in the specified network project.

nextPageToken

string

This token allows you to get the next page of results for list requests. If the number of results is larger than pageSize, use the nextPageToken as a value for the query parameter pageToken in the next request. The value will become empty when there are no more pages.

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 (UsableSubnetworkSecondaryRange)
    }
  ],
  "statusMessage": string
}
Fields
subnetwork

string

Subnetwork Name. Example: projects/my-project/regions/us-central1/subnetworks/my-subnet

network

string

Network Name. Example: projects/my-project/global/networks/my-network

ipCidrRange

string

The range of internal addresses that are owned by this subnetwork.

secondaryIpRanges[]

object (UsableSubnetworkSecondaryRange)

Secondary IP ranges.

statusMessage

string

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 (Status)
}
Fields
rangeName

string

The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance.

ipCidrRange

string

The range of IP addresses belonging to this subnetwork secondary range.

status

enum (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.