:doc:`CodePipeline <../../codepipeline>` / Client / stop_pipeline_execution

***********************
stop_pipeline_execution
***********************



.. py:method:: CodePipeline.Client.stop_pipeline_execution(**kwargs)

  

  Stops the specified pipeline execution. You choose to either stop the pipeline execution by completing in-progress actions without starting subsequent actions, or by abandoning in-progress actions. While completing or abandoning in-progress actions, the pipeline execution is in a ``Stopping`` state. After all in-progress actions are completed or abandoned, the pipeline execution is in a ``Stopped`` state.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codepipeline-2015-07-09/StopPipelineExecution>`_  


  **Request Syntax**
  ::

    response = client.stop_pipeline_execution(
        pipelineName='string',
        pipelineExecutionId='string',
        abandon=True|False,
        reason='string'
    )
    
  :type pipelineName: string
  :param pipelineName: **[REQUIRED]** 

    The name of the pipeline to stop.

    

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

    The ID of the pipeline execution to be stopped in the current stage. Use the ``GetPipelineState`` action to retrieve the current pipelineExecutionId.

    

  
  :type abandon: boolean
  :param abandon: 

    Use this option to stop the pipeline execution by abandoning, rather than finishing, in-progress actions.

     

    .. note::

      

      This option can lead to failed or out-of-sequence tasks.

      

    

  
  :type reason: string
  :param reason: 

    Use this option to enter comments, such as the reason the pipeline was stopped.

    

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

    
    ::

      {
          'pipelineExecutionId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **pipelineExecutionId** *(string) --* 

        The unique system-generated ID of the pipeline execution that was stopped.

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

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

  
  *   :py:class:`CodePipeline.Client.exceptions.PipelineNotFoundException`

  
  *   :py:class:`CodePipeline.Client.exceptions.PipelineExecutionNotStoppableException`

  
  *   :py:class:`CodePipeline.Client.exceptions.DuplicatedStopRequestException`

  