list_code_repositories

SageMaker.Client.list_code_repositories(**kwargs)

Gets a list of the Git repositories in your account.

See also: AWS API Documentation

Request Syntax

response = client.list_code_repositories(
    CreationTimeAfter=datetime(2015, 1, 1),
    CreationTimeBefore=datetime(2015, 1, 1),
    LastModifiedTimeAfter=datetime(2015, 1, 1),
    LastModifiedTimeBefore=datetime(2015, 1, 1),
    MaxResults=123,
    NameContains='string',
    NextToken='string',
    SortBy='Name'|'CreationTime'|'LastModifiedTime',
    SortOrder='Ascending'|'Descending'
)
Parameters
  • CreationTimeAfter (datetime) -- A filter that returns only Git repositories that were created after the specified time.
  • CreationTimeBefore (datetime) -- A filter that returns only Git repositories that were created before the specified time.
  • LastModifiedTimeAfter (datetime) -- A filter that returns only Git repositories that were last modified after the specified time.
  • LastModifiedTimeBefore (datetime) -- A filter that returns only Git repositories that were last modified before the specified time.
  • MaxResults (integer) -- The maximum number of Git repositories to return in the response.
  • NameContains (string) -- A string in the Git repositories name. This filter returns only repositories whose name contains the specified string.
  • NextToken (string) -- 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.
  • SortBy (string) -- The field to sort results by. The default is Name .
  • SortOrder (string) -- The sort order for results. The default is Ascending .
Return type

dict

Returns

Response Syntax

{
    'CodeRepositorySummaryList': [
        {
            'CodeRepositoryName': 'string',
            'CodeRepositoryArn': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'LastModifiedTime': datetime(2015, 1, 1),
            'GitConfig': {
                'RepositoryUrl': 'string',
                'Branch': 'string',
                'SecretArn': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • CodeRepositorySummaryList (list) --

      Gets a list of summaries of the Git repositories. Each summary specifies the following values for the repository:

      • Name
      • Amazon Resource Name (ARN)
      • Creation time
      • Last modified time
      • Configuration information, including the URL location of the repository and the ARN of the Amazon Web Services Secrets Manager secret that contains the credentials used to access the repository.
      • (dict) --

        Specifies summary information about a Git repository.

        • CodeRepositoryName (string) --

          The name of the Git repository.

        • CodeRepositoryArn (string) --

          The Amazon Resource Name (ARN) of the Git repository.

        • CreationTime (datetime) --

          The date and time that the Git repository was created.

        • LastModifiedTime (datetime) --

          The date and time that the Git repository was last modified.

        • GitConfig (dict) --

          Configuration details for the Git repository, including the URL where it is located and the ARN of the Amazon Web Services Secrets Manager secret that contains the credentials used to access the repository.

          • RepositoryUrl (string) --

            The URL where the Git repository is located.

          • Branch (string) --

            The default branch for the Git repository.

          • SecretArn (string) --

            The Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret that contains the credentials used to access the git repository. The secret must have a staging label of AWSCURRENT and must be in the following format:

            {"username": UserName, "password": Password}

    • NextToken (string) --

      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.