Amazon ElastiCache

2022/11/16 - Amazon ElastiCache - 4 updated api methods

Changes  for Redis now supports AWS Identity and Access Management authentication access to Redis clusters starting with redis-engine version 7.0

CreateUser (updated) Link ¶
Changes (request, response)
Request
{'AuthenticationMode': {'Passwords': ['string'],
                        'Type': 'password | no-password-required | iam'}}
Response
{'Authentication': {'Type': {'iam'}}}

For Redis engine version 6.0 onwards: Creates a Redis user. For more information, see Using Role Based Access Control (RBAC) .

See also: AWS API Documentation

Request Syntax

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',
        ]
    }
)
type UserId

string

param UserId

[REQUIRED]

The ID of the user.

type UserName

string

param UserName

[REQUIRED]

The username of the user.

type Engine

string

param Engine

[REQUIRED]

The current supported value is Redis.

type Passwords

list

param Passwords

Passwords used for this user. You can create up to two passwords for each user.

  • (string) --

type AccessString

string

param AccessString

[REQUIRED]

Access permissions string used for this user.

type NoPasswordRequired

boolean

param NoPasswordRequired

Indicates a password is not required for this user.

type Tags

list

param Tags

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.

type AuthenticationMode

dict

param AuthenticationMode

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 to password .

    • (string) --

rtype

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 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.

DeleteUser (updated) Link ¶
Changes (response)
{'Authentication': {'Type': {'iam'}}}

For Redis engine version 6.0 onwards: Deletes a user. The user will be removed from all user groups and in turn removed from all replication groups. For more information, see Using Role Based Access Control (RBAC) .

See also: AWS API Documentation

Request Syntax

client.delete_user(
    UserId='string'
)
type UserId

string

param UserId

[REQUIRED]

The ID of the user.

rtype

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 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.

DescribeUsers (updated) Link ¶
Changes (response)
{'Users': {'Authentication': {'Type': {'iam'}}}}

Returns a list of users.

See also: AWS API Documentation

Request Syntax

client.describe_users(
    Engine='string',
    UserId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxRecords=123,
    Marker='string'
)
type Engine

string

param Engine

The Redis engine.

type UserId

string

param UserId

The ID of the user.

type Filters

list

param Filters

Filter to determine the list of User IDs to return.

  • (dict) --

    Used to streamline results of a search based on the property being filtered.

    • Name (string) -- [REQUIRED]

      The property being filtered. For example, UserId.

    • Values (list) -- [REQUIRED]

      The property values to filter on. For example, "user-123".

      • (string) --

type MaxRecords

integer

param MaxRecords

The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results can be retrieved.

type Marker

string

param Marker

An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords. >

rtype

dict

returns

Response Syntax

{
    'Users': [
        {
            'UserId': 'string',
            'UserName': 'string',
            'Status': 'string',
            'Engine': 'string',
            'MinimumEngineVersion': 'string',
            'AccessString': 'string',
            'UserGroupIds': [
                'string',
            ],
            'Authentication': {
                'Type': 'password'|'no-password'|'iam',
                'PasswordCount': 123
            },
            'ARN': 'string'
        },
    ],
    'Marker': 'string'
}

Response Structure

  • (dict) --

    • Users (list) --

      A list of users.

      • (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 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.

    • Marker (string) --

      An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords. >

ModifyUser (updated) Link ¶
Changes (request, response)
Request
{'AuthenticationMode': {'Passwords': ['string'],
                        'Type': 'password | no-password-required | iam'}}
Response
{'Authentication': {'Type': {'iam'}}}

Changes user password(s) and/or access string.

See also: AWS API Documentation

Request Syntax

client.modify_user(
    UserId='string',
    AccessString='string',
    AppendAccessString='string',
    Passwords=[
        'string',
    ],
    NoPasswordRequired=True|False,
    AuthenticationMode={
        'Type': 'password'|'no-password-required'|'iam',
        'Passwords': [
            'string',
        ]
    }
)
type UserId

string

param UserId

[REQUIRED]

The ID of the user.

type AccessString

string

param AccessString

Access permissions string used for this user.

type AppendAccessString

string

param AppendAccessString

Adds additional user permissions to the access string.

type Passwords

list

param Passwords

The passwords belonging to the user. You are allowed up to two.

  • (string) --

type NoPasswordRequired

boolean

param NoPasswordRequired

Indicates no password is required for the user.

type AuthenticationMode

dict

param AuthenticationMode

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 to password .

    • (string) --

rtype

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 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.