Skip to main content

domains

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

Overview

Namedomains
TypeResource
Idaws.codeartifact.domains

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the domain. (pattern: <code>[a-z][a-z0-9-]{0,48}[a-z0-9]</code>)
arnstringThe Amazon Resource Name (ARN) of the domain. (pattern: <code>\S+</code>)
asset_size_bytesinteger (int64)The total size of all assets in the domain.
created_timestring (date-time)A timestamp that represents the date and time the domain was created.
encryption_keystringThe ARN of an Key Management Service (KMS) key associated with a domain. (pattern: <code>\S+</code>)
ownerstringThe Amazon Web Services account ID that owns the domain. (pattern: <code>[0-9]{12}</code>)
repository_countintegerThe number of repositories in the domain.
s_3_bucket_arnstringThe Amazon Resource Name (ARN) of the Amazon S3 bucket that is used to store package assets in the domain. (pattern: <code>\S+</code>)
statusstringThe current status of a domain. (Active, Deleted)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_domainselectdomain, regiondomain-ownerReturns a DomainDescription object that contains information about the requested domain.
list_domainsselectregionReturns a list of DomainSummary objects for all domains owned by the Amazon Web Services account that makes this call. Each returned DomainSummary object contains information about a domain.
create_domaininsertdomain, regionCreates a domain. CodeArtifact domains make it easier to manage multiple repositories across an organization. You can use a domain to apply permissions across many repositories owned by different Amazon Web Services accounts. An asset is stored only once in a domain, even if it's in multiple repositories. Although you can have multiple domains, we recommend a single production domain that contains all published artifacts so that your development teams can find and share packages. You can use a second pre-production domain to test changes to the production domain configuration.
delete_domaindeletedomain, regiondomain-ownerDeletes a domain. You cannot delete a domain that contains repositories. If you want to delete a domain with repositories, first delete its repositories.

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 to delete.
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.

SELECT examples

Returns a DomainDescription object that contains information about the requested domain.

SELECT
name,
arn,
asset_size_bytes,
created_time,
encryption_key,
owner,
repository_count,
s_3_bucket_arn,
status
FROM aws.codeartifact.domains
WHERE domain = '{{ domain }}' -- required
AND region = '{{ region }}' -- required
AND `domain-owner` = '{{ domain-owner }}'
;

INSERT examples

Creates a domain. CodeArtifact domains make it easier to manage multiple repositories across an organization. You can use a domain to apply permissions across many repositories owned by different Amazon Web Services accounts. An asset is stored only once in a domain, even if it's in multiple repositories. Although you can have multiple domains, we recommend a single production domain that contains all published artifacts so that your development teams can find and share packages. You can use a second pre-production domain to test changes to the production domain configuration.

INSERT INTO aws.codeartifact.domains (
encryptionKey,
tags,
domain,
region
)
SELECT
'{{ encryptionKey }}',
'{{ tags }}',
'{{ domain }}',
'{{ region }}'
RETURNING
domain
;

DELETE examples

Deletes a domain. You cannot delete a domain that contains repositories. If you want to delete a domain with repositories, first delete its repositories.

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