# CodePipeline (/integrations/codepipeline)





{/* MANUAL-CONTENT-START:intro */}

Use [AWS CodePipeline](https://aws.amazon.com/codepipeline/) to inspect release pipelines and execution history, start or stop runs, retry stages, and approve or reject manual approval actions. Stage transitions can be disabled or re-enabled to control pipeline flow.

{/* MANUAL-CONTENT-END */}

## Use the block [#usage-instructions]

Start, stop, and monitor pipeline executions, retry failed stages, and approve or reject manual approval actions. Requires AWS access key and secret access key.

## Actions [#actions]

### CodePipeline List Pipelines [#codepipeline-list-pipelines]

List all CodePipeline pipelines in an AWS account and region

<ReferenceDetails>
  #### Input [#input]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `awsRegion` | string | Yes | AWS region (e.g., us-east-1) |
  | `awsAccessKeyId` | string | Yes | AWS access key ID |
  | `awsSecretAccessKey` | string | Yes | AWS secret access key |
  | `maxResults` | number | No | Maximum number of pipelines to return (1-1000) |
  | `nextToken` | string | No | Pagination token from a previous call |

  #### Output [#output]

  | Parameter | Type | Description |
  | - | - | - |
  | `pipelines` | array | List of pipelines with name, version, type, and timestamps |
  | ↳ `name` | string | Pipeline name |
  | ↳ `version` | number | Pipeline version number |
  | ↳ `pipelineType` | string | Pipeline type (V1 or V2) |
  | ↳ `executionMode` | string | Execution mode (QUEUED, SUPERSEDED, PARALLEL) |
  | ↳ `created` | number | Epoch ms when the pipeline was created |
  | ↳ `updated` | number | Epoch ms when the pipeline was last updated |
  | `nextToken` | string | Pagination token for the next page of results |
</ReferenceDetails>

### CodePipeline Get Pipeline [#codepipeline-get-pipeline]

Get the structure of a CodePipeline pipeline, including its stages, actions, and variables

<ReferenceDetails>
  #### Input [#input-1]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `awsRegion` | string | Yes | AWS region (e.g., us-east-1) |
  | `awsAccessKeyId` | string | Yes | AWS access key ID |
  | `awsSecretAccessKey` | string | Yes | AWS secret access key |
  | `pipelineName` | string | Yes | Name of the pipeline |
  | `version` | number | No | Pipeline version to retrieve (defaults to the current version) |

  #### Output [#output-1]

  | Parameter | Type | Description |
  | - | - | - |
  | `pipelineName` | string | Pipeline name |
  | `pipelineArn` | string | Pipeline ARN |
  | `roleArn` | string | IAM role ARN the pipeline assumes |
  | `version` | number | Pipeline version number |
  | `pipelineType` | string | Pipeline type (V1 or V2) |
  | `executionMode` | string | Execution mode (QUEUED, SUPERSEDED, PARALLEL) |
  | `artifactStoreType` | string | Artifact store type (S3) |
  | `artifactStoreLocation` | string | Artifact store bucket location |
  | `stages` | array | Pipeline stages with their actions (name, category, provider, configuration) |
  | ↳ `stageName` | string | Stage name |
  | ↳ `actions` | array | Actions in the stage, in run order |
  | `variables` | array | Pipeline variable declarations with default values |
  | ↳ `name` | string | Variable name |
  | ↳ `defaultValue` | string | Default value |
  | ↳ `description` | string | Variable description |
  | `created` | number | Epoch ms when the pipeline was created |
  | `updated` | number | Epoch ms when the pipeline was last updated |
</ReferenceDetails>

### CodePipeline Get Pipeline State [#codepipeline-get-pipeline-state]

Get the current state of a CodePipeline pipeline, including stage and action status and pending approval tokens

<ReferenceDetails>
  #### Input [#input-2]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `awsRegion` | string | Yes | AWS region (e.g., us-east-1) |
  | `awsAccessKeyId` | string | Yes | AWS access key ID |
  | `awsSecretAccessKey` | string | Yes | AWS secret access key |
  | `pipelineName` | string | Yes | Name of the pipeline |

  #### Output [#output-2]

  | Parameter | Type | Description |
  | - | - | - |
  | `pipelineName` | string | Pipeline name |
  | `pipelineVersion` | number | Pipeline version number |
  | `created` | number | Epoch ms when the pipeline was created |
  | `updated` | number | Epoch ms when the pipeline was last updated |
  | `stageStates` | array | Per-stage state including latest execution status and action details |
  | ↳ `stageName` | string | Stage name |
  | ↳ `status` | string | Latest stage execution status (InProgress, Succeeded, Failed, Stopped, Cancelled) |
  | ↳ `pipelineExecutionId` | string | Pipeline execution ID currently in the stage |
  | ↳ `inboundTransitionEnabled` | boolean | Whether the inbound transition into the stage is enabled |
  | ↳ `actionStates` | array | Per-action state with status, summary, error details, and approval token (for pending manual approvals) |
</ReferenceDetails>

### CodePipeline Get Pipeline Execution [#codepipeline-get-pipeline-execution]

Get details of a CodePipeline execution, including status, trigger, source revisions, and resolved variables

<ReferenceDetails>
  #### Input [#input-3]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `awsRegion` | string | Yes | AWS region (e.g., us-east-1) |
  | `awsAccessKeyId` | string | Yes | AWS access key ID |
  | `awsSecretAccessKey` | string | Yes | AWS secret access key |
  | `pipelineName` | string | Yes | Name of the pipeline |
  | `pipelineExecutionId` | string | Yes | ID of the pipeline execution |

  #### Output [#output-3]

  | Parameter | Type | Description |
  | - | - | - |
  | `pipelineExecutionId` | string | Pipeline execution ID |
  | `pipelineName` | string | Pipeline name |
  | `pipelineVersion` | number | Pipeline version number |
  | `status` | string | Execution status (Cancelled, InProgress, Stopped, Stopping, Succeeded, Superseded, Failed) |
  | `statusSummary` | string | Status summary for the execution |
  | `executionMode` | string | Execution mode (QUEUED, SUPERSEDED, PARALLEL) |
  | `executionType` | string | Execution type (STANDARD or ROLLBACK) |
  | `triggerType` | string | What triggered the execution (e.g., Webhook, StartPipelineExecution) |
  | `triggerDetail` | string | Detail about the trigger (e.g., user ARN) |
  | `artifactRevisions` | array | Source artifact revisions for the execution |
  | ↳ `name` | string | Artifact name |
  | ↳ `revisionId` | string | Revision ID (e.g., commit SHA) |
  | ↳ `revisionSummary` | string | Revision summary (e.g., commit message) |
  | ↳ `revisionUrl` | string | URL of the revision |
  | ↳ `created` | number | Epoch ms when the revision was created |
  | `variables` | array | Resolved pipeline variables for the execution |
  | ↳ `name` | string | Variable name |
  | ↳ `resolvedValue` | string | Resolved variable value |
</ReferenceDetails>

### CodePipeline List Pipeline Executions [#codepipeline-list-pipeline-executions]

List recent executions of a CodePipeline pipeline with status and source revisions

<ReferenceDetails>
  #### Input [#input-4]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `awsRegion` | string | Yes | AWS region (e.g., us-east-1) |
  | `awsAccessKeyId` | string | Yes | AWS access key ID |
  | `awsSecretAccessKey` | string | Yes | AWS secret access key |
  | `pipelineName` | string | Yes | Name of the pipeline |
  | `maxResults` | number | No | Maximum number of executions to return (1-100, default 100) |
  | `nextToken` | string | No | Pagination token from a previous call |
  | `succeededInStage` | string | No | Only return executions that succeeded in this stage |

  #### Output [#output-4]

  | Parameter | Type | Description |
  | - | - | - |
  | `executions` | array | Pipeline execution summaries, most recent first |
  | ↳ `pipelineExecutionId` | string | Pipeline execution ID |
  | ↳ `status` | string | Execution status (Cancelled, InProgress, Stopped, Stopping, Succeeded, Superseded, Failed) |
  | ↳ `statusSummary` | string | Status summary for the execution |
  | ↳ `startTime` | number | Epoch ms when the execution started |
  | ↳ `lastUpdateTime` | number | Epoch ms when the execution was last updated |
  | ↳ `executionMode` | string | Execution mode (QUEUED, SUPERSEDED, PARALLEL) |
  | ↳ `executionType` | string | Execution type (STANDARD or ROLLBACK) |
  | ↳ `stopTriggerReason` | string | Reason the execution was stopped, if applicable |
  | ↳ `triggerType` | string | What triggered the execution |
  | ↳ `triggerDetail` | string | Detail about the trigger |
  | ↳ `rollbackTargetPipelineExecutionId` | string | Execution ID this run rolled back to, if it was a rollback |
  | ↳ `sourceRevisions` | array | Source revisions (commit IDs, summaries, URLs) for the execution |
  | `nextToken` | string | Pagination token for the next page of results |
</ReferenceDetails>

### CodePipeline List Action Executions [#codepipeline-list-action-executions]

List action-level execution history for a CodePipeline pipeline, including per-action status, timing, and error details

<ReferenceDetails>
  #### Input [#input-5]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `awsRegion` | string | Yes | AWS region (e.g., us-east-1) |
  | `awsAccessKeyId` | string | Yes | AWS access key ID |
  | `awsSecretAccessKey` | string | Yes | AWS secret access key |
  | `pipelineName` | string | Yes | Name of the pipeline |
  | `pipelineExecutionId` | string | No | Only return action executions for this pipeline execution |
  | `maxResults` | number | No | Maximum number of action executions to return (1-100, default 100) |
  | `nextToken` | string | No | Pagination token from a previous call |

  #### Output [#output-5]

  | Parameter | Type | Description |
  | - | - | - |
  | `actionExecutionDetails` | array | Action execution history, most recent first |
  | ↳ `pipelineExecutionId` | string | Pipeline execution ID |
  | ↳ `actionExecutionId` | string | Action execution ID (use as the approval token for PARALLEL execution-mode pipelines) |
  | ↳ `pipelineVersion` | number | Pipeline version number |
  | ↳ `stageName` | string | Stage the action belongs to |
  | ↳ `actionName` | string | Action name |
  | ↳ `startTime` | number | Epoch ms when the action started |
  | ↳ `lastUpdateTime` | number | Epoch ms when the action was last updated |
  | ↳ `updatedBy` | string | Who or what last updated the action |
  | ↳ `status` | string | Action execution status (InProgress, Abandoned, Succeeded, Failed) |
  | ↳ `externalExecutionId` | string | ID of the external system execution (e.g., CodeBuild build ID) |
  | ↳ `externalExecutionSummary` | string | Summary from the external system execution |
  | ↳ `externalExecutionUrl` | string | URL of the external system execution |
  | ↳ `errorCode` | string | Error code if the action failed |
  | ↳ `errorMessage` | string | Error message if the action failed |
  | `nextToken` | string | Pagination token for the next page of results |
</ReferenceDetails>

### CodePipeline Start Execution [#codepipeline-start-execution]

Start a CodePipeline pipeline execution, optionally overriding pipeline variables

<ReferenceDetails>
  #### Input [#input-6]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `awsRegion` | string | Yes | AWS region (e.g., us-east-1) |
  | `awsAccessKeyId` | string | Yes | AWS access key ID |
  | `awsSecretAccessKey` | string | Yes | AWS secret access key |
  | `pipelineName` | string | Yes | Name of the pipeline to start |
  | `clientRequestToken` | string | No | Idempotency token to identify a unique execution request |
  | `variables` | json | No | Pipeline variable overrides as an array of \{ name, value } objects |

  #### Output [#output-6]

  | Parameter | Type | Description |
  | - | - | - |
  | `pipelineExecutionId` | string | ID of the pipeline execution that was started |
</ReferenceDetails>

### CodePipeline Stop Execution [#codepipeline-stop-execution]

Stop a CodePipeline pipeline execution, either finishing in-progress actions or abandoning them

<ReferenceDetails>
  #### Input [#input-7]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `awsRegion` | string | Yes | AWS region (e.g., us-east-1) |
  | `awsAccessKeyId` | string | Yes | AWS access key ID |
  | `awsSecretAccessKey` | string | Yes | AWS secret access key |
  | `pipelineName` | string | Yes | Name of the pipeline |
  | `pipelineExecutionId` | string | Yes | ID of the pipeline execution to stop |
  | `abandon` | boolean | No | Abandon in-progress actions instead of letting them finish (default false) |
  | `reason` | string | No | Reason for stopping the execution (max 200 characters) |

  #### Output [#output-7]

  | Parameter | Type | Description |
  | - | - | - |
  | `pipelineExecutionId` | string | ID of the pipeline execution that was stopped |
</ReferenceDetails>

### CodePipeline Retry Stage Execution [#codepipeline-retry-stage-execution]

Retry the failed actions (or all actions) of a failed CodePipeline stage

<ReferenceDetails>
  #### Input [#input-8]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `awsRegion` | string | Yes | AWS region (e.g., us-east-1) |
  | `awsAccessKeyId` | string | Yes | AWS access key ID |
  | `awsSecretAccessKey` | string | Yes | AWS secret access key |
  | `pipelineName` | string | Yes | Name of the pipeline |
  | `stageName` | string | Yes | Name of the failed stage to retry |
  | `pipelineExecutionId` | string | Yes | ID of the pipeline execution in the failed stage |
  | `retryMode` | string | Yes | Scope of the retry: FAILED\_ACTIONS or ALL\_ACTIONS |

  #### Output [#output-8]

  | Parameter | Type | Description |
  | - | - | - |
  | `pipelineExecutionId` | string | ID of the pipeline execution with the retried stage |
</ReferenceDetails>

### CodePipeline Put Approval Result [#codepipeline-put-approval-result]

Approve or reject a pending CodePipeline manual approval action. The approval token is available from Get Pipeline State on the pending approval action

<ReferenceDetails>
  #### Input [#input-9]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `awsRegion` | string | Yes | AWS region (e.g., us-east-1) |
  | `awsAccessKeyId` | string | Yes | AWS access key ID |
  | `awsSecretAccessKey` | string | Yes | AWS secret access key |
  | `pipelineName` | string | Yes | Name of the pipeline |
  | `stageName` | string | Yes | Name of the stage containing the approval action |
  | `actionName` | string | Yes | Name of the manual approval action |
  | `token` | string | Yes | Approval token from Get Pipeline State for the pending approval |
  | `status` | string | Yes | Approval decision: Approved or Rejected |
  | `summary` | string | Yes | Summary explaining the approval decision (max 512 characters) |

  #### Output [#output-9]

  | Parameter | Type | Description |
  | - | - | - |
  | `approvedAt` | number | Epoch ms when the approval or rejection was submitted |
  | `status` | string | The submitted approval decision (Approved or Rejected) |
</ReferenceDetails>

### CodePipeline Disable Stage Transition [#codepipeline-disable-stage-transition]

Prevent artifacts from transitioning into or out of a CodePipeline stage, freezing the pipeline at that point

<ReferenceDetails>
  #### Input [#input-10]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `awsRegion` | string | Yes | AWS region (e.g., us-east-1) |
  | `awsAccessKeyId` | string | Yes | AWS access key ID |
  | `awsSecretAccessKey` | string | Yes | AWS secret access key |
  | `pipelineName` | string | Yes | Name of the pipeline |
  | `stageName` | string | Yes | Name of the stage to disable the transition for |
  | `transitionType` | string | Yes | Inbound to block artifacts entering the stage, Outbound to block artifacts leaving it |
  | `reason` | string | Yes | Reason the transition is disabled, shown in the pipeline console (max 300 characters) |

  #### Output [#output-10]

  | Parameter | Type | Description |
  | - | - | - |
  | `pipelineName` | string | Pipeline name |
  | `stageName` | string | Stage whose transition was disabled |
  | `transitionType` | string | Transition type that was disabled (Inbound or Outbound) |
</ReferenceDetails>

### CodePipeline Enable Stage Transition [#codepipeline-enable-stage-transition]

Re-enable artifacts transitioning into or out of a CodePipeline stage after it was disabled

<ReferenceDetails>
  #### Input [#input-11]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `awsRegion` | string | Yes | AWS region (e.g., us-east-1) |
  | `awsAccessKeyId` | string | Yes | AWS access key ID |
  | `awsSecretAccessKey` | string | Yes | AWS secret access key |
  | `pipelineName` | string | Yes | Name of the pipeline |
  | `stageName` | string | Yes | Name of the stage to enable the transition for |
  | `transitionType` | string | Yes | Inbound to allow artifacts entering the stage, Outbound to allow artifacts leaving it |

  #### Output [#output-11]

  | Parameter | Type | Description |
  | - | - | - |
  | `pipelineName` | string | Pipeline name |
  | `stageName` | string | Stage whose transition was enabled |
  | `transitionType` | string | Transition type that was enabled (Inbound or Outbound) |
</ReferenceDetails>
