listSupportPermits method

Future<ListSupportPermitsOutput> listSupportPermits({
  1. int? maxResults,
  2. String? nextToken,
  3. List<SupportPermitStatus>? supportPermitStatuses,
})

Lists all support permits in the caller's account. Use pagination to ensure that the operation returns quickly and successfully.

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

Parameter maxResults : The maximum number of results to return in a single call. Valid range is 1 to 100.

Parameter nextToken : The token for the next page of results.

Parameter supportPermitStatuses : Filters the results by support permit status. Valid values: ACTIVE, INACTIVE, DELETING.

Implementation

Future<ListSupportPermitsOutput> listSupportPermits({
  int? maxResults,
  String? nextToken,
  List<SupportPermitStatus>? supportPermitStatuses,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (supportPermitStatuses != null)
      'supportPermitStatuses':
          supportPermitStatuses.map((e) => e.value).toList(),
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/support-permits',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListSupportPermitsOutput.fromJson(response);
}