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

*********************
retry_stage_execution
*********************



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

  

  You can retry a stage that has failed without having to run a pipeline again from the beginning. You do this by either retrying the failed actions in a stage or by retrying all actions in the stage starting from the first action in the stage. When you retry the failed actions in a stage, all actions that are still in progress continue working, and failed actions are triggered again. When you retry a failed stage from the first action in the stage, the stage cannot have any actions in progress. Before a stage can be retried, it must either have all actions failed or some actions failed and some succeeded.

  

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


  **Request Syntax**
  ::

    response = client.retry_stage_execution(
        pipelineName='string',
        stageName='string',
        pipelineExecutionId='string',
        retryMode='FAILED_ACTIONS'|'ALL_ACTIONS'
    )
    
  :type pipelineName: string
  :param pipelineName: **[REQUIRED]** 

    The name of the pipeline that contains the failed stage.

    

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

    The name of the failed stage to be retried.

    

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

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

    

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

    The scope of the retry attempt.

    

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

    
    ::

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

    

    - *(dict) --* 

      Represents the output of a ``RetryStageExecution`` action.

      
      

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

        The ID of the current workflow execution in the failed stage.

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

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

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

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

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

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

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

  