:doc:`CodeCatalyst <../../codecatalyst>` / Client / create_source_repository

************************
create_source_repository
************************



.. py:method:: CodeCatalyst.Client.create_source_repository(**kwargs)

  

  Creates an empty Git-based source repository in a specified project. The repository is created with an initial empty commit with a default branch named ``main``.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codecatalyst-2022-09-28/CreateSourceRepository>`_  


  **Request Syntax**
  ::

    response = client.create_source_repository(
        spaceName='string',
        projectName='string',
        name='string',
        description='string'
    )
    
  :type spaceName: string
  :param spaceName: **[REQUIRED]** 

    The name of the space.

    

  
  :type projectName: string
  :param projectName: **[REQUIRED]** 

    The name of the project in the space.

    

  
  :type name: string
  :param name: **[REQUIRED]** 

    The name of the source repository. For more information about name requirements, see `Quotas for source repositories <https://docs.aws.amazon.com/codecatalyst/latest/userguide/source-quotas.html>`__.

    

  
  :type description: string
  :param description: 

    The description of the source repository.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'spaceName': 'string',
          'projectName': 'string',
          'name': 'string',
          'description': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **spaceName** *(string) --* 

        The name of the space.

        
      

      - **projectName** *(string) --* 

        The name of the project in the space.

        
      

      - **name** *(string) --* 

        The name of the source repository.

        
      

      - **description** *(string) --* 

        The description of the source repository.

        
  
  **Exceptions**
  
  *   :py:class:`CodeCatalyst.Client.exceptions.ThrottlingException`

  
  *   :py:class:`CodeCatalyst.Client.exceptions.ConflictException`

  
  *   :py:class:`CodeCatalyst.Client.exceptions.ValidationException`

  
  *   :py:class:`CodeCatalyst.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`CodeCatalyst.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`CodeCatalyst.Client.exceptions.AccessDeniedException`

  