listAppInstanceAdmins method

Future<ListAppInstanceAdminsResponse> listAppInstanceAdmins({
  1. required String appInstanceArn,
  2. int? maxResults,
  3. String? nextToken,
})

Returns a list of the administrators in the app instance.

May throw BadRequestException. May throw ForbiddenException. May throw ResourceLimitExceededException. May throw ThrottledClientException. May throw UnauthorizedClientException. May throw ServiceUnavailableException. May throw ServiceFailureException.

Parameter appInstanceArn : The ARN of the app instance.

Parameter maxResults : The maximum number of administrators that you want to return.

Parameter nextToken : The token returned from previous API requests until the number of administrators is reached.

Implementation

Future<ListAppInstanceAdminsResponse> listAppInstanceAdmins({
  required String appInstanceArn,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(appInstanceArn, 'appInstanceArn');
  _s.validateStringLength(
    'appInstanceArn',
    appInstanceArn,
    5,
    1600,
    isRequired: true,
  );
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    0,
    2048,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'max-results': [maxResults.toString()],
    if (nextToken != null) 'next-token': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/app-instances/${Uri.encodeComponent(appInstanceArn)}/admins',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListAppInstanceAdminsResponse.fromJson(response);
}