:doc:`DirectoryService <../../ds>` / Client / create_log_subscription

***********************
create_log_subscription
***********************



.. py:method:: DirectoryService.Client.create_log_subscription(**kwargs)

  

  Creates a subscription to forward real-time Directory Service domain controller security logs to the specified Amazon CloudWatch log group in your Amazon Web Services account.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CreateLogSubscription>`_  


  **Request Syntax**
  ::

    response = client.create_log_subscription(
        DirectoryId='string',
        LogGroupName='string'
    )
    
  :type DirectoryId: string
  :param DirectoryId: **[REQUIRED]** 

    Identifier of the directory to which you want to subscribe and receive real-time logs to your specified CloudWatch log group.

    

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

    The name of the CloudWatch log group where the real-time domain controller logs are forwarded.

    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`DirectoryService.Client.exceptions.EntityAlreadyExistsException`

  
  *   :py:class:`DirectoryService.Client.exceptions.EntityDoesNotExistException`

  
  *   :py:class:`DirectoryService.Client.exceptions.UnsupportedOperationException`

  
  *   :py:class:`DirectoryService.Client.exceptions.InsufficientPermissionsException`

  
  *   :py:class:`DirectoryService.Client.exceptions.ClientException`

  
  *   :py:class:`DirectoryService.Client.exceptions.ServiceException`

  