user_groups
Creates, updates, deletes or gets an user_group
resource or lists user_groups
in a region
Overview
Name | user_groups |
Type | Resource |
Description | Resource Type definition for AWS::ElastiCache::UserGroup |
Id | aws.elasticache.user_groups |
Fields
Name | Datatype | Description |
---|---|---|
status | string | Indicates user group status. Can be "creating", "active", "modifying", "deleting". |
user_group_id | string | The ID of the user group. |
engine | string | Must be redis. |
user_ids | array | List of users associated to this user group. |
arn | string | The Amazon Resource Name (ARN) of the user account. |
tags | array | An array of key-value pairs to apply to this user. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | UserGroupId, Engine, UserIds, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all user_groups
in a region.
SELECT
region,
status,
user_group_id,
engine,
user_ids,
arn,
tags
FROM aws.elasticache.user_groups
WHERE region = 'us-east-1';
Gets all properties from an individual user_group
.
SELECT
region,
status,
user_group_id,
engine,
user_ids,
arn,
tags
FROM aws.elasticache.user_groups
WHERE region = 'us-east-1' AND data__Identifier = '<UserGroupId>';
INSERT
example
Use the following StackQL query and manifest file to create a new user_group
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.elasticache.user_groups (
UserGroupId,
Engine,
UserIds,
region
)
SELECT
'{{ UserGroupId }}',
'{{ Engine }}',
'{{ UserIds }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.elasticache.user_groups (
UserGroupId,
Engine,
UserIds,
Tags,
region
)
SELECT
'{{ UserGroupId }}',
'{{ Engine }}',
'{{ UserIds }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: user_group
props:
- name: UserGroupId
value: '{{ UserGroupId }}'
- name: Engine
value: '{{ Engine }}'
- name: UserIds
value:
- '{{ UserIds[0] }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.elasticache.user_groups
WHERE data__Identifier = '<UserGroupId>'
AND region = 'us-east-1';
Permissions
To operate on the user_groups
resource, the following permissions are required:
Create
elasticache:CreateUserGroup,
elasticache:DescribeUserGroups,
elasticache:ListTagsForResource,
elasticache:AddTagsToResource
Read
elasticache:DescribeUserGroups,
elasticache:ListTagsForResource
Update
elasticache:ModifyUserGroup,
elasticache:DescribeUserGroups,
elasticache:ListTagsForResource,
elasticache:AddTagsToResource,
elasticache:RemoveTagsFromResource
Delete
elasticache:ModifyReplicationGroup,
elasticache:DeleteUserGroup,
elasticache:DescribeUserGroups,
elasticache:ListTagsForResource
List
elasticache:DescribeUserGroups,
elasticache:ListTagsForResource