repositories
Creates, updates, deletes, gets or lists a repositories resource.
Overview
| Name | repositories |
| Type | Resource |
| Id | aws.codeartifact.repositories |
Fields
The following fields are returned by SELECT queries:
- describe_repository
- list_repositories
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the repository. (pattern: <code>[A-Za-z0-9][A-Za-z0-9._-]{1,99}</code>) |
administrator_account | string | The 12-digit account number of the Amazon Web Services account that manages the repository. (pattern: <code>[0-9]{12}</code>) |
arn | string | The Amazon Resource Name (ARN) of the repository. (pattern: <code>\S+</code>) |
created_time | string (date-time) | A timestamp that represents the date and time the repository was created. |
description | string | A text description of the repository. (pattern: <code>\P{C}*</code>) |
domain_name | string | The name of the domain that contains the repository. (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 that contains the repository. It does not include dashes or spaces. (pattern: <code>[0-9]{12}</code>) |
external_connections | array | An array of external connections associated with the repository. |
upstreams | array | A 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. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the repository. (pattern: <code>[A-Za-z0-9][A-Za-z0-9._-]{1,99}</code>) |
administrator_account | string | The Amazon Web Services account ID that manages the repository. (pattern: <code>[0-9]{12}</code>) |
arn | string | The ARN of the repository. (pattern: <code>\S+</code>) |
created_time | string (date-time) | A timestamp that represents the date and time the repository was created. |
description | string | The description of the repository. (pattern: <code>\P{C}*</code>) |
domain_name | string | The name of the domain that contains the repository. (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>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_repository | select | domain, repository, region | domain-owner | Returns a RepositoryDescription object that contains detailed information about the requested repository. |
list_repositories | select | region | repository-prefix, max-results, next-token | Returns 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_repository | insert | domain, repository, region | domain-owner | Creates a repository. |
update_repository | update | domain, repository, region | domain-owner | Update the properties of a repository. |
delete_repository | delete | domain, repository, region | domain-owner | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
domain | string | The name of the domain that contains the repository to delete. |
region | string | AWS region (default: us-east-1) |
repository | string | The name of the repository to delete. |
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. |
repository-prefix | string | A prefix used to filter returned repositories. Only repositories with names that start with repositoryPrefix are returned. |
SELECT examples
- describe_repository
- list_repositories
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 }}'
;
Returns 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.
SELECT
name,
administrator_account,
arn,
created_time,
description,
domain_name,
domain_owner
FROM aws.codeartifact.repositories
WHERE region = '{{ region }}' -- required
AND `repository-prefix` = '{{ repository-prefix }}'
AND `max-results` = '{{ max-results }}'
AND `next-token` = '{{ next-token }}'
;
INSERT examples
- create_repository
- Manifest
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
;
# Description fields are for documentation purposes
- name: repositories
props:
- name: domain
value: "{{ domain }}"
description: Required parameter for the repositories resource.
- name: repository
value: "{{ repository }}"
description: Required parameter for the repositories resource.
- name: region
value: "{{ region }}"
description: Required parameter for the repositories resource.
- name: description
value: "{{ description }}"
- name: upstreams
value:
- repositoryName: "{{ repositoryName }}"
- 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_repository
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
- delete_repository
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 }}'
;