Skip to main content

package_version_assets

Creates, updates, deletes, gets or lists a package_version_assets resource.

Overview

Namepackage_version_assets
TypeResource
Idaws.codeartifact.package_version_assets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
assetstring (byte)The binary file, or asset, that is downloaded.
asset_namestringThe name of the asset that is downloaded. (pattern: <code>\P{C}+</code>)
package_versionstringA string that contains the package version (for example, 3.5.2). (pattern: <code>[^#/\s]+</code>)
package_version_revisionstringThe name of the package version revision that contains the downloaded asset. (pattern: <code>\S+</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_package_version_assetselectdomain, repository, format, package, version, asset, regiondomain-owner, namespace, revisionReturns an asset (or file) that is in a package. For example, for a Maven package version, use GetPackageVersionAsset to download a JAR file, a POM file, or any other assets in the package version.
list_package_version_assetsselectdomain, repository, format, package, version, regiondomain-owner, namespace, max-results, next-tokenReturns a list of AssetSummary objects for assets in a package version.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
assetstringThe name of the requested asset.
domainstringThe name of the domain that contains the repository associated with the package version assets.
formatstringThe format of the package that contains the requested package version assets.
packagestringThe name of the package that contains the requested package version assets.
regionstringAWS region (default: us-east-1)
repositorystringThe name of the repository that contains the package that contains the requested package version assets.
versionstringA string that contains the package version (for example, 3.5.2).
domain-ownerstringThe 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
max-resultsintegerThe maximum number of results to return per page.
namespacestringThe namespace of the package version that contains the requested package version assets. The package component that specifies its namespace depends on its type. For example: The namespace is required requesting assets from 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.
next-tokenstringThe 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.
revisionstringThe name of the package version revision that contains the requested asset.

SELECT examples

Returns an asset (or file) that is in a package. For example, for a Maven package version, use GetPackageVersionAsset to download a JAR file, a POM file, or any other assets in the package version.

SELECT
asset,
asset_name,
package_version,
package_version_revision
FROM aws.codeartifact.package_version_assets
WHERE domain = '{{ domain }}' -- required
AND repository = '{{ repository }}' -- required
AND format = '{{ format }}' -- required
AND package = '{{ package }}' -- required
AND version = '{{ version }}' -- required
AND asset = '{{ asset }}' -- required
AND region = '{{ region }}' -- required
AND `domain-owner` = '{{ domain-owner }}'
AND namespace = '{{ namespace }}'
AND revision = '{{ revision }}'
;