Skip to main content

pipelines

Creates, updates, deletes, gets or lists a pipelines resource.

Overview

Namepipelines
TypeResource
Idaws.codepipeline.pipelines

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
metadataobjectRepresents the pipeline metadata information returned as part of the output of a GetPipeline action.
pipelineobjectRepresents the structure of actions and stages to be performed in the pipeline.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_pipelineselectregionReturns the metadata, structure, stages, and actions of a pipeline. Can be used to return the entire structure of a pipeline in JSON format, which can then be modified and used to update the pipeline structure with UpdatePipeline.
list_pipelinesselectregionGets a summary of all of the pipelines associated with your account.
create_pipelineinsertregion, pipelineCreates a pipeline. In the pipeline structure, you must include either artifactStore or artifactStores in your pipeline, but you cannot use both. If you create a cross-region action in your pipeline, you must use artifactStores.
update_pipelineupdateregion, pipelineUpdates a specified pipeline with edits or changes to its structure. Use a JSON file with the pipeline structure and UpdatePipeline to provide the full structure of the pipeline. Updating the pipeline increases the version number of the pipeline by 1.
put_approval_resultreplaceregion, pipelineName, stageName, actionName, result, tokenProvides the response to a manual approval request to CodePipeline. Valid responses include Approved and Rejected.
put_action_revisionreplaceregion, pipelineName, stageName, actionName, actionRevisionProvides information to CodePipeline about new revisions to a source.
delete_pipelinedeleteregionDeletes the specified pipeline.
disable_stage_transitionexecregion, pipelineName, stageName, transitionType, reasonPrevents artifacts in a pipeline from transitioning to the next stage in the pipeline.
enable_stage_transitionexecregion, pipelineName, stageName, transitionTypeEnables artifacts in a pipeline to transition to a stage in a pipeline.
rollback_stageexecregion, pipelineName, stageName, targetPipelineExecutionIdRolls back a stage execution.
start_pipeline_executionexecregion, nameStarts the specified pipeline. Specifically, it begins processing the latest commit to the source location specified as part of the pipeline.
stop_pipeline_executionexecregion, pipelineName, pipelineExecutionIdStops 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns the metadata, structure, stages, and actions of a pipeline. Can be used to return the entire structure of a pipeline in JSON format, which can then be modified and used to update the pipeline structure with UpdatePipeline.

SELECT
metadata,
pipeline
FROM aws.codepipeline.pipelines
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a pipeline. In the pipeline structure, you must include either artifactStore or artifactStores in your pipeline, but you cannot use both. If you create a cross-region action in your pipeline, you must use artifactStores.

INSERT INTO aws.codepipeline.pipelines (
pipeline,
tags,
region
)
SELECT
'{{ pipeline }}' /* required */,
'{{ tags }}',
'{{ region }}'
RETURNING
pipeline,
tags
;

UPDATE examples

Updates a specified pipeline with edits or changes to its structure. Use a JSON file with the pipeline structure and UpdatePipeline to provide the full structure of the pipeline. Updating the pipeline increases the version number of the pipeline by 1.

UPDATE aws.codepipeline.pipelines
SET
pipeline = '{{ pipeline }}'
WHERE
region = '{{ region }}' --required
AND pipeline = '{{ pipeline }}' --required
RETURNING
pipeline;

REPLACE examples

Provides the response to a manual approval request to CodePipeline. Valid responses include Approved and Rejected.

REPLACE aws.codepipeline.pipelines
SET
pipelineName = '{{ pipelineName }}',
stageName = '{{ stageName }}',
actionName = '{{ actionName }}',
result = '{{ result }}',
token = '{{ token }}'
WHERE
region = '{{ region }}' --required
AND pipelineName = '{{ pipelineName }}' --required
AND stageName = '{{ stageName }}' --required
AND actionName = '{{ actionName }}' --required
AND result = '{{ result }}' --required
AND token = '{{ token }}' --required
RETURNING
approved_at;

DELETE examples

Deletes the specified pipeline.

DELETE FROM aws.codepipeline.pipelines
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Prevents artifacts in a pipeline from transitioning to the next stage in the pipeline.

EXEC aws.codepipeline.pipelines.disable_stage_transition
@region='{{ region }}' --required
@@json=
'{
"pipelineName": "{{ pipelineName }}",
"stageName": "{{ stageName }}",
"transitionType": "{{ transitionType }}",
"reason": "{{ reason }}"
}'
;