list method
Lists the descriptors for supported channel types.
The use of descriptors makes it possible for new channel types to be dynamically added.
Request parameters:
name
- Required. The REST resource name of the parent from which to
retrieve the notification channel descriptors. The expected syntax is:
projects/[PROJECT_ID_OR_NUMBER] Note that this names
(https://cloud.google.com/monitoring/api/v3#project_name) the parent
container in which to look for the descriptors; to retrieve a single
descriptor by name, use the GetNotificationChannelDescriptor operation,
instead.
Value must have pattern ^projects/\[^/\]+$
.
pageSize
- The maximum number of results to return in a single response.
If not set to a positive number, a reasonable value will be chosen by the
service.
pageToken
- If non-empty, page_token must contain a value returned as
the next_page_token in a previous response to request the next set of
results.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a ListNotificationChannelDescriptorsResponse.
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<ListNotificationChannelDescriptorsResponse> list(
core.String name, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v3/' +
core.Uri.encodeFull('$name') +
'/notificationChannelDescriptors';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListNotificationChannelDescriptorsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}