:doc:`Connect <../../connect>` / Client / associate_analytics_data_set

****************************
associate_analytics_data_set
****************************



.. py:method:: Connect.Client.associate_analytics_data_set(**kwargs)

  

  Associates the specified dataset for a Amazon Connect instance with the target account. You can associate only one dataset in a single call.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/connect-2017-08-08/AssociateAnalyticsDataSet>`_  


  **Request Syntax**
  ::

    response = client.associate_analytics_data_set(
        InstanceId='string',
        DataSetId='string',
        TargetAccountId='string'
    )
    
  :type InstanceId: string
  :param InstanceId: **[REQUIRED]** 

    The identifier of the Amazon Connect instance. You can `find the instance ID <https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html>`__ in the Amazon Resource Name (ARN) of the instance.

    

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

    The identifier of the dataset to associate with the target account.

    

  
  :type TargetAccountId: string
  :param TargetAccountId: 

    The identifier of the target account. Use to associate a dataset to a different account than the one containing the Amazon Connect instance. If not specified, by default this value is the Amazon Web Services account that has the Amazon Connect instance.

    

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

    
    ::

      {
          'DataSetId': 'string',
          'TargetAccountId': 'string',
          'ResourceShareId': 'string',
          'ResourceShareArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **DataSetId** *(string) --* 

        The identifier of the dataset that was associated.

        
      

      - **TargetAccountId** *(string) --* 

        The identifier of the target account.

        
      

      - **ResourceShareId** *(string) --* 

        The Resource Access Manager share ID that is generated.

        
      

      - **ResourceShareArn** *(string) --* 

        The Amazon Resource Name (ARN) of the Resource Access Manager share.

        
  
  **Exceptions**
  
  *   :py:class:`Connect.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`Connect.Client.exceptions.InvalidParameterException`

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

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

  
  *   :py:class:`Connect.Client.exceptions.InternalServiceException`

  