Skip to main content

associated_packages

Creates, updates, deletes, gets or lists an associated_packages resource.

Overview

Nameassociated_packages
TypeResource
Idaws.codeartifact.associated_packages

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
association_typestringDescribes the strength of the association between the package and package group. A strong match can be thought of as an exact match, and a weak match can be thought of as a variation match, for example, the package name matches a variation of the package group pattern. For more information about package group pattern matching, including strong and weak matches, see Package group definition syntax and matching behavior in the CodeArtifact User Guide. (STRONG, WEAK)
format_stringA format that specifies the type of the associated package. (npm, pypi, maven, nuget, generic, ruby, swift, cargo)
namespacestringThe namespace of the associated package. The package component that specifies its namespace depends on its type. For example: 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. (pattern: <code>[^#/\s]+</code>)
packagestringThe name of the associated package. (pattern: <code>[^#/\s]+</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_associated_packagesselectdomain, package-group, regiondomain-owner, max-results, next-token, previewReturns a list of packages associated with the requested package group. For information package group association and matching, see Package group definition syntax and matching behavior in the CodeArtifact User Guide.

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
domainstringThe name of the domain that contains the package group from which to list associated packages.
package-groupstringThe pattern of the package group from which to list associated packages.
regionstringAWS region (default: us-east-1)
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.
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.
previewbooleanWhen this flag is included, ListAssociatedPackages will return a list of packages that would be associated with a package group, even if it does not exist.

SELECT examples

Returns a list of packages associated with the requested package group. For information package group association and matching, see Package group definition syntax and matching behavior in the CodeArtifact User Guide.

SELECT
association_type,
format_,
namespace,
package
FROM aws.codeartifact.associated_packages
WHERE domain = '{{ domain }}' -- required
AND `package-group` = '{{ package-group }}' -- required
AND region = '{{ region }}' -- required
AND `domain-owner` = '{{ domain-owner }}'
AND `max-results` = '{{ max-results }}'
AND `next-token` = '{{ next-token }}'
AND preview = '{{ preview }}'
;