Proton / Client / create_repository

create_repository#

Proton.Client.create_repository(**kwargs)#

Create and register a link to a repository. Proton uses the link to repeatedly access the repository, to either push to it (self-managed provisioning) or pull from it (template sync). You can share a linked repository across multiple resources (like environments using self-managed provisioning, or synced templates). When you create a repository link, Proton creates a service-linked role for you.

For more information, see Self-managed provisioning, Template bundles, and Template sync configurations in the Proton User Guide.

See also: AWS API Documentation

Request Syntax

response = client.create_repository(
    connectionArn='string',
    encryptionKey='string',
    name='string',
    provider='GITHUB'|'GITHUB_ENTERPRISE'|'BITBUCKET',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
Parameters:
  • connectionArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of your AWS CodeStar connection that connects Proton to your repository provider account. For more information, see Setting up for Proton in the Proton User Guide.

  • encryptionKey (string) – The ARN of your customer Amazon Web Services Key Management Service (Amazon Web Services KMS) key.

  • name (string) –

    [REQUIRED]

    The repository name (for example, myrepos/myrepo).

  • provider (string) –

    [REQUIRED]

    The repository provider.

  • tags (list) –

    An optional list of metadata items that you can associate with the Proton repository. A tag is a key-value pair.

    For more information, see Proton resources and tagging in the Proton User Guide.

    • (dict) –

      A description of a resource tag.

      • key (string) – [REQUIRED]

        The key of the resource tag.

      • value (string) – [REQUIRED]

        The value of the resource tag.

Return type:

dict

Returns:

Response Syntax

{
    'repository': {
        'arn': 'string',
        'connectionArn': 'string',
        'encryptionKey': 'string',
        'name': 'string',
        'provider': 'GITHUB'|'GITHUB_ENTERPRISE'|'BITBUCKET'
    }
}

Response Structure

  • (dict) –

    • repository (dict) –

      The repository link’s detail data that’s returned by Proton.

      • arn (string) –

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

      • connectionArn (string) –

        The Amazon Resource Name (ARN) of your AWS CodeStar connection that connects Proton to your repository provider account.

      • encryptionKey (string) –

        Your customer Amazon Web Services KMS encryption key.

      • name (string) –

        The repository name.

      • provider (string) –

        The repository provider.

Exceptions