CodeConnections / Client / get_connection

get_connection#

CodeConnections.Client.get_connection(**kwargs)#

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

See also: AWS API Documentation

Request Syntax

response = client.get_connection(
    ConnectionArn='string'
)
Parameters:

ConnectionArn (string) –

[REQUIRED]

The Amazon Resource Name (ARN) of a connection.

Return type:

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.

        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

  • CodeConnections.Client.exceptions.ResourceNotFoundException

  • CodeConnections.Client.exceptions.ResourceUnavailableException