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

**************************
create_content_association
**************************



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

  

  Creates an association between a content resource in a knowledge base and `step-by-step guides <https://docs.aws.amazon.com/connect/latest/adminguide/step-by-step-guided-experiences.html>`__. Step-by-step guides offer instructions to agents for resolving common customer issues. You create a content association to integrate Amazon Q in Connect and step-by-step guides.

   

  After you integrate Amazon Q and step-by-step guides, when Amazon Q provides a recommendation to an agent based on the intent that it's detected, it also provides them with the option to start the step-by-step guide that you have associated with the content.

   

  Note the following limitations:

   

  
  * You can create only one content association for each content resource in a knowledge base.
   
  * You can associate a step-by-step guide with multiple content resources.
  

   

  For more information, see `Integrate Amazon Q in Connect with step-by-step guides <https://docs.aws.amazon.com/connect/latest/adminguide/integrate-q-with-guides.html>`__ in the *Amazon Connect Administrator Guide*.

  

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


  **Request Syntax**
  ::

    response = client.create_content_association(
        clientToken='string',
        knowledgeBaseId='string',
        contentId='string',
        associationType='AMAZON_CONNECT_GUIDE',
        association={
            'amazonConnectGuideAssociation': {
                'flowId': 'string'
            }
        },
        tags={
            'string': '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 <http://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.

    

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

    The identifier of the content.

    

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

    The type of association.

    

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

    The identifier of the associated resource.

    .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``amazonConnectGuideAssociation``. 

  
    - **amazonConnectGuideAssociation** *(dict) --* 

      The data of the step-by-step guide association.

      

    
      - **flowId** *(string) --* 

        The Amazon Resource Name (ARN) of an Amazon Connect flow. Step-by-step guides are a type of flow.

        

      
    
  
  :type tags: dict
  :param tags: 

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

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {
          'contentAssociation': {
              'knowledgeBaseId': 'string',
              'knowledgeBaseArn': 'string',
              'contentId': 'string',
              'contentArn': 'string',
              'contentAssociationId': 'string',
              'contentAssociationArn': 'string',
              'associationType': 'AMAZON_CONNECT_GUIDE',
              'associationData': {
                  'amazonConnectGuideAssociation': {
                      'flowId': 'string'
                  }
              },
              'tags': {
                  'string': 'string'
              }
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **contentAssociation** *(dict) --* 

        The association between Amazon Q in Connect content and another resource.

        
        

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

          The identifier of the knowledge base.

          
        

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

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

          
        

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

          The identifier of the content.

          
        

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

          The Amazon Resource Name (ARN) of the content.

          
        

        - **contentAssociationId** *(string) --* 

          The identifier of the content association. Can be either the ID or the ARN. URLs cannot contain the ARN.

          
        

        - **contentAssociationArn** *(string) --* 

          The Amazon Resource Name (ARN) of the content association.

          
        

        - **associationType** *(string) --* 

          The type of association.

          
        

        - **associationData** *(dict) --* 

          The content association.

          .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``amazonConnectGuideAssociation``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                    'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


        
          

          - **amazonConnectGuideAssociation** *(dict) --* 

            The data of the step-by-step guide association.

            
            

            - **flowId** *(string) --* 

              The Amazon Resource Name (ARN) of an Amazon Connect flow. Step-by-step guides are a type of flow.

              
        
      
        

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

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

          
          

          - *(string) --* 
            

            - *(string) --* 
      
    
    
  
  **Exceptions**
  
  *   :py:class:`QConnect.Client.exceptions.ConflictException`

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

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

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

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

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

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

  