package_version_assets
Creates, updates, deletes, gets or lists a package_version_assets resource.
Overview
| Name | package_version_assets |
| Type | Resource |
| Id | aws.codeartifact.package_version_assets |
Fields
The following fields are returned by SELECT queries:
- get_package_version_asset
- list_package_version_assets
| Name | Datatype | Description |
|---|---|---|
asset | string (byte) | The binary file, or asset, that is downloaded. |
asset_name | string | The name of the asset that is downloaded. (pattern: <code>\P{C}+</code>) |
package_version | string | A string that contains the package version (for example, 3.5.2). (pattern: <code>[^#/\s]+</code>) |
package_version_revision | string | The name of the package version revision that contains the downloaded asset. (pattern: <code>\S+</code>) |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the asset. (pattern: <code>\P{C}+</code>) |
hashes | object | The hashes of the asset. |
size | integer (int64) | The size of the asset. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_package_version_asset | select | domain, repository, format, package, version, asset, region | domain-owner, namespace, revision | 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. |
list_package_version_assets | select | domain, repository, format, package, version, region | domain-owner, namespace, max-results, next-token | Returns 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.
| Name | Datatype | Description |
|---|---|---|
asset | string | The name of the requested asset. |
domain | string | The name of the domain that contains the repository associated with the package version assets. |
format | string | The format of the package that contains the requested package version assets. |
package | string | The name of the package that contains the requested package version assets. |
region | string | AWS region (default: us-east-1) |
repository | string | The name of the repository that contains the package that contains the requested package version assets. |
version | string | A string that contains the package version (for example, 3.5.2). |
domain-owner | string | The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. |
max-results | integer | The maximum number of results to return per page. |
namespace | string | The 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-token | string | 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. |
revision | string | The name of the package version revision that contains the requested asset. |
SELECT examples
- get_package_version_asset
- list_package_version_assets
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 }}'
;
Returns a list of AssetSummary objects for assets in a package version.
SELECT
name,
hashes,
size
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 region = '{{ region }}' -- required
AND `domain-owner` = '{{ domain-owner }}'
AND namespace = '{{ namespace }}'
AND `max-results` = '{{ max-results }}'
AND `next-token` = '{{ next-token }}'
;