listNotebooks method
Lists notebooks in Amazon SageMaker Unified Studio.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter domainIdentifier :
The identifier of the Amazon SageMaker Unified Studio domain in which to
list notebooks.
Parameter owningProjectIdentifier :
The identifier of the project that owns the notebooks.
Parameter maxResults :
The maximum number of notebooks to return in a single call. When the
number of notebooks exceeds the value of MaxResults, the
response contains a NextToken value.
Parameter nextToken :
When the number of notebooks is greater than the default value for the
MaxResults parameter, or if you explicitly specify a value
for MaxResults that is less than the number of notebooks, the
response includes a pagination token named NextToken. You can
specify this NextToken value in a subsequent call to
ListNotebooks to list the next set of notebooks.
Parameter sortBy :
The field to sort the results by.
Parameter sortOrder :
The sort order for the results.
Parameter status :
The status to filter notebooks by.
Implementation
Future<ListNotebooksOutput> listNotebooks({
required String domainIdentifier,
required String owningProjectIdentifier,
int? maxResults,
String? nextToken,
SortKey? sortBy,
SortOrder? sortOrder,
NotebookStatus? status,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
50,
);
final $query = <String, List<String>>{
'owningProjectIdentifier': [owningProjectIdentifier],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (sortBy != null) 'sortBy': [sortBy.value],
if (sortOrder != null) 'sortOrder': [sortOrder.value],
if (status != null) 'status': [status.value],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/v2/domains/${Uri.encodeComponent(domainIdentifier)}/notebooks',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListNotebooksOutput.fromJson(response);
}