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 = '{{ region }}' AND
Identifier = '{{ user_arn }}';
Lists all users in a region.
SELECT
region,
user_arn
FROM awscc.connect.users_list_only
WHERE
region = '{{ region }}';
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ 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 }}'
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
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.connect.users
WHERE
Identifier = '{{ user_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 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