Delete Package Versions
codeartifact_delete_package_versions | R Documentation |
Deletes one or more versions of a package¶
Description¶
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,
list_package_versions
), but you can restore them using
update_package_versions_status
.
Usage¶
codeartifact_delete_package_versions(domain, domainOwner, repository,
format, namespace, package, versions, expectedStatus)
Arguments¶
domain |
[required] The name of the domain that contains the package to delete. |
domainOwner |
The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. |
repository |
[required] The name of the repository that contains the package versions to delete. |
format |
[required] The format of the package versions to delete. |
namespace |
The namespace of the package versions to be deleted. The package component that specifies its namespace depends on its type. For example: The namespace is required when deleting package versions of the following formats:
|
package |
[required] The name of the package with the versions to delete. |
versions |
[required] An array of strings that specify the versions of the package to delete. |
expectedStatus |
The expected status of the package version to delete. |
Value¶
A list with the following syntax:
list(
successfulVersions = list(
list(
revision = "string",
status = "Published"|"Unfinished"|"Unlisted"|"Archived"|"Disposed"|"Deleted"
)
),
failedVersions = list(
list(
errorCode = "ALREADY_EXISTS"|"MISMATCHED_REVISION"|"MISMATCHED_STATUS"|"NOT_ALLOWED"|"NOT_FOUND"|"SKIPPED",
errorMessage = "string"
)
)
)
Request syntax¶
svc$delete_package_versions(
domain = "string",
domainOwner = "string",
repository = "string",
format = "npm"|"pypi"|"maven"|"nuget"|"generic"|"ruby"|"swift"|"cargo",
namespace = "string",
package = "string",
versions = list(
"string"
),
expectedStatus = "Published"|"Unfinished"|"Unlisted"|"Archived"|"Disposed"|"Deleted"
)