user_groups
Creates, updates, deletes, gets or lists a user_groups resource.
Overview
| Name | user_groups |
| Type | Resource |
| Id | aws.elasticache.user_groups |
Fields
The following fields are returned by SELECT queries:
- describe_user_groups
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the user group. |
engine | string | The options are valkey or redis. |
minimum_engine_version | string | The minimum engine version required, which is Redis OSS 6.0 |
pending_changes | string | A list of updates being applied to the user group. |
replication_groups | string | A list of replication groups that the user group can access. |
serverless_caches | string | Indicates which serverless caches the specified user group is associated with. Available for Valkey, Redis OSS and Serverless Memcached only. |
status | string | Indicates user group status. Can be "creating", "active", "modifying", "deleting". |
user_group_id | string | The ID of the user group. |
user_ids | string | The list of user IDs that belong to the user group. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_user_groups | select | region | UserGroupId, MaxRecords, Marker | Returns a list of user groups. |
create_user_group | insert | UserGroupId, region | Engine, UserIds, Tags | For Valkey engine version 7.2 onwards and Redis OSS 6.0 to 7.1: Creates a user group. For more information, see Using Role Based Access Control (RBAC) |
modify_user_group | update | UserGroupId, region | UserIdsToAdd, UserIdsToRemove, Engine | Changes the list of users that belong to the user group. |
delete_user_group | delete | UserGroupId, region | For Valkey engine version 7.2 onwards and Redis OSS 6.0 onwards: Deletes a user group. The user group must first be disassociated from the replication group before it can be deleted. 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 |
|---|---|---|
UserGroupId | string | The ID of the user group. |
region | string | AWS region (default: us-east-1) |
Engine | string | Modifies the engine listed in a user group. The options are valkey or redis. |
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. |
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. Available for Valkey and Redis OSS only. |
UserGroupId | string | The ID of the user group. |
UserIds | array | The list of user IDs that belong to the user group. |
UserIdsToAdd | array | The list of user IDs to add to the user group. |
UserIdsToRemove | array | The list of user IDs to remove from the user group. |
SELECT examples
- describe_user_groups
Returns a list of user groups.
SELECT
arn,
engine,
minimum_engine_version,
pending_changes,
replication_groups,
serverless_caches,
status,
user_group_id,
user_ids
FROM aws.elasticache.user_groups
WHERE region = '{{ region }}' -- required
AND UserGroupId = '{{ UserGroupId }}'
AND MaxRecords = '{{ MaxRecords }}'
AND Marker = '{{ Marker }}'
;
INSERT examples
- create_user_group
- Manifest
For Valkey engine version 7.2 onwards and Redis OSS 6.0 to 7.1: Creates a user group. For more information, see Using Role Based Access Control (RBAC)
INSERT INTO aws.elasticache.user_groups (
UserGroupId,
region,
Engine,
UserIds,
Tags
)
SELECT
'{{ UserGroupId }}',
'{{ region }}',
'{{ Engine }}',
'{{ UserIds }}',
'{{ Tags }}'
RETURNING
arn,
engine,
minimum_engine_version,
pending_changes,
replication_groups,
serverless_caches,
status,
user_group_id,
user_ids
;
# Description fields are for documentation purposes
- name: user_groups
props:
- name: UserGroupId
value: "{{ UserGroupId }}"
description: Required parameter for the user_groups resource.
- name: region
value: "{{ region }}"
description: Required parameter for the user_groups resource.
- name: Engine
value: "{{ Engine }}"
description: Sets the engine listed in a user group. The options are valkey or redis.
description: Sets the engine listed in a user group. The options are valkey or redis.
- name: UserIds
value: "{{ UserIds }}"
description: The list of user IDs that belong to the user group.
description: The list of user IDs that belong to the user group.
- 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. Available for Valkey and Redis OSS only.
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. Available for Valkey and Redis OSS only.
UPDATE examples
- modify_user_group
Changes the list of users that belong to the user group.
UPDATE aws.elasticache.user_groups
SET
-- No updatable properties
WHERE
UserGroupId = '{{ UserGroupId }}' --required
AND region = '{{ region }}' --required
AND UserIdsToAdd = '{{ UserIdsToAdd}}'
AND UserIdsToRemove = '{{ UserIdsToRemove}}'
AND Engine = '{{ Engine}}'
RETURNING
arn,
engine,
minimum_engine_version,
pending_changes,
replication_groups,
serverless_caches,
status,
user_group_id,
user_ids;
DELETE examples
- delete_user_group
For Valkey engine version 7.2 onwards and Redis OSS 6.0 onwards: Deletes a user group. The user group must first be disassociated from the replication group before it can be deleted. For more information, see Using Role Based Access Control (RBAC).
DELETE FROM aws.elasticache.user_groups
WHERE UserGroupId = '{{ UserGroupId }}' --required
AND region = '{{ region }}' --required
;