getDataLakeSources method

Future<GetDataLakeSourcesResponse> getDataLakeSources({
  1. List<String>? accounts,
  2. int? maxResults,
  3. String? nextToken,
})

Retrieves a snapshot of the current Region, including whether Amazon Security Lake is enabled for those accounts and which sources Security Lake is collecting data from.

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

Parameter accounts : The Amazon Web Services account ID for which a static snapshot of the current Amazon Web Services Region, including enabled accounts and log sources, is retrieved.

Parameter maxResults : The maximum limit of accounts for which the static snapshot of the current Region, including enabled accounts and log sources, is retrieved.

Parameter nextToken : Lists if there are more results available. The value of nextToken is a unique pagination token for each page. Repeat the call using the returned token to retrieve the next page. Keep all other arguments unchanged.

Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.

Implementation

Future<GetDataLakeSourcesResponse> getDataLakeSources({
  List<String>? accounts,
  int? maxResults,
  String? nextToken,
}) 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,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/v1/datalake/sources',
    exceptionFnMap: _exceptionFns,
  );
  return GetDataLakeSourcesResponse.fromJson(response);
}