list method
Lists services for the given project and region.
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}/services
*
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.
fieldSelector
- Not supported, and ignored by Cloud Run.
includeUninitialized
- Not supported, and ignored by Cloud Run.
labelSelector
- Allows to filter resources based on a label. Supported
operations are =, !=, exists, in, and notIn.
limit
- The maximum number of records that should be returned.
resourceVersion
- Not supported, and ignored by Cloud Run.
watch
- Not supported, and ignored by Cloud Run.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a ListServicesResponse.
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<ListServicesResponse> list(
core.String parent, {
core.String? continue_,
core.String? fieldSelector,
core.bool? includeUninitialized,
core.String? labelSelector,
core.int? limit,
core.String? resourceVersion,
core.bool? watch,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (continue_ != null) 'continue': [continue_],
if (fieldSelector != null) 'fieldSelector': [fieldSelector],
if (includeUninitialized != null)
'includeUninitialized': ['${includeUninitialized}'],
if (labelSelector != null) 'labelSelector': [labelSelector],
if (limit != null) 'limit': ['${limit}'],
if (resourceVersion != null) 'resourceVersion': [resourceVersion],
if (watch != null) 'watch': ['${watch}'],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'apis/serving.knative.dev/v1/' +
core.Uri.encodeFull('$parent') +
'/services';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListServicesResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}