listNotebookInstanceLifecycleConfigs method

Future<ListNotebookInstanceLifecycleConfigsOutput> listNotebookInstanceLifecycleConfigs({
  1. DateTime? creationTimeAfter,
  2. DateTime? creationTimeBefore,
  3. DateTime? lastModifiedTimeAfter,
  4. DateTime? lastModifiedTimeBefore,
  5. int? maxResults,
  6. String? nameContains,
  7. String? nextToken,
  8. NotebookInstanceLifecycleConfigSortKey? sortBy,
  9. NotebookInstanceLifecycleConfigSortOrder? sortOrder,
})

Lists notebook instance lifestyle configurations created with the CreateNotebookInstanceLifecycleConfig API.

Parameter creationTimeAfter : A filter that returns only lifecycle configurations that were created after the specified time (timestamp).

Parameter creationTimeBefore : A filter that returns only lifecycle configurations that were created before the specified time (timestamp).

Parameter lastModifiedTimeAfter : A filter that returns only lifecycle configurations that were modified after the specified time (timestamp).

Parameter lastModifiedTimeBefore : A filter that returns only lifecycle configurations that were modified before the specified time (timestamp).

Parameter maxResults : The maximum number of lifecycle configurations to return in the response.

Parameter nameContains : A string in the lifecycle configuration name. This filter returns only lifecycle configurations whose name contains the specified string.

Parameter nextToken : If the result of a ListNotebookInstanceLifecycleConfigs request was truncated, the response includes a NextToken. To get the next set of lifecycle configurations, use the token in the next request.

Parameter sortBy : Sorts the list of results. The default is CreationTime.

Parameter sortOrder : The sort order for results.

Implementation

Future<ListNotebookInstanceLifecycleConfigsOutput>
    listNotebookInstanceLifecycleConfigs({
  DateTime? creationTimeAfter,
  DateTime? creationTimeBefore,
  DateTime? lastModifiedTimeAfter,
  DateTime? lastModifiedTimeBefore,
  int? maxResults,
  String? nameContains,
  String? nextToken,
  NotebookInstanceLifecycleConfigSortKey? sortBy,
  NotebookInstanceLifecycleConfigSortOrder? sortOrder,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  _s.validateStringLength(
    'nameContains',
    nameContains,
    0,
    63,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    0,
    8192,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.ListNotebookInstanceLifecycleConfigs'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (creationTimeAfter != null)
        'CreationTimeAfter': unixTimestampToJson(creationTimeAfter),
      if (creationTimeBefore != null)
        'CreationTimeBefore': unixTimestampToJson(creationTimeBefore),
      if (lastModifiedTimeAfter != null)
        'LastModifiedTimeAfter': unixTimestampToJson(lastModifiedTimeAfter),
      if (lastModifiedTimeBefore != null)
        'LastModifiedTimeBefore': unixTimestampToJson(lastModifiedTimeBefore),
      if (maxResults != null) 'MaxResults': maxResults,
      if (nameContains != null) 'NameContains': nameContains,
      if (nextToken != null) 'NextToken': nextToken,
      if (sortBy != null) 'SortBy': sortBy.toValue(),
      if (sortOrder != null) 'SortOrder': sortOrder.toValue(),
    },
  );

  return ListNotebookInstanceLifecycleConfigsOutput.fromJson(
      jsonResponse.body);
}