Skip to main content

package_groups

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

Overview

Namepackage_groups
TypeResource
Idaws.codeartifact.package_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe ARN of the package group. (pattern: <code>\S+</code>)
contact_infostringThe contact information of the package group. (pattern: <code>\P{C}*</code>)
created_timestring (date-time)A timestamp that represents the date and time the package group was created.
descriptionstringThe description of the package group. (pattern: <code>\P{C}*</code>)
domain_namestringThe name of the domain that contains the package group. (pattern: <code>[a-z][a-z0-9-]{0,48}[a-z0-9]</code>)
domain_ownerstringThe 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces. (pattern: <code>[0-9]{12}</code>)
origin_configurationobjectThe package group origin configuration that determines how package versions can enter repositories.
parentobjectThe direct parent package group of the package group.
pattern_stringThe pattern of the package group. The pattern determines which packages are associated with the package group. (pattern: <code>[^\p{C}\p{IsWhitespace}]+</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_package_groupselectdomain, package-group, regiondomain-ownerReturns a PackageGroupDescription object that contains information about the requested package group.
list_package_groupsselectdomain, regiondomain-owner, max-results, next-token, prefixReturns a list of package groups in the requested domain.
create_package_groupinsertdomain, region, packageGroupdomain-ownerCreates a package group. For more information about creating package groups, including example CLI commands, see Create a package group in the CodeArtifact User Guide.
update_package_groupupdatedomain, region, packageGroupdomain-ownerUpdates a package group. This API cannot be used to update a package group's origin configuration or pattern. To update a package group's origin configuration, use UpdatePackageGroupOriginConfiguration.
update_package_group_origin_configurationupdatedomain, package-group, regiondomain-ownerUpdates the package origin configuration for a package group. The package origin configuration determines how new versions of a package can be added to a repository. You can allow or block direct publishing of new package versions, or ingestion and retaining of new package versions from an external connection or upstream source. For more information about package group origin controls and configuration, see Package group origin controls in the CodeArtifact User Guide.
delete_package_groupdeletedomain, package-group, regiondomain-ownerDeletes a package group. Deleting a package group does not delete packages or package versions associated with the package group. When a package group is deleted, the direct child package groups will become children of the package group's direct parent package group. Therefore, if any of the child groups are inheriting any settings from the parent, those settings could change.

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 domain that contains the package group to be deleted.
package-groupstringThe pattern of the package group to be deleted.
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.
prefixstringA prefix for which to search package groups. When included, ListPackageGroups will return only package groups with patterns that match the prefix.

SELECT examples

Returns a PackageGroupDescription object that contains information about the requested package group.

SELECT
arn,
contact_info,
created_time,
description,
domain_name,
domain_owner,
origin_configuration,
parent,
pattern_
FROM aws.codeartifact.package_groups
WHERE domain = '{{ domain }}' -- required
AND `package-group` = '{{ package-group }}' -- required
AND region = '{{ region }}' -- required
AND `domain-owner` = '{{ domain-owner }}'
;

INSERT examples

Creates a package group. For more information about creating package groups, including example CLI commands, see Create a package group in the CodeArtifact User Guide.

INSERT INTO aws.codeartifact.package_groups (
packageGroup,
contactInfo,
description,
tags,
domain,
region,
`domain-owner`
)
SELECT
'{{ packageGroup }}' /* required */,
'{{ contactInfo }}',
'{{ description }}',
'{{ tags }}',
'{{ domain }}',
'{{ region }}',
'{{ domain-owner }}'
RETURNING
package_group
;

UPDATE examples

Updates a package group. This API cannot be used to update a package group's origin configuration or pattern. To update a package group's origin configuration, use UpdatePackageGroupOriginConfiguration.

UPDATE aws.codeartifact.package_groups
SET
packageGroup = '{{ packageGroup }}',
contactInfo = '{{ contactInfo }}',
description = '{{ description }}'
WHERE
domain = '{{ domain }}' --required
AND region = '{{ region }}' --required
AND packageGroup = '{{ packageGroup }}' --required
AND `domain-owner` = '{{ domain-owner}}'
RETURNING
package_group;

DELETE examples

Deletes a package group. Deleting a package group does not delete packages or package versions associated with the package group. When a package group is deleted, the direct child package groups will become children of the package group's direct parent package group. Therefore, if any of the child groups are inheriting any settings from the parent, those settings could change.

DELETE FROM aws.codeartifact.package_groups
WHERE domain = '{{ domain }}' --required
AND `package-group` = '{{ package-group }}' --required
AND region = '{{ region }}' --required
AND `domain-owner` = '{{ domain-owner }}'
;