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

*****************
modify_user_group
*****************



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

  

  Changes the list of users that belong to the user group.

  

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


  **Request Syntax**
  ::

    response = client.modify_user_group(
        UserGroupId='string',
        UserIdsToAdd=[
            'string',
        ],
        UserIdsToRemove=[
            'string',
        ],
        Engine='string'
    )
    
  :type UserGroupId: string
  :param UserGroupId: **[REQUIRED]** 

    The ID of the user group.

    

  
  :type UserIdsToAdd: list
  :param UserIdsToAdd: 

    The list of user IDs to add to the user group.

    

  
    - *(string) --* 

    

  :type UserIdsToRemove: list
  :param UserIdsToRemove: 

    The list of user IDs to remove from the user group.

    

  
    - *(string) --* 

    

  :type Engine: string
  :param Engine: 

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

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'UserGroupId': 'string',
          'Status': 'string',
          'Engine': 'string',
          'UserIds': [
              'string',
          ],
          'MinimumEngineVersion': 'string',
          'PendingChanges': {
              'UserIdsToRemove': [
                  'string',
              ],
              'UserIdsToAdd': [
                  'string',
              ]
          },
          'ReplicationGroups': [
              'string',
          ],
          'ServerlessCaches': [
              'string',
          ],
          'ARN': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **UserGroupId** *(string) --* 

        The ID of the user group.

        
      

      - **Status** *(string) --* 

        Indicates user group status. Can be "creating", "active", "modifying", "deleting".

        
      

      - **Engine** *(string) --* 

        The options are valkey or redis.

        
      

      - **UserIds** *(list) --* 

        The list of user IDs that belong to the user group.

        
        

        - *(string) --* 
    
      

      - **MinimumEngineVersion** *(string) --* 

        The minimum engine version required, which is Redis OSS 6.0

        
      

      - **PendingChanges** *(dict) --* 

        A list of updates being applied to the user group.

        
        

        - **UserIdsToRemove** *(list) --* 

          The list of user IDs to remove.

          
          

          - *(string) --* 
      
        

        - **UserIdsToAdd** *(list) --* 

          The list of user IDs to add.

          
          

          - *(string) --* 
      
    
      

      - **ReplicationGroups** *(list) --* 

        A list of replication groups that the user group can access.

        
        

        - *(string) --* 
    
      

      - **ServerlessCaches** *(list) --* 

        Indicates which serverless caches the specified user group is associated with. Available for Valkey, Redis OSS and Serverless Memcached only.

        
        

        - *(string) --* 
    
      

      - **ARN** *(string) --* 

        The Amazon Resource Name (ARN) of the user group.

        
  
  **Exceptions**
  
  *   :py:class:`ElastiCache.Client.exceptions.UserGroupNotFoundFault`

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

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

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

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

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

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

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

  