:doc:`ElastiCache <../../elasticache>` / Client / modify_user

***********
modify_user
***********



.. py:method:: ElastiCache.Client.modify_user(**kwargs)

  

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

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/ModifyUser>`_  


  **Request Syntax**
  ::

    response = client.modify_user(
        UserId='string',
        AccessString='string',
        AppendAccessString='string',
        Passwords=[
            'string',
        ],
        NoPasswordRequired=True|False,
        AuthenticationMode={
            'Type': 'password'|'no-password-required'|'iam',
            'Passwords': [
                'string',
            ]
        },
        Engine='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) --* 

      
  
  
  :type Engine: string
  :param Engine: 

    Modifies the engine listed for a user. The options are valkey or redis.

    

  
  
  :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 options are valkey or 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**
  
  *   :py:class:`ElastiCache.Client.exceptions.UserNotFoundFault`

  
  *   :py:class:`ElastiCache.Client.exceptions.InvalidUserStateFault`

  
  *   :py:class:`ElastiCache.Client.exceptions.ServiceLinkedRoleNotFoundFault`

  
  *   :py:class:`ElastiCache.Client.exceptions.InvalidParameterValueException`

  
  *   :py:class:`ElastiCache.Client.exceptions.InvalidParameterCombinationException`

  