list method
Lists worker pools for the given project and region.
Results are sorted by creation time, descending.
Request parameters:
parent
- Required. The parent from where the resources should be listed.
In Cloud Run, it may be one of the following: * {project_id_or_number}
*
namespaces/{project_id_or_number}
*
namespaces/{project_id_or_number}/workerpools
*
projects/{project_id_or_number}/locations/{region}
*
projects/{project_id_or_number}/regions/{region}
Value must have pattern ^namespaces/\[^/\]+$
.
continue_
- Encoded string to continue paging.
labelSelector
- =, !=, exists, in, and notIn.
limit
- The maximum number of records that should be returned.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a ListWorkerPoolsResponse.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<ListWorkerPoolsResponse> list(
core.String parent, {
core.String? continue_,
core.String? labelSelector,
core.int? limit,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (continue_ != null) 'continue': [continue_],
if (labelSelector != null) 'labelSelector': [labelSelector],
if (limit != null) 'limit': ['${limit}'],
if ($fields != null) 'fields': [$fields],
};
final url_ =
'apis/run.googleapis.com/v1/' +
core.Uri.encodeFull('$parent') +
'/workerpools';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListWorkerPoolsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}