:doc:`PrometheusService <../../amp>` / Client / create_logging_configuration

****************************
create_logging_configuration
****************************



.. py:method:: PrometheusService.Client.create_logging_configuration(**kwargs)

  

  The ``CreateLoggingConfiguration`` operation creates rules and alerting logging configuration for the workspace. Use this operation to set the CloudWatch log group to which the logs will be published to.

   

  .. note::

    

    These logging configurations are only for rules and alerting logs.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/CreateLoggingConfiguration>`_  


  **Request Syntax**
  ::

    response = client.create_logging_configuration(
        workspaceId='string',
        logGroupArn='string',
        clientToken='string'
    )
    
  :type workspaceId: string
  :param workspaceId: **[REQUIRED]** 

    The ID of the workspace to create the logging configuration for.

    

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

    The ARN of the CloudWatch log group to which the vended log data will be published. This log group must exist prior to calling this operation.

    

  
  :type clientToken: string
  :param clientToken: 

    A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.

    This field is autopopulated if not provided.

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

    
    ::

      {
          'status': {
              'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED',
              'statusReason': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Represents the output of a ``CreateLoggingConfiguration`` operation.

      
      

      - **status** *(dict) --* 

        A structure that displays the current status of the logging configuration.

        
        

        - **statusCode** *(string) --* 

          The current status of the current rules and alerting logging configuration.

           

          .. note::

            

            These logging configurations are only for rules and alerting logs.

            

          
        

        - **statusReason** *(string) --* 

          If failed, the reason for the failure.

          
    
  
  **Exceptions**
  
  *   :py:class:`PrometheusService.Client.exceptions.ValidationException`

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

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

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

  