domain_units
Creates, updates, deletes or gets a domain_unit resource or lists domain_units in a region
Overview
| Name | domain_units |
| Type | Resource |
| Description | A domain unit enables you to easily organize your assets and other domain entities under specific business units and teams. |
| Id | awscc.datazone.domain_units |
Fields
| Name | Datatype | Description |
|---|---|---|
domain_identifier | string | The ID of the domain where you want to create a domain unit. |
description | string | The description of the domain unit. |
name | string | The name of the domain unit. |
parent_domain_unit_identifier | string | The ID of the parent domain unit. |
created_at | string | The timestamp at which the domain unit was created. |
domain_id | string | The ID of the domain where the domain unit was created. |
id | string | The ID of the domain unit. |
parent_domain_unit_id | string | The ID of the parent domain unit. |
identifier | string | The identifier of the domain unit that you want to get. |
last_updated_at | string | The timestamp at which the domain unit was last updated. |
region | string | AWS region. |
For more information, see AWS::DataZone::DomainUnit.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | DomainIdentifier, Name, ParentDomainUnitIdentifier, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, 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 = 'us-east-1' AND data__Identifier = '<DomainId>|<Id>';
INSERT example
Use the following StackQL query and manifest file to create a new domain_unit resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.datazone.domain_units (
DomainIdentifier,
Name,
ParentDomainUnitIdentifier,
region
)
SELECT
'{{ DomainIdentifier }}',
'{{ Name }}',
'{{ ParentDomainUnitIdentifier }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.datazone.domain_units (
DomainIdentifier,
Description,
Name,
ParentDomainUnitIdentifier,
region
)
SELECT
'{{ DomainIdentifier }}',
'{{ Description }}',
'{{ Name }}',
'{{ ParentDomainUnitIdentifier }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: domain_unit
props:
- name: DomainIdentifier
value: '{{ DomainIdentifier }}'
- name: Description
value: '{{ Description }}'
- name: Name
value: '{{ Name }}'
- name: ParentDomainUnitIdentifier
value: '{{ ParentDomainUnitIdentifier }}'
DELETE example
/*+ delete */
DELETE FROM awscc.datazone.domain_units
WHERE data__Identifier = '<DomainId|Id>'
AND region = 'us-east-1';
Permissions
To operate on the domain_units resource, the following permissions are required:
Create
datazone:CreateDomainUnit,
datazone:GetDomainUnit
Read
datazone:GetDomainUnit
Update
datazone:UpdateDomainUnit,
datazone:GetDomainUnit
Delete
datazone:DeleteDomainUnit,
datazone:GetDomainUnit
List
datazone:ListDomainUnitsForParent