Amazon MemoryDB

2023/05/30 - Amazon MemoryDB - 4 updated api methods

Changes  Amazon MemoryDB 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': {'Type': {'iam'}}}
Response
{'User': {'Authentication': {'Type': {'iam'}}}}

Creates a MemoryDB user. For more information, see Authenticating users with Access Contol Lists (ACLs) .

See also: AWS API Documentation

Request Syntax

client.create_user(
    UserName='string',
    AuthenticationMode={
        'Type': 'password'|'iam',
        'Passwords': [
            'string',
        ]
    },
    AccessString='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type UserName

string

param UserName

[REQUIRED]

The name of the user. This value must be unique as it also serves as the user identifier.

type AuthenticationMode

dict

param AuthenticationMode

[REQUIRED]

Denotes the user's authentication properties, such as whether it requires a password to authenticate.

  • Type (string) --

    Indicates whether the user requires a password to authenticate. All newly-created users require a password.

  • Passwords (list) --

    The password(s) used for authentication

    • (string) --

type AccessString

string

param AccessString

[REQUIRED]

Access permissions string used 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 MemoryDB resource. Tags are composed of a Key/Value pair. You can use tags to categorize and track all your MemoryDB resources. When you add or remove tags on clusters, those actions will be replicated to all nodes in the cluster. A tag with a null Value is permitted. For more information, see Tagging your MemoryDB resources

    • Key (string) --

      The key for the tag. May not be null.

    • Value (string) --

      The tag's value. May be null.

rtype

dict

returns

Response Syntax

{
    'User': {
        'Name': 'string',
        'Status': 'string',
        'AccessString': 'string',
        'ACLNames': [
            'string',
        ],
        'MinimumEngineVersion': 'string',
        'Authentication': {
            'Type': 'password'|'no-password'|'iam',
            'PasswordCount': 123
        },
        'ARN': 'string'
    }
}

Response Structure

  • (dict) --

    • User (dict) --

      The newly-created user.

      • Name (string) --

        The name of the user

      • Status (string) --

        Indicates the user status. Can be "active", "modifying" or "deleting".

      • AccessString (string) --

        Access permissions string used for this user.

      • ACLNames (list) --

        The names of the Access Control Lists to which the user belongs

        • (string) --

      • MinimumEngineVersion (string) --

        The minimum engine version supported for the user

      • 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)
{'User': {'Authentication': {'Type': {'iam'}}}}

Deletes a user. The user will be removed from all ACLs and in turn removed from all clusters.

See also: AWS API Documentation

Request Syntax

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

string

param UserName

[REQUIRED]

The name of the user to delete

rtype

dict

returns

Response Syntax

{
    'User': {
        'Name': 'string',
        'Status': 'string',
        'AccessString': 'string',
        'ACLNames': [
            'string',
        ],
        'MinimumEngineVersion': 'string',
        'Authentication': {
            'Type': 'password'|'no-password'|'iam',
            'PasswordCount': 123
        },
        'ARN': 'string'
    }
}

Response Structure

  • (dict) --

    • User (dict) --

      The user object that has been deleted.

      • Name (string) --

        The name of the user

      • Status (string) --

        Indicates the user status. Can be "active", "modifying" or "deleting".

      • AccessString (string) --

        Access permissions string used for this user.

      • ACLNames (list) --

        The names of the Access Control Lists to which the user belongs

        • (string) --

      • MinimumEngineVersion (string) --

        The minimum engine version supported for the user

      • 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(
    UserName='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
type UserName

string

param UserName

The name of the user

type Filters

list

param Filters

Filter to determine the list of users 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, UserName.

    • Values (list) -- [REQUIRED]

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

      • (string) --

type MaxResults

integer

param MaxResults

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

type NextToken

string

param NextToken

An optional argument to pass in case the total number of records exceeds the value of MaxResults. If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged.

rtype

dict

returns

Response Syntax

{
    'Users': [
        {
            'Name': 'string',
            'Status': 'string',
            'AccessString': 'string',
            'ACLNames': [
                'string',
            ],
            'MinimumEngineVersion': 'string',
            'Authentication': {
                'Type': 'password'|'no-password'|'iam',
                'PasswordCount': 123
            },
            'ARN': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Users (list) --

      A list of users.

      • (dict) --

        You create users and assign them specific permissions by using an access string. You assign the users to Access Control Lists aligned with a specific role (administrators, human resources) that are then deployed to one or more MemoryDB clusters.

        • Name (string) --

          The name of the user

        • Status (string) --

          Indicates the user status. Can be "active", "modifying" or "deleting".

        • AccessString (string) --

          Access permissions string used for this user.

        • ACLNames (list) --

          The names of the Access Control Lists to which the user belongs

          • (string) --

        • MinimumEngineVersion (string) --

          The minimum engine version supported for the user

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

    • NextToken (string) --

      An optional argument to pass in case the total number of records exceeds the value of MaxResults. If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged.

UpdateUser (updated) Link ¶
Changes (request, response)
Request
{'AuthenticationMode': {'Type': {'iam'}}}
Response
{'User': {'Authentication': {'Type': {'iam'}}}}

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

See also: AWS API Documentation

Request Syntax

client.update_user(
    UserName='string',
    AuthenticationMode={
        'Type': 'password'|'iam',
        'Passwords': [
            'string',
        ]
    },
    AccessString='string'
)
type UserName

string

param UserName

[REQUIRED]

The name of the user

type AuthenticationMode

dict

param AuthenticationMode

Denotes the user's authentication properties, such as whether it requires a password to authenticate.

  • Type (string) --

    Indicates whether the user requires a password to authenticate. All newly-created users require a password.

  • Passwords (list) --

    The password(s) used for authentication

    • (string) --

type AccessString

string

param AccessString

Access permissions string used for this user.

rtype

dict

returns

Response Syntax

{
    'User': {
        'Name': 'string',
        'Status': 'string',
        'AccessString': 'string',
        'ACLNames': [
            'string',
        ],
        'MinimumEngineVersion': 'string',
        'Authentication': {
            'Type': 'password'|'no-password'|'iam',
            'PasswordCount': 123
        },
        'ARN': 'string'
    }
}

Response Structure

  • (dict) --

    • User (dict) --

      The updated user

      • Name (string) --

        The name of the user

      • Status (string) --

        Indicates the user status. Can be "active", "modifying" or "deleting".

      • AccessString (string) --

        Access permissions string used for this user.

      • ACLNames (list) --

        The names of the Access Control Lists to which the user belongs

        • (string) --

      • MinimumEngineVersion (string) --

        The minimum engine version supported for the user

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