Class Pipeline
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.codepipeline.Pipeline
- All Implemented Interfaces:
IResource,IPipeline,INotificationRuleSource,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-29T11:15:35.056Z")
@Stability(Stable)
public class Pipeline
extends Resource
implements IPipeline
An AWS CodePipeline pipeline with its associated IAM role and S3 bucket.
Example:
// create a pipeline
import software.amazon.awscdk.services.codecommit.*;
// add a source action to the stage
Repository repo;
Artifact sourceArtifact;
Pipeline pipeline = new Pipeline(this, "Pipeline");
// add a stage
IStage sourceStage = pipeline.addStage(StageOptions.builder().stageName("Source").build());
sourceStage.addAction(CodeCommitSourceAction.Builder.create()
.actionName("Source")
.output(sourceArtifact)
.repository(repo)
.build());
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.codepipeline.IPipeline
IPipeline.Jsii$Default, IPipeline.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPipeline(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedPipeline(software.amazon.jsii.JsiiObjectRef objRef) Pipeline(software.constructs.Construct scope, String id, PipelineProps props) -
Method Summary
Modifier and TypeMethodDescriptionaddStage(StageOptions props) Creates a new Stage, and adds it to this Pipeline.voidaddToRolePolicy(PolicyStatement statement) Adds a statement to the pipeline role.addTrigger(TriggerProps props) Adds a new Trigger to this Pipeline.addVariable(Variable variable) Adds a new Variable to this Pipeline.bindAsNotificationRuleSource(software.constructs.Construct _scope) Returns a source configuration for notification rule.static IPipelinefromPipelineArn(software.constructs.Construct scope, String id, String pipelineArn) Import a pipeline into this app.Bucket used to store output artifacts.Returns all of theCrossRegionSupportStacks that were generated automatically when dealing with Actions that reside in a different region than the Pipeline itself.ARN of this pipeline.The name of the pipeline.The version of the pipeline.getRole()The IAM role AWS CodePipeline will use to perform actions or assume roles for actions with a more specific IAM role.Get the number of Stages in this Pipeline.Returns the stages that comprise the pipeline.notifyOn(String id, INotificationRuleTarget target, PipelineNotifyOnOptions options) Defines a CodeStar notification rule triggered when the pipeline events emitted by you specified, it very similar toonEventAPI.Define an notification rule triggered by the set of the "Action execution" events emitted from this pipeline.notifyOnAnyActionStateChange(String id, INotificationRuleTarget target, NotificationRuleOptions options) Define an notification rule triggered by the set of the "Action execution" events emitted from this pipeline.Define an notification rule triggered by the set of the "Manual approval" events emitted from this pipeline.notifyOnAnyManualApprovalStateChange(String id, INotificationRuleTarget target, NotificationRuleOptions options) Define an notification rule triggered by the set of the "Manual approval" events emitted from this pipeline.notifyOnAnyStageStateChange(String id, INotificationRuleTarget target) Define an notification rule triggered by the set of the "Stage execution" events emitted from this pipeline.notifyOnAnyStageStateChange(String id, INotificationRuleTarget target, NotificationRuleOptions options) Define an notification rule triggered by the set of the "Stage execution" events emitted from this pipeline.Define an notification rule triggered by the set of the "Pipeline execution" events emitted from this pipeline.notifyOnExecutionStateChange(String id, INotificationRuleTarget target, NotificationRuleOptions options) Define an notification rule triggered by the set of the "Pipeline execution" events emitted from this pipeline.Defines an event rule triggered by this CodePipeline.onEvent(String id, OnEventOptions options) Defines an event rule triggered by this CodePipeline.onStateChange(String id) Defines an event rule triggered by the "CodePipeline Pipeline Execution State Change" event emitted from this pipeline.onStateChange(String id, OnEventOptions options) Defines an event rule triggered by the "CodePipeline Pipeline Execution State Change" event emitted from this pipeline.Access one of the pipeline's stages by stage name.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
Pipeline
protected Pipeline(software.amazon.jsii.JsiiObjectRef objRef) -
Pipeline
protected Pipeline(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Pipeline
@Stability(Stable) public Pipeline(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable PipelineProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
Pipeline
@Stability(Stable) public Pipeline(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Details
-
fromPipelineArn
@Stability(Stable) @NotNull public static IPipeline fromPipelineArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String pipelineArn) Import a pipeline into this app.- Parameters:
scope- the scope into which to import this pipeline. This parameter is required.id- the logical ID of the returned pipeline construct. This parameter is required.pipelineArn- The ARN of the pipeline (e.g.arn:aws:codepipeline:us-east-1:123456789012:MyDemoPipeline). This parameter is required.
-
addStage
Creates a new Stage, and adds it to this Pipeline.- Parameters:
props- the creation properties of the new Stage. This parameter is required.- Returns:
- the newly created Stage
-
addToRolePolicy
Adds a statement to the pipeline role.- Parameters:
statement- This parameter is required.
-
addTrigger
Adds a new Trigger to this Pipeline.- Parameters:
props- Trigger property to add to this Pipeline. This parameter is required.- Returns:
- the newly created trigger
-
addVariable
Adds a new Variable to this Pipeline.- Parameters:
variable- Variable instance to add to this Pipeline. This parameter is required.- Returns:
- the newly created variable
-
bindAsNotificationRuleSource
@Stability(Stable) @NotNull public NotificationRuleSourceConfig bindAsNotificationRuleSource(@NotNull software.constructs.Construct _scope) Returns a source configuration for notification rule.- Specified by:
bindAsNotificationRuleSourcein interfaceINotificationRuleSource- Parameters:
_scope- This parameter is required.
-
notifyOn
@Stability(Stable) @NotNull public INotificationRule notifyOn(@NotNull String id, @NotNull INotificationRuleTarget target, @NotNull PipelineNotifyOnOptions options) Defines a CodeStar notification rule triggered when the pipeline events emitted by you specified, it very similar toonEventAPI.You can also use the methods
notifyOnExecutionStateChange,notifyOnAnyStageStateChange,notifyOnAnyActionStateChangeandnotifyOnAnyManualApprovalStateChangeto define rules for these specific event emitted. -
notifyOnAnyActionStateChange
@Stability(Stable) @NotNull public INotificationRule notifyOnAnyActionStateChange(@NotNull String id, @NotNull INotificationRuleTarget target, @Nullable NotificationRuleOptions options) Define an notification rule triggered by the set of the "Action execution" events emitted from this pipeline.- Specified by:
notifyOnAnyActionStateChangein interfaceIPipeline- Parameters:
id- This parameter is required.target- This parameter is required.options-- See Also:
-
notifyOnAnyActionStateChange
@Stability(Stable) @NotNull public INotificationRule notifyOnAnyActionStateChange(@NotNull String id, @NotNull INotificationRuleTarget target) Define an notification rule triggered by the set of the "Action execution" events emitted from this pipeline.- Specified by:
notifyOnAnyActionStateChangein interfaceIPipeline- Parameters:
id- This parameter is required.target- This parameter is required.- See Also:
-
notifyOnAnyManualApprovalStateChange
@Stability(Stable) @NotNull public INotificationRule notifyOnAnyManualApprovalStateChange(@NotNull String id, @NotNull INotificationRuleTarget target, @Nullable NotificationRuleOptions options) Define an notification rule triggered by the set of the "Manual approval" events emitted from this pipeline.- Specified by:
notifyOnAnyManualApprovalStateChangein interfaceIPipeline- Parameters:
id- This parameter is required.target- This parameter is required.options-- See Also:
-
notifyOnAnyManualApprovalStateChange
@Stability(Stable) @NotNull public INotificationRule notifyOnAnyManualApprovalStateChange(@NotNull String id, @NotNull INotificationRuleTarget target) Define an notification rule triggered by the set of the "Manual approval" events emitted from this pipeline.- Specified by:
notifyOnAnyManualApprovalStateChangein interfaceIPipeline- Parameters:
id- This parameter is required.target- This parameter is required.- See Also:
-
notifyOnAnyStageStateChange
@Stability(Stable) @NotNull public INotificationRule notifyOnAnyStageStateChange(@NotNull String id, @NotNull INotificationRuleTarget target, @Nullable NotificationRuleOptions options) Define an notification rule triggered by the set of the "Stage execution" events emitted from this pipeline.- Specified by:
notifyOnAnyStageStateChangein interfaceIPipeline- Parameters:
id- This parameter is required.target- This parameter is required.options-- See Also:
-
notifyOnAnyStageStateChange
@Stability(Stable) @NotNull public INotificationRule notifyOnAnyStageStateChange(@NotNull String id, @NotNull INotificationRuleTarget target) Define an notification rule triggered by the set of the "Stage execution" events emitted from this pipeline.- Specified by:
notifyOnAnyStageStateChangein interfaceIPipeline- Parameters:
id- This parameter is required.target- This parameter is required.- See Also:
-
notifyOnExecutionStateChange
@Stability(Stable) @NotNull public INotificationRule notifyOnExecutionStateChange(@NotNull String id, @NotNull INotificationRuleTarget target, @Nullable NotificationRuleOptions options) Define an notification rule triggered by the set of the "Pipeline execution" events emitted from this pipeline.- Specified by:
notifyOnExecutionStateChangein interfaceIPipeline- Parameters:
id- This parameter is required.target- This parameter is required.options-- See Also:
-
notifyOnExecutionStateChange
@Stability(Stable) @NotNull public INotificationRule notifyOnExecutionStateChange(@NotNull String id, @NotNull INotificationRuleTarget target) Define an notification rule triggered by the set of the "Pipeline execution" events emitted from this pipeline.- Specified by:
notifyOnExecutionStateChangein interfaceIPipeline- Parameters:
id- This parameter is required.target- This parameter is required.- See Also:
-
onEvent
@Stability(Stable) @NotNull public Rule onEvent(@NotNull String id, @Nullable OnEventOptions options) Defines an event rule triggered by this CodePipeline. -
onEvent
Defines an event rule triggered by this CodePipeline. -
onStateChange
@Stability(Stable) @NotNull public Rule onStateChange(@NotNull String id, @Nullable OnEventOptions options) Defines an event rule triggered by the "CodePipeline Pipeline Execution State Change" event emitted from this pipeline.- Specified by:
onStateChangein interfaceIPipeline- Parameters:
id- Identifier for this event handler. This parameter is required.options- Additional options to pass to the event rule.
-
onStateChange
Defines an event rule triggered by the "CodePipeline Pipeline Execution State Change" event emitted from this pipeline.- Specified by:
onStateChangein interfaceIPipeline- Parameters:
id- Identifier for this event handler. This parameter is required.
-
stage
Access one of the pipeline's stages by stage name.- Parameters:
stageName- This parameter is required.
-
getArtifactBucket
Bucket used to store output artifacts. -
getCrossRegionSupport
Returns all of theCrossRegionSupportStacks that were generated automatically when dealing with Actions that reside in a different region than the Pipeline itself. -
getPipelineArn
ARN of this pipeline.- Specified by:
getPipelineArnin interfaceIPipeline
-
getPipelineName
The name of the pipeline.- Specified by:
getPipelineNamein interfaceIPipeline
-
getPipelineVersion
The version of the pipeline. -
getRole
The IAM role AWS CodePipeline will use to perform actions or assume roles for actions with a more specific IAM role. -
getStageCount
Get the number of Stages in this Pipeline. -
getStages
Returns the stages that comprise the pipeline.Note: the returned array is a defensive copy, so adding elements to it has no effect. Instead, use the
addStagemethod if you want to add more stages to the pipeline.
-