|
| 1 | +--- |
| 2 | +title: CodePipeline |
| 3 | +description: Run, monitor, and approve AWS CodePipeline pipelines |
| 4 | +--- |
| 5 | + |
| 6 | +import { BlockInfoCard } from "@/components/ui/block-info-card" |
| 7 | + |
| 8 | +<BlockInfoCard |
| 9 | + type="codepipeline" |
| 10 | + color="linear-gradient(45deg, #2E27AD 0%, #527FFF 100%)" |
| 11 | +/> |
| 12 | + |
| 13 | +## Usage Instructions |
| 14 | + |
| 15 | +Integrate AWS CodePipeline into workflows. Start, stop, and monitor pipeline executions, retry failed stages, and approve or reject manual approval actions. Requires AWS access key and secret access key. |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +## Tools |
| 20 | + |
| 21 | +### `codepipeline_list_pipelines` |
| 22 | + |
| 23 | +List all CodePipeline pipelines in an AWS account and region |
| 24 | + |
| 25 | +#### Input |
| 26 | + |
| 27 | +| Parameter | Type | Required | Description | |
| 28 | +| --------- | ---- | -------- | ----------- | |
| 29 | +| `awsRegion` | string | Yes | AWS region \(e.g., us-east-1\) | |
| 30 | +| `awsAccessKeyId` | string | Yes | AWS access key ID | |
| 31 | +| `awsSecretAccessKey` | string | Yes | AWS secret access key | |
| 32 | +| `maxResults` | number | No | Maximum number of pipelines to return \(1-1000\) | |
| 33 | +| `nextToken` | string | No | Pagination token from a previous call | |
| 34 | + |
| 35 | +#### Output |
| 36 | + |
| 37 | +| Parameter | Type | Description | |
| 38 | +| --------- | ---- | ----------- | |
| 39 | +| `pipelines` | array | List of pipelines with name, version, type, and timestamps | |
| 40 | +| ↳ `name` | string | Pipeline name | |
| 41 | +| ↳ `version` | number | Pipeline version number | |
| 42 | +| ↳ `pipelineType` | string | Pipeline type \(V1 or V2\) | |
| 43 | +| ↳ `executionMode` | string | Execution mode \(QUEUED, SUPERSEDED, PARALLEL\) | |
| 44 | +| ↳ `created` | number | Epoch ms when the pipeline was created | |
| 45 | +| ↳ `updated` | number | Epoch ms when the pipeline was last updated | |
| 46 | +| `nextToken` | string | Pagination token for the next page of results | |
| 47 | + |
| 48 | +### `codepipeline_get_pipeline_state` |
| 49 | + |
| 50 | +Get the current state of a CodePipeline pipeline, including stage and action status and pending approval tokens |
| 51 | + |
| 52 | +#### Input |
| 53 | + |
| 54 | +| Parameter | Type | Required | Description | |
| 55 | +| --------- | ---- | -------- | ----------- | |
| 56 | +| `awsRegion` | string | Yes | AWS region \(e.g., us-east-1\) | |
| 57 | +| `awsAccessKeyId` | string | Yes | AWS access key ID | |
| 58 | +| `awsSecretAccessKey` | string | Yes | AWS secret access key | |
| 59 | +| `pipelineName` | string | Yes | Name of the pipeline | |
| 60 | + |
| 61 | +#### Output |
| 62 | + |
| 63 | +| Parameter | Type | Description | |
| 64 | +| --------- | ---- | ----------- | |
| 65 | +| `pipelineName` | string | Pipeline name | |
| 66 | +| `pipelineVersion` | number | Pipeline version number | |
| 67 | +| `created` | number | Epoch ms when the pipeline was created | |
| 68 | +| `updated` | number | Epoch ms when the pipeline was last updated | |
| 69 | +| `stageStates` | array | Per-stage state including latest execution status and action details | |
| 70 | +| ↳ `stageName` | string | Stage name | |
| 71 | +| ↳ `status` | string | Latest stage execution status \(InProgress, Succeeded, Failed, Stopped, Cancelled\) | |
| 72 | +| ↳ `pipelineExecutionId` | string | Pipeline execution ID currently in the stage | |
| 73 | +| ↳ `inboundTransitionEnabled` | boolean | Whether the inbound transition into the stage is enabled | |
| 74 | +| ↳ `actionStates` | array | Per-action state with status, summary, error details, and approval token \(for pending manual approvals\) | |
| 75 | + |
| 76 | +### `codepipeline_get_pipeline_execution` |
| 77 | + |
| 78 | +Get details of a CodePipeline execution, including status, trigger, source revisions, and resolved variables |
| 79 | + |
| 80 | +#### Input |
| 81 | + |
| 82 | +| Parameter | Type | Required | Description | |
| 83 | +| --------- | ---- | -------- | ----------- | |
| 84 | +| `awsRegion` | string | Yes | AWS region \(e.g., us-east-1\) | |
| 85 | +| `awsAccessKeyId` | string | Yes | AWS access key ID | |
| 86 | +| `awsSecretAccessKey` | string | Yes | AWS secret access key | |
| 87 | +| `pipelineName` | string | Yes | Name of the pipeline | |
| 88 | +| `pipelineExecutionId` | string | Yes | ID of the pipeline execution | |
| 89 | + |
| 90 | +#### Output |
| 91 | + |
| 92 | +| Parameter | Type | Description | |
| 93 | +| --------- | ---- | ----------- | |
| 94 | +| `pipelineExecutionId` | string | Pipeline execution ID | |
| 95 | +| `pipelineName` | string | Pipeline name | |
| 96 | +| `pipelineVersion` | number | Pipeline version number | |
| 97 | +| `status` | string | Execution status \(Cancelled, InProgress, Stopped, Stopping, Succeeded, Superseded, Failed\) | |
| 98 | +| `statusSummary` | string | Status summary for the execution | |
| 99 | +| `executionMode` | string | Execution mode \(QUEUED, SUPERSEDED, PARALLEL\) | |
| 100 | +| `executionType` | string | Execution type \(STANDARD or ROLLBACK\) | |
| 101 | +| `triggerType` | string | What triggered the execution \(e.g., Webhook, StartPipelineExecution\) | |
| 102 | +| `triggerDetail` | string | Detail about the trigger \(e.g., user ARN\) | |
| 103 | +| `artifactRevisions` | array | Source artifact revisions for the execution | |
| 104 | +| ↳ `name` | string | Artifact name | |
| 105 | +| ↳ `revisionId` | string | Revision ID \(e.g., commit SHA\) | |
| 106 | +| ↳ `revisionSummary` | string | Revision summary \(e.g., commit message\) | |
| 107 | +| ↳ `revisionUrl` | string | URL of the revision | |
| 108 | +| ↳ `created` | number | Epoch ms when the revision was created | |
| 109 | +| `variables` | array | Resolved pipeline variables for the execution | |
| 110 | +| ↳ `name` | string | Variable name | |
| 111 | +| ↳ `resolvedValue` | string | Resolved variable value | |
| 112 | + |
| 113 | +### `codepipeline_list_pipeline_executions` |
| 114 | + |
| 115 | +List recent executions of a CodePipeline pipeline with status and source revisions |
| 116 | + |
| 117 | +#### Input |
| 118 | + |
| 119 | +| Parameter | Type | Required | Description | |
| 120 | +| --------- | ---- | -------- | ----------- | |
| 121 | +| `awsRegion` | string | Yes | AWS region \(e.g., us-east-1\) | |
| 122 | +| `awsAccessKeyId` | string | Yes | AWS access key ID | |
| 123 | +| `awsSecretAccessKey` | string | Yes | AWS secret access key | |
| 124 | +| `pipelineName` | string | Yes | Name of the pipeline | |
| 125 | +| `maxResults` | number | No | Maximum number of executions to return \(1-100, default 100\) | |
| 126 | +| `nextToken` | string | No | Pagination token from a previous call | |
| 127 | +| `succeededInStage` | string | No | Only return executions that succeeded in this stage | |
| 128 | + |
| 129 | +#### Output |
| 130 | + |
| 131 | +| Parameter | Type | Description | |
| 132 | +| --------- | ---- | ----------- | |
| 133 | +| `executions` | array | Pipeline execution summaries, most recent first | |
| 134 | +| ↳ `pipelineExecutionId` | string | Pipeline execution ID | |
| 135 | +| ↳ `status` | string | Execution status \(Cancelled, InProgress, Stopped, Stopping, Succeeded, Superseded, Failed\) | |
| 136 | +| ↳ `statusSummary` | string | Status summary for the execution | |
| 137 | +| ↳ `startTime` | number | Epoch ms when the execution started | |
| 138 | +| ↳ `lastUpdateTime` | number | Epoch ms when the execution was last updated | |
| 139 | +| ↳ `executionMode` | string | Execution mode \(QUEUED, SUPERSEDED, PARALLEL\) | |
| 140 | +| ↳ `executionType` | string | Execution type \(STANDARD or ROLLBACK\) | |
| 141 | +| ↳ `stopTriggerReason` | string | Reason the execution was stopped, if applicable | |
| 142 | +| ↳ `triggerType` | string | What triggered the execution | |
| 143 | +| ↳ `triggerDetail` | string | Detail about the trigger | |
| 144 | +| ↳ `sourceRevisions` | array | Source revisions \(commit IDs, summaries, URLs\) for the execution | |
| 145 | +| `nextToken` | string | Pagination token for the next page of results | |
| 146 | + |
| 147 | +### `codepipeline_start_execution` |
| 148 | + |
| 149 | +Start a CodePipeline pipeline execution, optionally overriding pipeline variables |
| 150 | + |
| 151 | +#### Input |
| 152 | + |
| 153 | +| Parameter | Type | Required | Description | |
| 154 | +| --------- | ---- | -------- | ----------- | |
| 155 | +| `awsRegion` | string | Yes | AWS region \(e.g., us-east-1\) | |
| 156 | +| `awsAccessKeyId` | string | Yes | AWS access key ID | |
| 157 | +| `awsSecretAccessKey` | string | Yes | AWS secret access key | |
| 158 | +| `pipelineName` | string | Yes | Name of the pipeline to start | |
| 159 | +| `clientRequestToken` | string | No | Idempotency token to identify a unique execution request | |
| 160 | +| `variables` | json | No | Pipeline variable overrides as an array of \{ name, value \} objects | |
| 161 | + |
| 162 | +#### Output |
| 163 | + |
| 164 | +| Parameter | Type | Description | |
| 165 | +| --------- | ---- | ----------- | |
| 166 | +| `pipelineExecutionId` | string | ID of the pipeline execution that was started | |
| 167 | + |
| 168 | +### `codepipeline_stop_execution` |
| 169 | + |
| 170 | +Stop a CodePipeline pipeline execution, either finishing in-progress actions or abandoning them |
| 171 | + |
| 172 | +#### Input |
| 173 | + |
| 174 | +| Parameter | Type | Required | Description | |
| 175 | +| --------- | ---- | -------- | ----------- | |
| 176 | +| `awsRegion` | string | Yes | AWS region \(e.g., us-east-1\) | |
| 177 | +| `awsAccessKeyId` | string | Yes | AWS access key ID | |
| 178 | +| `awsSecretAccessKey` | string | Yes | AWS secret access key | |
| 179 | +| `pipelineName` | string | Yes | Name of the pipeline | |
| 180 | +| `pipelineExecutionId` | string | Yes | ID of the pipeline execution to stop | |
| 181 | +| `abandon` | boolean | No | Abandon in-progress actions instead of letting them finish \(default false\) | |
| 182 | +| `reason` | string | No | Reason for stopping the execution \(max 200 characters\) | |
| 183 | + |
| 184 | +#### Output |
| 185 | + |
| 186 | +| Parameter | Type | Description | |
| 187 | +| --------- | ---- | ----------- | |
| 188 | +| `pipelineExecutionId` | string | ID of the pipeline execution that was stopped | |
| 189 | + |
| 190 | +### `codepipeline_retry_stage_execution` |
| 191 | + |
| 192 | +Retry the failed actions (or all actions) of a failed CodePipeline stage |
| 193 | + |
| 194 | +#### Input |
| 195 | + |
| 196 | +| Parameter | Type | Required | Description | |
| 197 | +| --------- | ---- | -------- | ----------- | |
| 198 | +| `awsRegion` | string | Yes | AWS region \(e.g., us-east-1\) | |
| 199 | +| `awsAccessKeyId` | string | Yes | AWS access key ID | |
| 200 | +| `awsSecretAccessKey` | string | Yes | AWS secret access key | |
| 201 | +| `pipelineName` | string | Yes | Name of the pipeline | |
| 202 | +| `stageName` | string | Yes | Name of the failed stage to retry | |
| 203 | +| `pipelineExecutionId` | string | Yes | ID of the pipeline execution in the failed stage | |
| 204 | +| `retryMode` | string | Yes | Scope of the retry: FAILED_ACTIONS or ALL_ACTIONS | |
| 205 | + |
| 206 | +#### Output |
| 207 | + |
| 208 | +| Parameter | Type | Description | |
| 209 | +| --------- | ---- | ----------- | |
| 210 | +| `pipelineExecutionId` | string | ID of the pipeline execution with the retried stage | |
| 211 | + |
| 212 | +### `codepipeline_put_approval_result` |
| 213 | + |
| 214 | +Approve or reject a pending CodePipeline manual approval action. The approval token is available from Get Pipeline State on the pending approval action |
| 215 | + |
| 216 | +#### Input |
| 217 | + |
| 218 | +| Parameter | Type | Required | Description | |
| 219 | +| --------- | ---- | -------- | ----------- | |
| 220 | +| `awsRegion` | string | Yes | AWS region \(e.g., us-east-1\) | |
| 221 | +| `awsAccessKeyId` | string | Yes | AWS access key ID | |
| 222 | +| `awsSecretAccessKey` | string | Yes | AWS secret access key | |
| 223 | +| `pipelineName` | string | Yes | Name of the pipeline | |
| 224 | +| `stageName` | string | Yes | Name of the stage containing the approval action | |
| 225 | +| `actionName` | string | Yes | Name of the manual approval action | |
| 226 | +| `token` | string | Yes | Approval token from Get Pipeline State for the pending approval | |
| 227 | +| `status` | string | Yes | Approval decision: Approved or Rejected | |
| 228 | +| `summary` | string | Yes | Summary explaining the approval decision \(max 512 characters\) | |
| 229 | + |
| 230 | +#### Output |
| 231 | + |
| 232 | +| Parameter | Type | Description | |
| 233 | +| --------- | ---- | ----------- | |
| 234 | +| `approvedAt` | number | Epoch ms when the approval or rejection was submitted | |
| 235 | +| `status` | string | The submitted approval decision \(Approved or Rejected\) | |
| 236 | + |
| 237 | + |
0 commit comments