list_package_versions
(**kwargs)¶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.
See also: AWS API Documentation
Request Syntax
response = client.list_package_versions(
domain='string',
domainOwner='string',
repository='string',
format='npm'|'pypi'|'maven'|'nuget'|'generic',
namespace='string',
package='string',
status='Published'|'Unfinished'|'Unlisted'|'Archived'|'Disposed'|'Deleted',
sortBy='PUBLISHED_TIME',
maxResults=123,
nextToken='string',
originType='INTERNAL'|'EXTERNAL'|'UNKNOWN'
)
[REQUIRED]
The name of the domain that contains the repository that contains the requested package versions.
[REQUIRED]
The name of the repository that contains the requested package versions.
[REQUIRED]
The format of the package versions you want to list.
The namespace of the package that contains the requested package versions. The package component that specifies its namespace depends on its type. For example:
groupId
.scope
.namespace
.[REQUIRED]
The name of the package for which you want to request package versions.
originType
used to filter package versions. Only package versions with the provided originType
will be returned.dict
Response Syntax
{
'defaultDisplayVersion': 'string',
'format': 'npm'|'pypi'|'maven'|'nuget'|'generic',
'namespace': 'string',
'package': 'string',
'versions': [
{
'version': 'string',
'revision': 'string',
'status': 'Published'|'Unfinished'|'Unlisted'|'Archived'|'Disposed'|'Deleted',
'origin': {
'domainEntryPoint': {
'repositoryName': 'string',
'externalConnectionName': 'string'
},
'originType': 'INTERNAL'|'EXTERNAL'|'UNKNOWN'
}
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
defaultDisplayVersion (string) --
The default package version to display. This depends on the package format:
latest
tag. If the latest
tag is not set, it's the most recently published package version.format (string) --
A format of the package.
namespace (string) --
The namespace of the package that contains the requested package versions. The package component that specifies its namespace depends on its type. For example:
groupId
.scope
.package (string) --
The name of the package.
versions (list) --
The returned list of PackageVersionSummary objects.
(dict) --
Details about a package version, including its status, version, and revision. The ListPackageVersions operation returns a list of PackageVersionSummary
objects.
version (string) --
Information about a package version.
revision (string) --
The revision associated with a package version.
status (string) --
A string that contains the status of the package version. It can be one of the following:
origin (dict) --
A PackageVersionOrigin object that contains information about how the package version was added to the repository.
domainEntryPoint (dict) --
A DomainEntryPoint object that contains information about from which repository or external connection the package version was added to the domain.
repositoryName (string) --
The name of the repository that a package was originally published to.
externalConnectionName (string) --
The name of the external connection that a package was ingested from.
originType (string) --
Describes how the package version was originally added to the domain. An INTERNAL
origin type means the package version was published directly to a repository in the domain. An EXTERNAL
origin type means the package version was ingested from an external connection.
nextToken (string) --
If there are additional results, this is the token for the next set of results.
Exceptions
CodeArtifact.Client.exceptions.AccessDeniedException
CodeArtifact.Client.exceptions.InternalServerException
CodeArtifact.Client.exceptions.ResourceNotFoundException
CodeArtifact.Client.exceptions.ThrottlingException
CodeArtifact.Client.exceptions.ValidationException