listDataLakeDatasets method

Future<ListDataLakeDatasetsResponse> listDataLakeDatasets({
  1. required String instanceId,
  2. required String namespace,
  3. int? maxResults,
  4. String? nextToken,
})

Enables you to programmatically view the list of Amazon Web Services Supply Chain data lake datasets. Developers can view the datasets and the corresponding information such as namespace, schema, and so on for a given instance ID and namespace.

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

Parameter instanceId : The Amazon Web Services Supply Chain instance identifier.

Parameter namespace : The namespace of the dataset, besides the custom defined namespace, every instance comes with below pre-defined namespaces:

Parameter maxResults : The max number of datasets to fetch in this paginated request.

Parameter nextToken : The pagination token to fetch next page of datasets.

Implementation

Future<ListDataLakeDatasetsResponse> listDataLakeDatasets({
  required String instanceId,
  required String namespace,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    0,
    20,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/api/datalake/instance/${Uri.encodeComponent(instanceId)}/namespaces/${Uri.encodeComponent(namespace)}/datasets',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListDataLakeDatasetsResponse.fromJson(response);
}