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
- get (all properties)
- list (identifiers only)
| 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. |
| Name | Datatype | Description |
|---|---|---|
domain_id | string | The ID of the domain where the domain unit was created. |
id | string | The ID of the domain unit. |
region | string | AWS region. |
For more information, see AWS::DataZone::DomainUnit.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | domain_units | INSERT | DomainIdentifier, Name, ParentDomainUnitIdentifier, region |
delete_resource | domain_units | DELETE | Identifier, region |
update_resource | domain_units | UPDATE | Identifier, PatchDocument, region |
list_resources | domain_units_list_only | SELECT | region |
get_resource | domain_units | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 }}';
Lists all domain_units in a region.
SELECT
region,
domain_id,
id
FROM awscc.datazone.domain_units_list_only
WHERE
region = '{{ region }}';
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
'{{ domain_identifier }}',
'{{ name }}',
'{{ parent_domain_unit_identifier }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.datazone.domain_units (
DomainIdentifier,
Description,
Name,
ParentDomainUnitIdentifier,
region
)
SELECT
'{{ domain_identifier }}',
'{{ description }}',
'{{ name }}',
'{{ parent_domain_unit_identifier }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: domain_unit
props:
- name: domain_identifier
value: '{{ domain_identifier }}'
- name: description
value: '{{ description }}'
- name: name
value: '{{ name }}'
- name: parent_domain_unit_identifier
value: '{{ parent_domain_unit_identifier }}'
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:
| Parameter | Description |
|---|---|
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:
- Create
- Read
- Update
- Delete
- List
datazone:CreateDomainUnit,
datazone:GetDomainUnit
datazone:GetDomainUnit
datazone:UpdateDomainUnit,
datazone:GetDomainUnit
datazone:DeleteDomainUnit,
datazone:GetDomainUnit
datazone:ListDomainUnitsForParent