list method

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

Lists all access policies in an organization.

Request parameters:

pageSize - Number of AccessPolicy instances to include in the list. Default 100.

pageToken - Next page token for the next batch of AccessPolicy instances. Defaults to the first page of results.

parent - Required. Resource name for the container to list AccessPolicy instances from. Format: organizations/{org_id}

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

Completes with a ListAccessPoliciesResponse.

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<ListAccessPoliciesResponse> 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_ = 'v1/accessPolicies';

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