list method

Future<ListTagKeysResponse> list({
  1. int? pageSize,
  2. String? pageToken,
  3. String? parent,
  4. String? $fields,
})

Lists all TagKeys for a parent resource.

Request parameters:

pageSize - Optional. The maximum number of TagKeys to return in the response. The server allows a maximum of 300 TagKeys to return. If unspecified, the server will use 100 as the default.

pageToken - Optional. A pagination token returned from a previous call to ListTagKey that indicates where this listing should continue from.

parent - Required. The resource name of the TagKey's parent. Must be of the form organizations/{org_id} or projects/{project_id} or projects/{project_number}

$fields - Selector specifying which fields to include in a partial response.

Completes with a ListTagKeysResponse.

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<ListTagKeysResponse> list({
  core.int? pageSize,
  core.String? pageToken,
  core.String? parent,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (parent != null) 'parent': [parent],
    if ($fields != null) 'fields': [$fields],
  };

  const url_ = 'v3/tagKeys';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return ListTagKeysResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}