domain_units
Creates, updates, deletes, gets or lists a domain_units resource.
Overview
| Name | domain_units |
| Type | Resource |
| Id | aws.datazone.domain_units |
Fields
The following fields are returned by SELECT queries:
- get_domain_unit
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the domain unit. (pattern: <code>[a-z0-9_-]+</code>) |
name | string | The name of the domain unit. (pattern: <code>[\w -]+</code>) |
created_at | string (date-time) | The time stamp at which the domain unit was created. |
created_by | string | The user who created the domain unit. |
description | string | The description of the domain unit. |
domain_id | string | The ID of the domain in which the domain unit lives. (pattern: <code>dzd[-][a-zA-Z0-9-]{1,36}</code>) |
last_updated_at | string (date-time) | The timestamp at which the domain unit was last updated. |
last_updated_by | string | The user who last updated the domain unit. |
owners | array | The owners of the domain unit. |
parent_domain_unit_id | string | The ID of the parent domain unit. (pattern: <code>[a-z0-9_-]+</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_domain_unit | select | domain_identifier, identifier, region | Gets the details of the specified domain unit. | |
create_domain_unit | insert | domain_identifier, region, name, parentDomainUnitIdentifier | Creates a domain unit in Amazon DataZone. | |
update_domain_unit | update | domain_identifier, identifier, region | Updates the domain unit. | |
delete_domain_unit | delete | domain_identifier, identifier, region | Deletes a domain unit. |
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_identifier | string | The ID of the domain where you want to delete a domain unit. |
identifier | string | The ID of the domain unit that you want to delete. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_domain_unit
Gets the details of the specified domain unit.
SELECT
id,
name,
created_at,
created_by,
description,
domain_id,
last_updated_at,
last_updated_by,
owners,
parent_domain_unit_id
FROM aws.datazone.domain_units
WHERE domain_identifier = '{{ domain_identifier }}' -- required
AND identifier = '{{ identifier }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples
- create_domain_unit
- Manifest
Creates a domain unit in Amazon DataZone.
INSERT INTO aws.datazone.domain_units (
name,
parentDomainUnitIdentifier,
description,
clientToken,
domain_identifier,
region
)
SELECT
'{{ name }}' /* required */,
'{{ parentDomainUnitIdentifier }}' /* required */,
'{{ description }}',
'{{ clientToken }}',
'{{ domain_identifier }}',
'{{ region }}'
RETURNING
id,
name,
ancestor_domain_unit_ids,
created_at,
created_by,
description,
domain_id,
owners,
parent_domain_unit_id
;
# Description fields are for documentation purposes
- name: domain_units
props:
- name: domain_identifier
value: "{{ domain_identifier }}"
description: Required parameter for the domain_units resource.
- name: region
value: "{{ region }}"
description: Required parameter for the domain_units resource.
- name: name
value: "{{ name }}"
- name: parentDomainUnitIdentifier
value: "{{ parentDomainUnitIdentifier }}"
- name: description
value: "{{ description }}"
- name: clientToken
value: "{{ clientToken }}"
UPDATE examples
- update_domain_unit
Updates the domain unit.
UPDATE aws.datazone.domain_units
SET
description = '{{ description }}',
name = '{{ name }}'
WHERE
domain_identifier = '{{ domain_identifier }}' --required
AND identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
RETURNING
id,
name,
created_at,
created_by,
description,
domain_id,
last_updated_at,
last_updated_by,
owners,
parent_domain_unit_id;
DELETE examples
- delete_domain_unit
Deletes a domain unit.
DELETE FROM aws.datazone.domain_units
WHERE domain_identifier = '{{ domain_identifier }}' --required
AND identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
;