CodePipeline

Run, monitor, and approve AWS CodePipeline pipelines

Usage Instructions

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.

Tools

codepipeline_list_pipelines

List all CodePipeline pipelines in an AWS account and region

Input

ParameterTypeRequiredDescription
awsRegionstringYesAWS region (e.g., us-east-1)
awsAccessKeyIdstringYesAWS access key ID
awsSecretAccessKeystringYesAWS secret access key
maxResultsnumberNoMaximum number of pipelines to return (1-1000)
nextTokenstringNoPagination token from a previous call

Output

ParameterTypeDescription
pipelinesarrayList of pipelines with name, version, type, and timestamps
namestringPipeline name
versionnumberPipeline version number
pipelineTypestringPipeline type (V1 or V2)
executionModestringExecution mode (QUEUED, SUPERSEDED, PARALLEL)
creatednumberEpoch ms when the pipeline was created
updatednumberEpoch ms when the pipeline was last updated
nextTokenstringPagination token for the next page of results

codepipeline_get_pipeline_state

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

Input

ParameterTypeRequiredDescription
awsRegionstringYesAWS region (e.g., us-east-1)
awsAccessKeyIdstringYesAWS access key ID
awsSecretAccessKeystringYesAWS secret access key
pipelineNamestringYesName of the pipeline

Output

ParameterTypeDescription
pipelineNamestringPipeline name
pipelineVersionnumberPipeline version number
creatednumberEpoch ms when the pipeline was created
updatednumberEpoch ms when the pipeline was last updated
stageStatesarrayPer-stage state including latest execution status and action details
stageNamestringStage name
statusstringLatest stage execution status (InProgress, Succeeded, Failed, Stopped, Cancelled)
pipelineExecutionIdstringPipeline execution ID currently in the stage
inboundTransitionEnabledbooleanWhether the inbound transition into the stage is enabled
actionStatesarrayPer-action state with status, summary, error details, and approval token (for pending manual approvals)

codepipeline_get_pipeline_execution

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

Input

ParameterTypeRequiredDescription
awsRegionstringYesAWS region (e.g., us-east-1)
awsAccessKeyIdstringYesAWS access key ID
awsSecretAccessKeystringYesAWS secret access key
pipelineNamestringYesName of the pipeline
pipelineExecutionIdstringYesID of the pipeline execution

Output

ParameterTypeDescription
pipelineExecutionIdstringPipeline execution ID
pipelineNamestringPipeline name
pipelineVersionnumberPipeline version number
statusstringExecution status (Cancelled, InProgress, Stopped, Stopping, Succeeded, Superseded, Failed)
statusSummarystringStatus summary for the execution
executionModestringExecution mode (QUEUED, SUPERSEDED, PARALLEL)
executionTypestringExecution type (STANDARD or ROLLBACK)
triggerTypestringWhat triggered the execution (e.g., Webhook, StartPipelineExecution)
triggerDetailstringDetail about the trigger (e.g., user ARN)
artifactRevisionsarraySource artifact revisions for the execution
namestringArtifact name
revisionIdstringRevision ID (e.g., commit SHA)
revisionSummarystringRevision summary (e.g., commit message)
revisionUrlstringURL of the revision
creatednumberEpoch ms when the revision was created
variablesarrayResolved pipeline variables for the execution
namestringVariable name
resolvedValuestringResolved variable value

codepipeline_list_pipeline_executions

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

Input

ParameterTypeRequiredDescription
awsRegionstringYesAWS region (e.g., us-east-1)
awsAccessKeyIdstringYesAWS access key ID
awsSecretAccessKeystringYesAWS secret access key
pipelineNamestringYesName of the pipeline
maxResultsnumberNoMaximum number of executions to return (1-100, default 100)
nextTokenstringNoPagination token from a previous call
succeededInStagestringNoOnly return executions that succeeded in this stage

Output

ParameterTypeDescription
executionsarrayPipeline execution summaries, most recent first
pipelineExecutionIdstringPipeline execution ID
statusstringExecution status (Cancelled, InProgress, Stopped, Stopping, Succeeded, Superseded, Failed)
statusSummarystringStatus summary for the execution
startTimenumberEpoch ms when the execution started
lastUpdateTimenumberEpoch ms when the execution was last updated
executionModestringExecution mode (QUEUED, SUPERSEDED, PARALLEL)
executionTypestringExecution type (STANDARD or ROLLBACK)
stopTriggerReasonstringReason the execution was stopped, if applicable
triggerTypestringWhat triggered the execution
triggerDetailstringDetail about the trigger
sourceRevisionsarraySource revisions (commit IDs, summaries, URLs) for the execution
nextTokenstringPagination token for the next page of results

codepipeline_start_execution

Start a CodePipeline pipeline execution, optionally overriding pipeline variables

Input

ParameterTypeRequiredDescription
awsRegionstringYesAWS region (e.g., us-east-1)
awsAccessKeyIdstringYesAWS access key ID
awsSecretAccessKeystringYesAWS secret access key
pipelineNamestringYesName of the pipeline to start
clientRequestTokenstringNoIdempotency token to identify a unique execution request
variablesjsonNoPipeline variable overrides as an array of { name, value } objects

Output

ParameterTypeDescription
pipelineExecutionIdstringID of the pipeline execution that was started

codepipeline_stop_execution

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

Input

ParameterTypeRequiredDescription
awsRegionstringYesAWS region (e.g., us-east-1)
awsAccessKeyIdstringYesAWS access key ID
awsSecretAccessKeystringYesAWS secret access key
pipelineNamestringYesName of the pipeline
pipelineExecutionIdstringYesID of the pipeline execution to stop
abandonbooleanNoAbandon in-progress actions instead of letting them finish (default false)
reasonstringNoReason for stopping the execution (max 200 characters)

Output

ParameterTypeDescription
pipelineExecutionIdstringID of the pipeline execution that was stopped

codepipeline_retry_stage_execution

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

Input

ParameterTypeRequiredDescription
awsRegionstringYesAWS region (e.g., us-east-1)
awsAccessKeyIdstringYesAWS access key ID
awsSecretAccessKeystringYesAWS secret access key
pipelineNamestringYesName of the pipeline
stageNamestringYesName of the failed stage to retry
pipelineExecutionIdstringYesID of the pipeline execution in the failed stage
retryModestringYesScope of the retry: FAILED_ACTIONS or ALL_ACTIONS

Output

ParameterTypeDescription
pipelineExecutionIdstringID of the pipeline execution with the retried stage

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

Input

ParameterTypeRequiredDescription
awsRegionstringYesAWS region (e.g., us-east-1)
awsAccessKeyIdstringYesAWS access key ID
awsSecretAccessKeystringYesAWS secret access key
pipelineNamestringYesName of the pipeline
stageNamestringYesName of the stage containing the approval action
actionNamestringYesName of the manual approval action
tokenstringYesApproval token from Get Pipeline State for the pending approval
statusstringYesApproval decision: Approved or Rejected
summarystringYesSummary explaining the approval decision (max 512 characters)

Output

ParameterTypeDescription
approvedAtnumberEpoch ms when the approval or rejection was submitted
statusstringThe submitted approval decision (Approved or Rejected)

On this page