StopPipelineExecution - CodePipeline

StopPipelineExecution

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.

Request Syntax

{ "abandon": boolean, "pipelineExecutionId": "string", "pipelineName": "string", "reason": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

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: Boolean

Required: No

pipelineExecutionId

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

Type: String

Pattern: [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

Required: Yes

pipelineName

The name of the pipeline to stop.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100.

Pattern: [A-Za-z0-9.@\-_]+

Required: Yes

reason

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

Type: String

Length Constraints: Maximum length of 200.

Required: No

Response Syntax

{ "pipelineExecutionId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

pipelineExecutionId

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

Type: String

Pattern: [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

Errors

For information about the errors that are common to all actions, see Common Errors.

ConflictException

Your request cannot be handled because the pipeline is busy handling ongoing activities. Try again later.

HTTP Status Code: 400

DuplicatedStopRequestException

The pipeline execution is already in a Stopping state. If you already chose to stop and wait, you cannot make that request again. You can choose to stop and abandon now, but be aware that this option can lead to failed tasks or out of sequence tasks. If you already chose to stop and abandon, you cannot make that request again.

HTTP Status Code: 400

PipelineExecutionNotStoppableException

Unable to stop the pipeline execution. The execution might already be in a Stopped state, or it might no longer be in progress.

HTTP Status Code: 400

PipelineNotFoundException

The pipeline was specified in an invalid format or cannot be found.

HTTP Status Code: 400

ValidationException

The validation was specified in an invalid format.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: