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

************************
update_q_app_permissions
************************



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

  

  Updates read permissions for a Amazon Q App in Amazon Q Business application environment instance.

  

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


  **Request Syntax**
  ::

    response = client.update_q_app_permissions(
        instanceId='string',
        appId='string',
        grantPermissions=[
            {
                'action': 'read'|'write',
                'principal': 'string'
            },
        ],
        revokePermissions=[
            {
                'action': 'read'|'write',
                'principal': '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 Amazon Q App for which permissions are being updated.

    

  
  :type grantPermissions: list
  :param grantPermissions: 

    The list of permissions to grant for the Amazon Q App.

    

  
    - *(dict) --* 

      The permission to grant or revoke for a Amazon Q App.

      

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

        The action associated with the permission.

        

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

        The principal user to which the permission applies.

        

      
    

  :type revokePermissions: list
  :param revokePermissions: 

    The list of permissions to revoke for the Amazon Q App.

    

  
    - *(dict) --* 

      The permission to grant or revoke for a Amazon Q App.

      

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

        The action associated with the permission.

        

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

        The principal user to which the permission applies.

        

      
    

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

    
    ::

      {
          'resourceArn': 'string',
          'appId': 'string',
          'permissions': [
              {
                  'action': 'read'|'write',
                  'principal': {
                      'userId': 'string',
                      'userType': 'owner'|'user',
                      'email': 'string'
                  }
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **resourceArn** *(string) --* 

        The Amazon Resource Name (ARN) of the Amazon Q App for which permissions were updated.

        
      

      - **appId** *(string) --* 

        The unique identifier of the Amazon Q App for which permissions were updated.

        
      

      - **permissions** *(list) --* 

        The updated list of permissions for the Amazon Q App.

        
        

        - *(dict) --* 

          The permission granted to the Amazon Q App.

          
          

          - **action** *(string) --* 

            The action associated with the permission.

            
          

          - **principal** *(dict) --* 

            The principal user to which the permission applies.

            
            

            - **userId** *(string) --* 

              The unique identifier of the user.

              
            

            - **userType** *(string) --* 

              The type of the user.

              
            

            - **email** *(string) --* 

              The email address associated with the user.

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

  