Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

get_folder

CodeCommit.Client.get_folder(**kwargs)

Returns the contents of a specified folder in a repository.

See also: AWS API Documentation

Request Syntax

response = client.get_folder(
    repositoryName='string',
    commitSpecifier='string',
    folderPath='string'
)
Parameters
  • repositoryName (string) --

    [REQUIRED]

    The name of the repository.

  • commitSpecifier (string) -- A fully qualified reference used to identify a commit that contains the version of the folder's content to return. A fully qualified reference can be a commit ID, branch name, tag, or reference such as HEAD. If no specifier is provided, the folder content is returned as it exists in the HEAD commit.
  • folderPath (string) --

    [REQUIRED]

    The fully qualified path to the folder whose contents are returned, including the folder name. For example, /examples is a fully-qualified path to a folder named examples that was created off of the root directory (/) of a repository.

Return type

dict

Returns

Response Syntax

{
    'commitId': 'string',
    'folderPath': 'string',
    'treeId': 'string',
    'subFolders': [
        {
            'treeId': 'string',
            'absolutePath': 'string',
            'relativePath': 'string'
        },
    ],
    'files': [
        {
            'blobId': 'string',
            'absolutePath': 'string',
            'relativePath': 'string',
            'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
        },
    ],
    'symbolicLinks': [
        {
            'blobId': 'string',
            'absolutePath': 'string',
            'relativePath': 'string',
            'fileMode': 'EXECUTABLE'|'NORMAL'|'SYMLINK'
        },
    ],
    'subModules': [
        {
            'commitId': 'string',
            'absolutePath': 'string',
            'relativePath': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • commitId (string) --

      The full commit ID used as a reference for the returned version of the folder content.

    • folderPath (string) --

      The fully qualified path of the folder whose contents are returned.

    • treeId (string) --

      The full SHA-1 pointer of the tree information for the commit that contains the folder.

    • subFolders (list) --

      The list of folders that exist under the specified folder, if any.

      • (dict) --

        Returns information about a folder in a repository.

        • treeId (string) --

          The full SHA-1 pointer of the tree information for the commit that contains the folder.

        • absolutePath (string) --

          The fully qualified path of the folder in the repository.

        • relativePath (string) --

          The relative path of the specified folder from the folder where the query originated.

    • files (list) --

      The list of files in the specified folder, if any.

      • (dict) --

        Returns information about a file in a repository.

        • blobId (string) --

          The blob ID that contains the file information.

        • absolutePath (string) --

          The fully qualified path to the file in the repository.

        • relativePath (string) --

          The relative path of the file from the folder where the query originated.

        • fileMode (string) --

          The extrapolated file mode permissions for the file. Valid values include EXECUTABLE and NORMAL.

    • symbolicLinks (list) --

      The list of symbolic links to other files and folders in the specified folder, if any.

      • (dict) --

        Returns information about a symbolic link in a repository folder.

        • blobId (string) --

          The blob ID that contains the information about the symbolic link.

        • absolutePath (string) --

          The fully qualified path to the folder that contains the symbolic link.

        • relativePath (string) --

          The relative path of the symbolic link from the folder where the query originated.

        • fileMode (string) --

          The file mode permissions of the blob that cotains information about the symbolic link.

    • subModules (list) --

      The list of submodules in the specified folder, if any.

      • (dict) --

        Returns information about a submodule reference in a repository folder.

        • commitId (string) --

          The commit ID that contains the reference to the submodule.

        • absolutePath (string) --

          The fully qualified path to the folder that contains the reference to the submodule.

        • relativePath (string) --

          The relative path of the submodule from the folder where the query originated.

Exceptions

  • CodeCommit.Client.exceptions.RepositoryNameRequiredException
  • CodeCommit.Client.exceptions.InvalidRepositoryNameException
  • CodeCommit.Client.exceptions.RepositoryDoesNotExistException
  • CodeCommit.Client.exceptions.InvalidCommitException
  • CodeCommit.Client.exceptions.CommitDoesNotExistException
  • CodeCommit.Client.exceptions.PathRequiredException
  • CodeCommit.Client.exceptions.InvalidPathException
  • CodeCommit.Client.exceptions.FolderDoesNotExistException
  • CodeCommit.Client.exceptions.EncryptionIntegrityChecksFailedException
  • CodeCommit.Client.exceptions.EncryptionKeyAccessDeniedException
  • CodeCommit.Client.exceptions.EncryptionKeyDisabledException
  • CodeCommit.Client.exceptions.EncryptionKeyNotFoundException
  • CodeCommit.Client.exceptions.EncryptionKeyUnavailableException