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::ElastiCache::User |
Id | aws.elasticache.users |
Fields
Name | Datatype | Description |
---|---|---|
status | string | Indicates the user status. Can be "active", "modifying" or "deleting". |
user_id | string | The ID of the user. |
user_name | string | The username of the user. |
engine | string | Must be redis. |
access_string | string | Access permissions string used for this user account. |
no_password_required | boolean | Indicates a password is not required for this user account. |
passwords | array | Passwords used for this user account. You can create up to two passwords for each user. |
arn | string | The Amazon Resource Name (ARN) of the user account. |
authentication_mode | object | |
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 | UserId, UserName, Engine, 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 users
in a region.
SELECT
region,
status,
user_id,
user_name,
engine,
access_string,
no_password_required,
passwords,
arn,
authentication_mode,
tags
FROM aws.elasticache.users
WHERE region = 'us-east-1';
Gets all properties from an individual user
.
SELECT
region,
status,
user_id,
user_name,
engine,
access_string,
no_password_required,
passwords,
arn,
authentication_mode,
tags
FROM aws.elasticache.users
WHERE region = 'us-east-1' AND data__Identifier = '<UserId>';
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 aws.elasticache.users (
UserId,
UserName,
Engine,
region
)
SELECT
'{{ UserId }}',
'{{ UserName }}',
'{{ Engine }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.elasticache.users (
UserId,
UserName,
Engine,
AccessString,
NoPasswordRequired,
Passwords,
AuthenticationMode,
Tags,
region
)
SELECT
'{{ UserId }}',
'{{ UserName }}',
'{{ Engine }}',
'{{ AccessString }}',
'{{ NoPasswordRequired }}',
'{{ Passwords }}',
'{{ AuthenticationMode }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: user
props:
- name: UserId
value: '{{ UserId }}'
- name: UserName
value: '{{ UserName }}'
- name: Engine
value: '{{ Engine }}'
- name: AccessString
value: '{{ AccessString }}'
- name: NoPasswordRequired
value: '{{ NoPasswordRequired }}'
- name: Passwords
value:
- '{{ Passwords[0] }}'
- name: AuthenticationMode
value:
Type: '{{ Type }}'
Passwords:
- '{{ Passwords[0] }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.elasticache.users
WHERE data__Identifier = '<UserId>'
AND region = 'us-east-1';
Permissions
To operate on the users
resource, the following permissions are required:
Create
elasticache:CreateUser,
elasticache:DescribeUsers,
elasticache:ListTagsForResource,
elasticache:AddTagsToResource
Read
elasticache:DescribeUsers,
elasticache:ListTagsForResource
Update
elasticache:ModifyUser,
elasticache:DescribeUsers,
elasticache:ListTagsForResource,
elasticache:AddTagsToResource,
elasticache:RemoveTagsFromResource
Delete
elasticache:DeleteUser,
elasticache:DescribeUsers
List
elasticache:DescribeUsers,
elasticache:ListTagsForResource