CodeConnections / Client / create_connection

create_connection#

CodeConnections.Client.create_connection(**kwargs)#

Creates a connection that can then be given to other Amazon Web Services services like CodePipeline so that it can access third-party code repositories. The connection is in pending status until the third-party connection handshake is completed from the console.

See also: AWS API Documentation

Request Syntax

response = client.create_connection(
    ProviderType='Bitbucket'|'GitHub'|'GitHubEnterpriseServer'|'GitLab'|'GitLabSelfManaged',
    ConnectionName='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    HostArn='string'
)
Parameters:
  • ProviderType (string) – The name of the external provider where your third-party code repository is configured.

  • ConnectionName (string) –

    [REQUIRED]

    The name of the connection to be created.

  • Tags (list) –

    The key-value pair to use when tagging the resource.

    • (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.

  • HostArn (string) – The Amazon Resource Name (ARN) of the host associated with the connection to be created.

Return type:

dict

Returns:

Response Syntax

{
    'ConnectionArn': 'string',
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • ConnectionArn (string) –

      The Amazon Resource Name (ARN) of the connection to be created. 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.

    • Tags (list) –

      Specifies the tags applied to the resource.

      • (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) –

          The tag’s key.

        • Value (string) –

          The tag’s value.

Exceptions