users
Creates, updates, deletes, gets or lists a users resource.
Overview
| Name | users |
| Type | Resource |
| Id | aws.elasticache.users |
Fields
The following fields are returned by SELECT queries:
- describe_users
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the user. |
access_string | string | Access permissions string used for this user. |
authentication | string | Denotes whether the user requires a password to authenticate. |
engine | string | The options are valkey or redis. |
minimum_engine_version | string | The minimum engine version required, which is Redis OSS 6.0 |
status | string | Indicates the user status. Can be "active", "modifying" or "deleting". |
user_group_ids | string | Returns a list of the user group IDs the user belongs to. |
user_id | string | The ID of the user. |
user_name | string | The username of the user. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_users | select | region | Engine, UserId, Filters, MaxRecords, Marker | Returns a list of users. |
create_user | insert | UserId, UserName, AccessString, region | Engine, Passwords, NoPasswordRequired, Tags, AuthenticationMode | For Valkey engine version 7.2 onwards and Redis OSS 6.0 to 7.1: Creates a user. For more information, see Using Role Based Access Control (RBAC). |
modify_user | update | UserId, region | AccessString, AppendAccessString, Passwords, NoPasswordRequired, AuthenticationMode, Engine | Changes user password(s) and/or access string. |
delete_user | delete | UserId, region | For Valkey engine version 7.2 onwards and Redis OSS 6.0 onwards: Deletes a user. The user will be removed from all user groups and in turn removed from all replication groups. For more information, see Using Role Based Access Control (RBAC). |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
AccessString | string | Access permissions string used for this user. |
UserId | string | The ID of the user. |
UserName | string | The username of the user. |
region | string | AWS region (default: us-east-1) |
AccessString | string | Access permissions string used for this user. |
AppendAccessString | string | Adds additional user permissions to the access string. |
AuthenticationMode | object | Specifies how to authenticate the user. |
Engine | string | Modifies the engine listed for a user. The options are valkey or redis. |
Filters | array | Filter to determine the list of User IDs to return. |
Marker | string | An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords. > |
MaxRecords | integer | The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results can be retrieved. |
NoPasswordRequired | boolean | Indicates no password is required for the user. |
Passwords | array | The passwords belonging to the user. You are allowed up to two. |
Tags | array | A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag value, although null is accepted. |
UserId | string | The ID of the user. |
SELECT examples
- describe_users
Returns a list of users.
SELECT
arn,
access_string,
authentication,
engine,
minimum_engine_version,
status,
user_group_ids,
user_id,
user_name
FROM aws.elasticache.users
WHERE region = '{{ region }}' -- required
AND Engine = '{{ Engine }}'
AND UserId = '{{ UserId }}'
AND Filters = '{{ Filters }}'
AND MaxRecords = '{{ MaxRecords }}'
AND Marker = '{{ Marker }}'
;
INSERT examples
- create_user
- Manifest
For Valkey engine version 7.2 onwards and Redis OSS 6.0 to 7.1: Creates a user. For more information, see Using Role Based Access Control (RBAC).
INSERT INTO aws.elasticache.users (
UserId,
UserName,
AccessString,
region,
Engine,
Passwords,
NoPasswordRequired,
Tags,
AuthenticationMode
)
SELECT
'{{ UserId }}',
'{{ UserName }}',
'{{ AccessString }}',
'{{ region }}',
'{{ Engine }}',
'{{ Passwords }}',
'{{ NoPasswordRequired }}',
'{{ Tags }}',
'{{ AuthenticationMode }}'
RETURNING
arn,
access_string,
authentication,
engine,
minimum_engine_version,
status,
user_group_ids,
user_id,
user_name
;
# Description fields are for documentation purposes
- name: users
props:
- name: UserId
value: "{{ UserId }}"
description: Required parameter for the users resource.
- name: UserName
value: "{{ UserName }}"
description: Required parameter for the users resource.
- name: AccessString
value: "{{ AccessString }}"
description: Required parameter for the users resource.
- name: region
value: "{{ region }}"
description: Required parameter for the users resource.
- name: Engine
value: "{{ Engine }}"
description: The options are valkey or redis.
description: The options are valkey or redis.
- name: Passwords
value: "{{ Passwords }}"
description: Passwords used for this user. You can create up to two passwords for each user.
description: Passwords used for this user. You can create up to two passwords for each user.
- name: NoPasswordRequired
value: {{ NoPasswordRequired }}
description: Indicates a password is not required for this user.
description: Indicates a password is not required for this user.
- name: Tags
value: "{{ Tags }}"
description: A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag value, although null is accepted.
description: A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag value, although null is accepted.
- name: AuthenticationMode
value: "{{ AuthenticationMode }}"
description: Specifies how to authenticate the user.
description: Specifies how to authenticate the user.
UPDATE examples
- modify_user
Changes user password(s) and/or access string.
UPDATE aws.elasticache.users
SET
-- No updatable properties
WHERE
UserId = '{{ UserId }}' --required
AND region = '{{ region }}' --required
AND AccessString = '{{ AccessString}}'
AND AppendAccessString = '{{ AppendAccessString}}'
AND Passwords = '{{ Passwords}}'
AND NoPasswordRequired = {{ NoPasswordRequired}}
AND AuthenticationMode = '{{ AuthenticationMode}}'
AND Engine = '{{ Engine}}'
RETURNING
arn,
access_string,
authentication,
engine,
minimum_engine_version,
status,
user_group_ids,
user_id,
user_name;
DELETE examples
- delete_user
For Valkey engine version 7.2 onwards and Redis OSS 6.0 onwards: Deletes a user. The user will be removed from all user groups and in turn removed from all replication groups. For more information, see Using Role Based Access Control (RBAC).
DELETE FROM aws.elasticache.users
WHERE UserId = '{{ UserId }}' --required
AND region = '{{ region }}' --required
;