Method: projects.locations.memberships.list

Lists Memberships in a given project and location.

HTTP request

GET https://gkehub.googleapis.com/v1/{parent=projects/*/locations/*}/memberships

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The parent (project and location) where the Memberships will be listed. Specified in the format projects/*/locations/*. projects/*/locations/- list memberships in all the regions.

Authorization requires the following IAM permission on the specified resource parent:

  • gkehub.memberships.list

Query parameters

Parameters
pageSize

integer

Optional. When requesting a 'page' of resources, pageSize specifies number of resources to return. If unspecified or set to 0, all resources will be returned.

pageToken

string

Optional. Token returned by previous call to memberships.list which specifies the position in the list from where to continue listing the resources.

filter

string

Optional. Lists Memberships that match the filter expression, following the syntax outlined in https://google.aip.dev/160.

Examples:

  • Name is bar in project foo-proj and location global:
  name = "projects/foo-proj/locations/global/membership/bar"
  • Memberships that have a label called foo:
  labels.foo:*
  • Memberships that have a label called foo whose value is bar:
  labels.foo = bar
  • Memberships in the CREATING state:
  state = CREATING
orderBy

string

Optional. One or more fields to compare and use to sort the output. See https://google.aip.dev/132#ordering.

Request body

The request body must be empty.

Response body

Response message for the GkeHub.ListMemberships method.

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

JSON representation
{
  "resources": [
    {
      object (Membership)
    }
  ],
  "nextPageToken": string,
  "unreachable": [
    string
  ]
}
Fields
resources[]

object (Membership)

The list of matching Memberships.

nextPageToken

string

A token to request the next page of resources from the memberships.list method. The value of an empty string means that there are no more resources to return.

unreachable[]

string

List of locations that could not be reached while fetching this list.

Authorization scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.