:doc:`KinesisAnalytics <../../kinesisanalytics>` / Client / add_application_cloud_watch_logging_option

******************************************
add_application_cloud_watch_logging_option
******************************************



.. py:method:: KinesisAnalytics.Client.add_application_cloud_watch_logging_option(**kwargs)

  

  .. note::

    

    This documentation is for version 1 of the Amazon Kinesis Data Analytics API, which only supports SQL applications. Version 2 of the API supports SQL and Java applications. For more information about version 2, see `Amazon Kinesis Data Analytics API V2 Documentation </kinesisanalytics/latest/apiv2/Welcome.html>`__.

    

   

  Adds a CloudWatch log stream to monitor application configuration errors. For more information about using CloudWatch log streams with Amazon Kinesis Analytics applications, see `Working with Amazon CloudWatch Logs <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/cloudwatch-logs.html>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/AddApplicationCloudWatchLoggingOption>`_  


  **Request Syntax**
  ::

    response = client.add_application_cloud_watch_logging_option(
        ApplicationName='string',
        CurrentApplicationVersionId=123,
        CloudWatchLoggingOption={
            'LogStreamARN': 'string',
            'RoleARN': 'string'
        }
    )
    
  :type ApplicationName: string
  :param ApplicationName: **[REQUIRED]** 

    The Kinesis Analytics application name.

    

  
  :type CurrentApplicationVersionId: integer
  :param CurrentApplicationVersionId: **[REQUIRED]** 

    The version ID of the Kinesis Analytics application.

    

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

    Provides the CloudWatch log stream Amazon Resource Name (ARN) and the IAM role ARN. Note: To write application messages to CloudWatch, the IAM role that is used must have the ``PutLogEvents`` policy action enabled.

    

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

      ARN of the CloudWatch log to receive application messages.

      

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

      IAM ARN of the role to use to send application messages. Note: To write application messages to CloudWatch, the IAM role that is used must have the ``PutLogEvents`` policy action enabled.

      

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`KinesisAnalytics.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`KinesisAnalytics.Client.exceptions.ResourceInUseException`

  
  *   :py:class:`KinesisAnalytics.Client.exceptions.InvalidArgumentException`

  
  *   :py:class:`KinesisAnalytics.Client.exceptions.ConcurrentModificationException`

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

  