Skip to main content

repositories

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

Overview

Namerepositories
TypeResource
Idaws.codeartifact.repositories

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the repository. (pattern: <code>[A-Za-z0-9][A-Za-z0-9._-]{1,99}</code>)
administrator_accountstringThe 12-digit account number of the Amazon Web Services account that manages the repository. (pattern: <code>[0-9]{12}</code>)
arnstringThe Amazon Resource Name (ARN) of the repository. (pattern: <code>\S+</code>)
created_timestring (date-time)A timestamp that represents the date and time the repository was created.
descriptionstringA text description of the repository. (pattern: <code>\P{C}*</code>)
domain_namestringThe name of the domain that contains the repository. (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 that contains the repository. It does not include dashes or spaces. (pattern: <code>[0-9]{12}</code>)
external_connectionsarrayAn array of external connections associated with the repository.
upstreamsarrayA list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when CodeArtifact looks for a requested package version. For more information, see Working with upstream repositories.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_repositoryselectdomain, repository, regiondomain-ownerReturns a RepositoryDescription object that contains detailed information about the requested repository.
list_repositoriesselectregionrepository-prefix, max-results, next-tokenReturns a list of RepositorySummary objects. Each RepositorySummary contains information about a repository in the specified Amazon Web Services account and that matches the input parameters.
create_repositoryinsertdomain, repository, regiondomain-ownerCreates a repository.
update_repositoryupdatedomain, repository, regiondomain-ownerUpdate the properties of a repository.
delete_repositorydeletedomain, repository, regiondomain-ownerDeletes a repository.

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 repository to delete.
regionstringAWS region (default: us-east-1)
repositorystringThe name of the repository to delete.
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.
repository-prefixstringA prefix used to filter returned repositories. Only repositories with names that start with repositoryPrefix are returned.

SELECT examples

Returns a RepositoryDescription object that contains detailed information about the requested repository.

SELECT
name,
administrator_account,
arn,
created_time,
description,
domain_name,
domain_owner,
external_connections,
upstreams
FROM aws.codeartifact.repositories
WHERE domain = '{{ domain }}' -- required
AND repository = '{{ repository }}' -- required
AND region = '{{ region }}' -- required
AND `domain-owner` = '{{ domain-owner }}'
;

INSERT examples

Creates a repository.

INSERT INTO aws.codeartifact.repositories (
description,
upstreams,
tags,
domain,
repository,
region,
`domain-owner`
)
SELECT
'{{ description }}',
'{{ upstreams }}',
'{{ tags }}',
'{{ domain }}',
'{{ repository }}',
'{{ region }}',
'{{ domain-owner }}'
RETURNING
repository
;

UPDATE examples

Update the properties of a repository.

UPDATE aws.codeartifact.repositories
SET
description = '{{ description }}',
upstreams = '{{ upstreams }}'
WHERE
domain = '{{ domain }}' --required
AND repository = '{{ repository }}' --required
AND region = '{{ region }}' --required
AND `domain-owner` = '{{ domain-owner}}'
RETURNING
repository;

DELETE examples

Deletes a repository.

DELETE FROM aws.codeartifact.repositories
WHERE domain = '{{ domain }}' --required
AND repository = '{{ repository }}' --required
AND region = '{{ region }}' --required
AND `domain-owner` = '{{ domain-owner }}'
;