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

***************
stop_experiment
***************



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

  

  Stops an experiment that is currently running. If you stop an experiment, you can't resume it or restart it.

  

  .. 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/StopExperiment>`_  


  **Request Syntax**
  ::

    response = client.stop_experiment(
        desiredState='COMPLETED'|'CANCELLED',
        experiment='string',
        project='string',
        reason='string'
    )
    
  :type desiredState: string
  :param desiredState: 

    Specify whether the experiment is to be considered ``COMPLETED`` or ``CANCELLED`` after it stops.

    

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

    The name of the experiment to stop.

    

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

    The name or ARN of the project that contains the experiment to stop.

    

  
  :type reason: string
  :param reason: 

    A string that describes why you are stopping the experiment.

    

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

    
    ::

      {
          'endedTime': datetime(2015, 1, 1)
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **endedTime** *(datetime) --* 

        The date and time that the experiment stopped.

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

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

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

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

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

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

  