:doc:`QuickSight <../../quicksight>` / Client / update_data_source_permissions

******************************
update_data_source_permissions
******************************



.. py:method:: QuickSight.Client.update_data_source_permissions(**kwargs)

  

  Updates the permissions to a data source.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/quicksight-2018-04-01/UpdateDataSourcePermissions>`_  


  **Request Syntax**
  ::

    response = client.update_data_source_permissions(
        AwsAccountId='string',
        DataSourceId='string',
        GrantPermissions=[
            {
                'Principal': 'string',
                'Actions': [
                    'string',
                ]
            },
        ],
        RevokePermissions=[
            {
                'Principal': 'string',
                'Actions': [
                    'string',
                ]
            },
        ]
    )
    
  :type AwsAccountId: string
  :param AwsAccountId: **[REQUIRED]** 

    The Amazon Web Services account ID.

    

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

    The ID of the data source. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

    

  
  :type GrantPermissions: list
  :param GrantPermissions: 

    A list of resource permissions that you want to grant on the data source.

    

  
    - *(dict) --* 

      Permission for the resource.

      

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

        The Amazon Resource Name (ARN) of the principal. This can be one of the following:

         

        
        * The ARN of an Quick Sight user or group associated with a data source or dataset. (This is common.)
         
        * The ARN of an Quick Sight user, group, or namespace associated with an analysis, dashboard, template, or theme. Namespace sharing is not supported for action connectors. (This is common.)
         
        * The ARN of an Amazon Web Services account root: This is an IAM ARN rather than a Quick Sight ARN. Use this option only to share resources (templates) across Amazon Web Services accounts. Account root sharing is not supported for action connectors. (This is less common.)
        

        

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

        The IAM action to grant or revoke permissions on.

        

      
        - *(string) --* 

        
    
    

  :type RevokePermissions: list
  :param RevokePermissions: 

    A list of resource permissions that you want to revoke on the data source.

    

  
    - *(dict) --* 

      Permission for the resource.

      

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

        The Amazon Resource Name (ARN) of the principal. This can be one of the following:

         

        
        * The ARN of an Quick Sight user or group associated with a data source or dataset. (This is common.)
         
        * The ARN of an Quick Sight user, group, or namespace associated with an analysis, dashboard, template, or theme. Namespace sharing is not supported for action connectors. (This is common.)
         
        * The ARN of an Amazon Web Services account root: This is an IAM ARN rather than a Quick Sight ARN. Use this option only to share resources (templates) across Amazon Web Services accounts. Account root sharing is not supported for action connectors. (This is less common.)
        

        

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

        The IAM action to grant or revoke permissions on.

        

      
        - *(string) --* 

        
    
    

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

    
    ::

      {
          'DataSourceArn': 'string',
          'DataSourceId': 'string',
          'RequestId': 'string',
          'Status': 123
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **DataSourceArn** *(string) --* 

        The Amazon Resource Name (ARN) of the data source.

        
      

      - **DataSourceId** *(string) --* 

        The ID of the data source. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

        
      

      - **RequestId** *(string) --* 

        The Amazon Web Services request ID for this operation.

        
      

      - **Status** *(integer) --* 

        The HTTP status of the request.

        
  
  **Exceptions**
  
  *   :py:class:`QuickSight.Client.exceptions.AccessDeniedException`

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

  
  *   :py:class:`QuickSight.Client.exceptions.InvalidParameterValueException`

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

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

  
  *   :py:class:`QuickSight.Client.exceptions.InternalFailureException`

  