update_package_versions_status
async
¶
update_package_versions_status(
domain: DomainName,
repository: RepositoryName,
format: PackageFormat,
package: PackageName,
versions: PackageVersionList,
target_status: PackageVersionStatus,
*,
config_overrides: Optional[AsynccodeartifactClientConfig] = 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/async_codeartifact.py
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 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 | |