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 | awscc.elasticache.user_groups |
Fields
- get (all properties)
- list (identifiers only)
| 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 | The target cache engine for the user group. |
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. |
| Name | Datatype | Description |
|---|---|---|
user_group_id | string | The ID of the user group. |
region | string | AWS region. |
For more information, see AWS::ElastiCache::UserGroup.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | user_groups | INSERT | UserGroupId, Engine, UserIds, region |
delete_resource | user_groups | DELETE | Identifier, region |
update_resource | user_groups | UPDATE | Identifier, PatchDocument, region |
list_resources | user_groups_list_only | SELECT | region |
get_resource | user_groups | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual user_group.
SELECT
region,
status,
user_group_id,
engine,
user_ids,
arn,
tags
FROM awscc.elasticache.user_groups
WHERE
region = 'us-east-1' AND
Identifier = '{{ user_group_id }}';
Lists all user_groups in a region.
SELECT
region,
user_group_id
FROM awscc.elasticache.user_groups_list_only
WHERE
region = 'us-east-1';
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 awscc.elasticache.user_groups (
UserGroupId,
Engine,
UserIds,
region
)
SELECT
'{{ user_group_id }}',
'{{ engine }}',
'{{ user_ids }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.elasticache.user_groups (
UserGroupId,
Engine,
UserIds,
Tags,
region
)
SELECT
'{{ user_group_id }}',
'{{ engine }}',
'{{ user_ids }}',
'{{ 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: user_group_id
value: '{{ user_group_id }}'
- name: engine
value: '{{ engine }}'
- name: user_ids
value:
- '{{ user_ids[0] }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a user_group resource, using stack-deploy.
/*+ update */
UPDATE awscc.elasticache.user_groups
SET PatchDocument = string('{{ {
"Engine": engine,
"UserIds": user_ids,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ user_group_id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.elasticache.user_groups
WHERE
Identifier = '{{ user_group_id }}' AND
region = 'us-east-1';
Permissions
To operate on the user_groups resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
elasticache:CreateUserGroup,
elasticache:DescribeUserGroups,
elasticache:ListTagsForResource,
elasticache:AddTagsToResource
elasticache:DescribeUserGroups,
elasticache:ListTagsForResource
elasticache:ModifyUserGroup,
elasticache:DescribeUserGroups,
elasticache:ListTagsForResource,
elasticache:AddTagsToResource,
elasticache:RemoveTagsFromResource
elasticache:ModifyReplicationGroup,
elasticache:DeleteUserGroup,
elasticache:DescribeUserGroups,
elasticache:ListTagsForResource
elasticache:DescribeUserGroups,
elasticache:ListTagsForResource