listLogSources method

Future<ListLogSourcesResponse> listLogSources({
  1. List<String>? accounts,
  2. int? maxResults,
  3. String? nextToken,
  4. List<String>? regions,
  5. List<LogSourceResource>? sources,
})

Retrieves the log sources.

May throw AccessDeniedException. May throw BadRequestException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter accounts : The list of Amazon Web Services accounts for which log sources are displayed.

Parameter maxResults : The maximum number of accounts for which the log sources are displayed.

Parameter nextToken : If nextToken is returned, there are more results available. You can repeat the call using the returned token to retrieve the next page.

Parameter regions : The list of Regions for which log sources are displayed.

Parameter sources : The list of sources for which log sources are displayed.

Implementation

Future<ListLogSourcesResponse> listLogSources({
  List<String>? accounts,
  int? maxResults,
  String? nextToken,
  List<String>? regions,
  List<LogSourceResource>? sources,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $payload = <String, dynamic>{
    if (accounts != null) 'accounts': accounts,
    if (maxResults != null) 'maxResults': maxResults,
    if (nextToken != null) 'nextToken': nextToken,
    if (regions != null) 'regions': regions,
    if (sources != null) 'sources': sources,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/v1/datalake/logsources/list',
    exceptionFnMap: _exceptionFns,
  );
  return ListLogSourcesResponse.fromJson(response);
}