user_hierarchy_structures
Creates, updates, deletes or gets an user_hierarchy_structure resource or lists user_hierarchy_structures in a region
Overview
| Name | user_hierarchy_structures |
| Type | Resource |
| Description | Resource Type definition for AWS::Connect::UserHierarchyStructure |
| Id | awscc.connect.user_hierarchy_structures |
Fields
| Name | Datatype | Description |
|---|---|---|
instance_arn | string | The identifier of the Amazon Connect instance. |
user_hierarchy_structure_arn | string | The identifier of the User Hierarchy Structure. |
user_hierarchy_structure | object | Information about the hierarchy structure. |
region | string | AWS region. |
For more information, see AWS::Connect::UserHierarchyStructure.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | InstanceArn, region |
delete_resource | DELETE | Identifier, region |
update_resource | UPDATE | Identifier, PatchDocument, region |
get_resource | SELECT | Identifier, region |
SELECT examples
Gets all properties from an individual user_hierarchy_structure.
SELECT
region,
instance_arn,
user_hierarchy_structure_arn,
user_hierarchy_structure
FROM awscc.connect.user_hierarchy_structures
WHERE
region = '{{ region }}' AND
Identifier = '{{ user_hierarchy_structure_arn }}';
INSERT example
Use the following StackQL query and manifest file to create a new user_hierarchy_structure resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.connect.user_hierarchy_structures (
InstanceArn,
region
)
SELECT
'{{ instance_arn }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.connect.user_hierarchy_structures (
InstanceArn,
UserHierarchyStructure,
region
)
SELECT
'{{ instance_arn }}',
'{{ user_hierarchy_structure }}',
'{{ 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: user_hierarchy_structure
props:
- name: instance_arn
value: '{{ instance_arn }}'
- name: user_hierarchy_structure
value:
level_one:
hierarchy_level_arn: '{{ hierarchy_level_arn }}'
hierarchy_level_id: '{{ hierarchy_level_id }}'
name: '{{ name }}'
level_two:
hierarchy_level_arn: null
hierarchy_level_id: null
name: null
level_three:
hierarchy_level_arn: null
hierarchy_level_id: null
name: null
level_four:
hierarchy_level_arn: null
hierarchy_level_id: null
name: null
level_five:
hierarchy_level_arn: null
hierarchy_level_id: null
name: null
UPDATE example
Use the following StackQL query and manifest file to update a user_hierarchy_structure resource, using stack-deploy.
/*+ update */
UPDATE awscc.connect.user_hierarchy_structures
SET PatchDocument = string('{{ {
"UserHierarchyStructure": user_hierarchy_structure
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ user_hierarchy_structure_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.connect.user_hierarchy_structures
WHERE
Identifier = '{{ user_hierarchy_structure_arn }}' 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 user_hierarchy_structures resource, the following permissions are required:
- Create
- Read
- Delete
- Update
connect:UpdateUserHierarchyStructure
connect:DescribeUserHierarchyStructure
connect:UpdateUserHierarchyStructure
connect:UpdateUserHierarchyStructure