listDataLakeNamespaces method

Future<ListDataLakeNamespacesResponse> listDataLakeNamespaces({
  1. required String instanceId,
  2. int? maxResults,
  3. String? nextToken,
})

Enables you to programmatically view the list of Amazon Web Services Supply Chain data lake namespaces. Developers can view the namespaces and the corresponding information such as description for a given instance ID. Note that this API only return custom namespaces, instance pre-defined namespaces are not included.

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

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

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

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

Implementation

Future<ListDataLakeNamespacesResponse> listDataLakeNamespaces({
  required String instanceId,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    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',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListDataLakeNamespacesResponse.fromJson(response);
}