users
Creates, updates, deletes or gets a user resource or lists users in a region
Overview
| Name | users |
| Type | Resource |
| Description | Resource Type definition for AWS::Connect::User |
| Id | awscc.connect.users |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
instance_arn | string | The identifier of the Amazon Connect instance. |
directory_user_id | string | The identifier of the user account in the directory used for identity management. |
hierarchy_group_arn | string | The identifier of the hierarchy group for the user. |
username | string | The user name for the account. |
password | string | The password for the user account. A password is required if you are using Amazon Connect for identity management. Otherwise, it is an error to include a password. |
routing_profile_arn | string | The identifier of the routing profile for the user. |
identity_info | object | The information about the identity of the user. |
phone_config | object | The phone settings for the user. |
security_profile_arns | array | One or more security profile arns for the user |
user_arn | string | The Amazon Resource Name (ARN) for the user. |
tags | array | One or more tags. |
user_proficiencies | array | One or more predefined attributes assigned to a user, with a level that indicates how skilled they are. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
user_arn | string | The Amazon Resource Name (ARN) for the user. |
region | string | AWS region. |
For more information, see AWS::Connect::User.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | users | INSERT | InstanceArn, PhoneConfig, RoutingProfileArn, SecurityProfileArns, Username, region |
delete_resource | users | DELETE | Identifier, region |
update_resource | users | UPDATE | Identifier, PatchDocument, region |
list_resources | users_list_only | SELECT | region |
get_resource | users | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual user.
SELECT
region,
instance_arn,
directory_user_id,
hierarchy_group_arn,
username,
password,
routing_profile_arn,
identity_info,
phone_config,
security_profile_arns,
user_arn,
tags,
user_proficiencies
FROM awscc.connect.users
WHERE
region = 'us-east-1' AND
Identifier = '{{ user_arn }}';
Lists all users in a region.
SELECT
region,
user_arn
FROM awscc.connect.users_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new user resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.connect.users (
InstanceArn,
Username,
RoutingProfileArn,
PhoneConfig,
SecurityProfileArns,
region
)
SELECT
'{{ instance_arn }}',
'{{ username }}',
'{{ routing_profile_arn }}',
'{{ phone_config }}',
'{{ security_profile_arns }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.connect.users (
InstanceArn,
DirectoryUserId,
HierarchyGroupArn,
Username,
Password,
RoutingProfileArn,
IdentityInfo,
PhoneConfig,
SecurityProfileArns,
Tags,
UserProficiencies,
region
)
SELECT
'{{ instance_arn }}',
'{{ directory_user_id }}',
'{{ hierarchy_group_arn }}',
'{{ username }}',
'{{ password }}',
'{{ routing_profile_arn }}',
'{{ identity_info }}',
'{{ phone_config }}',
'{{ security_profile_arns }}',
'{{ tags }}',
'{{ user_proficiencies }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: user
props:
- name: instance_arn
value: '{{ instance_arn }}'
- name: directory_user_id
value: '{{ directory_user_id }}'
- name: hierarchy_group_arn
value: '{{ hierarchy_group_arn }}'
- name: username
value: '{{ username }}'
- name: password
value: '{{ password }}'
- name: routing_profile_arn
value: '{{ routing_profile_arn }}'
- name: identity_info
value:
first_name: '{{ first_name }}'
last_name: '{{ last_name }}'
email: '{{ email }}'
secondary_email: '{{ secondary_email }}'
mobile: '{{ mobile }}'
- name: phone_config
value:
after_contact_work_time_limit: '{{ after_contact_work_time_limit }}'
auto_accept: '{{ auto_accept }}'
desk_phone_number: '{{ desk_phone_number }}'
phone_type: '{{ phone_type }}'
persistent_connection: '{{ persistent_connection }}'
- name: security_profile_arns
value:
- '{{ security_profile_arns[0] }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: user_proficiencies
value:
- attribute_name: '{{ attribute_name }}'
attribute_value: '{{ attribute_value }}'
level: null
UPDATE example
Use the following StackQL query and manifest file to update a user resource, using stack-deploy.
/*+ update */
UPDATE awscc.connect.users
SET PatchDocument = string('{{ {
"InstanceArn": instance_arn,
"DirectoryUserId": directory_user_id,
"HierarchyGroupArn": hierarchy_group_arn,
"Username": username,
"Password": password,
"RoutingProfileArn": routing_profile_arn,
"IdentityInfo": identity_info,
"PhoneConfig": phone_config,
"SecurityProfileArns": security_profile_arns,
"Tags": tags,
"UserProficiencies": user_proficiencies
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ user_arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.connect.users
WHERE
Identifier = '{{ user_arn }}' AND
region = 'us-east-1';
Permissions
To operate on the users resource, the following permissions are required:
- Create
- Read
- Delete
- Update
- List
connect:CreateUser,
connect:TagResource,
connect:AssociateUserProficiencies
connect:DescribeUser,
connect:ListUserProficiencies
connect:DeleteUser,
connect:UntagResource
connect:UpdateUserIdentityInfo,
connect:UpdateUserPhoneConfig,
connect:UpdateUserRoutingProfile,
connect:UpdateUserSecurityProfiles,
connect:UpdateUserHierarchy,
connect:TagResource,
connect:UntagResource,
connect:AssociateUserProficiencies,
connect:DisassociateUserProficiencies,
connect:UpdateUserProficiencies
connect:ListUsers