pipelines
Creates, updates, deletes or gets a pipeline
resource or lists pipelines
in a region
Overview
Name | pipelines |
Type | Resource |
Description | The AWS::CodePipeline::Pipeline resource creates a CodePipeline pipeline that describes how software changes go through a release process. |
Id | aws.codepipeline.pipelines |
Fields
Name | Datatype | Description |
---|---|---|
artifact_stores | array | A 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_transitions | array | Represents the input of a DisableStageTransition action. |
stages | array | Represents information about a stage and its definition. |
execution_mode | string | The method that the pipeline will use to handle multiple executions. The default mode is SUPERSEDED. |
restart_execution_on_update | boolean | Indicates whether to rerun the CodePipeline pipeline after you update it. |
triggers | array | The trigger configuration specifying a type of event, such as Git tags, that starts the pipeline. |
role_arn | string | The 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 |
name | string | The name of the pipeline. |
variables | array | A 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@\-_]+. |
version | string | The version of the pipeline. |
artifact_store | object | The S3 bucket where artifacts for the pipeline are stored. |
pipeline_type | string | CodePipeline 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. |
tags | array | Specifies the tags applied to the pipeline. |
region | string | AWS region. |
For more information, see AWS::CodePipeline::Pipeline
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Stages, RoleArn, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all pipelines
in a region.
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 aws.codepipeline.pipelines
WHERE region = 'us-east-1';
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 aws.codepipeline.pipelines
WHERE region = 'us-east-1' AND data__Identifier = '<Name>';
INSERT
example
Use the following StackQL query and manifest file to create a new pipeline
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.codepipeline.pipelines (
Stages,
RoleArn,
region
)
SELECT
'{{ Stages }}',
'{{ RoleArn }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.codepipeline.pipelines (
ArtifactStores,
DisableInboundStageTransitions,
Stages,
ExecutionMode,
RestartExecutionOnUpdate,
Triggers,
RoleArn,
Name,
Variables,
ArtifactStore,
PipelineType,
Tags,
region
)
SELECT
'{{ ArtifactStores }}',
'{{ DisableInboundStageTransitions }}',
'{{ Stages }}',
'{{ ExecutionMode }}',
'{{ RestartExecutionOnUpdate }}',
'{{ Triggers }}',
'{{ RoleArn }}',
'{{ Name }}',
'{{ Variables }}',
'{{ ArtifactStore }}',
'{{ PipelineType }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: pipeline
props:
- name: ArtifactStores
value:
- ArtifactStore:
Type: '{{ Type }}'
EncryptionKey:
Type: '{{ Type }}'
Id: '{{ Id }}'
Location: '{{ Location }}'
Region: '{{ Region }}'
- name: DisableInboundStageTransitions
value:
- StageName: '{{ StageName }}'
Reason: '{{ Reason }}'
- name: Stages
value:
- Blockers:
- Name: '{{ Name }}'
Type: '{{ Type }}'
Actions:
- ActionTypeId:
Owner: '{{ Owner }}'
Category: '{{ Category }}'
Version: '{{ Version }}'
Provider: '{{ Provider }}'
Configuration: {}
InputArtifacts:
- Name: '{{ Name }}'
OutputArtifacts:
- Name: '{{ Name }}'
Files:
- '{{ Files[0] }}'
Commands:
- '{{ Commands[0] }}'
OutputVariables:
- '{{ OutputVariables[0] }}'
Region: '{{ Region }}'
Namespace: '{{ Namespace }}'
RoleArn: '{{ RoleArn }}'
RunOrder: '{{ RunOrder }}'
Name: '{{ Name }}'
TimeoutInMinutes: '{{ TimeoutInMinutes }}'
Name: '{{ Name }}'
OnFailure:
Result: '{{ Result }}'
RetryConfiguration:
RetryMode: '{{ RetryMode }}'
Conditions:
- Result: '{{ Result }}'
Rules:
- RuleTypeId:
Owner: '{{ Owner }}'
Category: '{{ Category }}'
Version: '{{ Version }}'
Provider: '{{ Provider }}'
Configuration: {}
InputArtifacts:
- null
Region: '{{ Region }}'
RoleArn: '{{ RoleArn }}'
Name: '{{ Name }}'
OnSuccess:
Conditions:
- null
BeforeEntry:
Conditions:
- null
- name: ExecutionMode
value: '{{ ExecutionMode }}'
- name: RestartExecutionOnUpdate
value: '{{ RestartExecutionOnUpdate }}'
- name: Triggers
value:
- GitConfiguration:
Push:
- FilePaths:
Includes:
- '{{ Includes[0] }}'
Excludes:
- '{{ Excludes[0] }}'
Branches:
Includes:
- '{{ Includes[0] }}'
Excludes:
- '{{ Excludes[0] }}'
Tags:
Includes:
- '{{ Includes[0] }}'
Excludes:
- '{{ Excludes[0] }}'
SourceActionName: '{{ SourceActionName }}'
PullRequest:
- FilePaths: null
Events:
- '{{ Events[0] }}'
Branches: null
ProviderType: '{{ ProviderType }}'
- name: RoleArn
value: '{{ RoleArn }}'
- name: Name
value: '{{ Name }}'
- name: Variables
value:
- DefaultValue: '{{ DefaultValue }}'
Description: '{{ Description }}'
Name: '{{ Name }}'
- name: ArtifactStore
value: null
- name: PipelineType
value: '{{ PipelineType }}'
- name: Tags
value:
- Value: '{{ Value }}'
Key: '{{ Key }}'
DELETE
example
/*+ delete */
DELETE FROM aws.codepipeline.pipelines
WHERE data__Identifier = '<Name>'
AND region = 'us-east-1';
Permissions
To operate on the pipelines
resource, the following permissions are required:
Create
iam:GetRole,
iam:PassRole,
codepipeline:GetPipeline,
codepipeline:CreatePipeline,
codepipeline:DisableStageTransition,
codepipeline:GetPipelineState,
codepipeline:TagResource,
codestar-connections:PassConnection
Read
codepipeline:GetPipeline,
codepipeline:ListTagsForResource,
codepipeline:GetPipelineState
Update
iam:GetRole,
iam:PassRole,
codepipeline:EnableStageTransition,
codepipeline:StartPipelineExecution,
codepipeline:GetPipeline,
codepipeline:UpdatePipeline,
codepipeline:GetPipelineState,
codepipeline:DisableStageTransition,
codepipeline:TagResource,
codepipeline:UntagResource,
codestar-connections:PassConnection
Delete
codepipeline:GetPipeline,
codepipeline:DeletePipeline
List
codepipeline:ListPipelines