list method
List Ruleset
metadata only and optionally filter the results by
Ruleset
name.
The full Source
contents of a Ruleset
may be retrieved with
GetRuleset.
Request parameters:
name
- Required. Resource name for the project. Format:
projects/{project_id}
Value must have pattern ^projects/\[^/\]+$
.
filter
- Ruleset
filter. The list method supports filters with
restrictions on Ruleset.name
. Filters on Ruleset.create_time
should
use the date
function which parses strings that conform to the RFC 3339
date/time specifications. Example: create_time > date("2017-01-01T00:00:00Z") AND name=UUID-*
pageSize
- Page size to load. Maximum of 100. Defaults to 10. Note:
page_size
is just a hint and the service may choose to load less than
page_size
due to the size of the output. To traverse all of the
releases, caller should iterate until the page_token
is empty.
pageToken
- Next page token for loading the next batch of Ruleset
instances.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a ListRulesetsResponse.
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<ListRulesetsResponse> list(
core.String name, {
core.String? filter,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final _queryParams = <core.String, core.List<core.String>>{
if (filter != null) 'filter': [filter],
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
final _url = 'v1/' + core.Uri.encodeFull('$name') + '/rulesets';
final _response = await _requester.request(
_url,
'GET',
queryParams: _queryParams,
);
return ListRulesetsResponse.fromJson(
_response as core.Map<core.String, core.dynamic>);
}