list method
Lists TagHolds under a TagValue.
Request parameters:
parent
- Required. The resource name of the parent TagValue. Must be of
the form: tagValues/{tag-value-id}
.
Value must have pattern ^tagValues/\[^/\]+$
.
filter
- Optional. Criteria used to select a subset of TagHolds parented
by the TagValue to return. This field follows the syntax defined by
aip.dev/160; the holder
and origin
fields are supported for filtering.
Currently only AND
syntax is supported. Some example queries are: *
holder = //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group
origin = 35678234
*holder = //compute.googleapis.com/compute/projects/myproject/regions/us-east-1/instanceGroupManagers/instance-group AND origin = 35678234
pageSize
- Optional. The maximum number of TagHolds to return in the
response. The server allows a maximum of 300 TagHolds to return. If
unspecified, the server will use 100 as the default.
pageToken
- Optional. A pagination token returned from a previous call
to ListTagHolds
that indicates where this listing should continue from.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a ListTagHoldsResponse
.
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<ListTagHoldsResponse> list(
core.String parent, {
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_ = 'v3/' + core.Uri.encodeFull('$parent') + '/tagHolds';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListTagHoldsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}