listCodeRepositories method
- DateTime? creationTimeAfter,
- DateTime? creationTimeBefore,
- DateTime? lastModifiedTimeAfter,
- DateTime? lastModifiedTimeBefore,
- int? maxResults,
- String? nameContains,
- String? nextToken,
- CodeRepositorySortBy? sortBy,
- CodeRepositorySortOrder? sortOrder,
Gets a list of the Git repositories in your account.
Parameter creationTimeAfter :
A filter that returns only Git repositories that were created after the
specified time.
Parameter creationTimeBefore :
A filter that returns only Git repositories that were created before the
specified time.
Parameter lastModifiedTimeAfter :
A filter that returns only Git repositories that were last modified after
the specified time.
Parameter lastModifiedTimeBefore :
A filter that returns only Git repositories that were last modified before
the specified time.
Parameter maxResults :
The maximum number of Git repositories to return in the response.
Parameter nameContains :
A string in the Git repositories name. This filter returns only
repositories whose name contains the specified string.
Parameter nextToken :
If the result of a ListCodeRepositoriesOutput request was
truncated, the response includes a NextToken. To get the next
set of Git repositories, use the token in the next request.
Parameter sortBy :
The field to sort results by. The default is Name.
Parameter sortOrder :
The sort order for results. The default is Ascending.
Implementation
Future<ListCodeRepositoriesOutput> listCodeRepositories({
  DateTime? creationTimeAfter,
  DateTime? creationTimeBefore,
  DateTime? lastModifiedTimeAfter,
  DateTime? lastModifiedTimeBefore,
  int? maxResults,
  String? nameContains,
  String? nextToken,
  CodeRepositorySortBy? sortBy,
  CodeRepositorySortOrder? 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.ListCodeRepositories'
  };
  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 ListCodeRepositoriesOutput.fromJson(jsonResponse.body);
}