Method: projects.regions.clusters.list

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

HTTP request

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

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
projectId

string

Required. The ID of the Google Cloud Platform project that the cluster belongs to.

Authorization requires the following Google IAM permission on the specified resource projectId:

  • dataproc.clusters.list

region

string

Required. The Cloud Dataproc 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, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING and ERROR 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

number

Optional. The standard List page size.

pageToken

string

Optional. The standard List page token.

Request body

The request body must be empty.

Response body

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

The list of all clusters in a project.

JSON representation
{
  "clusters": [
    {
      object(Cluster)
    }
  ],
  "nextPageToken": string
}
Fields
clusters[]

object(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 the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

Try it!

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Dataproc