Skip to main content

pipelines

Creates, updates, deletes or gets a pipeline resource or lists pipelines in a region

Overview

Namepipelines
TypeResource
DescriptionThe AWS::CodePipeline::Pipeline resource creates a CodePipeline pipeline that describes how software changes go through a release process.
Idawscc.codepipeline.pipelines

Fields

NameDatatypeDescription
artifact_storesarrayA mapping of artifactStore objects and their corresponding AWS Regions. There must be an artifact store for the pipeline Region and for each cross-region action in the pipeline.
disable_inbound_stage_transitionsarrayRepresents the input of a DisableStageTransition action.
stagesarrayRepresents information about a stage and its definition.
execution_modestringThe method that the pipeline will use to handle multiple executions. The default mode is SUPERSEDED.
restart_execution_on_updatebooleanIndicates whether to rerun the CodePipeline pipeline after you update it.
triggersarrayThe trigger configuration specifying a type of event, such as Git tags, that starts the pipeline.
role_arnstringThe Amazon Resource Name (ARN) for CodePipeline to use to either perform actions with no actionRoleArn, or to use to assume roles for actions with an actionRoleArn
namestringThe name of the pipeline.
variablesarrayA list that defines the pipeline variables for a pipeline resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9@\-_]+.
versionstringThe version of the pipeline.
artifact_storeobjectThe S3 bucket where artifacts for the pipeline are stored.
pipeline_typestringCodePipeline provides the following pipeline types, which differ in characteristics and price, so that you can tailor your pipeline features and cost to the needs of your applications.
tagsarraySpecifies the tags applied to the pipeline.
regionstringAWS region.

For more information, see AWS::CodePipeline::Pipeline.

Methods

NameResourceAccessible byRequired Params
create_resourcepipelinesINSERTStages, RoleArn, region
delete_resourcepipelinesDELETEIdentifier, region
update_resourcepipelinesUPDATEIdentifier, PatchDocument, region
list_resourcespipelines_list_onlySELECTregion
get_resourcepipelinesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual pipeline.

SELECT
region,
artifact_stores,
disable_inbound_stage_transitions,
stages,
execution_mode,
restart_execution_on_update,
triggers,
role_arn,
name,
variables,
version,
artifact_store,
pipeline_type,
tags
FROM awscc.codepipeline.pipelines
WHERE
region = '{{ region }}' AND
Identifier = '{{ name }}';

INSERT example

Use the following StackQL query and manifest file to create a new pipeline resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.codepipeline.pipelines (
Stages,
RoleArn,
region
)
SELECT
'{{ stages }}',
'{{ role_arn }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a pipeline resource, using stack-deploy.

/*+ update */
UPDATE awscc.codepipeline.pipelines
SET PatchDocument = string('{{ {
"ArtifactStores": artifact_stores,
"DisableInboundStageTransitions": disable_inbound_stage_transitions,
"Stages": stages,
"ExecutionMode": execution_mode,
"RestartExecutionOnUpdate": restart_execution_on_update,
"Triggers": triggers,
"RoleArn": role_arn,
"Variables": variables,
"ArtifactStore": artifact_store,
"PipelineType": pipeline_type,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.codepipeline.pipelines
WHERE
Identifier = '{{ name }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the pipelines resource, the following permissions are required:

iam:GetRole,
iam:PassRole,
codepipeline:GetPipeline,
codepipeline:CreatePipeline,
codepipeline:DisableStageTransition,
codepipeline:GetPipelineState,
codepipeline:TagResource,
codestar-connections:PassConnection