list method
Lists the monitored resources that are members of a group.
Request parameters:
name
- Required. The group whose members are listed. The format is:
projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]
Value must have pattern ^projects/\[^/\]+/groups/\[^/\]+$
.
filter
- An optional list filter
(https://cloud.google.com/monitoring/api/learn_more#filtering) describing
the members to be returned. The filter may reference the type, labels, and
metadata of monitored resources that comprise the group. For example, to
return only resources representing Compute Engine VM instances, use this
filter: resource.type = "gce_instance"
interval_endTime
- Required. The end of the time interval.
interval_startTime
- Optional. The beginning of the time interval. The
default value for the start time is the end time. The start time must not
be later than the end time.
pageSize
- A positive number that is the maximum number of results to
return.
pageToken
- If this field is not empty then it must contain the
next_page_token value returned by a previous call to this method. Using
this field causes the method to return additional results from the
previous method call.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a ListGroupMembersResponse.
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<ListGroupMembersResponse> list(
core.String name, {
core.String? filter,
core.String? interval_endTime,
core.String? interval_startTime,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (filter != null) 'filter': [filter],
if (interval_endTime != null) 'interval.endTime': [interval_endTime],
if (interval_startTime != null)
'interval.startTime': [interval_startTime],
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v3/' + core.Uri.encodeFull('$name') + '/members';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListGroupMembersResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}