update_package_versions_status
¶
update_package_versions_status(
domain: DomainName,
repository: RepositoryName,
format: PackageFormat,
package: PackageName,
versions: PackageVersionList,
target_status: PackageVersionStatus,
*,
config_overrides: Optional[codeartifactClientConfig] = None,
domain_owner: Optional[AccountId] = None,
namespace: Optional[PackageNamespace] = None,
version_revisions: Optional[PackageVersionRevisionMap] = None,
expected_status: Optional[PackageVersionStatus] = None,
) -> UpdatePackageVersionsStatusResult
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.
Parameters:
-
domain(DomainName) –The name of the domain that contains the repository that contains the package versions with a status to be updated.
-
domain_owner(Optional[AccountId], default:None) –The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
-
repository(RepositoryName) –The repository that contains the package versions with the status you want to update.
-
format(PackageFormat) –A format that specifies the type of the package with the statuses to update.
-
namespace(Optional[PackageNamespace], default:None) –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.
-
-
package(PackageName) –The name of the package with the version statuses to update.
-
versions(PackageVersionList) –An array of strings that specify the versions of the package with the statuses to update.
-
version_revisions(Optional[PackageVersionRevisionMap], default:None) –A map of package versions and package version revisions. The map
keyis the package version (for example,3.5.2), and the mapvalueis the package version revision. -
expected_status(Optional[PackageVersionStatus], default:None) –The package version’s expected status before it is updated. If
expectedStatusis provided, the package version's status is updated only if its status at the timeUpdatePackageVersionsStatusis called matchesexpectedStatus. -
target_status(PackageVersionStatus) –The status you want to change the package version status to.
Raises:
-
AccessDeniedException–The operation did not succeed because of an unauthorized access attempt.
-
ConflictException–The operation did not succeed because prerequisites are not met.
-
InternalServerException–The operation did not succeed because of an error that occurred inside CodeArtifact.
-
ResourceNotFoundException–The operation did not succeed because the resource requested is not found in the service.
-
ThrottlingException–The operation did not succeed because too many requests are sent to the service.
-
ValidationException–The operation did not succeed because a parameter in the request was sent with an invalid value.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_codeartifact/_services/codeartifact.py
3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 | |