:doc:`CodeCommit <../../codecommit>` / Client / get_folder

**********
get_folder
**********



.. py:method:: CodeCommit.Client.get_folder(**kwargs)

  

  Returns the contents of a specified folder in a repository.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetFolder>`_  


  **Request Syntax**
  ::

    response = client.get_folder(
        repositoryName='string',
        commitSpecifier='string',
        folderPath='string'
    )
    
  :type repositoryName: string
  :param repositoryName: **[REQUIRED]** 

    The name of the repository.

    

  
  :type commitSpecifier: string
  :param commitSpecifier: 

    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.

    

  
  :type folderPath: string
  :param folderPath: **[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.

    

  
  
  :rtype: 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**
  
  *   :py:class:`CodeCommit.Client.exceptions.RepositoryNameRequiredException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidRepositoryNameException`

  
  *   :py:class:`CodeCommit.Client.exceptions.RepositoryDoesNotExistException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidCommitException`

  
  *   :py:class:`CodeCommit.Client.exceptions.CommitDoesNotExistException`

  
  *   :py:class:`CodeCommit.Client.exceptions.PathRequiredException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidPathException`

  
  *   :py:class:`CodeCommit.Client.exceptions.FolderDoesNotExistException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionIntegrityChecksFailedException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyAccessDeniedException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyDisabledException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyNotFoundException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyUnavailableException`

  