getDelegations method

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

Gets a list of delegations from an audit owner to a delegate.

May throw AccessDeniedException. May throw InternalServerException. May throw ValidationException.

Parameter maxResults : Represents the maximum number of results on a page or for an API request call.

Parameter nextToken : The pagination token that's used to fetch the next set of results.

Implementation

Future<GetDelegationsResponse> getDelegations({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  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: '/delegations',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetDelegationsResponse.fromJson(response);
}