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

**************
update_session
**************



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

  

  Updates a session. A session is a contextual container used for generating recommendations. Amazon Connect updates the existing Amazon Q in Connect session for each contact on which Amazon Q in Connect is enabled.

  

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


  **Request Syntax**
  ::

    response = client.update_session(
        assistantId='string',
        sessionId='string',
        description='string',
        tagFilter={
            'tagCondition': {
                'key': 'string',
                'value': 'string'
            },
            'andConditions': [
                {
                    'key': 'string',
                    'value': 'string'
                },
            ],
            'orConditions': [
                {
                    'andConditions': [
                        {
                            'key': 'string',
                            'value': 'string'
                        },
                    ],
                    'tagCondition': {
                        'key': 'string',
                        'value': 'string'
                    }
                },
            ]
        },
        aiAgentConfiguration={
            'string': {
                'aiAgentId': 'string'
            }
        },
        orchestratorConfigurationList=[
            {
                'aiAgentId': 'string',
                'orchestratorUseCase': 'string'
            },
        ],
        removeOrchestratorConfigurationList=True|False
    )
    
  :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 description: string
  :param description: 

    The description.

    

  
  :type tagFilter: dict
  :param tagFilter: 

    An object that can be used to specify Tag conditions.

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

  
    - **tagCondition** *(dict) --* 

      A leaf node condition which can be used to specify a tag condition.

      

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

        The tag key in the tag condition.

        

      
      - **value** *(string) --* 

        The tag value in the tag condition.

        

      
    
    - **andConditions** *(list) --* 

      A list of conditions which would be applied together with an ``AND`` condition.

      

    
      - *(dict) --* 

        A leaf node condition which can be used to specify a tag condition.

        

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

          The tag key in the tag condition.

          

        
        - **value** *(string) --* 

          The tag value in the tag condition.

          

        
      
  
    - **orConditions** *(list) --* 

      A list of conditions which would be applied together with an ``OR`` condition.

      

    
      - *(dict) --* 

        A list of conditions which would be applied together with an ``OR`` condition.

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

      
        - **andConditions** *(list) --* 

          A list of conditions which would be applied together with an ``AND`` condition.

          

        
          - *(dict) --* 

            A leaf node condition which can be used to specify a tag condition.

            

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

              The tag key in the tag condition.

              

            
            - **value** *(string) --* 

              The tag value in the tag condition.

              

            
          
      
        - **tagCondition** *(dict) --* 

          A leaf node condition which can be used to specify a tag condition.

          

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

            The tag key in the tag condition.

            

          
          - **value** *(string) --* 

            The tag value in the tag condition.

            

          
        
      
  
  
  :type aiAgentConfiguration: dict
  :param aiAgentConfiguration: 

    The configuration of the AI Agents (mapped by AI Agent Type to AI Agent version) that should be used by Amazon Q in Connect for this Session.

    

  
    - *(string) --* 

    
      - *(dict) --* 

        A type that specifies the AI Agent ID configuration data when mapping an AI Agents to be used for an AI Agent type on a session or assistant.

        

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

          The ID of the AI Agent to be configured.

          

        
      


  :type orchestratorConfigurationList: list
  :param orchestratorConfigurationList: 

    The updated list of orchestrator configurations for the session.

    

  
    - *(dict) --* 

      An entry in the orchestrator configuration list.

      

    
      - **aiAgentId** *(string) --* 

        The identifier of the AI Agent in the orchestrator configuration.

        

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

        The use case for the orchestrator configuration. (for example Connect.SelfService, Connect.AgentAssistance)

        

      
    

  :type removeOrchestratorConfigurationList: boolean
  :param removeOrchestratorConfigurationList: 

    The list of orchestrator configurations to remove from the session.

    

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

    
    ::

      {
          'session': {
              'sessionArn': 'string',
              'sessionId': 'string',
              'name': 'string',
              'description': 'string',
              'tags': {
                  'string': 'string'
              },
              'integrationConfiguration': {
                  'topicIntegrationArn': 'string'
              },
              'tagFilter': {
                  'tagCondition': {
                      'key': 'string',
                      'value': 'string'
                  },
                  'andConditions': [
                      {
                          'key': 'string',
                          'value': 'string'
                      },
                  ],
                  'orConditions': [
                      {
                          'andConditions': [
                              {
                                  'key': 'string',
                                  'value': 'string'
                              },
                          ],
                          'tagCondition': {
                              'key': 'string',
                              'value': 'string'
                          }
                      },
                  ]
              },
              'aiAgentConfiguration': {
                  'string': {
                      'aiAgentId': 'string'
                  }
              },
              'origin': 'SYSTEM'|'CUSTOMER',
              'orchestratorConfigurationList': [
                  {
                      'aiAgentId': 'string',
                      'orchestratorUseCase': 'string'
                  },
              ]
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **session** *(dict) --* 

        Information about the session.

        
        

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

          The Amazon Resource Name (ARN) of the session.

          
        

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

          The identifier of the session.

          
        

        - **name** *(string) --* 

          The name of the session.

          
        

        - **description** *(string) --* 

          The description of the session.

          
        

        - **tags** *(dict) --* 

          The tags used to organize, track, or control access for this resource.

          
          

          - *(string) --* 
            

            - *(string) --* 
      
    
        

        - **integrationConfiguration** *(dict) --* 

          The configuration information for the session integration.

          
          

          - **topicIntegrationArn** *(string) --* 

            The Amazon Resource Name (ARN) of the integrated Amazon SNS topic used for streaming chat messages.

            
      
        

        - **tagFilter** *(dict) --* 

          An object that can be used to specify Tag conditions.

          .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``tagCondition``, ``andConditions``, ``orConditions``.     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'}


        
          

          - **tagCondition** *(dict) --* 

            A leaf node condition which can be used to specify a tag condition.

            
            

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

              The tag key in the tag condition.

              
            

            - **value** *(string) --* 

              The tag value in the tag condition.

              
        
          

          - **andConditions** *(list) --* 

            A list of conditions which would be applied together with an ``AND`` condition.

            
            

            - *(dict) --* 

              A leaf node condition which can be used to specify a tag condition.

              
              

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

                The tag key in the tag condition.

                
              

              - **value** *(string) --* 

                The tag value in the tag condition.

                
          
        
          

          - **orConditions** *(list) --* 

            A list of conditions which would be applied together with an ``OR`` condition.

            
            

            - *(dict) --* 

              A list of conditions which would be applied together with an ``OR`` condition.

              .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``andConditions``, ``tagCondition``.     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'}


            
              

              - **andConditions** *(list) --* 

                A list of conditions which would be applied together with an ``AND`` condition.

                
                

                - *(dict) --* 

                  A leaf node condition which can be used to specify a tag condition.

                  
                  

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

                    The tag key in the tag condition.

                    
                  

                  - **value** *(string) --* 

                    The tag value in the tag condition.

                    
              
            
              

              - **tagCondition** *(dict) --* 

                A leaf node condition which can be used to specify a tag condition.

                
                

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

                  The tag key in the tag condition.

                  
                

                - **value** *(string) --* 

                  The tag value in the tag condition.

                  
            
          
        
      
        

        - **aiAgentConfiguration** *(dict) --* 

          The configuration of the AI Agents (mapped by AI Agent Type to AI Agent version) that should be used by Amazon Q in Connect for this Session.

          
          

          - *(string) --* 
            

            - *(dict) --* 

              A type that specifies the AI Agent ID configuration data when mapping an AI Agents to be used for an AI Agent type on a session or assistant.

              
              

              - **aiAgentId** *(string) --* 

                The ID of the AI Agent to be configured.

                
          
      
    
        

        - **origin** *(string) --* 

          The origin of the Session to be listed. ``SYSTEM`` for a default Session created by Amazon Q in Connect or ``CUSTOMER`` for a Session created by calling `CreateSession <https://docs.aws.amazon.com/connect/latest/APIReference/API_amazon-q-connect_CreateSession.html>`__ API.

          
        

        - **orchestratorConfigurationList** *(list) --* 

          The list of orchestrator configurations for the session.

          
          

          - *(dict) --* 

            An entry in the orchestrator configuration list.

            
            

            - **aiAgentId** *(string) --* 

              The identifier of the AI Agent in the orchestrator configuration.

              
            

            - **orchestratorUseCase** *(string) --* 

              The use case for the orchestrator configuration. (for example Connect.SelfService, Connect.AgentAssistance)

              
        
      
    
  
  **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`

  