listOrganizationAdminAccounts method

Future<ListOrganizationAdminAccountsResponse> listOrganizationAdminAccounts({
  1. int? maxResults,
  2. String? nextToken,
})

Lists the accounts configured as GuardDuty delegated administrators.

May throw BadRequestException. May throw InternalServerErrorException.

Parameter maxResults : The maximum number of results to return in the response.

Parameter nextToken : A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the NextToken value returned from the previous request to continue listing results after the first page.

Implementation

Future<ListOrganizationAdminAccountsResponse> listOrganizationAdminAccounts({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/admin',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListOrganizationAdminAccountsResponse.fromJson(response);
}