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

*******************
update_library_item
*******************



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

  

  Updates the library item for an Amazon Q App.

  

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


  **Request Syntax**
  ::

    response = client.update_library_item(
        instanceId='string',
        libraryItemId='string',
        status='PUBLISHED'|'DISABLED',
        categories=[
            'string',
        ]
    )
    
  :type instanceId: string
  :param instanceId: **[REQUIRED]** 

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

    

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

    The unique identifier of the library item to update.

    

  
  :type status: string
  :param status: 

    The new status to set for the library item, such as "Published" or "Hidden".

    

  
  :type categories: list
  :param categories: 

    The new categories to associate with the library item.

    

  
    - *(string) --* 

    

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

    
    ::

      {
          'libraryItemId': 'string',
          'appId': 'string',
          'appVersion': 123,
          'categories': [
              {
                  'id': 'string',
                  'title': 'string',
                  'color': 'string',
                  'appCount': 123
              },
          ],
          'status': 'string',
          'createdAt': datetime(2015, 1, 1),
          'createdBy': 'string',
          'updatedAt': datetime(2015, 1, 1),
          'updatedBy': 'string',
          'ratingCount': 123,
          'isRatedByUser': True|False,
          'userCount': 123,
          'isVerified': True|False
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **libraryItemId** *(string) --* 

        The unique identifier of the updated library item.

        
      

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

        The unique identifier of the Q App associated with the library item.

        
      

      - **appVersion** *(integer) --* 

        The version of the Q App associated with the library item.

        
      

      - **categories** *(list) --* 

        The categories associated with the updated library item.

        
        

        - *(dict) --* 

          A category used to classify and filter library items for Amazon Q Apps.

          
          

          - **id** *(string) --* 

            The unique identifier of the category.

            
          

          - **title** *(string) --* 

            The title or name of the category.

            
          

          - **color** *(string) --* 

            The color of the category

            
          

          - **appCount** *(integer) --* 

            The number of published Amazon Q Apps associated with a category

            
      
    
      

      - **status** *(string) --* 

        The new status of the updated library item.

        
      

      - **createdAt** *(datetime) --* 

        The date and time the library item was originally created.

        
      

      - **createdBy** *(string) --* 

        The user who originally created the library item.

        
      

      - **updatedAt** *(datetime) --* 

        The date and time the library item was last updated.

        
      

      - **updatedBy** *(string) --* 

        The user who last updated the library item.

        
      

      - **ratingCount** *(integer) --* 

        The number of ratings the library item has received.

        
      

      - **isRatedByUser** *(boolean) --* 

        Whether the current user has rated the library item.

        
      

      - **userCount** *(integer) --* 

        The number of users who have the associated Q App.

        
      

      - **isVerified** *(boolean) --* 

        Indicates whether the library item has been verified.

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

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

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

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

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

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

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

  