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

**************
search_content
**************



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

  

  Searches for content in a specified knowledge base. Can be used to get a specific content resource by its name.

  

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


  **Request Syntax**
  ::

    response = client.search_content(
        nextToken='string',
        maxResults=123,
        knowledgeBaseId='string',
        searchExpression={
            'filters': [
                {
                    'field': 'NAME',
                    'operator': 'EQUALS',
                    'value': 'string'
                },
            ]
        }
    )
    
  :type nextToken: string
  :param nextToken: 

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results to return per page.

    

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

    The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

    

  
  :type searchExpression: dict
  :param searchExpression: **[REQUIRED]** 

    The search expression to filter results.

    

  
    - **filters** *(list) --* **[REQUIRED]** 

      The search expression filters.

      

    
      - *(dict) --* 

        A search filter.

        

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

          The field on which to filter.

          

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

          The operator to use for comparing the field’s value with the provided value.

          

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

          The desired field value on which to filter.

          

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

    
    ::

      {
          'contentSummaries': [
              {
                  'contentArn': 'string',
                  'contentId': 'string',
                  'knowledgeBaseArn': 'string',
                  'knowledgeBaseId': 'string',
                  'name': 'string',
                  'revisionId': 'string',
                  'title': 'string',
                  'contentType': 'string',
                  'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED'|'UPDATE_FAILED',
                  'metadata': {
                      'string': 'string'
                  },
                  'tags': {
                      'string': 'string'
                  }
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **contentSummaries** *(list) --* 

        Summary information about the content.

        
        

        - *(dict) --* 

          Summary information about the content.

          
          

          - **contentArn** *(string) --* 

            The Amazon Resource Name (ARN) of the content.

            
          

          - **contentId** *(string) --* 

            The identifier of the content.

            
          

          - **knowledgeBaseArn** *(string) --* 

            The Amazon Resource Name (ARN) of the knowledge base.

            
          

          - **knowledgeBaseId** *(string) --* 

            The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base.

            
          

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

            The name of the content.

            
          

          - **revisionId** *(string) --* 

            The identifier of the revision of the content.

            
          

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

            The title of the content.

            
          

          - **contentType** *(string) --* 

            The media type of the content.

            
          

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

            The status of the content.

            
          

          - **metadata** *(dict) --* 

            A key/value map to store attributes without affecting tagging or recommendations. For example, when synchronizing data between an external system and Amazon Q in Connect, you can store an external version identifier as metadata to utilize for determining drift.

            
            

            - *(string) --* 
              

              - *(string) --* 
        
      
          

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

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

            
            

            - *(string) --* 
              

              - *(string) --* 
        
      
      
    
      

      - **nextToken** *(string) --* 

        If there are additional results, this is the token for the next set of results.

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

  