:doc:`ConnectWisdomService <../../wisdom>` / Client / create_content

**************
create_content
**************



.. py:method:: ConnectWisdomService.Client.create_content(**kwargs)

  

  Creates Wisdom content. Before to calling this API, use `StartContentUpload <https://docs.aws.amazon.com/wisdom/latest/APIReference/API_StartContentUpload.html>`__ to upload an asset.

  

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


  **Request Syntax**
  ::

    response = client.create_content(
        clientToken='string',
        knowledgeBaseId='string',
        metadata={
            'string': 'string'
        },
        name='string',
        overrideLinkOutUri='string',
        tags={
            'string': 'string'
        },
        title='string',
        uploadId='string'
    )
    
  :type clientToken: string
  :param clientToken: 

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see `Making retries safe with idempotent APIs <https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/>`__.

    This field is autopopulated if not provided.

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

    The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Wisdom Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

    

  
  :type metadata: dict
  :param metadata: 

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

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    The name of the content. Each piece of content in a knowledge base must have a unique name. You can retrieve a piece of content using only its knowledge base and its name with the `SearchContent <https://docs.aws.amazon.com/wisdom/latest/APIReference/API_SearchContent.html>`__ API.

    

  
  :type overrideLinkOutUri: string
  :param overrideLinkOutUri: 

    The URI you want to use for the article. If the knowledge base has a templateUri, setting this argument overrides it for this piece of content.

    

  
  :type tags: dict
  :param tags: 

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

    

  
    - *(string) --* 

    
      - *(string) --* 

      


  :type title: string
  :param title: 

    The title of the content. If not set, the title is equal to the name.

    

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

    A pointer to the uploaded asset. This value is returned by `StartContentUpload <https://docs.aws.amazon.com/wisdom/latest/APIReference/API_StartContentUpload.html>`__.

    

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

    
    ::

      {
          'content': {
              'contentArn': 'string',
              'contentId': 'string',
              'contentType': 'string',
              'knowledgeBaseArn': 'string',
              'knowledgeBaseId': 'string',
              'linkOutUri': 'string',
              'metadata': {
                  'string': 'string'
              },
              'name': 'string',
              'revisionId': 'string',
              'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED'|'UPDATE_FAILED',
              'tags': {
                  'string': 'string'
              },
              'title': 'string',
              'url': 'string',
              'urlExpiry': datetime(2015, 1, 1)
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **content** *(dict) --* 

        The content.

        
        

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

          The Amazon Resource Name (ARN) of the content.

          
        

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

          The identifier of the content.

          
        

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

          The media type 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 if you're storing Wisdom Content resource to it.

          
        

        - **linkOutUri** *(string) --* 

          The URI 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 Wisdom, you can store an external version identifier as metadata to utilize for determining drift.

          
          

          - *(string) --* 
            

            - *(string) --* 
      
    
        

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

          The name of the content.

          
        

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

          The identifier of the content revision.

          
        

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

          The status of the content.

          
        

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

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

          
          

          - *(string) --* 
            

            - *(string) --* 
      
    
        

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

          The title of the content.

          
        

        - **url** *(string) --* 

          The URL of the content.

          
        

        - **urlExpiry** *(datetime) --* 

          The expiration time of the URL as an epoch timestamp.

          
    
  
  **Exceptions**
  
  *   :py:class:`ConnectWisdomService.Client.exceptions.ConflictException`

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

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

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

  
  *   :py:class:`ConnectWisdomService.Client.exceptions.ResourceNotFoundException`

  