:doc:`CloudWatchEvidently <../../evidently>` / Client / put_project_events

******************
put_project_events
******************



.. py:method:: CloudWatchEvidently.Client.put_project_events(**kwargs)

  

  Sends performance events to Evidently. These events can be used to evaluate a launch or an experiment.

  

  .. danger::

        This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.


  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/evidently-2021-02-01/PutProjectEvents>`_  


  **Request Syntax**
  ::

    response = client.put_project_events(
        events=[
            {
                'data': 'string',
                'timestamp': datetime(2015, 1, 1),
                'type': 'aws.evidently.evaluation'|'aws.evidently.custom'
            },
        ],
        project='string'
    )
    
  :type events: list
  :param events: **[REQUIRED]** 

    An array of event structures that contain the performance data that is being sent to Evidently.

    

  
    - *(dict) --* 

      A structure that contains the information about one evaluation event or custom event sent to Evidently. This is a JSON payload. If this event specifies a pre-defined event type, the payload must follow the defined event schema.

      

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

        The event data.

        

      
      - **timestamp** *(datetime) --* **[REQUIRED]** 

        The timestamp of the event.

        

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

        ``aws.evidently.evaluation`` specifies an evaluation event, which determines which feature variation that a user sees. ``aws.evidently.custom`` specifies a custom event, which generates metrics from user actions such as clicks and checkouts.

        

      
    

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

    The name or ARN of the project to write the events to.

    

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

    
    ::

      {
          'eventResults': [
              {
                  'errorCode': 'string',
                  'errorMessage': 'string',
                  'eventId': 'string'
              },
          ],
          'failedEventCount': 123
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **eventResults** *(list) --* 

        A structure that contains Evidently's response to the sent events, including an event ID and error codes, if any.

        
        

        - *(dict) --* 

          A structure that contains Evidently's response to the sent events, including an event ID and error codes, if any.

          
          

          - **errorCode** *(string) --* 

            If the ``PutProjectEvents`` operation has an error, the error code is returned here.

            
          

          - **errorMessage** *(string) --* 

            If the ``PutProjectEvents`` operation has an error, the error message is returned here.

            
          

          - **eventId** *(string) --* 

            A unique ID assigned to this ``PutProjectEvents`` operation.

            
      
    
      

      - **failedEventCount** *(integer) --* 

        The number of events in the operation that could not be used by Evidently.

        
  
  **Exceptions**
  
  *   :py:class:`CloudWatchEvidently.Client.exceptions.ThrottlingException`

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

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

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

  