Skip to main content

users

Creates, updates, deletes or gets a user resource or lists users in a region

Overview

Nameusers
TypeResource
DescriptionResource Type definition for AWS::ElastiCache::User
Idawscc.elasticache.users

Fields

NameDatatypeDescription
statusstringIndicates the user status. Can be "active", "modifying" or "deleting".
user_idstringThe ID of the user.
user_namestringThe username of the user.
enginestringThe target cache engine for the user.
access_stringstringAccess permissions string used for this user account.
no_password_requiredbooleanIndicates a password is not required for this user account.
passwordsarrayPasswords used for this user account. You can create up to two passwords for each user.
arnstringThe Amazon Resource Name (ARN) of the user account.
authentication_modeobject
tagsarrayAn array of key-value pairs to apply to this user.
regionstringAWS region.

For more information, see AWS::ElastiCache::User.

Methods

NameResourceAccessible byRequired Params
create_resourceusersINSERTUserId, UserName, Engine, region
delete_resourceusersDELETEIdentifier, region
update_resourceusersUPDATEIdentifier, PatchDocument, region
list_resourcesusers_list_onlySELECTregion
get_resourceusersSELECTIdentifier, region

SELECT examples

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 awscc.elasticache.users
WHERE
region = 'us-east-1' AND
Identifier = '{{ user_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new user resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.elasticache.users (
UserId,
UserName,
Engine,
region
)
SELECT
'{{ user_id }}',
'{{ user_name }}',
'{{ engine }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a user resource, using stack-deploy.

/*+ update */
UPDATE awscc.elasticache.users
SET PatchDocument = string('{{ {
"Engine": engine,
"AccessString": access_string,
"NoPasswordRequired": no_password_required,
"Passwords": passwords,
"AuthenticationMode": authentication_mode,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ user_id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.elasticache.users
WHERE
Identifier = '{{ user_id }}' AND
region = 'us-east-1';

Permissions

To operate on the users resource, the following permissions are required:

elasticache:CreateUser,
elasticache:DescribeUsers,
elasticache:ListTagsForResource,
elasticache:AddTagsToResource