:doc:`QApps <../../qapps>` / Client / start_q_app_session

*******************
start_q_app_session
*******************



.. py:method:: QApps.Client.start_q_app_session(**kwargs)

  

  Starts a new session for an Amazon Q App, allowing inputs to be provided and the app to be run.

   

  .. note::

    

    Each Q App session will be condensed into a single conversation in the web experience.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/qapps-2023-11-27/StartQAppSession>`_  


  **Request Syntax**
  ::

    response = client.start_q_app_session(
        instanceId='string',
        appId='string',
        appVersion=123,
        initialValues=[
            {
                'cardId': 'string',
                'value': 'string',
                'submissionMutation': {
                    'submissionId': 'string',
                    'mutationType': 'edit'|'delete'|'add'
                }
            },
        ],
        sessionId='string',
        tags={
            'string': 'string'
        }
    )
    
  :type instanceId: string
  :param instanceId: **[REQUIRED]** 

    The unique identifier of the Amazon Q Business application environment instance.

    

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

    The unique identifier of the Q App to start a session for.

    

  
  :type appVersion: integer
  :param appVersion: **[REQUIRED]** 

    The version of the Q App to use for the session.

    

  
  :type initialValues: list
  :param initialValues: 

    Optional initial input values to provide for the Q App session.

    

  
    - *(dict) --* 

      The value or result associated with a card in a Amazon Q App session.

      

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

        The unique identifier of the card.

        

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

        The value or result associated with the card.

        

      
      - **submissionMutation** *(dict) --* 

        The structure that describes how the current form card value is mutated. Only applies for form cards when multiple responses are allowed.

        

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

          The unique identifier of the submission.

          

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

          The operation that is performed on a submission.

          

        
      
    

  :type sessionId: string
  :param sessionId: 

    The unique identifier of the a Q App session.

    

  
  :type tags: dict
  :param tags: 

    Optional tags to associate with the new Q App session.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {
          'sessionId': 'string',
          'sessionArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The unique identifier of the new or retrieved Q App session.

        
      

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

        The Amazon Resource Name (ARN) of the new Q App session.

        
  
  **Exceptions**
  
  *   :py:class:`QApps.Client.exceptions.ResourceNotFoundException`

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

  
  *   :py:class:`QApps.Client.exceptions.ValidationException`

  
  *   :py:class:`QApps.Client.exceptions.InternalServerException`

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

  
  *   :py:class:`QApps.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`QApps.Client.exceptions.ThrottlingException`

  