:doc:`DataExchange <../../dataexchange>` / Client / create_data_grant

*****************
create_data_grant
*****************



.. py:method:: DataExchange.Client.create_data_grant(**kwargs)

  

  This operation creates a data grant.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dataexchange-2017-07-25/CreateDataGrant>`_  


  **Request Syntax**
  ::

    response = client.create_data_grant(
        Name='string',
        GrantDistributionScope='AWS_ORGANIZATION'|'NONE',
        ReceiverPrincipal='string',
        SourceDataSetId='string',
        EndsAt=datetime(2015, 1, 1),
        Description='string',
        Tags={
            'string': 'string'
        }
    )
    
  :type Name: string
  :param Name: **[REQUIRED]** 

    The name of the data grant.

    

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

    The distribution scope of the data grant.

    

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

    The Amazon Web Services account ID of the data grant receiver.

    

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

    The ID of the data set used to create the data grant.

    

  
  :type EndsAt: datetime
  :param EndsAt: 

    The timestamp of when access to the associated data set ends.

    

  
  :type Description: string
  :param Description: 

    The description of the data grant.

    

  
  :type Tags: dict
  :param Tags: 

    The tags to add to the data grant. A tag is a key-value pair.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {
          'Name': 'string',
          'SenderPrincipal': 'string',
          'ReceiverPrincipal': 'string',
          'Description': 'string',
          'AcceptanceState': 'PENDING_RECEIVER_ACCEPTANCE'|'ACCEPTED',
          'AcceptedAt': datetime(2015, 1, 1),
          'EndsAt': datetime(2015, 1, 1),
          'GrantDistributionScope': 'AWS_ORGANIZATION'|'NONE',
          'DataSetId': 'string',
          'SourceDataSetId': 'string',
          'Id': 'string',
          'Arn': 'string',
          'CreatedAt': datetime(2015, 1, 1),
          'UpdatedAt': datetime(2015, 1, 1),
          'Tags': {
              'string': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Name** *(string) --* 

        The name of the data grant.

        
      

      - **SenderPrincipal** *(string) --* 

        The Amazon Web Services account ID of the data grant sender.

        
      

      - **ReceiverPrincipal** *(string) --* 

        The Amazon Web Services account ID of the data grant receiver.

        
      

      - **Description** *(string) --* 

        The description of the data grant.

        
      

      - **AcceptanceState** *(string) --* 

        The acceptance state of the data grant.

        
      

      - **AcceptedAt** *(datetime) --* 

        The timestamp of when the data grant was accepted.

        
      

      - **EndsAt** *(datetime) --* 

        The timestamp of when access to the associated data set ends.

        
      

      - **GrantDistributionScope** *(string) --* 

        The distribution scope for the data grant.

        
      

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

        The ID of the data set associated to the data grant.

        
      

      - **SourceDataSetId** *(string) --* 

        The ID of the data set used to create the data grant.

        
      

      - **Id** *(string) --* 

        The ID of the data grant.

        
      

      - **Arn** *(string) --* 

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

        
      

      - **CreatedAt** *(datetime) --* 

        The timestamp of when the data grant was created.

        
      

      - **UpdatedAt** *(datetime) --* 

        The timestamp of when the data grant was last updated.

        
      

      - **Tags** *(dict) --* 

        The tags associated to the data grant. A tag is a key-value pair.

        
        

        - *(string) --* 
          

          - *(string) --* 
    
  
  
  **Exceptions**
  
  *   :py:class:`DataExchange.Client.exceptions.ServiceLimitExceededException`

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

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

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

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

  
  *   :py:class:`DataExchange.Client.exceptions.InternalServerException`

  