v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1438166195.6 KB

Updates the status of one or more versions of a package. Using <code>UpdatePackageVersionsStatus</code>, you can update the status of package versions to <code>Archived</code>, <code>Published</code>, or <code>Unlisted</code>. To set the status of a package version to <code>Disposed</code>, use <a href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_DisposePackageVersions.html">DisposePackageVersions</a>.

post/v1/package/versions/update_status#domain&repository&format&package

Query parameters

domainstring required

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

domain-ownerstring

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

repositorystring required

The repository that contains the package versions with the status you want to update.

format'npm' | 'pypi' | 'maven' | 'nuget' | 'generic' required

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

namespacestring
<p>The namespace of the package version to be updated. The package version component that specifies its namespace depends on its type. For example:</p> <ul> <li> <p> The namespace of a Maven package version is its <code>groupId</code>. </p> </li> <li> <p> The namespace of an npm package version is its <code>scope</code>. </p> </li> <li> <p> Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace. </p> </li> <li> <p> The namespace of a generic package is its <code>namespace</code>. </p> </li> </ul>
packagestring required

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

Request body

versionsPackageVersion[] required

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

versionRevisionsobject

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

expectedStatus'Published' | 'Unfinished' | 'Unlisted' | 'Archived' | 'Disposed' | 'Deleted'

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

targetStatus'Published' | 'Unfinished' | 'Unlisted' | 'Archived' | 'Disposed' | 'Deleted' required

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

Response

Success

successfulVersionsobject

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

failedVersionsobject

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