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::MemoryDB::User
Idaws.memorydb.users

Fields

NameDatatypeDescription
statusstringIndicates the user status. Can be "active", "modifying" or "deleting".
user_namestringThe name of the user.
access_stringstringAccess permissions string used for this user account.
authentication_modeobject
arnstringThe Amazon Resource Name (ARN) of the user account.
tagsarrayAn array of key-value pairs to apply to this user.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTUserName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all users in a region.

SELECT
region,
status,
user_name,
access_string,
authentication_mode,
arn,
tags
FROM aws.memorydb.users
WHERE region = 'us-east-1';

Gets all properties from an individual user.

SELECT
region,
status,
user_name,
access_string,
authentication_mode,
arn,
tags
FROM aws.memorydb.users
WHERE region = 'us-east-1' AND data__Identifier = '<UserName>';

INSERT example

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

/*+ create */
INSERT INTO aws.memorydb.users (
UserName,
region
)
SELECT
'{{ UserName }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.memorydb.users
WHERE data__Identifier = '<UserName>'
AND region = 'us-east-1';

Permissions

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

Create

memorydb:CreateUser,
memorydb:DescribeUsers,
memorydb:TagResource,
memorydb:ListTags

Read

memorydb:DescribeUsers,
memorydb:ListTags

Update

memorydb:UpdateUser,
memorydb:DescribeUsers,
memorydb:ListTags,
memorydb:TagResource,
memorydb:UntagResource

Delete

memorydb:DeleteUser,
memorydb:DescribeUsers

List

memorydb:DescribeUsers,
memorydb:ListTags