list_package_versions
async
¶
list_package_versions(
domain: DomainName,
repository: RepositoryName,
format: PackageFormat,
package: PackageName,
*,
config_overrides: Optional[AsynccodeartifactClientConfig] = None,
domain_owner: Optional[AccountId] = None,
namespace: Optional[PackageNamespace] = None,
status: Optional[PackageVersionStatus] = None,
sort_by: Optional[PackageVersionSortType] = None,
max_results: Optional[ListPackageVersionsMaxResults] = None,
next_token: Optional[PaginationToken] = None,
origin_type: Optional[PackageVersionOriginType] = None,
) -> ListPackageVersionsResult
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.
Parameters:
-
domain(DomainName) –The name of the domain that contains the repository that contains the requested package versions.
-
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 name of the repository that contains the requested package versions.
-
format(PackageFormat) –The format of the package versions you want to list.
-
namespace(Optional[PackageNamespace], default:None) –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 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.
-
-
package(PackageName) –The name of the package for which you want to request package versions.
-
status(Optional[PackageVersionStatus], default:None) –A string that filters the requested package versions by status.
-
sort_by(Optional[PackageVersionSortType], default:None) –How to sort the requested list of package versions.
-
max_results(Optional[ListPackageVersionsMaxResults], default:None) –The maximum number of results to return per page.
-
next_token(Optional[PaginationToken], default:None) –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.
-
origin_type(Optional[PackageVersionOriginType], default:None) –The
originTypeused to filter package versions. Only package versions with the providedoriginTypewill be returned.
Raises:
-
AccessDeniedException–The operation did not succeed because of an unauthorized access attempt.
-
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
2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 | |