Skip to main content

domain_units

Creates, updates, deletes or gets a domain_unit resource or lists domain_units in a region

Overview

Namedomain_units
TypeResource
DescriptionA domain unit enables you to easily organize your assets and other domain entities under specific business units and teams.
Idawscc.datazone.domain_units

Fields

NameDatatypeDescription
domain_identifierstringThe ID of the domain where you want to create a domain unit.
descriptionstringThe description of the domain unit.
namestringThe name of the domain unit.
parent_domain_unit_identifierstringThe ID of the parent domain unit.
created_atstringThe timestamp at which the domain unit was created.
domain_idstringThe ID of the domain where the domain unit was created.
idstringThe ID of the domain unit.
parent_domain_unit_idstringThe ID of the parent domain unit.
identifierstringThe identifier of the domain unit that you want to get.
last_updated_atstringThe timestamp at which the domain unit was last updated.
regionstringAWS region.

For more information, see AWS::DataZone::DomainUnit.

Methods

NameResourceAccessible byRequired Params
create_resourcedomain_unitsINSERTDomainIdentifier, Name, ParentDomainUnitIdentifier, region
delete_resourcedomain_unitsDELETEIdentifier, region
update_resourcedomain_unitsUPDATEIdentifier, PatchDocument, region
list_resourcesdomain_units_list_onlySELECTregion
get_resourcedomain_unitsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual domain_unit.

SELECT
region,
domain_identifier,
description,
name,
parent_domain_unit_identifier,
created_at,
domain_id,
id,
parent_domain_unit_id,
identifier,
last_updated_at
FROM awscc.datazone.domain_units
WHERE
region = '{{ region }}' AND
Identifier = '{{ domain_id }}|{{ id }}';

INSERT example

Use the following StackQL query and manifest file to create a new domain_unit resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.datazone.domain_units (
DomainIdentifier,
Name,
ParentDomainUnitIdentifier,
region
)
SELECT
'{{ domain_identifier }}',
'{{ name }}',
'{{ parent_domain_unit_identifier }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a domain_unit resource, using stack-deploy.

/*+ update */
UPDATE awscc.datazone.domain_units
SET PatchDocument = string('{{ {
"Description": description,
"Name": name
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ domain_id }}|{{ id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.datazone.domain_units
WHERE
Identifier = '{{ domain_id }}|{{ id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the domain_units resource, the following permissions are required:

datazone:CreateDomainUnit,
datazone:GetDomainUnit