list method

Future<BackendServiceList> list (
  1. String project,
  2. String region,
  3. {String filter,
  4. int maxResults,
  5. String orderBy,
  6. String pageToken,
  7. String $fields}

Retrieves the list of regional BackendService resources available to the specified project in the given region.

Request parameters:

project - Project ID for this request. Value must have pattern "(?:(?:-a-z0-9{1,63}.)*(?:a-z?):)?(?:0-9{1,19}|(?:a-z0-9?))".

region - Name of the region scoping this request. Value must have pattern "a-z?".

filter - A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.

For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.

You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.

To filter on multiple expressions, provide each separate expression within parentheses. For example: (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)

[maxResults] - The maximum number of results per page that should be
returned. If the number of available results is larger than `maxResults`,
Compute Engine returns a `nextPageToken` that can be used to get the next
page of results in subsequent list requests. Acceptable values are `0` to
`500`, inclusive. (Default: `500`)

[orderBy] - Sorts list results by a certain order. By default, results are
returned in alphanumerical order based on the resource name.

You can also sort results in descending order based on the creation
timestamp using `orderBy="creationTimestamp desc"`. This sorts results
based on the `creationTimestamp` field in reverse chronological order
(newest result first). Use this to sort resources like operations so that
the newest operation is returned first.

Currently, only sorting by `name` or `creationTimestamp desc` is

[pageToken] - Specifies a page token to use. Set `pageToken` to the
`nextPageToken` returned by a previous list request to get the next page
of results.

[$fields] - Selector specifying which fields to include in a partial

Completes with a [BackendServiceList].

Completes with a [commons.ApiRequestError] if the API endpoint returned an

If the used [http.Client] completes with an error when making a REST call,
this method will complete with the same error.


async.Future<BackendServiceList> list(core.String project, core.String region,
    {core.String filter, maxResults,
    core.String orderBy,
    core.String pageToken,
    core.String $fields}) {
  var _url;
  var _queryParams = new core.Map<core.String, core.List<core.String>>();
  var _uploadMedia;
  var _uploadOptions;
  var _downloadOptions = commons.DownloadOptions.Metadata;
  var _body;

  if (project == null) {
    throw new core.ArgumentError("Parameter project is required.");
  if (region == null) {
    throw new core.ArgumentError("Parameter region is required.");
  if (filter != null) {
    _queryParams["filter"] = [filter];
  if (maxResults != null) {
    _queryParams["maxResults"] = ["${maxResults}"];
  if (orderBy != null) {
    _queryParams["orderBy"] = [orderBy];
  if (pageToken != null) {
    _queryParams["pageToken"] = [pageToken];
  if ($fields != null) {
    _queryParams["fields"] = [$fields];

  _url = commons.Escaper.ecapeVariable('$project') +
      '/regions/' +
      commons.Escaper.ecapeVariable('$region') +

  var _response = _requester.request(_url, "GET",
      body: _body,
      queryParams: _queryParams,
      uploadOptions: _uploadOptions,
      uploadMedia: _uploadMedia,
      downloadOptions: _downloadOptions);
  return _response.then((data) => new BackendServiceList.fromJson(data));