get_connection

CodeStarconnections.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',
        '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 AWS user 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 AWS 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

  • CodeStarconnections.Client.exceptions.ResourceNotFoundException
  • CodeStarconnections.Client.exceptions.ResourceUnavailableException