Class ResourceManager.ProjectListOption (1.19.0)

public static class ResourceManager.ProjectListOption extends Option

Class for specifying project list options.

Inheritance

Object > com.google.cloud.resourcemanager.Option > ResourceManager.ProjectListOption

Static Methods

fields(ResourceManager.ProjectField[] fields)

public static ResourceManager.ProjectListOption fields(ResourceManager.ProjectField[] fields)

Returns an option to specify the project's fields to be returned by the RPC call.

If this option is not provided all project fields are returned. ProjectListOption.fields can be used to specify only the fields of interest. Project ID is always returned, even if not specified. ProjectField provides a list of fields that can be used.

Parameter
NameDescription
fieldsProjectField[]
Returns
TypeDescription
ResourceManager.ProjectListOption

filter(String filter)

public static ResourceManager.ProjectListOption filter(String filter)

Returns an option to specify a filter.

Filter rules are case insensitive. The fields eligible for filtering are:

  • name
  • project ID
  • labels.key, where key is the name of a label

You can specify multiple filters by adding a space between each filter. Multiple filters are composed using "and".

Some examples of filters:

  • name:* The project has a name.
  • name:Howl The project's name is Howl or howl.
  • name:HOWL Equivalent to above.
  • NAME:howl Equivalent to above.
  • labels.color:* The project has the label color.
  • labels.color:red The project's label color has the value red.
  • labels.color:red label.size:big The project's label color has the value red and its label size has the value big.
Parameter
NameDescription
filterString
Returns
TypeDescription
ResourceManager.ProjectListOption

pageSize(int pageSize)

public static ResourceManager.ProjectListOption pageSize(int pageSize)

The maximum number of projects to return per RPC.

The server can return fewer projects than requested. When there are more results than the page size, the server will return a page token that can be used to fetch other results.

Parameter
NameDescription
pageSizeint
Returns
TypeDescription
ResourceManager.ProjectListOption

pageToken(String pageToken)

public static ResourceManager.ProjectListOption pageToken(String pageToken)

Returns an option to specify a page token.

The page token (returned from a previous call to list) indicates from where listing should continue.

Parameter
NameDescription
pageTokenString
Returns
TypeDescription
ResourceManager.ProjectListOption