# Method: projects.aggregated.usableSubnetworks.list

- [HTTP request](https://docs.cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.aggregated.usableSubnetworks/list#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.aggregated.usableSubnetworks/list#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.aggregated.usableSubnetworks/list#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.aggregated.usableSubnetworks/list#body.request_body)
- [Response body](https://docs.cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.aggregated.usableSubnetworks/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.aggregated.usableSubnetworks/list#body.ListUsableSubnetworksResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.aggregated.usableSubnetworks/list#body.aspect)
- [UsableSubnetwork](https://docs.cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.aggregated.usableSubnetworks/list#UsableSubnetwork)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.aggregated.usableSubnetworks/list#UsableSubnetwork.SCHEMA_REPRESENTATION)
- [UsableSubnetworkSecondaryRange](https://docs.cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.aggregated.usableSubnetworks/list#UsableSubnetworkSecondaryRange)
  - [JSON representation](https://docs.cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.aggregated.usableSubnetworks/list#UsableSubnetworkSecondaryRange.SCHEMA_REPRESENTATION)
- [Status](https://docs.cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.aggregated.usableSubnetworks/list#Status)
- [Try it!](https://docs.cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.aggregated.usableSubnetworks/list#try-it)

Lists subnetworks that can be used for creating clusters in a project.

### HTTP request

`GET https://container.googleapis.com/v1beta1/{parent=projects/*}/aggregated/usableSubnetworks`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. 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 (`https://docs.cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.aggregated.usableSubnetworks/list#UsableSubnetwork`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `subnetworks[]` | ``object (`https://docs.cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.aggregated.usableSubnetworks/list#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 one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `
  https://www.googleapis.com/auth/container`
- `
  https://www.googleapis.com/auth/container.read-only`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

## 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 (`https://docs.cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.aggregated.usableSubnetworks/list#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 (`https://docs.cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.aggregated.usableSubnetworks/list#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 (`https://docs.cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.aggregated.usableSubnetworks/list#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 (`https://docs.cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.aggregated.usableSubnetworks/list#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 a cluster for services. It cannot be used for other clusters. |
| `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. |