Skip to content

Returns a list of PackageVersionSummary objects for package versions in a repository that match the request parameters

Description

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.

Usage

codeartifact_list_package_versions(domain, domainOwner, repository,
  format, namespace, package, status, sortBy, maxResults, nextToken,
  originType)

Arguments

  • domain

    [required] The name of the domain that contains the repository that contains the requested package versions.

  • 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 requested package versions.

  • format

    [required] The format of the package versions you want to list.

  • namespace

    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

    [required] The name of the package for which you want to request package versions.

  • status

    A string that filters the requested package versions by status.

  • sortBy

    How to sort the requested list of package versions.

  • maxResults

    The maximum number of results to return per page.

  • nextToken

    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.

  • originType

    The originType used to filter package versions. Only package versions with the provided originType will be returned.

Value

A list with the following syntax:

list(
  defaultDisplayVersion = "string",
  format = "npm"|"pypi"|"maven"|"nuget"|"generic"|"ruby"|"swift"|"cargo",
  namespace = "string",
  package = "string",
  versions = list(
    list(
      version = "string",
      revision = "string",
      status = "Published"|"Unfinished"|"Unlisted"|"Archived"|"Disposed"|"Deleted",
      origin = list(
        domainEntryPoint = list(
          repositoryName = "string",
          externalConnectionName = "string"
        ),
        originType = "INTERNAL"|"EXTERNAL"|"UNKNOWN"
      )
    )
  ),
  nextToken = "string"
)

Request syntax

svc$list_package_versions(
  domain = "string",
  domainOwner = "string",
  repository = "string",
  format = "npm"|"pypi"|"maven"|"nuget"|"generic"|"ruby"|"swift"|"cargo",
  namespace = "string",
  package = "string",
  status = "Published"|"Unfinished"|"Unlisted"|"Archived"|"Disposed"|"Deleted",
  sortBy = "PUBLISHED_TIME",
  maxResults = 123,
  nextToken = "string",
  originType = "INTERNAL"|"EXTERNAL"|"UNKNOWN"
)