Class PipelineProps
Inheritance
Implements
Namespace: Amazon.CDK.AWS.CodePipeline
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class PipelineProps : Object, IPipelineProps
Syntax (vb)
Public Class PipelineProps
Inherits Object
Implements IPipelineProps
Remarks
ExampleMetadata: infused
Examples
PipelineProject project;
var repository = new Repository(this, "MyRepository", new RepositoryProps {
RepositoryName = "MyRepository"
});
var project = new PipelineProject(this, "MyProject");
var sourceOutput = new Artifact();
var sourceAction = new CodeCommitSourceAction(new CodeCommitSourceActionProps {
ActionName = "CodeCommit",
Repository = repository,
Output = sourceOutput
});
var buildAction = new CodeBuildAction(new CodeBuildActionProps {
ActionName = "CodeBuild",
Project = project,
Input = sourceOutput,
Outputs = new [] { new Artifact() }, // optional
ExecuteBatchBuild = true, // optional, defaults to false
CombineBatchBuildArtifacts = true
});
new Pipeline(this, "MyPipeline", new PipelineProps {
Stages = new [] { new StageProps {
StageName = "Source",
Actions = new [] { sourceAction }
}, new StageProps {
StageName = "Build",
Actions = new [] { buildAction }
} }
});
Synopsis
Constructors
PipelineProps() |
Properties
ArtifactBucket | The S3 bucket used by this Pipeline to store artifacts. |
CrossAccountKeys | Create KMS keys for cross-account deployments. |
CrossRegionReplicationBuckets | A map of region to S3 bucket name used for cross-region CodePipeline. |
EnableKeyRotation | Enable KMS key rotation for the generated KMS keys. |
ExecutionMode | The method that the pipeline will use to handle multiple executions. |
PipelineName | Name of the pipeline. |
PipelineType | Type of the pipeline. |
RestartExecutionOnUpdate | Indicates whether to rerun the AWS CodePipeline pipeline after you update it. |
ReuseCrossRegionSupportStacks | Reuse the same cross region support stack for all pipelines in the App. |
Role | The IAM role to be assumed by this Pipeline. |
Stages | The list of Stages, in order, to create this Pipeline with. |
Triggers | The trigger configuration specifying a type of event, such as Git tags, that starts the pipeline. |
Variables | A list that defines the pipeline variables for a pipeline resource. |
Constructors
PipelineProps()
public PipelineProps()
Properties
ArtifactBucket
The S3 bucket used by this Pipeline to store artifacts.
public IBucket ArtifactBucket { get; set; }
Property Value
Remarks
Default: - A new S3 bucket will be created.
CrossAccountKeys
Create KMS keys for cross-account deployments.
public Nullable<bool> CrossAccountKeys { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
This controls whether the pipeline is enabled for cross-account deployments.
By default cross-account deployments are enabled, but this feature requires that KMS Customer Master Keys are created which have a cost of $1/month.
If you do not need cross-account deployments, you can set this to false
to
not create those keys and save on that cost (the artifact bucket will be
encrypted with an AWS-managed key). However, cross-account deployments will
no longer be possible.
Default: false - false if the feature flag CODEPIPELINE_CROSS_ACCOUNT_KEYS_DEFAULT_VALUE_TO_FALSE
is true, true otherwise
CrossRegionReplicationBuckets
A map of region to S3 bucket name used for cross-region CodePipeline.
public IDictionary<string, IBucket> CrossRegionReplicationBuckets { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, IBucket>
Remarks
For every Action that you specify targeting a different region than the Pipeline itself, if you don't provide an explicit Bucket for that region using this property, the construct will automatically create a Stack containing an S3 Bucket in that region.
Default: - None.
EnableKeyRotation
Enable KMS key rotation for the generated KMS keys.
public Nullable<bool> EnableKeyRotation { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
By default KMS key rotation is disabled, but will add an additional $1/month for each year the key exists when enabled.
Default: - false (key rotation is disabled)
ExecutionMode
The method that the pipeline will use to handle multiple executions.
public Nullable<ExecutionMode> ExecutionMode { get; set; }
Property Value
System.Nullable<ExecutionMode>
Remarks
Default: - ExecutionMode.SUPERSEDED
PipelineName
Name of the pipeline.
public string PipelineName { get; set; }
Property Value
System.String
Remarks
Default: - AWS CloudFormation generates an ID and uses that for the pipeline name.
PipelineType
Type of the pipeline.
public Nullable<PipelineType> PipelineType { get; set; }
Property Value
System.Nullable<PipelineType>
Remarks
Default: - PipelineType.V2 if the feature flag CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2
is true, PipelineType.V1 otherwise
See: https://docs.aws.amazon.com/codepipeline/latest/userguide/pipeline-types-planning.html
RestartExecutionOnUpdate
Indicates whether to rerun the AWS CodePipeline pipeline after you update it.
public Nullable<bool> RestartExecutionOnUpdate { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
ReuseCrossRegionSupportStacks
Reuse the same cross region support stack for all pipelines in the App.
public Nullable<bool> ReuseCrossRegionSupportStacks { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - true (Use the same support stack for all pipelines in App)
Role
The IAM role to be assumed by this Pipeline.
public IRole Role { get; set; }
Property Value
Remarks
Default: a new IAM role will be created.
Stages
The list of Stages, in order, to create this Pipeline with.
public IStageProps[] Stages { get; set; }
Property Value
Remarks
You can always add more Stages later by calling Pipeline#addStage
.
Default: - None.
Triggers
The trigger configuration specifying a type of event, such as Git tags, that starts the pipeline.
public ITriggerProps[] Triggers { get; set; }
Property Value
Remarks
When a trigger configuration is specified, default change detection for repository and branch commits is disabled.
triggers
can only be used when pipelineType
is set to PipelineType.V2
.
You can always add more triggers later by calling Pipeline#addTrigger
.
Default: - No triggers
Variables
A list that defines the pipeline variables for a pipeline resource.
public Variable[] Variables { get; set; }
Property Value
Variable[]
Remarks
variables
can only be used when pipelineType
is set to PipelineType.V2
.
You can always add more variables later by calling Pipeline#addVariable
.
Default: - No variables