package_groups
Creates, updates, deletes, gets or lists a package_groups resource.
Overview
| Name | package_groups |
| Type | Resource |
| Id | aws.codeartifact.package_groups |
Fields
The following fields are returned by SELECT queries:
- describe_package_group
- list_package_groups
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN of the package group. (pattern: <code>\S+</code>) |
contact_info | string | The contact information of the package group. (pattern: <code>\P{C}*</code>) |
created_time | string (date-time) | A timestamp that represents the date and time the package group was created. |
description | string | The description of the package group. (pattern: <code>\P{C}*</code>) |
domain_name | string | The name of the domain that contains the package group. (pattern: <code>[a-z][a-z0-9-]{0,48}[a-z0-9]</code>) |
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. (pattern: <code>[0-9]{12}</code>) |
origin_configuration | object | The package group origin configuration that determines how package versions can enter repositories. |
parent | object | The direct parent package group of the package group. |
pattern_ | string | The pattern of the package group. The pattern determines which packages are associated with the package group. (pattern: <code>[^\p{C}\p{IsWhitespace}]+</code>) |
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN of the package group. (pattern: <code>\S+</code>) |
contact_info | string | The contact information of the package group. (pattern: <code>\P{C}*</code>) |
created_time | string (date-time) | A timestamp that represents the date and time the repository was created. |
description | string | The description of the package group. (pattern: <code>\P{C}*</code>) |
domain_name | string | The domain that contains the package group. (pattern: <code>[a-z][a-z0-9-]{0,48}[a-z0-9]</code>) |
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. (pattern: <code>[0-9]{12}</code>) |
origin_configuration | object | Details about the package origin configuration of a package group. |
parent | object | The direct parent package group of the package group. |
pattern_ | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_package_group | select | domain, package-group, region | domain-owner | Returns a PackageGroupDescription object that contains information about the requested package group. |
list_package_groups | select | domain, region | domain-owner, max-results, next-token, prefix | Returns a list of package groups in the requested domain. |
create_package_group | insert | domain, region, packageGroup | domain-owner | 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. |
update_package_group | update | domain, region, packageGroup | domain-owner | 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_package_group_origin_configuration | update | domain, package-group, region | domain-owner | Updates 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_group | delete | domain, package-group, region | domain-owner | 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. |
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 |
|---|---|---|
domain | string | The domain that contains the package group to be deleted. |
package-group | string | The pattern of the package group to be deleted. |
region | string | AWS region (default: us-east-1) |
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. |
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. |
prefix | string | A prefix for which to search package groups. When included, ListPackageGroups will return only package groups with patterns that match the prefix. |
SELECT examples
- describe_package_group
- list_package_groups
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 }}'
;
Returns a list of package groups in the requested domain.
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 region = '{{ region }}' -- required
AND `domain-owner` = '{{ domain-owner }}'
AND `max-results` = '{{ max-results }}'
AND `next-token` = '{{ next-token }}'
AND prefix = '{{ prefix }}'
;
INSERT examples
- create_package_group
- Manifest
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
;
# Description fields are for documentation purposes
- name: package_groups
props:
- name: domain
value: "{{ domain }}"
description: Required parameter for the package_groups resource.
- name: region
value: "{{ region }}"
description: Required parameter for the package_groups resource.
- name: packageGroup
value: "{{ packageGroup }}"
- name: contactInfo
value: "{{ contactInfo }}"
- name: description
value: "{{ description }}"
- name: tags
value:
- key: "{{ key }}"
value: "{{ value }}"
- name: domain-owner
value: "{{ domain-owner }}"
description: The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
description: The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
UPDATE examples
- update_package_group
- update_package_group_origin_configuration
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;
Updates 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.
UPDATE aws.codeartifact.package_groups
SET
restrictions = '{{ restrictions }}',
addAllowedRepositories = '{{ addAllowedRepositories }}',
removeAllowedRepositories = '{{ removeAllowedRepositories }}'
WHERE
domain = '{{ domain }}' --required
AND `package-group` = '{{ package-group }}' --required
AND region = '{{ region }}' --required
AND `domain-owner` = '{{ domain-owner}}'
RETURNING
allowed_repository_updates,
package_group;
DELETE examples
- delete_package_group
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 }}'
;