CodeArtifact

2024/06/20 - CodeArtifact - 24 updated api methods

Changes  Add support for the Cargo package format.

AssociateExternalConnection (updated) Link ¶
Changes (response)
{'repository': {'externalConnections': {'packageFormat': {'cargo'}}}}

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

Note

A repository can have one or more upstream repositories, or an external connection.

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.

  • public:ruby-gems-org - for RubyGems.org.

  • public:crates-io - for Crates.io.

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'|'ruby'|'swift'|'cargo',
                '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.

CopyPackageVersions (updated) Link ¶
Changes (request)
{'format': {'cargo'}}

Copies package versions from one repository to another repository in the same domain.

Note

You must specify versions or versionRevisions . You cannot specify both.

See also: AWS API Documentation

Request Syntax

client.copy_package_versions(
    domain='string',
    domainOwner='string',
    sourceRepository='string',
    destinationRepository='string',
    format='npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
    namespace='string',
    package='string',
    versions=[
        'string',
    ],
    versionRevisions={
        'string': 'string'
    },
    allowOverwrite=True|False,
    includeFromUpstream=True|False
)
type domain

string

param domain

[REQUIRED]

The name of the domain that contains the source and destination 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 sourceRepository

string

param sourceRepository

[REQUIRED]

The name of the repository that contains the package versions to be copied.

type destinationRepository

string

param destinationRepository

[REQUIRED]

The name of the repository into which package versions are copied.

type format

string

param format

[REQUIRED]

The format of the package versions to be copied.

type namespace

string

param namespace

The namespace of the package versions to be copied. The package component that specifies its namespace depends on its type. For example:

Note

The namespace is required when copying package versions of the following formats:

  • Maven

  • Swift

  • generic

  • The namespace of a Maven package version is its groupId .

  • The namespace of an npm or Swift package version is its scope .

  • The namespace of a generic package is its namespace .

  • Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

type package

string

param package

[REQUIRED]

The name of the package that contains the versions to be copied.

type versions

list

param versions

The versions of the package to be copied.

Note

You must specify versions or versionRevisions . You cannot specify both.

  • (string) --

type versionRevisions

dict

param versionRevisions

A list of key-value pairs. The keys are package versions and the values are package version revisions. A CopyPackageVersion operation succeeds if the specified versions in the source repository match the specified package version revision.

Note

You must specify versions or versionRevisions . You cannot specify both.

  • (string) --

    • (string) --

type allowOverwrite

boolean

param allowOverwrite

Set to true to overwrite a package version that already exists in the destination repository. If set to false and the package version already exists in the destination repository, the package version is returned in the failedVersions field of the response with an ALREADY_EXISTS error code.

type includeFromUpstream

boolean

param includeFromUpstream

Set to true to copy packages from repositories that are upstream from the source repository to the destination repository. The default setting is false. For more information, see Working with upstream repositories.

rtype

dict

returns

Response Syntax

{
    'successfulVersions': {
        'string': {
            'revision': 'string',
            'status': 'Published'|'Unfinished'|'Unlisted'|'Archived'|'Disposed'|'Deleted'
        }
    },
    'failedVersions': {
        'string': {
            'errorCode': 'ALREADY_EXISTS'|'MISMATCHED_REVISION'|'MISMATCHED_STATUS'|'NOT_ALLOWED'|'NOT_FOUND'|'SKIPPED',
            'errorMessage': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • successfulVersions (dict) --

      A list of the package versions that were successfully copied to your repository.

      • (string) --

        • (dict) --

          Contains the revision and status of a package version.

          • revision (string) --

            The revision of a package version.

          • status (string) --

            The status of a package version.

    • failedVersions (dict) --

      A map of package versions that failed to copy and their error codes. The possible error codes are in the PackageVersionError data type. They are:

      • ALREADY_EXISTS

      • MISMATCHED_REVISION

      • MISMATCHED_STATUS

      • NOT_ALLOWED

      • NOT_FOUND

      • SKIPPED

      • (string) --

        • (dict) --

          l An error associated with package.

          • errorCode (string) --

            The error code associated with the error. Valid error codes are:

            • ALREADY_EXISTS

            • MISMATCHED_REVISION

            • MISMATCHED_STATUS

            • NOT_ALLOWED

            • NOT_FOUND

            • SKIPPED

          • errorMessage (string) --

            The error message associated with the error.

CreateRepository (updated) Link ¶
Changes (response)
{'repository': {'externalConnections': {'packageFormat': {'cargo'}}}}

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'|'ruby'|'swift'|'cargo',
                '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.

DeletePackage (updated) Link ¶
Changes (request, response)
Request
{'format': {'cargo'}}
Response
{'deletedPackage': {'format': {'cargo'}}}

Deletes a package and all associated package versions. A deleted package cannot be restored. To delete one or more package versions, use the DeletePackageVersions API.

See also: AWS API Documentation

Request Syntax

client.delete_package(
    domain='string',
    domainOwner='string',
    repository='string',
    format='npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
    namespace='string',
    package='string'
)
type domain

string

param domain

[REQUIRED]

The name of the domain that contains the package 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 that contains the package to delete.

type format

string

param format

[REQUIRED]

The format of the requested package to delete.

type namespace

string

param namespace

The namespace of the package to delete. The package component that specifies its namespace depends on its type. For example:

Note

The namespace is required when deleting packages of the following formats:

  • Maven

  • Swift

  • generic

  • The namespace of a Maven package version is its groupId .

  • The namespace of an npm or Swift package version is its scope .

  • The namespace of a generic package is its namespace .

  • Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

type package

string

param package

[REQUIRED]

The name of the package to delete.

rtype

dict

returns

Response Syntax

{
    'deletedPackage': {
        'format': 'npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
        'namespace': 'string',
        'package': 'string',
        'originConfiguration': {
            'restrictions': {
                'publish': 'ALLOW'|'BLOCK',
                'upstream': 'ALLOW'|'BLOCK'
            }
        }
    }
}

Response Structure

  • (dict) --

    • deletedPackage (dict) --

      Details about a package, including its format, namespace, and name.

      • format (string) --

        The format of the package.

      • namespace (string) --

        The namespace of the package. The package component that specifies its namespace depends on its type. For example:

        • The namespace of a Maven package version is its groupId .

        • The namespace of an npm or Swift package version is its scope .

        • The namespace of a generic package is its namespace .

        • Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

      • package (string) --

        The name of the package.

      • originConfiguration (dict) --

        A PackageOriginConfiguration object that contains a PackageOriginRestrictions object that contains information about the upstream and publish package origin restrictions.

        • restrictions (dict) --

          A PackageOriginRestrictions object that contains information about the upstream and publish package origin configuration for the package.

          • publish (string) --

            The package origin configuration that determines if new versions of the package can be published directly to the repository.

          • upstream (string) --

            The package origin configuration that determines if new versions of the package can be added to the repository from an external connection or upstream source.

DeletePackageVersions (updated) Link ¶
Changes (request)
{'format': {'cargo'}}

Deletes one or more versions of a package. A deleted package version cannot be restored in your repository. If you want to remove a package version from your repository and be able to restore it later, set its status to Archived . Archived packages cannot be downloaded from a repository and don't show up with list package APIs (for example, ListPackageVersions ), but you can restore them using UpdatePackageVersionsStatus.

See also: AWS API Documentation

Request Syntax

client.delete_package_versions(
    domain='string',
    domainOwner='string',
    repository='string',
    format='npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
    namespace='string',
    package='string',
    versions=[
        'string',
    ],
    expectedStatus='Published'|'Unfinished'|'Unlisted'|'Archived'|'Disposed'|'Deleted'
)
type domain

string

param domain

[REQUIRED]

The name of the domain that contains the package 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 that contains the package versions to delete.

type format

string

param format

[REQUIRED]

The format of the package versions to delete.

type namespace

string

param namespace

The namespace of the package versions to be deleted. The package component that specifies its namespace depends on its type. For example:

Note

The namespace is required when deleting package versions of the following formats:

  • Maven

  • Swift

  • generic

  • The namespace of a Maven package version is its groupId .

  • The namespace of an npm or Swift package version is its scope .

  • The namespace of a generic package is its namespace .

  • Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

type package

string

param package

[REQUIRED]

The name of the package with the versions to delete.

type versions

list

param versions

[REQUIRED]

An array of strings that specify the versions of the package to delete.

  • (string) --

type expectedStatus

string

param expectedStatus

The expected status of the package version to delete.

rtype

dict

returns

Response Syntax

{
    'successfulVersions': {
        'string': {
            'revision': 'string',
            'status': 'Published'|'Unfinished'|'Unlisted'|'Archived'|'Disposed'|'Deleted'
        }
    },
    'failedVersions': {
        'string': {
            'errorCode': 'ALREADY_EXISTS'|'MISMATCHED_REVISION'|'MISMATCHED_STATUS'|'NOT_ALLOWED'|'NOT_FOUND'|'SKIPPED',
            'errorMessage': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • successfulVersions (dict) --

      A list of the package versions that were successfully deleted. The status of every successful version will be Deleted .

      • (string) --

        • (dict) --

          Contains the revision and status of a package version.

          • revision (string) --

            The revision of a package version.

          • status (string) --

            The status of a package version.

    • failedVersions (dict) --

      A PackageVersionError object that contains a map of errors codes for the deleted package that failed. The possible error codes are:

      • ALREADY_EXISTS

      • MISMATCHED_REVISION

      • MISMATCHED_STATUS

      • NOT_ALLOWED

      • NOT_FOUND

      • SKIPPED

      • (string) --

        • (dict) --

          l An error associated with package.

          • errorCode (string) --

            The error code associated with the error. Valid error codes are:

            • ALREADY_EXISTS

            • MISMATCHED_REVISION

            • MISMATCHED_STATUS

            • NOT_ALLOWED

            • NOT_FOUND

            • SKIPPED

          • errorMessage (string) --

            The error message associated with the error.

DeleteRepository (updated) Link ¶
Changes (response)
{'repository': {'externalConnections': {'packageFormat': {'cargo'}}}}

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'|'ruby'|'swift'|'cargo',
                '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.

DescribePackage (updated) Link ¶
Changes (request, response)
Request
{'format': {'cargo'}}
Response
{'package': {'format': {'cargo'}}}

Returns a PackageDescription object that contains information about the requested package.

See also: AWS API Documentation

Request Syntax

client.describe_package(
    domain='string',
    domainOwner='string',
    repository='string',
    format='npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
    namespace='string',
    package='string'
)
type domain

string

param domain

[REQUIRED]

The name of the domain that contains the repository that contains the package.

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 that contains the requested package.

type format

string

param format

[REQUIRED]

A format that specifies the type of the requested package.

type namespace

string

param namespace

The namespace of the requested package. The package component that specifies its namespace depends on its type. For example:

Note

The namespace is required when requesting packages of the following formats:

  • Maven

  • Swift

  • generic

  • The namespace of a Maven package version is its groupId .

  • The namespace of an npm or Swift package version is its scope .

  • The namespace of a generic package is its namespace .

  • Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

type package

string

param package

[REQUIRED]

The name of the requested package.

rtype

dict

returns

Response Syntax

{
    'package': {
        'format': 'npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
        'namespace': 'string',
        'name': 'string',
        'originConfiguration': {
            'restrictions': {
                'publish': 'ALLOW'|'BLOCK',
                'upstream': 'ALLOW'|'BLOCK'
            }
        }
    }
}

Response Structure

  • (dict) --

    • package (dict) --

      A PackageDescription object that contains information about the requested package.

      • format (string) --

        A format that specifies the type of the package.

      • namespace (string) --

        The namespace of the package. The package component that specifies its namespace depends on its type. For example:

        • The namespace of a Maven package version is its groupId .

        • The namespace of an npm or Swift package version is its scope .

        • The namespace of a generic package is its namespace .

        • Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

      • name (string) --

        The name of the package.

      • originConfiguration (dict) --

        The package origin configuration for the package.

        • restrictions (dict) --

          A PackageOriginRestrictions object that contains information about the upstream and publish package origin configuration for the package.

          • publish (string) --

            The package origin configuration that determines if new versions of the package can be published directly to the repository.

          • upstream (string) --

            The package origin configuration that determines if new versions of the package can be added to the repository from an external connection or upstream source.

DescribePackageVersion (updated) Link ¶
Changes (request, response)
Request
{'format': {'cargo'}}
Response
{'packageVersion': {'format': {'cargo'}}}

Returns a PackageVersionDescription object that contains information about the requested package version.

See also: AWS API Documentation

Request Syntax

client.describe_package_version(
    domain='string',
    domainOwner='string',
    repository='string',
    format='npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
    namespace='string',
    package='string',
    packageVersion='string'
)
type domain

string

param domain

[REQUIRED]

The name of the domain that contains the repository that contains the package version.

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 that contains the package version.

type format

string

param format

[REQUIRED]

A format that specifies the type of the requested package version.

type namespace

string

param namespace

The namespace of the requested package version. The package component that specifies its namespace depends on its type. For example:

Note

The namespace is required when requesting package versions of the following formats:

  • Maven

  • Swift

  • generic

  • The namespace of a Maven package version is its groupId .

  • The namespace of an npm or Swift package version is its scope .

  • The namespace of a generic package is its namespace .

  • Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

type package

string

param package

[REQUIRED]

The name of the requested package version.

type packageVersion

string

param packageVersion

[REQUIRED]

A string that contains the package version (for example, 3.5.2 ).

rtype

dict

returns

Response Syntax

{
    'packageVersion': {
        'format': 'npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
        'namespace': 'string',
        'packageName': 'string',
        'displayName': 'string',
        'version': 'string',
        'summary': 'string',
        'homePage': 'string',
        'sourceCodeRepository': 'string',
        'publishedTime': datetime(2015, 1, 1),
        'licenses': [
            {
                'name': 'string',
                'url': 'string'
            },
        ],
        'revision': 'string',
        'status': 'Published'|'Unfinished'|'Unlisted'|'Archived'|'Disposed'|'Deleted',
        'origin': {
            'domainEntryPoint': {
                'repositoryName': 'string',
                'externalConnectionName': 'string'
            },
            'originType': 'INTERNAL'|'EXTERNAL'|'UNKNOWN'
        }
    }
}

Response Structure

  • (dict) --

    • packageVersion (dict) --

      A PackageVersionDescription object that contains information about the requested package version.

      • format (string) --

        The format of the package version.

      • namespace (string) --

        The namespace of the package version. The package component that specifies its namespace depends on its type. For example:

        • The namespace of a Maven package version is its groupId .

        • The namespace of an npm or Swift package version is its scope .

        • The namespace of a generic package is its namespace .

        • Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

      • packageName (string) --

        The name of the requested package.

      • displayName (string) --

        The name of the package that is displayed. The displayName varies depending on the package version's format. For example, if an npm package is named ui , is in the namespace vue , and has the format npm , then the displayName is @vue/ui .

      • version (string) --

        The version of the package.

      • summary (string) --

        A summary of the package version. The summary is extracted from the package. The information in and detail level of the summary depends on the package version's format.

      • homePage (string) --

        The homepage associated with the package.

      • sourceCodeRepository (string) --

        The repository for the source code in the package version, or the source code used to build it.

      • publishedTime (datetime) --

        A timestamp that contains the date and time the package version was published.

      • licenses (list) --

        Information about licenses associated with the package version.

        • (dict) --

          Details of the license data.

          • name (string) --

            Name of the license.

          • url (string) --

            The URL for license data.

      • revision (string) --

        The revision of the package version.

      • status (string) --

        A string that contains the status of the package version.

      • origin (dict) --

        A PackageVersionOrigin object that contains information about how the package version was added to the repository.

        • domainEntryPoint (dict) --

          A DomainEntryPoint object that contains information about from which repository or external connection the package version was added to the domain.

          • repositoryName (string) --

            The name of the repository that a package was originally published to.

          • externalConnectionName (string) --

            The name of the external connection that a package was ingested from.

        • originType (string) --

          Describes how the package version was originally added to the domain. An INTERNAL origin type means the package version was published directly to a repository in the domain. An EXTERNAL origin type means the package version was ingested from an external connection.

DescribeRepository (updated) Link ¶
Changes (response)
{'repository': {'externalConnections': {'packageFormat': {'cargo'}}}}

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'|'ruby'|'swift'|'cargo',
                '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': {'externalConnections': {'packageFormat': {'cargo'}}}}

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'|'ruby'|'swift'|'cargo',
                '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.

DisposePackageVersions (updated) Link ¶
Changes (request)
{'format': {'cargo'}}

Deletes the assets in package versions and sets the package versions' status to Disposed . A disposed package version cannot be restored in your repository because its assets are deleted.

To view all disposed package versions in a repository, use ListPackageVersions and set the status parameter to Disposed .

To view information about a disposed package version, use DescribePackageVersion.

See also: AWS API Documentation

Request Syntax

client.dispose_package_versions(
    domain='string',
    domainOwner='string',
    repository='string',
    format='npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
    namespace='string',
    package='string',
    versions=[
        'string',
    ],
    versionRevisions={
        'string': 'string'
    },
    expectedStatus='Published'|'Unfinished'|'Unlisted'|'Archived'|'Disposed'|'Deleted'
)
type domain

string

param domain

[REQUIRED]

The name of the domain that contains the repository you want to dispose.

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 that contains the package versions you want to dispose.

type format

string

param format

[REQUIRED]

A format that specifies the type of package versions you want to dispose.

type namespace

string

param namespace

The namespace of the package versions to be disposed. The package component that specifies its namespace depends on its type. For example:

Note

The namespace is required when disposing package versions of the following formats:

  • Maven

  • Swift

  • generic

  • The namespace of a Maven package version is its groupId .

  • The namespace of an npm or Swift package version is its scope .

  • The namespace of a generic package is its namespace .

  • Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

type package

string

param package

[REQUIRED]

The name of the package with the versions you want to dispose.

type versions

list

param versions

[REQUIRED]

The versions of the package you want to dispose.

  • (string) --

type versionRevisions

dict

param versionRevisions

The revisions of the package versions you want to dispose.

  • (string) --

    • (string) --

type expectedStatus

string

param expectedStatus

The expected status of the package version to dispose.

rtype

dict

returns

Response Syntax

{
    'successfulVersions': {
        'string': {
            'revision': 'string',
            'status': 'Published'|'Unfinished'|'Unlisted'|'Archived'|'Disposed'|'Deleted'
        }
    },
    'failedVersions': {
        'string': {
            'errorCode': 'ALREADY_EXISTS'|'MISMATCHED_REVISION'|'MISMATCHED_STATUS'|'NOT_ALLOWED'|'NOT_FOUND'|'SKIPPED',
            'errorMessage': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • successfulVersions (dict) --

      A list of the package versions that were successfully disposed.

      • (string) --

        • (dict) --

          Contains the revision and status of a package version.

          • revision (string) --

            The revision of a package version.

          • status (string) --

            The status of a package version.

    • failedVersions (dict) --

      A PackageVersionError object that contains a map of errors codes for the disposed package versions that failed. The possible error codes are:

      • ALREADY_EXISTS

      • MISMATCHED_REVISION

      • MISMATCHED_STATUS

      • NOT_ALLOWED

      • NOT_FOUND

      • SKIPPED

      • (string) --

        • (dict) --

          l An error associated with package.

          • errorCode (string) --

            The error code associated with the error. Valid error codes are:

            • ALREADY_EXISTS

            • MISMATCHED_REVISION

            • MISMATCHED_STATUS

            • NOT_ALLOWED

            • NOT_FOUND

            • SKIPPED

          • errorMessage (string) --

            The error message associated with the error.

GetAssociatedPackageGroup (updated) Link ¶
Changes (request)
{'format': {'cargo'}}

Returns the most closely associated package group to the specified package. This API does not require that the package exist in any repository in the domain. As such, GetAssociatedPackageGroup can be used to see which package group's origin configuration applies to a package before that package is in a repository. This can be helpful to check if public packages are blocked without ingesting them.

For information package group association and matching, see Package group definition syntax and matching behavior in the CodeArtifact User Guide .

See also: AWS API Documentation

Request Syntax

client.get_associated_package_group(
    domain='string',
    domainOwner='string',
    format='npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
    namespace='string',
    package='string'
)
type domain

string

param domain

[REQUIRED]

The name of the domain that contains the package from which to get the associated package group.

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 format

string

param format

[REQUIRED]

The format of the package from which to get the associated package group.

type namespace

string

param namespace

The namespace of the package from which to get the associated package group. The package component that specifies its namespace depends on its type. For example:

Note

The namespace is required when getting associated package groups from packages of the following formats:

  • Maven

  • Swift

  • generic

  • The namespace of a Maven package version is its groupId .

  • The namespace of an npm or Swift package version is its scope .

  • The namespace of a generic package is its namespace .

  • Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

type package

string

param package

[REQUIRED]

The package from which to get the associated package group.

rtype

dict

returns

Response Syntax

{
    'packageGroup': {
        'arn': 'string',
        'pattern': 'string',
        'domainName': 'string',
        'domainOwner': 'string',
        'createdTime': datetime(2015, 1, 1),
        'contactInfo': 'string',
        'description': 'string',
        'originConfiguration': {
            'restrictions': {
                'string': {
                    'mode': 'ALLOW'|'ALLOW_SPECIFIC_REPOSITORIES'|'BLOCK'|'INHERIT',
                    'effectiveMode': 'ALLOW'|'ALLOW_SPECIFIC_REPOSITORIES'|'BLOCK'|'INHERIT',
                    'inheritedFrom': {
                        'arn': 'string',
                        'pattern': 'string'
                    },
                    'repositoriesCount': 123
                }
            }
        },
        'parent': {
            'arn': 'string',
            'pattern': 'string'
        }
    },
    'associationType': 'STRONG'|'WEAK'
}

Response Structure

  • (dict) --

    • packageGroup (dict) --

      The package group that is associated with the requested package.

      • arn (string) --

        The ARN of the package group.

      • pattern (string) --

        The pattern of the package group. The pattern determines which packages are associated with the package group.

      • domainName (string) --

        The name of the domain that contains the package group.

      • domainOwner (string) --

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

      • createdTime (datetime) --

        A timestamp that represents the date and time the package group was created.

      • contactInfo (string) --

        The contact information of the package group.

      • description (string) --

        The description of the package group.

      • originConfiguration (dict) --

        The package group origin configuration that determines how package versions can enter repositories.

        • restrictions (dict) --

          The origin configuration settings that determine how package versions can enter repositories.

          • (string) --

            • (dict) --

              Contains information about the configured restrictions of the origin controls of a package group.

              • mode (string) --

                The package group origin restriction setting. If the value of mode is ALLOW , ALLOW_SPECIFIC_REPOSITORIES , or BLOCK , then the value of effectiveMode is the same. Otherwise, when the value is INHERIT , then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT .

              • effectiveMode (string) --

                The effective package group origin restriction setting. If the value of mode is ALLOW , ALLOW_SPECIFIC_REPOSITORIES , or BLOCK , then the value of effectiveMode is the same. Otherwise, when the value of mode is INHERIT , then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT .

              • inheritedFrom (dict) --

                The parent package group that the package group origin restrictions are inherited from.

                • arn (string) --

                  The ARN of the package group.

                • pattern (string) --

                  The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

              • repositoriesCount (integer) --

                The number of repositories in the allowed repository list.

      • parent (dict) --

        The direct parent package group of the package group.

        • arn (string) --

          The ARN of the package group.

        • pattern (string) --

          The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

    • associationType (string) --

      Describes the strength of the association between the package and package group. A strong match is also known as an exact match, and a weak match is known as a relative match.

GetPackageVersionAsset (updated) Link ¶
Changes (request)
{'format': {'cargo'}}

Returns an asset (or file) that is in a package. For example, for a Maven package version, use GetPackageVersionAsset to download a JAR file, a POM file, or any other assets in the package version.

See also: AWS API Documentation

Request Syntax

client.get_package_version_asset(
    domain='string',
    domainOwner='string',
    repository='string',
    format='npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
    namespace='string',
    package='string',
    packageVersion='string',
    asset='string',
    packageVersionRevision='string'
)
type domain

string

param domain

[REQUIRED]

The name of the domain that contains the repository that contains the package version with the requested asset.

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 repository that contains the package version with the requested asset.

type format

string

param format

[REQUIRED]

A format that specifies the type of the package version with the requested asset file.

type namespace

string

param namespace

The namespace of the package version with the requested asset file. The package component that specifies its namespace depends on its type. For example:

Note

The namespace is required when requesting assets from package versions of the following formats:

  • Maven

  • Swift

  • generic

  • The namespace of a Maven package version is its groupId .

  • The namespace of an npm or Swift package version is its scope .

  • The namespace of a generic package is its namespace .

  • Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

type package

string

param package

[REQUIRED]

The name of the package that contains the requested asset.

type packageVersion

string

param packageVersion

[REQUIRED]

A string that contains the package version (for example, 3.5.2 ).

type asset

string

param asset

[REQUIRED]

The name of the requested asset.

type packageVersionRevision

string

param packageVersionRevision

The name of the package version revision that contains the requested asset.

rtype

dict

returns

Response Syntax

{
    'asset': StreamingBody(),
    'assetName': 'string',
    'packageVersion': 'string',
    'packageVersionRevision': 'string'
}

Response Structure

  • (dict) --

    • asset (:class:`.StreamingBody`) --

      The binary file, or asset, that is downloaded.

    • assetName (string) --

      The name of the asset that is downloaded.

    • packageVersion (string) --

      A string that contains the package version (for example, 3.5.2 ).

    • packageVersionRevision (string) --

      The name of the package version revision that contains the downloaded asset.

GetPackageVersionReadme (updated) Link ¶
Changes (both)
{'format': {'cargo'}}

Gets the readme file or descriptive text for a package version.

The returned text might contain formatting. For example, it might contain formatting for Markdown or reStructuredText.

See also: AWS API Documentation

Request Syntax

client.get_package_version_readme(
    domain='string',
    domainOwner='string',
    repository='string',
    format='npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
    namespace='string',
    package='string',
    packageVersion='string'
)
type domain

string

param domain

[REQUIRED]

The name of the domain that contains the repository that contains the package version with the requested readme file.

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 repository that contains the package with the requested readme file.

type format

string

param format

[REQUIRED]

A format that specifies the type of the package version with the requested readme file.

type namespace

string

param namespace

The namespace of the package version with the requested readme file. The package component that specifies its namespace depends on its type. For example:

Note

The namespace is required when requesting the readme from package versions of the following formats:

  • Maven

  • Swift

  • generic

  • The namespace of a Maven package version is its groupId .

  • The namespace of an npm or Swift package version is its scope .

  • The namespace of a generic package is its namespace .

  • Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

type package

string

param package

[REQUIRED]

The name of the package version that contains the requested readme file.

type packageVersion

string

param packageVersion

[REQUIRED]

A string that contains the package version (for example, 3.5.2 ).

rtype

dict

returns

Response Syntax

{
    'format': 'npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
    'namespace': 'string',
    'package': 'string',
    'version': 'string',
    'versionRevision': 'string',
    'readme': 'string'
}

Response Structure

  • (dict) --

    • format (string) --

      The format of the package with the requested readme file.

    • namespace (string) --

      The namespace of the package version with the requested readme file. The package component that specifies its namespace depends on its type. For example:

      • The namespace of a Maven package version is its groupId .

      • The namespace of an npm or Swift package version is its scope .

      • The namespace of a generic package is its namespace .

      • Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

    • package (string) --

      The name of the package that contains the returned readme file.

    • version (string) --

      The version of the package with the requested readme file.

    • versionRevision (string) --

      The current revision associated with the package version.

    • readme (string) --

      The text of the returned readme file.

GetRepositoryEndpoint (updated) Link ¶
Changes (request)
{'format': {'cargo'}}

Returns the endpoint of a repository for a specific package format. A repository has one endpoint for each package format:

  • cargo

  • generic

  • maven

  • npm

  • nuget

  • pypi

  • ruby

  • swift

See also: AWS API Documentation

Request Syntax

client.get_repository_endpoint(
    domain='string',
    domainOwner='string',
    repository='string',
    format='npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo'
)
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 that contains the repository. It does not include dashes or spaces.

type repository

string

param repository

[REQUIRED]

The name of the repository.

type format

string

param format

[REQUIRED]

Returns which endpoint of a repository to return. A repository has one endpoint for each package format.

rtype

dict

returns

Response Syntax

{
    'repositoryEndpoint': 'string'
}

Response Structure

  • (dict) --

    • repositoryEndpoint (string) --

      A string that specifies the URL of the returned endpoint.

ListAssociatedPackages (updated) Link ¶
Changes (response)
{'packages': {'format': {'cargo'}}}

Returns a list of packages associated with the requested package group. For information package group association and matching, see Package group definition syntax and matching behavior in the CodeArtifact User Guide .

See also: AWS API Documentation

Request Syntax

client.list_associated_packages(
    domain='string',
    domainOwner='string',
    packageGroup='string',
    maxResults=123,
    nextToken='string',
    preview=True|False
)
type domain

string

param domain

[REQUIRED]

The name of the domain that contains the package group from which to list associated packages.

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 packageGroup

string

param packageGroup

[REQUIRED]

The pattern of the package group from which to list associated packages.

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.

type preview

boolean

param preview

When this flag is included, ListAssociatedPackages will return a list of packages that would be associated with a package group, even if it does not exist.

rtype

dict

returns

Response Syntax

{
    'packages': [
        {
            'format': 'npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
            'namespace': 'string',
            'package': 'string',
            'associationType': 'STRONG'|'WEAK'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • packages (list) --

      The list of packages associated with the requested package group.

      • (dict) --

        A package associated with a package group.

        • format (string) --

          A format that specifies the type of the associated package.

        • namespace (string) --

          The namespace of the associated package. The package component that specifies its namespace depends on its type. For example:

          • The namespace of a Maven package version is its groupId .

          • The namespace of an npm or Swift package version is its scope .

          • The namespace of a generic package is its namespace .

          • Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

        • package (string) --

          The name of the associated package.

        • associationType (string) --

          Describes the strength of the association between the package and package group. A strong match can be thought of as an exact match, and a weak match can be thought of as a variation match, for example, the package name matches a variation of the package group pattern. For more information about package group pattern matching, including strong and weak matches, see Package group definition syntax and matching behavior in the CodeArtifact User Guide .

    • nextToken (string) --

      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.

ListPackageVersionAssets (updated) Link ¶
Changes (both)
{'format': {'cargo'}}

Returns a list of AssetSummary objects for assets in a package version.

See also: AWS API Documentation

Request Syntax

client.list_package_version_assets(
    domain='string',
    domainOwner='string',
    repository='string',
    format='npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
    namespace='string',
    package='string',
    packageVersion='string',
    maxResults=123,
    nextToken='string'
)
type domain

string

param domain

[REQUIRED]

The name of the domain that contains the repository associated with the package version assets.

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 that contains the package that contains the requested package version assets.

type format

string

param format

[REQUIRED]

The format of the package that contains the requested package version assets.

type namespace

string

param namespace

The namespace of the package version that contains the requested package version assets. The package component that specifies its namespace depends on its type. For example:

Note

The namespace is required requesting assets from package versions of the following formats:

  • Maven

  • Swift

  • generic

  • The namespace of a Maven package version is its groupId .

  • The namespace of an npm or Swift package version is its scope .

  • The namespace of a generic package is its namespace .

  • Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

type package

string

param package

[REQUIRED]

The name of the package that contains the requested package version assets.

type packageVersion

string

param packageVersion

[REQUIRED]

A string that contains the package version (for example, 3.5.2 ).

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

{
    'format': 'npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
    'namespace': 'string',
    'package': 'string',
    'version': 'string',
    'versionRevision': 'string',
    'nextToken': 'string',
    'assets': [
        {
            'name': 'string',
            'size': 123,
            'hashes': {
                'string': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • format (string) --

      The format of the package that contains the requested package version assets.

    • namespace (string) --

      The namespace of the package version that contains the requested package version assets. The package component that specifies its namespace depends on its type. For example:

      • The namespace of a Maven package version is its groupId .

      • The namespace of an npm or Swift package version is its scope .

      • The namespace of a generic package is its namespace .

      • Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

    • package (string) --

      The name of the package that contains the requested package version assets.

    • version (string) --

      The version of the package associated with the requested assets.

    • versionRevision (string) --

      The current revision associated with the package version.

    • nextToken (string) --

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

    • assets (list) --

      The returned list of AssetSummary objects.

      • (dict) --

        Contains details about a package version asset.

        • name (string) --

          The name of the asset.

        • size (integer) --

          The size of the asset.

        • hashes (dict) --

          The hashes of the asset.

          • (string) --

            • (string) --

ListPackageVersionDependencies (updated) Link ¶
Changes (both)
{'format': {'cargo'}}

Returns the direct dependencies for a package version. The dependencies are returned as PackageDependency objects. CodeArtifact extracts the dependencies for a package version from the metadata file for the package format (for example, the package.json file for npm packages and the pom.xml file for Maven). Any package version dependencies that are not listed in the configuration file are not returned.

See also: AWS API Documentation

Request Syntax

client.list_package_version_dependencies(
    domain='string',
    domainOwner='string',
    repository='string',
    format='npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
    namespace='string',
    package='string',
    packageVersion='string',
    nextToken='string'
)
type domain

string

param domain

[REQUIRED]

The name of the domain that contains the repository that contains the requested package version dependencies.

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 that contains the requested package version.

type format

string

param format

[REQUIRED]

The format of the package with the requested dependencies.

type namespace

string

param namespace

The namespace of the package version with the requested dependencies. The package component that specifies its namespace depends on its type. For example:

Note

The namespace is required when listing dependencies from package versions of the following formats:

  • Maven

  • The namespace of a Maven package version is its groupId .

  • The namespace of an npm package version is its scope .

  • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

type package

string

param package

[REQUIRED]

The name of the package versions' package.

type packageVersion

string

param packageVersion

[REQUIRED]

A string that contains the package version (for example, 3.5.2 ).

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

{
    'format': 'npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
    'namespace': 'string',
    'package': 'string',
    'version': 'string',
    'versionRevision': 'string',
    'nextToken': 'string',
    'dependencies': [
        {
            'namespace': 'string',
            'package': 'string',
            'dependencyType': 'string',
            'versionRequirement': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • format (string) --

      A format that specifies the type of the package that contains the returned dependencies.

    • namespace (string) --

      The namespace of the package version that contains the returned dependencies. The package component that specifies its namespace depends on its type. For example:

      Note

      The namespace is required when listing dependencies from package versions of the following formats:

      • Maven

      • The namespace of a Maven package version is its groupId .

      • The namespace of an npm package version is its scope .

      • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

    • package (string) --

      The name of the package that contains the returned package versions dependencies.

    • version (string) --

      The version of the package that is specified in the request.

    • versionRevision (string) --

      The current revision associated with the package version.

    • nextToken (string) --

      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.

    • dependencies (list) --

      The returned list of PackageDependency objects.

      • (dict) --

        Details about a package dependency.

        • namespace (string) --

          The namespace of the package that this package depends on. The package component that specifies its namespace depends on its type. For example:

          • The namespace of a Maven package version is its groupId .

          • The namespace of an npm or Swift package version is its scope .

          • The namespace of a generic package is its namespace .

          • Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

        • package (string) --

          The name of the package that this package depends on.

        • dependencyType (string) --

          The type of a package dependency. The possible values depend on the package type.

          • npm: regular , dev , peer , optional

          • maven: optional , parent , compile , runtime , test , system , provided .

          Note

          Note that parent is not a regular Maven dependency type; instead this is extracted from the <parent> element if one is defined in the package version's POM file.

          • nuget: The dependencyType field is never set for NuGet packages.

          • pypi: Requires-Dist

        • versionRequirement (string) --

          The required version, or version range, of the package that this package depends on. The version format is specific to the package type. For example, the following are possible valid required versions: 1.2.3 , ^2.3.4 , or 4.x .

ListPackageVersions (updated) Link ¶
Changes (both)
{'format': {'cargo'}}

Returns a list of PackageVersionSummary objects for package versions in a repository that match the request parameters. Package versions of all statuses will be returned by default when calling list-package-versions with no --status parameter.

See also: AWS API Documentation

Request Syntax

client.list_package_versions(
    domain='string',
    domainOwner='string',
    repository='string',
    format='npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
    namespace='string',
    package='string',
    status='Published'|'Unfinished'|'Unlisted'|'Archived'|'Disposed'|'Deleted',
    sortBy='PUBLISHED_TIME',
    maxResults=123,
    nextToken='string',
    originType='INTERNAL'|'EXTERNAL'|'UNKNOWN'
)
type domain

string

param domain

[REQUIRED]

The name of the domain that contains the repository that contains the requested package versions.

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 that contains the requested package versions.

type format

string

param format

[REQUIRED]

The format of the package versions you want to list.

type namespace

string

param namespace

The namespace of the package that contains the requested package versions. The package component that specifies its namespace depends on its type. For example:

Note

The namespace is required when deleting package versions of the following formats:

  • Maven

  • Swift

  • generic

  • The namespace of a Maven package version is its groupId .

  • The namespace of an npm or Swift package version is its scope .

  • The namespace of a generic package is its namespace .

  • Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

type package

string

param package

[REQUIRED]

The name of the package for which you want to request package versions.

type status

string

param status

A string that filters the requested package versions by status.

type sortBy

string

param sortBy

How to sort the requested list of package versions.

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.

type originType

string

param originType

The originType used to filter package versions. Only package versions with the provided originType will be returned.

rtype

dict

returns

Response Syntax

{
    'defaultDisplayVersion': 'string',
    'format': 'npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
    'namespace': 'string',
    'package': 'string',
    'versions': [
        {
            'version': 'string',
            'revision': 'string',
            'status': 'Published'|'Unfinished'|'Unlisted'|'Archived'|'Disposed'|'Deleted',
            'origin': {
                'domainEntryPoint': {
                    'repositoryName': 'string',
                    'externalConnectionName': 'string'
                },
                'originType': 'INTERNAL'|'EXTERNAL'|'UNKNOWN'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • defaultDisplayVersion (string) --

      The default package version to display. This depends on the package format:

      • For Maven and PyPI packages, it's the most recently published package version.

      • For npm packages, it's the version referenced by the latest tag. If the latest tag is not set, it's the most recently published package version.

    • format (string) --

      A format of the package.

    • namespace (string) --

      The namespace of the package that contains the requested package versions. The package component that specifies its namespace depends on its type. For example:

      • The namespace of a Maven package version is its groupId .

      • The namespace of an npm or Swift package version is its scope .

      • The namespace of a generic package is its namespace .

      • Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

    • package (string) --

      The name of the package.

    • versions (list) --

      The returned list of PackageVersionSummary objects.

      • (dict) --

        Details about a package version, including its status, version, and revision. The ListPackageVersions operation returns a list of PackageVersionSummary objects.

        • version (string) --

          Information about a package version.

        • revision (string) --

          The revision associated with a package version.

        • status (string) --

          A string that contains the status of the package version. It can be one of the following:

        • origin (dict) --

          A PackageVersionOrigin object that contains information about how the package version was added to the repository.

          • domainEntryPoint (dict) --

            A DomainEntryPoint object that contains information about from which repository or external connection the package version was added to the domain.

            • repositoryName (string) --

              The name of the repository that a package was originally published to.

            • externalConnectionName (string) --

              The name of the external connection that a package was ingested from.

          • originType (string) --

            Describes how the package version was originally added to the domain. An INTERNAL origin type means the package version was published directly to a repository in the domain. An EXTERNAL origin type means the package version was ingested from an external connection.

    • nextToken (string) --

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

ListPackages (updated) Link ¶
Changes (request, response)
Request
{'format': {'cargo'}}
Response
{'packages': {'format': {'cargo'}}}

Returns a list of PackageSummary objects for packages in a repository that match the request parameters.

See also: AWS API Documentation

Request Syntax

client.list_packages(
    domain='string',
    domainOwner='string',
    repository='string',
    format='npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
    namespace='string',
    packagePrefix='string',
    maxResults=123,
    nextToken='string',
    publish='ALLOW'|'BLOCK',
    upstream='ALLOW'|'BLOCK'
)
type domain

string

param domain

[REQUIRED]

The name of the domain that contains the repository that contains the requested packages.

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 that contains the requested packages.

type format

string

param format

The format used to filter requested packages. Only packages from the provided format will be returned.

type namespace

string

param namespace

The namespace prefix used to filter requested packages. Only packages with a namespace that starts with the provided string value are returned. Note that although this option is called --namespace and not --namespace-prefix , it has prefix-matching behavior.

Each package format uses namespace as follows:

  • The namespace of a Maven package version is its groupId .

  • The namespace of an npm or Swift package version is its scope .

  • The namespace of a generic package is its namespace .

  • Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

type packagePrefix

string

param packagePrefix

A prefix used to filter requested packages. Only packages with names that start with packagePrefix 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.

type publish

string

param publish

The value of the Publish package origin control restriction used to filter requested packages. Only packages with the provided restriction are returned. For more information, see PackageOriginRestrictions.

type upstream

string

param upstream

The value of the Upstream package origin control restriction used to filter requested packages. Only packages with the provided restriction are returned. For more information, see PackageOriginRestrictions.

rtype

dict

returns

Response Syntax

{
    'packages': [
        {
            'format': 'npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
            'namespace': 'string',
            'package': 'string',
            'originConfiguration': {
                'restrictions': {
                    'publish': 'ALLOW'|'BLOCK',
                    'upstream': 'ALLOW'|'BLOCK'
                }
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • packages (list) --

      The list of returned PackageSummary objects.

      • (dict) --

        Details about a package, including its format, namespace, and name.

        • format (string) --

          The format of the package.

        • namespace (string) --

          The namespace of the package. The package component that specifies its namespace depends on its type. For example:

          • The namespace of a Maven package version is its groupId .

          • The namespace of an npm or Swift package version is its scope .

          • The namespace of a generic package is its namespace .

          • Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

        • package (string) --

          The name of the package.

        • originConfiguration (dict) --

          A PackageOriginConfiguration object that contains a PackageOriginRestrictions object that contains information about the upstream and publish package origin restrictions.

          • restrictions (dict) --

            A PackageOriginRestrictions object that contains information about the upstream and publish package origin configuration for the package.

            • publish (string) --

              The package origin configuration that determines if new versions of the package can be published directly to the repository.

            • upstream (string) --

              The package origin configuration that determines if new versions of the package can be added to the repository from an external connection or upstream source.

    • nextToken (string) --

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

PublishPackageVersion (updated) Link ¶
Changes (both)
{'format': {'cargo'}}

Creates a new package version containing one or more assets (or files).

The unfinished flag can be used to keep the package version in the Unfinished state until all of its assets have been uploaded (see Package version status in the CodeArtifact user guide ). To set the package version’s status to Published , omit the unfinished flag when uploading the final asset, or set the status using UpdatePackageVersionStatus. Once a package version’s status is set to Published , it cannot change back to Unfinished .

Note

Only generic packages can be published using this API. For more information, see Using generic packages in the CodeArtifact User Guide .

See also: AWS API Documentation

Request Syntax

client.publish_package_version(
    domain='string',
    domainOwner='string',
    repository='string',
    format='npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
    namespace='string',
    package='string',
    packageVersion='string',
    assetContent=b'bytes'|file,
    assetName='string',
    assetSHA256='string',
    unfinished=True|False
)
type domain

string

param domain

[REQUIRED]

The name of the domain that contains the repository that contains the package version to publish.

type domainOwner

string

param domainOwner

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

type repository

string

param repository

[REQUIRED]

The name of the repository that the package version will be published to.

type format

string

param format

[REQUIRED]

A format that specifies the type of the package version with the requested asset file.

The only supported value is generic .

type namespace

string

param namespace

The namespace of the package version to publish.

type package

string

param package

[REQUIRED]

The name of the package version to publish.

type packageVersion

string

param packageVersion

[REQUIRED]

The package version to publish (for example, 3.5.2 ).

type assetContent

bytes or seekable file-like object

param assetContent

[REQUIRED]

The content of the asset to publish.

type assetName

string

param assetName

[REQUIRED]

The name of the asset to publish. Asset names can include Unicode letters and numbers, and the following special characters: ~ ! @ ^ & ( ) - ` _ + [ ] { } ; , . `

type assetSHA256

string

param assetSHA256

[REQUIRED]

The SHA256 hash of the assetContent to publish. This value must be calculated by the caller and provided with the request (see Publishing a generic package in the CodeArtifact User Guide ).

This value is used as an integrity check to verify that the assetContent has not changed after it was originally sent.

type unfinished

boolean

param unfinished

Specifies whether the package version should remain in the unfinished state. If omitted, the package version status will be set to Published (see Package version status in the CodeArtifact User Guide ).

Valid values: unfinished

rtype

dict

returns

Response Syntax

{
    'format': 'npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
    'namespace': 'string',
    'package': 'string',
    'version': 'string',
    'versionRevision': 'string',
    'status': 'Published'|'Unfinished'|'Unlisted'|'Archived'|'Disposed'|'Deleted',
    'asset': {
        'name': 'string',
        'size': 123,
        'hashes': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • format (string) --

      The format of the package version.

    • namespace (string) --

      The namespace of the package version.

    • package (string) --

      The name of the package.

    • version (string) --

      The version of the package.

    • versionRevision (string) --

      The revision of the package version.

    • status (string) --

      A string that contains the status of the package version. For more information, see Package version status in the CodeArtifact User Guide .

    • asset (dict) --

      An AssetSummary for the published asset.

      • name (string) --

        The name of the asset.

      • size (integer) --

        The size of the asset.

      • hashes (dict) --

        The hashes of the asset.

        • (string) --

          • (string) --

PutPackageOriginConfiguration (updated) Link ¶
Changes (request)
{'format': {'cargo'}}

Sets the package origin configuration for a package.

The package origin configuration determines how new versions of a package can be added to a repository. You can allow or block direct publishing of new package versions, or ingestion and retaining of new package versions from an external connection or upstream source. For more information about package origin controls and configuration, see Editing package origin controls in the CodeArtifact User Guide .

PutPackageOriginConfiguration can be called on a package that doesn't yet exist in the repository. When called on a package that does not exist, a package is created in the repository with no versions and the requested restrictions are set on the package. This can be used to preemptively block ingesting or retaining any versions from external connections or upstream repositories, or to block publishing any versions of the package into the repository before connecting any package managers or publishers to the repository.

See also: AWS API Documentation

Request Syntax

client.put_package_origin_configuration(
    domain='string',
    domainOwner='string',
    repository='string',
    format='npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
    namespace='string',
    package='string',
    restrictions={
        'publish': 'ALLOW'|'BLOCK',
        'upstream': 'ALLOW'|'BLOCK'
    }
)
type domain

string

param domain

[REQUIRED]

The name of the domain that contains the repository that contains the package.

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 that contains the package.

type format

string

param format

[REQUIRED]

A format that specifies the type of the package to be updated.

type namespace

string

param namespace

The namespace of the package to be updated. The package component that specifies its namespace depends on its type. For example:

  • The namespace of a Maven package version is its groupId .

  • The namespace of an npm or Swift package version is its scope .

  • The namespace of a generic package is its namespace .

  • Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

type package

string

param package

[REQUIRED]

The name of the package to be updated.

type restrictions

dict

param restrictions

[REQUIRED]

A PackageOriginRestrictions object that contains information about the upstream and publish package origin restrictions. The upstream restriction determines if new package versions can be ingested or retained from external connections or upstream repositories. The publish restriction determines if new package versions can be published directly to the repository.

You must include both the desired upstream and publish restrictions.

  • publish (string) -- [REQUIRED]

    The package origin configuration that determines if new versions of the package can be published directly to the repository.

  • upstream (string) -- [REQUIRED]

    The package origin configuration that determines if new versions of the package can be added to the repository from an external connection or upstream source.

rtype

dict

returns

Response Syntax

{
    'originConfiguration': {
        'restrictions': {
            'publish': 'ALLOW'|'BLOCK',
            'upstream': 'ALLOW'|'BLOCK'
        }
    }
}

Response Structure

  • (dict) --

    • originConfiguration (dict) --

      A PackageOriginConfiguration object that describes the origin configuration set for the package. It contains a PackageOriginRestrictions object that describes how new versions of the package can be introduced to the repository.

      • restrictions (dict) --

        A PackageOriginRestrictions object that contains information about the upstream and publish package origin configuration for the package.

        • publish (string) --

          The package origin configuration that determines if new versions of the package can be published directly to the repository.

        • upstream (string) --

          The package origin configuration that determines if new versions of the package can be added to the repository from an external connection or upstream source.

UpdatePackageVersionsStatus (updated) Link ¶
Changes (request)
{'format': {'cargo'}}

Updates the status of one or more versions of a package. Using UpdatePackageVersionsStatus , you can update the status of package versions to Archived , Published , or Unlisted . To set the status of a package version to Disposed , use DisposePackageVersions.

See also: AWS API Documentation

Request Syntax

client.update_package_versions_status(
    domain='string',
    domainOwner='string',
    repository='string',
    format='npm'|'pypi'|'maven'|'nuget'|'generic'|'ruby'|'swift'|'cargo',
    namespace='string',
    package='string',
    versions=[
        'string',
    ],
    versionRevisions={
        'string': 'string'
    },
    expectedStatus='Published'|'Unfinished'|'Unlisted'|'Archived'|'Disposed'|'Deleted',
    targetStatus='Published'|'Unfinished'|'Unlisted'|'Archived'|'Disposed'|'Deleted'
)
type domain

string

param domain

[REQUIRED]

The name of the domain that contains the repository that contains the package versions with a status to be updated.

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 repository that contains the package versions with the status you want to update.

type format

string

param format

[REQUIRED]

A format that specifies the type of the package with the statuses to update.

type namespace

string

param namespace

The namespace of the package version to be updated. The package component that specifies its namespace depends on its type. For example:

  • The namespace of a Maven package version is its groupId .

  • The namespace of an npm or Swift package version is its scope .

  • The namespace of a generic package is its namespace .

  • Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

type package

string

param package

[REQUIRED]

The name of the package with the version statuses to update.

type versions

list

param versions

[REQUIRED]

An array of strings that specify the versions of the package with the statuses to update.

  • (string) --

type versionRevisions

dict

param versionRevisions

A map of package versions and package version revisions. The map key is the package version (for example, 3.5.2 ), and the map value is the package version revision.

  • (string) --

    • (string) --

type expectedStatus

string

param expectedStatus

The package version’s expected status before it is updated. If expectedStatus is provided, the package version's status is updated only if its status at the time UpdatePackageVersionsStatus is called matches expectedStatus .

type targetStatus

string

param targetStatus

[REQUIRED]

The status you want to change the package version status to.

rtype

dict

returns

Response Syntax

{
    'successfulVersions': {
        'string': {
            'revision': 'string',
            'status': 'Published'|'Unfinished'|'Unlisted'|'Archived'|'Disposed'|'Deleted'
        }
    },
    'failedVersions': {
        'string': {
            'errorCode': 'ALREADY_EXISTS'|'MISMATCHED_REVISION'|'MISMATCHED_STATUS'|'NOT_ALLOWED'|'NOT_FOUND'|'SKIPPED',
            'errorMessage': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • successfulVersions (dict) --

      A list of PackageVersionError objects, one for each package version with a status that failed to update.

      • (string) --

        • (dict) --

          Contains the revision and status of a package version.

          • revision (string) --

            The revision of a package version.

          • status (string) --

            The status of a package version.

    • failedVersions (dict) --

      A list of SuccessfulPackageVersionInfo objects, one for each package version with a status that successfully updated.

      • (string) --

        • (dict) --

          l An error associated with package.

          • errorCode (string) --

            The error code associated with the error. Valid error codes are:

            • ALREADY_EXISTS

            • MISMATCHED_REVISION

            • MISMATCHED_STATUS

            • NOT_ALLOWED

            • NOT_FOUND

            • SKIPPED

          • errorMessage (string) --

            The error message associated with the error.

UpdateRepository (updated) Link ¶
Changes (response)
{'repository': {'externalConnections': {'packageFormat': {'cargo'}}}}

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'|'ruby'|'swift'|'cargo',
                '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.