Skip to main content

package_groups

Creates, updates, deletes or gets a package_group resource or lists package_groups in a region

Overview

Namepackage_groups
TypeResource
DescriptionThe resource schema to create a CodeArtifact package group.
Idaws.codeartifact.package_groups

Fields

NameDatatypeDescription
domain_namestringThe name of the domain that contains the package group.
domain_ownerstringThe 12-digit account ID of the AWS account that owns the domain.
patternstringThe package group pattern that is used to gather packages.
contact_infostringThe contact info of the package group.
descriptionstringThe text description of the package group.
origin_configurationobjectThe package origin configuration of the package group.
tagsarrayAn array of key-value pairs to apply to the package group.
arnstringThe ARN of the package group.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTPattern, DomainName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all package_groups in a region.

SELECT
region,
domain_name,
domain_owner,
pattern,
contact_info,
description,
origin_configuration,
tags,
arn
FROM aws.codeartifact.package_groups
WHERE region = 'us-east-1';

Gets all properties from an individual package_group.

SELECT
region,
domain_name,
domain_owner,
pattern,
contact_info,
description,
origin_configuration,
tags,
arn
FROM aws.codeartifact.package_groups
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

Use the following StackQL query and manifest file to create a new package_group resource, using stack-deploy.

/*+ create */
INSERT INTO aws.codeartifact.package_groups (
DomainName,
Pattern,
region
)
SELECT
'{{ DomainName }}',
'{{ Pattern }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.codeartifact.package_groups
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

To operate on the package_groups resource, the following permissions are required:

Create

codeartifact:CreatePackageGroup,
codeartifact:DescribePackageGroup,
codeartifact:UpdatePackageGroup,
codeartifact:UpdatePackageGroupOriginConfiguration,
codeartifact:ListAllowedRepositoriesForGroup,
codeartifact:ListTagsForResource,
codeartifact:TagResource

Read

codeartifact:DescribePackageGroup,
codeartifact:ListAllowedRepositoriesForGroup,
codeartifact:ListTagsForResource

Update

codeartifact:UpdatePackageGroup,
codeartifact:UpdatePackageGroupOriginConfiguration,
codeartifact:DescribePackageGroup,
codeartifact:ListAllowedRepositoriesForGroup,
codeartifact:ListTagsForResource,
codeartifact:TagResource,
codeartifact:UntagResource

Delete

codeartifact:DeletePackageGroup,
codeartifact:DescribePackageGroup

List

codeartifact:ListPackageGroups