:doc:`CodeStarconnections <../../codestar-connections>` / Client / get_connection

**************
get_connection
**************



.. py:method:: CodeStarconnections.Client.get_connection(**kwargs)

  

  Returns the connection ARN and details such as status, owner, and provider type.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codestar-connections-2019-12-01/GetConnection>`_  


  **Request Syntax**
  ::

    response = client.get_connection(
        ConnectionArn='string'
    )
    
  :type ConnectionArn: string
  :param ConnectionArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of a connection.

    

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

    
    ::

      {
          'Connection': {
              'ConnectionName': 'string',
              'ConnectionArn': 'string',
              'ProviderType': 'Bitbucket'|'GitHub'|'GitHubEnterpriseServer'|'GitLab'|'GitLabSelfManaged',
              'OwnerAccountId': 'string',
              'ConnectionStatus': 'PENDING'|'AVAILABLE'|'ERROR',
              'HostArn': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Connection** *(dict) --* 

        The connection details, such as status, owner, and provider type.

        
        

        - **ConnectionName** *(string) --* 

          The name of the connection. Connection names must be unique in an Amazon Web Services account.

          
        

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

          The Amazon Resource Name (ARN) of the connection. The ARN is used as the connection reference when the connection is shared between Amazon Web Services services.

           

          .. note::

            

            The ARN is never reused if the connection is deleted.

            

          
        

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

          The name of the external provider where your third-party code repository is configured.

          
        

        - **OwnerAccountId** *(string) --* 

          The identifier of the external provider where your third-party code repository is configured. For Bitbucket, this is the account ID of the owner of the Bitbucket repository.

          
        

        - **ConnectionStatus** *(string) --* 

          The current status of the connection.

          
        

        - **HostArn** *(string) --* 

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

          
    
  
  **Exceptions**
  
  *   :py:class:`CodeStarconnections.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`CodeStarconnections.Client.exceptions.ResourceUnavailableException`

  