CodeArtifact

2023/03/23 - CodeArtifact - 8 updated api methods

Changes  Repository CreationTime is added to the CreateRepository and ListRepositories API responses.

AssociateExternalConnection (updated) Link ¶
Changes (response)
{'repository': {'createdTime': 'timestamp'}}

Adds an existing external connection to a repository. One external connection is allowed per repository.

See also: AWS API Documentation

Request Syntax

client.associate_external_connection(
    domain='string',
    domainOwner='string',
    repository='string',
    externalConnection='string'
)
type domain:

string

param domain:

[REQUIRED]

The name of the domain that contains the repository.

type domainOwner:

string

param domainOwner:

The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

type repository:

string

param repository:

[REQUIRED]

The name of the repository to which the external connection is added.

type externalConnection:

string

param externalConnection:

[REQUIRED]

The name of the external connection to add to the repository. The following values are supported:

  • public:npmjs - for the npm public repository.

  • public:nuget-org - for the NuGet Gallery.

  • public:pypi - for the Python Package Index.

  • public:maven-central - for Maven Central.

  • public:maven-googleandroid - for the Google Android repository.

  • public:maven-gradleplugins - for the Gradle plugins repository.

  • public:maven-commonsware - for the CommonsWare Android repository.

  • public:maven-clojars - for the Clojars repository.

rtype:

dict

returns:

Response Syntax

{
    'repository': {
        'name': 'string',
        'administratorAccount': 'string',
        'domainName': 'string',
        'domainOwner': 'string',
        'arn': 'string',
        'description': 'string',
        'upstreams': [
            {
                'repositoryName': 'string'
            },
        ],
        'externalConnections': [
            {
                'externalConnectionName': 'string',
                'packageFormat': 'npm'|'pypi'|'maven'|'nuget'|'generic',
                'status': 'Available'
            },
        ],
        'createdTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • repository (dict) --

      Information about the connected repository after processing the request.

      • name (string) --

        The name of the repository.

      • administratorAccount (string) --

        The 12-digit account number of the Amazon Web Services account that manages the repository.

      • domainName (string) --

        The name of the domain that contains the repository.

      • domainOwner (string) --

        The 12-digit account number of the Amazon Web Services account that owns the domain that contains the repository. It does not include dashes or spaces.

      • arn (string) --

        The Amazon Resource Name (ARN) of the repository.

      • description (string) --

        A text description of the repository.

      • upstreams (list) --

        A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when CodeArtifact looks for a requested package version. For more information, see Working with upstream repositories.

        • (dict) --

          Information about an upstream repository.

          • repositoryName (string) --

            The name of an upstream repository.

      • externalConnections (list) --

        An array of external connections associated with the repository.

        • (dict) --

          Contains information about the external connection of a repository.

          • externalConnectionName (string) --

            The name of the external connection associated with a repository.

          • packageFormat (string) --

            The package format associated with a repository's external connection. The valid package formats are:

            • npm: A Node Package Manager (npm) package.

            • pypi: A Python Package Index (PyPI) package.

            • maven: A Maven package that contains compiled code in a distributable format, such as a JAR file.

            • nuget: A NuGet package.

          • status (string) --

            The status of the external connection of a repository. There is one valid value, Available.

      • createdTime (datetime) --

        A timestamp that represents the date and time the repository was created.

CreateRepository (updated) Link ¶
Changes (response)
{'repository': {'createdTime': 'timestamp'}}

Creates a repository.

See also: AWS API Documentation

Request Syntax

client.create_repository(
    domain='string',
    domainOwner='string',
    repository='string',
    description='string',
    upstreams=[
        {
            'repositoryName': 'string'
        },
    ],
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
type domain:

string

param domain:

[REQUIRED]

The name of the domain that contains the created repository.

type domainOwner:

string

param domainOwner:

The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

type repository:

string

param repository:

[REQUIRED]

The name of the repository to create.

type description:

string

param description:

A description of the created repository.

type upstreams:

list

param upstreams:

A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when CodeArtifact looks for a requested package version. For more information, see Working with upstream repositories.

  • (dict) --

    Information about an upstream repository. A list of UpstreamRepository objects is an input parameter to CreateRepository and UpdateRepository.

    • repositoryName (string) -- [REQUIRED]

      The name of an upstream repository.

type tags:

list

param tags:

One or more tag key-value pairs for the repository.

  • (dict) --

    A tag is a key-value pair that can be used to manage, search for, or filter resources in CodeArtifact.

    • key (string) -- [REQUIRED]

      The tag key.

    • value (string) -- [REQUIRED]

      The tag value.

rtype:

dict

returns:

Response Syntax

{
    'repository': {
        'name': 'string',
        'administratorAccount': 'string',
        'domainName': 'string',
        'domainOwner': 'string',
        'arn': 'string',
        'description': 'string',
        'upstreams': [
            {
                'repositoryName': 'string'
            },
        ],
        'externalConnections': [
            {
                'externalConnectionName': 'string',
                'packageFormat': 'npm'|'pypi'|'maven'|'nuget'|'generic',
                'status': 'Available'
            },
        ],
        'createdTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • repository (dict) --

      Information about the created repository after processing the request.

      • name (string) --

        The name of the repository.

      • administratorAccount (string) --

        The 12-digit account number of the Amazon Web Services account that manages the repository.

      • domainName (string) --

        The name of the domain that contains the repository.

      • domainOwner (string) --

        The 12-digit account number of the Amazon Web Services account that owns the domain that contains the repository. It does not include dashes or spaces.

      • arn (string) --

        The Amazon Resource Name (ARN) of the repository.

      • description (string) --

        A text description of the repository.

      • upstreams (list) --

        A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when CodeArtifact looks for a requested package version. For more information, see Working with upstream repositories.

        • (dict) --

          Information about an upstream repository.

          • repositoryName (string) --

            The name of an upstream repository.

      • externalConnections (list) --

        An array of external connections associated with the repository.

        • (dict) --

          Contains information about the external connection of a repository.

          • externalConnectionName (string) --

            The name of the external connection associated with a repository.

          • packageFormat (string) --

            The package format associated with a repository's external connection. The valid package formats are:

            • npm: A Node Package Manager (npm) package.

            • pypi: A Python Package Index (PyPI) package.

            • maven: A Maven package that contains compiled code in a distributable format, such as a JAR file.

            • nuget: A NuGet package.

          • status (string) --

            The status of the external connection of a repository. There is one valid value, Available.

      • createdTime (datetime) --

        A timestamp that represents the date and time the repository was created.

DeleteRepository (updated) Link ¶
Changes (response)
{'repository': {'createdTime': 'timestamp'}}

Deletes a repository.

See also: AWS API Documentation

Request Syntax

client.delete_repository(
    domain='string',
    domainOwner='string',
    repository='string'
)
type domain:

string

param domain:

[REQUIRED]

The name of the domain that contains the repository to delete.

type domainOwner:

string

param domainOwner:

The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

type repository:

string

param repository:

[REQUIRED]

The name of the repository to delete.

rtype:

dict

returns:

Response Syntax

{
    'repository': {
        'name': 'string',
        'administratorAccount': 'string',
        'domainName': 'string',
        'domainOwner': 'string',
        'arn': 'string',
        'description': 'string',
        'upstreams': [
            {
                'repositoryName': 'string'
            },
        ],
        'externalConnections': [
            {
                'externalConnectionName': 'string',
                'packageFormat': 'npm'|'pypi'|'maven'|'nuget'|'generic',
                'status': 'Available'
            },
        ],
        'createdTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • repository (dict) --

      Information about the deleted repository after processing the request.

      • name (string) --

        The name of the repository.

      • administratorAccount (string) --

        The 12-digit account number of the Amazon Web Services account that manages the repository.

      • domainName (string) --

        The name of the domain that contains the repository.

      • domainOwner (string) --

        The 12-digit account number of the Amazon Web Services account that owns the domain that contains the repository. It does not include dashes or spaces.

      • arn (string) --

        The Amazon Resource Name (ARN) of the repository.

      • description (string) --

        A text description of the repository.

      • upstreams (list) --

        A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when CodeArtifact looks for a requested package version. For more information, see Working with upstream repositories.

        • (dict) --

          Information about an upstream repository.

          • repositoryName (string) --

            The name of an upstream repository.

      • externalConnections (list) --

        An array of external connections associated with the repository.

        • (dict) --

          Contains information about the external connection of a repository.

          • externalConnectionName (string) --

            The name of the external connection associated with a repository.

          • packageFormat (string) --

            The package format associated with a repository's external connection. The valid package formats are:

            • npm: A Node Package Manager (npm) package.

            • pypi: A Python Package Index (PyPI) package.

            • maven: A Maven package that contains compiled code in a distributable format, such as a JAR file.

            • nuget: A NuGet package.

          • status (string) --

            The status of the external connection of a repository. There is one valid value, Available.

      • createdTime (datetime) --

        A timestamp that represents the date and time the repository was created.

DescribeRepository (updated) Link ¶
Changes (response)
{'repository': {'createdTime': 'timestamp'}}

Returns a RepositoryDescription object that contains detailed information about the requested repository.

See also: AWS API Documentation

Request Syntax

client.describe_repository(
    domain='string',
    domainOwner='string',
    repository='string'
)
type domain:

string

param domain:

[REQUIRED]

The name of the domain that contains the repository to describe.

type domainOwner:

string

param domainOwner:

The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

type repository:

string

param repository:

[REQUIRED]

A string that specifies the name of the requested repository.

rtype:

dict

returns:

Response Syntax

{
    'repository': {
        'name': 'string',
        'administratorAccount': 'string',
        'domainName': 'string',
        'domainOwner': 'string',
        'arn': 'string',
        'description': 'string',
        'upstreams': [
            {
                'repositoryName': 'string'
            },
        ],
        'externalConnections': [
            {
                'externalConnectionName': 'string',
                'packageFormat': 'npm'|'pypi'|'maven'|'nuget'|'generic',
                'status': 'Available'
            },
        ],
        'createdTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • repository (dict) --

      A RepositoryDescription object that contains the requested repository information.

      • name (string) --

        The name of the repository.

      • administratorAccount (string) --

        The 12-digit account number of the Amazon Web Services account that manages the repository.

      • domainName (string) --

        The name of the domain that contains the repository.

      • domainOwner (string) --

        The 12-digit account number of the Amazon Web Services account that owns the domain that contains the repository. It does not include dashes or spaces.

      • arn (string) --

        The Amazon Resource Name (ARN) of the repository.

      • description (string) --

        A text description of the repository.

      • upstreams (list) --

        A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when CodeArtifact looks for a requested package version. For more information, see Working with upstream repositories.

        • (dict) --

          Information about an upstream repository.

          • repositoryName (string) --

            The name of an upstream repository.

      • externalConnections (list) --

        An array of external connections associated with the repository.

        • (dict) --

          Contains information about the external connection of a repository.

          • externalConnectionName (string) --

            The name of the external connection associated with a repository.

          • packageFormat (string) --

            The package format associated with a repository's external connection. The valid package formats are:

            • npm: A Node Package Manager (npm) package.

            • pypi: A Python Package Index (PyPI) package.

            • maven: A Maven package that contains compiled code in a distributable format, such as a JAR file.

            • nuget: A NuGet package.

          • status (string) --

            The status of the external connection of a repository. There is one valid value, Available.

      • createdTime (datetime) --

        A timestamp that represents the date and time the repository was created.

DisassociateExternalConnection (updated) Link ¶
Changes (response)
{'repository': {'createdTime': 'timestamp'}}

Removes an existing external connection from a repository.

See also: AWS API Documentation

Request Syntax

client.disassociate_external_connection(
    domain='string',
    domainOwner='string',
    repository='string',
    externalConnection='string'
)
type domain:

string

param domain:

[REQUIRED]

The name of the domain that contains the repository from which to remove the external repository.

type domainOwner:

string

param domainOwner:

The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

type repository:

string

param repository:

[REQUIRED]

The name of the repository from which the external connection will be removed.

type externalConnection:

string

param externalConnection:

[REQUIRED]

The name of the external connection to be removed from the repository.

rtype:

dict

returns:

Response Syntax

{
    'repository': {
        'name': 'string',
        'administratorAccount': 'string',
        'domainName': 'string',
        'domainOwner': 'string',
        'arn': 'string',
        'description': 'string',
        'upstreams': [
            {
                'repositoryName': 'string'
            },
        ],
        'externalConnections': [
            {
                'externalConnectionName': 'string',
                'packageFormat': 'npm'|'pypi'|'maven'|'nuget'|'generic',
                'status': 'Available'
            },
        ],
        'createdTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • repository (dict) --

      The repository associated with the removed external connection.

      • name (string) --

        The name of the repository.

      • administratorAccount (string) --

        The 12-digit account number of the Amazon Web Services account that manages the repository.

      • domainName (string) --

        The name of the domain that contains the repository.

      • domainOwner (string) --

        The 12-digit account number of the Amazon Web Services account that owns the domain that contains the repository. It does not include dashes or spaces.

      • arn (string) --

        The Amazon Resource Name (ARN) of the repository.

      • description (string) --

        A text description of the repository.

      • upstreams (list) --

        A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when CodeArtifact looks for a requested package version. For more information, see Working with upstream repositories.

        • (dict) --

          Information about an upstream repository.

          • repositoryName (string) --

            The name of an upstream repository.

      • externalConnections (list) --

        An array of external connections associated with the repository.

        • (dict) --

          Contains information about the external connection of a repository.

          • externalConnectionName (string) --

            The name of the external connection associated with a repository.

          • packageFormat (string) --

            The package format associated with a repository's external connection. The valid package formats are:

            • npm: A Node Package Manager (npm) package.

            • pypi: A Python Package Index (PyPI) package.

            • maven: A Maven package that contains compiled code in a distributable format, such as a JAR file.

            • nuget: A NuGet package.

          • status (string) --

            The status of the external connection of a repository. There is one valid value, Available.

      • createdTime (datetime) --

        A timestamp that represents the date and time the repository was created.

ListRepositories (updated) Link ¶
Changes (response)
{'repositories': {'createdTime': 'timestamp'}}

Returns a list of RepositorySummary objects. Each RepositorySummary contains information about a repository in the specified Amazon Web Services account and that matches the input parameters.

See also: AWS API Documentation

Request Syntax

client.list_repositories(
    repositoryPrefix='string',
    maxResults=123,
    nextToken='string'
)
type repositoryPrefix:

string

param repositoryPrefix:

A prefix used to filter returned repositories. Only repositories with names that start with repositoryPrefix are returned.

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

type nextToken:

string

param nextToken:

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

rtype:

dict

returns:

Response Syntax

{
    'repositories': [
        {
            'name': 'string',
            'administratorAccount': 'string',
            'domainName': 'string',
            'domainOwner': 'string',
            'arn': 'string',
            'description': 'string',
            'createdTime': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • repositories (list) --

      The returned list of RepositorySummary objects.

      • (dict) --

        Details about a repository, including its Amazon Resource Name (ARN), description, and domain information. The ListRepositories operation returns a list of RepositorySummary objects.

        • name (string) --

          The name of the repository.

        • administratorAccount (string) --

          The Amazon Web Services account ID that manages the repository.

        • domainName (string) --

          The name of the domain that contains the repository.

        • domainOwner (string) --

          The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

        • arn (string) --

          The ARN of the repository.

        • description (string) --

          The description of the repository.

        • createdTime (datetime) --

          A timestamp that represents the date and time the repository was created.

    • nextToken (string) --

      If there are additional results, this is the token for the next set of results.

ListRepositoriesInDomain (updated) Link ¶
Changes (response)
{'repositories': {'createdTime': 'timestamp'}}

Returns a list of RepositorySummary objects. Each RepositorySummary contains information about a repository in the specified domain and that matches the input parameters.

See also: AWS API Documentation

Request Syntax

client.list_repositories_in_domain(
    domain='string',
    domainOwner='string',
    administratorAccount='string',
    repositoryPrefix='string',
    maxResults=123,
    nextToken='string'
)
type domain:

string

param domain:

[REQUIRED]

The name of the domain that contains the returned list of repositories.

type domainOwner:

string

param domainOwner:

The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

type administratorAccount:

string

param administratorAccount:

Filter the list of repositories to only include those that are managed by the Amazon Web Services account ID.

type repositoryPrefix:

string

param repositoryPrefix:

A prefix used to filter returned repositories. Only repositories with names that start with repositoryPrefix are returned.

type maxResults:

integer

param maxResults:

The maximum number of results to return per page.

type nextToken:

string

param nextToken:

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

rtype:

dict

returns:

Response Syntax

{
    'repositories': [
        {
            'name': 'string',
            'administratorAccount': 'string',
            'domainName': 'string',
            'domainOwner': 'string',
            'arn': 'string',
            'description': 'string',
            'createdTime': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • repositories (list) --

      The returned list of repositories.

      • (dict) --

        Details about a repository, including its Amazon Resource Name (ARN), description, and domain information. The ListRepositories operation returns a list of RepositorySummary objects.

        • name (string) --

          The name of the repository.

        • administratorAccount (string) --

          The Amazon Web Services account ID that manages the repository.

        • domainName (string) --

          The name of the domain that contains the repository.

        • domainOwner (string) --

          The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

        • arn (string) --

          The ARN of the repository.

        • description (string) --

          The description of the repository.

        • createdTime (datetime) --

          A timestamp that represents the date and time the repository was created.

    • nextToken (string) --

      If there are additional results, this is the token for the next set of results.

UpdateRepository (updated) Link ¶
Changes (response)
{'repository': {'createdTime': 'timestamp'}}

Update the properties of a repository.

See also: AWS API Documentation

Request Syntax

client.update_repository(
    domain='string',
    domainOwner='string',
    repository='string',
    description='string',
    upstreams=[
        {
            'repositoryName': 'string'
        },
    ]
)
type domain:

string

param domain:

[REQUIRED]

The name of the domain associated with the repository to update.

type domainOwner:

string

param domainOwner:

The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

type repository:

string

param repository:

[REQUIRED]

The name of the repository to update.

type description:

string

param description:

An updated repository description.

type upstreams:

list

param upstreams:

A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when CodeArtifact looks for a requested package version. For more information, see Working with upstream repositories.

  • (dict) --

    Information about an upstream repository. A list of UpstreamRepository objects is an input parameter to CreateRepository and UpdateRepository.

    • repositoryName (string) -- [REQUIRED]

      The name of an upstream repository.

rtype:

dict

returns:

Response Syntax

{
    'repository': {
        'name': 'string',
        'administratorAccount': 'string',
        'domainName': 'string',
        'domainOwner': 'string',
        'arn': 'string',
        'description': 'string',
        'upstreams': [
            {
                'repositoryName': 'string'
            },
        ],
        'externalConnections': [
            {
                'externalConnectionName': 'string',
                'packageFormat': 'npm'|'pypi'|'maven'|'nuget'|'generic',
                'status': 'Available'
            },
        ],
        'createdTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • repository (dict) --

      The updated repository.

      • name (string) --

        The name of the repository.

      • administratorAccount (string) --

        The 12-digit account number of the Amazon Web Services account that manages the repository.

      • domainName (string) --

        The name of the domain that contains the repository.

      • domainOwner (string) --

        The 12-digit account number of the Amazon Web Services account that owns the domain that contains the repository. It does not include dashes or spaces.

      • arn (string) --

        The Amazon Resource Name (ARN) of the repository.

      • description (string) --

        A text description of the repository.

      • upstreams (list) --

        A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when CodeArtifact looks for a requested package version. For more information, see Working with upstream repositories.

        • (dict) --

          Information about an upstream repository.

          • repositoryName (string) --

            The name of an upstream repository.

      • externalConnections (list) --

        An array of external connections associated with the repository.

        • (dict) --

          Contains information about the external connection of a repository.

          • externalConnectionName (string) --

            The name of the external connection associated with a repository.

          • packageFormat (string) --

            The package format associated with a repository's external connection. The valid package formats are:

            • npm: A Node Package Manager (npm) package.

            • pypi: A Python Package Index (PyPI) package.

            • maven: A Maven package that contains compiled code in a distributable format, such as a JAR file.

            • nuget: A NuGet package.

          • status (string) --

            The status of the external connection of a repository. There is one valid value, Available.

      • createdTime (datetime) --

        A timestamp that represents the date and time the repository was created.