# Method: projects.regions.clusters.list

- [HTTP request](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.clusters/list#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.clusters/list#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.clusters/list#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.clusters/list#body.request_body)
- [Response body](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.clusters/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.clusters/list#body.ListClustersResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.clusters/list#body.aspect)
- [Try it!](https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.clusters/list#try-it)

Lists all regions/{region}/clusters in a project alphabetically.

### HTTP request

`GET https://dataproc.googleapis.com/v1/projects/{projectId}/regions/{region}/clusters`

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

### Path parameters

| Parameters ||
|---|---|
| `projectId` | `string` Required. The ID of the Google Cloud Platform project that the cluster belongs to. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `projectId`: - `dataproc.clusters.list` |
| `region` | `string` Required. The region in which to handle the request. |

### Query parameters

| Parameters ||
|---|---|
| `filter` | `string` Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax: field = value \[AND \[field = value\]\] ... where **field** is one of `status.state`, `clusterName`, or `labels.[KEY]`, and `[KEY]` is a label key. **value** can be `"*"` to match all values. `status.state` can be one of the following: `ACTIVE`, `INACTIVE`, `CREATING`, `RUNNING`, `ERROR`, `DELETING`, `UPDATING`, `STOPPING`, or `STOPPED`. `ACTIVE` contains the `CREATING`, `UPDATING`, and `RUNNING` states. `INACTIVE` contains the `DELETING`, `ERROR`, `STOPPING`, and `STOPPED` states. `clusterName` is the name of the cluster provided at creation time. Only the logical `AND` operator is supported; space-separated items are treated as having an implicit `AND` operator. Example filter: status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = \* |
| `pageSize` | `integer` Optional. The maximum number of clusters to return in each response. The service may return fewer than this value. If unspecified, the default value is 200. The maximum value is 1000. |
| `pageToken` | `string` Optional. A page token received from a previous `clusters.list` call. Provide this token to retrieve the subsequent page. |

### Request body

The request body must be empty.

### Response body

The list of all clusters in a project.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "clusters": [ { object (`https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.clusters#Cluster`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `clusters[]` | ``object (`https://docs.cloud.google.com/managed-spark/docs/reference/rest/v1/projects.regions.clusters#Cluster`)`` Output only. The clusters in the project. |
| `nextPageToken` | `string` Output only. This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the `pageToken` in a subsequent `ListClustersRequest`. |

### Authorization scopes

Requires one of the following OAuth scopes:

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

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