Skip to main content

domain_units

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

Overview

Namedomain_units
TypeResource
Idaws.datazone.domain_units

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the domain unit. (pattern: <code>[a-z0-9_-]+</code>)
namestringThe name of the domain unit. (pattern: <code>[\w -]+</code>)
created_atstring (date-time)The time stamp at which the domain unit was created.
created_bystringThe user who created the domain unit.
descriptionstringThe description of the domain unit.
domain_idstringThe ID of the domain in which the domain unit lives. (pattern: <code>dzd[-][a-zA-Z0-9-]{1,36}</code>)
last_updated_atstring (date-time)The timestamp at which the domain unit was last updated.
last_updated_bystringThe user who last updated the domain unit.
ownersarrayThe owners of the domain unit.
parent_domain_unit_idstringThe ID of the parent domain unit. (pattern: <code>[a-z0-9_-]+</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_domain_unitselectdomain_identifier, identifier, regionGets the details of the specified domain unit.
create_domain_unitinsertdomain_identifier, region, name, parentDomainUnitIdentifierCreates a domain unit in Amazon DataZone.
update_domain_unitupdatedomain_identifier, identifier, regionUpdates the domain unit.
delete_domain_unitdeletedomain_identifier, identifier, regionDeletes 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.

NameDatatypeDescription
domain_identifierstringThe ID of the domain where you want to delete a domain unit.
identifierstringThe ID of the domain unit that you want to delete.
regionstringAWS region (default: us-east-1)

SELECT examples

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

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
;

UPDATE examples

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

Deletes a domain unit.

DELETE FROM aws.datazone.domain_units
WHERE domain_identifier = '{{ domain_identifier }}' --required
AND identifier = '{{ identifier }}' --required
AND region = '{{ region }}' --required
;