ElastiCache / Client / create_user
create_user#
- ElastiCache.Client.create_user(**kwargs)#
For Valkey engine version 7.2 onwards and Redis OSS 6.0 and onwards: Creates a user. For more information, see Using Role Based Access Control (RBAC).
See also: AWS API Documentation
Request Syntax
response = client.create_user( UserId='string', UserName='string', Engine='string', Passwords=[ 'string', ], AccessString='string', NoPasswordRequired=True|False, Tags=[ { 'Key': 'string', 'Value': 'string' }, ], AuthenticationMode={ 'Type': 'password'|'no-password-required'|'iam', 'Passwords': [ 'string', ] } )
- Parameters:
UserId (string) –
[REQUIRED]
The ID of the user.
UserName (string) –
[REQUIRED]
The username of the user.
Engine (string) –
[REQUIRED]
The current supported value is Redis.
Passwords (list) –
Passwords used for this user. You can create up to two passwords for each user.
(string) –
AccessString (string) –
[REQUIRED]
Access permissions string used for this user.
NoPasswordRequired (boolean) – Indicates a password is not required for this user.
Tags (list) –
A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag value, although null is accepted.
(dict) –
A tag that can be added to an ElastiCache cluster or replication group. Tags are composed of a Key/Value pair. You can use tags to categorize and track all your ElastiCache resources, with the exception of global replication group. When you add or remove tags on replication groups, those actions will be replicated to all nodes in the replication group. A tag with a null Value is permitted.
Key (string) –
The key for the tag. May not be null.
Value (string) –
The tag’s value. May be null.
AuthenticationMode (dict) –
Specifies how to authenticate the user.
Type (string) –
Specifies the authentication type. Possible options are IAM authentication, password and no password.
Passwords (list) –
Specifies the passwords to use for authentication if
Type
is set topassword
.(string) –
- Return type:
dict
- Returns:
Response Syntax
{ 'UserId': 'string', 'UserName': 'string', 'Status': 'string', 'Engine': 'string', 'MinimumEngineVersion': 'string', 'AccessString': 'string', 'UserGroupIds': [ 'string', ], 'Authentication': { 'Type': 'password'|'no-password'|'iam', 'PasswordCount': 123 }, 'ARN': 'string' }
Response Structure
(dict) –
UserId (string) –
The ID of the user.
UserName (string) –
The username of the user.
Status (string) –
Indicates the user status. Can be “active”, “modifying” or “deleting”.
Engine (string) –
The current supported value is Redis.
MinimumEngineVersion (string) –
The minimum engine version required, which is Redis OSS 6.0
AccessString (string) –
Access permissions string used for this user.
UserGroupIds (list) –
Returns a list of the user group IDs the user belongs to.
(string) –
Authentication (dict) –
Denotes whether the user requires a password to authenticate.
Type (string) –
Indicates whether the user requires a password to authenticate.
PasswordCount (integer) –
The number of passwords belonging to the user. The maximum is two.
ARN (string) –
The Amazon Resource Name (ARN) of the user.
Exceptions