listInputSources method

Future<ListInputSourcesResponse> listInputSources({
  1. required String serviceArn,
  2. int? maxResults,
  3. String? nextToken,
  4. InputSourceType? type,
})

Lists input sources for a service.

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

Parameter type : Filter input sources by type.

Implementation

Future<ListInputSourcesResponse> listInputSources({
  required String serviceArn,
  int? maxResults,
  String? nextToken,
  InputSourceType? type,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    'serviceArn': [serviceArn],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (type != null) 'type': [type.value],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/v2/list-input-sources',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListInputSourcesResponse.fromJson(response);
}