domains
Creates, updates, deletes, gets or lists a domains resource.
Overview
| Name | domains |
| Type | Resource |
| Id | aws.codeartifact.domains |
Fields
The following fields are returned by SELECT queries:
- describe_domain
- list_domains
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the domain. (pattern: <code>[a-z][a-z0-9-]{0,48}[a-z0-9]</code>) |
arn | string | The Amazon Resource Name (ARN) of the domain. (pattern: <code>\S+</code>) |
asset_size_bytes | integer (int64) | The total size of all assets in the domain. |
created_time | string (date-time) | A timestamp that represents the date and time the domain was created. |
encryption_key | string | The ARN of an Key Management Service (KMS) key associated with a domain. (pattern: <code>\S+</code>) |
owner | string | The Amazon Web Services account ID that owns the domain. (pattern: <code>[0-9]{12}</code>) |
repository_count | integer | The number of repositories in the domain. |
s_3_bucket_arn | string | The Amazon Resource Name (ARN) of the Amazon S3 bucket that is used to store package assets in the domain. (pattern: <code>\S+</code>) |
status | string | The current status of a domain. (Active, Deleted) |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the domain. (pattern: <code>[a-z][a-z0-9-]{0,48}[a-z0-9]</code>) |
arn | string | The ARN of the domain. (pattern: <code>\S+</code>) |
created_time | string (date-time) | A timestamp that contains the date and time the domain was created. |
encryption_key | string | The key used to encrypt the domain. (pattern: <code>\S+</code>) |
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>) |
status | string | A string that contains the status of the domain. (Active, Deleted) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_domain | select | domain, region | domain-owner | Returns a DomainDescription object that contains information about the requested domain. |
list_domains | select | region | Returns 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_domain | insert | domain, region | 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. | |
delete_domain | delete | domain, region | domain-owner | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
domain | string | The name of the domain to delete. |
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. |
SELECT examples
- describe_domain
- list_domains
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 }}'
;
Returns 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.
SELECT
name,
arn,
created_time,
encryption_key,
owner,
status
FROM aws.codeartifact.domains
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_domain
- Manifest
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
;
# Description fields are for documentation purposes
- name: domains
props:
- name: domain
value: "{{ domain }}"
description: Required parameter for the domains resource.
- name: region
value: "{{ region }}"
description: Required parameter for the domains resource.
- name: encryptionKey
value: "{{ encryptionKey }}"
- name: tags
value:
- key: "{{ key }}"
value: "{{ value }}"
DELETE examples
- delete_domain
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 }}'
;