:doc:`CodeConnections <../../codeconnections>` / Client / create_repository_link

**********************
create_repository_link
**********************



.. py:method:: CodeConnections.Client.create_repository_link(**kwargs)

  

  Creates a link to a specified external Git repository. A repository link allows Git sync to monitor and sync changes to files in a specified Git repository.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codeconnections-2023-12-01/CreateRepositoryLink>`_  


  **Request Syntax**
  ::

    response = client.create_repository_link(
        ConnectionArn='string',
        OwnerId='string',
        RepositoryName='string',
        EncryptionKeyArn='string',
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    )
    
  :type ConnectionArn: string
  :param ConnectionArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the connection to be associated with the repository link.

    

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

    The owner ID for the repository associated with a specific sync configuration, such as the owner ID in GitHub.

    

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

    The name of the repository to be associated with the repository link.

    

  
  :type EncryptionKeyArn: string
  :param EncryptionKeyArn: 

    The Amazon Resource Name (ARN) encryption key for the repository to be associated with the repository link.

    

  
  :type Tags: list
  :param Tags: 

    The tags for the repository to be associated with the repository link.

    

  
    - *(dict) --* 

      A tag is a key-value pair that is used to manage the resource.

       

      This tag is available for use by Amazon Web Services services that support tags.

      

    
      - **Key** *(string) --* **[REQUIRED]** 

        The tag's key.

        

      
      - **Value** *(string) --* **[REQUIRED]** 

        The tag's value.

        

      
    

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

    
    ::

      {
          'RepositoryLinkInfo': {
              'ConnectionArn': 'string',
              'EncryptionKeyArn': 'string',
              'OwnerId': 'string',
              'ProviderType': 'Bitbucket'|'GitHub'|'GitHubEnterpriseServer'|'GitLab'|'GitLabSelfManaged'|'AzureDevOps',
              'RepositoryLinkArn': 'string',
              'RepositoryLinkId': 'string',
              'RepositoryName': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **RepositoryLinkInfo** *(dict) --* 

        The returned information about the created repository link.

        
        

        - **ConnectionArn** *(string) --* 

          The Amazon Resource Name (ARN) of the connection associated with the repository link.

          
        

        - **EncryptionKeyArn** *(string) --* 

          The Amazon Resource Name (ARN) of the encryption key for the repository associated with the repository link.

          
        

        - **OwnerId** *(string) --* 

          The owner ID for the repository associated with the repository link, such as the owner ID in GitHub.

          
        

        - **ProviderType** *(string) --* 

          The provider type for the connection, such as GitHub, associated with the repository link.

          
        

        - **RepositoryLinkArn** *(string) --* 

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

          
        

        - **RepositoryLinkId** *(string) --* 

          The ID of the repository link.

          
        

        - **RepositoryName** *(string) --* 

          The name of the repository associated with the repository link.

          
    
  
  **Exceptions**
  
  *   :py:class:`CodeConnections.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`CodeConnections.Client.exceptions.ConcurrentModificationException`

  
  *   :py:class:`CodeConnections.Client.exceptions.InternalServerException`

  
  *   :py:class:`CodeConnections.Client.exceptions.InvalidInputException`

  
  *   :py:class:`CodeConnections.Client.exceptions.LimitExceededException`

  
  *   :py:class:`CodeConnections.Client.exceptions.ResourceAlreadyExistsException`

  
  *   :py:class:`CodeConnections.Client.exceptions.ThrottlingException`

  