:doc:`QConnect <../../qconnect>` / Client / update_session_data

*******************
update_session_data
*******************



.. py:method:: QConnect.Client.update_session_data(**kwargs)

  

  Updates the data stored on an Amazon Q in Connect Session.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/qconnect-2020-10-19/UpdateSessionData>`_  


  **Request Syntax**
  ::

    response = client.update_session_data(
        assistantId='string',
        sessionId='string',
        namespace='Custom',
        data=[
            {
                'key': 'string',
                'value': {
                    'stringValue': 'string'
                }
            },
        ]
    )
    
  :type assistantId: string
  :param assistantId: **[REQUIRED]** 

    The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

    

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

    The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.

    

  
  :type namespace: string
  :param namespace: 

    The namespace into which the session data is stored. Supported namespaces are: Custom

    

  
  :type data: list
  :param data: **[REQUIRED]** 

    The data stored on the Amazon Q in Connect Session.

    

  
    - *(dict) --* 

      The list of key-value pairs that are stored on the session.

      

    
      - **key** *(string) --* **[REQUIRED]** 

        The key of the data stored on the session.

        

      
      - **value** *(dict) --* **[REQUIRED]** 

        The value of the data stored on the session.

        .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``stringValue``. 

      
        - **stringValue** *(string) --* 

          The string value of the data stored on the session.

          

        
      
    

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

    
    ::

      {
          'sessionArn': 'string',
          'sessionId': 'string',
          'namespace': 'Custom',
          'data': [
              {
                  'key': 'string',
                  'value': {
                      'stringValue': 'string'
                  }
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **sessionArn** *(string) --* 

        The Amazon Resource Name (ARN) of the session.

        
      

      - **sessionId** *(string) --* 

        The identifier of the session.

        
      

      - **namespace** *(string) --* 

        The namespace into which the session data is stored. Supported namespaces are: Custom

        
      

      - **data** *(list) --* 

        Data stored in the session.

        
        

        - *(dict) --* 

          The list of key-value pairs that are stored on the session.

          
          

          - **key** *(string) --* 

            The key of the data stored on the session.

            
          

          - **value** *(dict) --* 

            The value of the data stored on the session.

            .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``stringValue``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


          
            

            - **stringValue** *(string) --* 

              The string value of the data stored on the session.

              
        
      
    
  
  **Exceptions**
  
  *   :py:class:`QConnect.Client.exceptions.ValidationException`

  
  *   :py:class:`QConnect.Client.exceptions.UnauthorizedException`

  
  *   :py:class:`QConnect.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`QConnect.Client.exceptions.ResourceNotFoundException`

  