:doc:`WorkDocs <../../workdocs>` / Client / update_user

***********
update_user
***********



.. py:method:: WorkDocs.Client.update_user(**kwargs)

  

  Updates the specified attributes of the specified user, and grants or revokes administrative privileges to the Amazon WorkDocs site.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateUser>`_  


  **Request Syntax**
  ::

    response = client.update_user(
        AuthenticationToken='string',
        UserId='string',
        GivenName='string',
        Surname='string',
        Type='USER'|'ADMIN'|'POWERUSER'|'MINIMALUSER'|'WORKSPACESUSER',
        StorageRule={
            'StorageAllocatedInBytes': 123,
            'StorageType': 'UNLIMITED'|'QUOTA'
        },
        TimeZoneId='string',
        Locale='en'|'fr'|'ko'|'de'|'es'|'ja'|'ru'|'zh_CN'|'zh_TW'|'pt_BR'|'default',
        GrantPoweruserPrivileges='TRUE'|'FALSE'
    )
    
  :type AuthenticationToken: string
  :param AuthenticationToken: 

    Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

    

  
  :type UserId: string
  :param UserId: **[REQUIRED]** 

    The ID of the user.

    

  
  :type GivenName: string
  :param GivenName: 

    The given name of the user.

    

  
  :type Surname: string
  :param Surname: 

    The surname of the user.

    

  
  :type Type: string
  :param Type: 

    The type of the user.

    

  
  :type StorageRule: dict
  :param StorageRule: 

    The amount of storage for the user.

    

  
    - **StorageAllocatedInBytes** *(integer) --* 

      The amount of storage allocated, in bytes.

      

    
    - **StorageType** *(string) --* 

      The type of storage.

      

    
  
  :type TimeZoneId: string
  :param TimeZoneId: 

    The time zone ID of the user.

    

  
  :type Locale: string
  :param Locale: 

    The locale of the user.

    

  
  :type GrantPoweruserPrivileges: string
  :param GrantPoweruserPrivileges: 

    Boolean value to determine whether the user is granted Power user privileges.

    

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

    
    ::

      {
          'User': {
              'Id': 'string',
              'Username': 'string',
              'EmailAddress': 'string',
              'GivenName': 'string',
              'Surname': 'string',
              'OrganizationId': 'string',
              'RootFolderId': 'string',
              'RecycleBinFolderId': 'string',
              'Status': 'ACTIVE'|'INACTIVE'|'PENDING',
              'Type': 'USER'|'ADMIN'|'POWERUSER'|'MINIMALUSER'|'WORKSPACESUSER',
              'CreatedTimestamp': datetime(2015, 1, 1),
              'ModifiedTimestamp': datetime(2015, 1, 1),
              'TimeZoneId': 'string',
              'Locale': 'en'|'fr'|'ko'|'de'|'es'|'ja'|'ru'|'zh_CN'|'zh_TW'|'pt_BR'|'default',
              'Storage': {
                  'StorageUtilizedInBytes': 123,
                  'StorageRule': {
                      'StorageAllocatedInBytes': 123,
                      'StorageType': 'UNLIMITED'|'QUOTA'
                  }
              }
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **User** *(dict) --* 

        The user information.

        
        

        - **Id** *(string) --* 

          The ID of the user.

          
        

        - **Username** *(string) --* 

          The login name of the user.

          
        

        - **EmailAddress** *(string) --* 

          The email address of the user.

          
        

        - **GivenName** *(string) --* 

          The given name of the user.

          
        

        - **Surname** *(string) --* 

          The surname of the user.

          
        

        - **OrganizationId** *(string) --* 

          The ID of the organization.

          
        

        - **RootFolderId** *(string) --* 

          The ID of the root folder.

          
        

        - **RecycleBinFolderId** *(string) --* 

          The ID of the recycle bin folder.

          
        

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

          The status of the user.

          
        

        - **Type** *(string) --* 

          The type of user.

          
        

        - **CreatedTimestamp** *(datetime) --* 

          The time when the user was created.

          
        

        - **ModifiedTimestamp** *(datetime) --* 

          The time when the user was modified.

          
        

        - **TimeZoneId** *(string) --* 

          The time zone ID of the user.

          
        

        - **Locale** *(string) --* 

          The locale of the user.

          
        

        - **Storage** *(dict) --* 

          The storage for the user.

          
          

          - **StorageUtilizedInBytes** *(integer) --* 

            The amount of storage used, in bytes.

            
          

          - **StorageRule** *(dict) --* 

            The storage for a user.

            
            

            - **StorageAllocatedInBytes** *(integer) --* 

              The amount of storage allocated, in bytes.

              
            

            - **StorageType** *(string) --* 

              The type of storage.

              
        
      
    
  
  **Exceptions**
  
  *   :py:class:`WorkDocs.Client.exceptions.EntityNotExistsException`

  
  *   :py:class:`WorkDocs.Client.exceptions.UnauthorizedOperationException`

  
  *   :py:class:`WorkDocs.Client.exceptions.UnauthorizedResourceAccessException`

  
  *   :py:class:`WorkDocs.Client.exceptions.IllegalUserStateException`

  
  *   :py:class:`WorkDocs.Client.exceptions.ProhibitedStateException`

  
  *   :py:class:`WorkDocs.Client.exceptions.FailedDependencyException`

  
  *   :py:class:`WorkDocs.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`WorkDocs.Client.exceptions.DeactivatingLastSystemUserException`

  
  *   :py:class:`WorkDocs.Client.exceptions.InvalidArgumentException`

  