aws-cdk-lib.aws_codepipeline.IPipeline

interface IPipeline

LanguageType name
.NETAmazon.CDK.AWS.CodePipeline.IPipeline
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscodepipeline#IPipeline
Javasoftware.amazon.awscdk.services.codepipeline.IPipeline
Pythonaws_cdk.aws_codepipeline.IPipeline
TypeScript (source)aws-cdk-lib » aws_codepipeline » IPipeline

Implemented by Pipeline

Obtainable from Pipeline.fromPipelineArn()

The abstract view of an AWS CodePipeline as required and used by Actions.

It extends events.IRuleTarget, so this interface can be used as a Target for CloudWatch Events.

Properties

NameTypeDescription
envResourceEnvironmentThe environment this resource belongs to.
nodeNodeThe tree node.
pipelineArnstringThe ARN of the Pipeline.
pipelineNamestringThe name of the Pipeline.
stackStackThe stack in which this resource is defined.

env

Type: ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


node

Type: Node

The tree node.


pipelineArn

Type: string

The ARN of the Pipeline.


pipelineName

Type: string

The name of the Pipeline.


stack

Type: Stack

The stack in which this resource is defined.

Methods

NameDescription
applyRemovalPolicy(policy)Apply the given removal policy to this resource.
bindAsNotificationRuleSource(scope)Returns a source configuration for notification rule.
notifyOn(id, target, options)Defines a CodeStar notification rule triggered when the pipeline events emitted by you specified, it very similar to onEvent API.
notifyOnAnyActionStateChange(id, target, options?)Define an notification rule triggered by the set of the "Action execution" events emitted from this pipeline.
notifyOnAnyManualApprovalStateChange(id, target, options?)Define an notification rule triggered by the set of the "Manual approval" events emitted from this pipeline.
notifyOnAnyStageStateChange(id, target, options?)Define an notification rule triggered by the set of the "Stage execution" events emitted from this pipeline.
notifyOnExecutionStateChange(id, target, options?)Define an notification rule triggered by the set of the "Pipeline execution" events emitted from this pipeline.
onEvent(id, options?)Define an event rule triggered by this CodePipeline.
onStateChange(id, options?)Define an event rule triggered by the "CodePipeline Pipeline Execution State Change" event emitted from this pipeline.

applyRemovalPolicy(policy)

public applyRemovalPolicy(policy: RemovalPolicy): void

Parameters

  • policy RemovalPolicy

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).


bindAsNotificationRuleSource(scope)

public bindAsNotificationRuleSource(scope: Construct): NotificationRuleSourceConfig

Parameters

  • scope Construct

Returns

  • NotificationRuleSourceConfig

Returns a source configuration for notification rule.


notifyOn(id, target, options)

public notifyOn(id: string, target: INotificationRuleTarget, options: PipelineNotifyOnOptions): INotificationRule

Parameters

  • id string — The id of the CodeStar notification rule.
  • target INotificationRuleTarget — The target to register for the CodeStar Notifications destination.
  • options PipelineNotifyOnOptions — Customization options for CodeStar notification rule.

Returns

  • INotificationRule

Defines a CodeStar notification rule triggered when the pipeline events emitted by you specified, it very similar to onEvent API.

You can also use the methods notifyOnExecutionStateChange, notifyOnAnyStageStateChange, notifyOnAnyActionStateChange and notifyOnAnyManualApprovalStateChange to define rules for these specific event emitted.


notifyOnAnyActionStateChange(id, target, options?)

public notifyOnAnyActionStateChange(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRule

Parameters

  • id string — Identifier for this notification handler.
  • target INotificationRuleTarget — The target to register for the CodeStar Notifications destination.
  • options NotificationRuleOptions — Additional options to pass to the notification rule.

Returns

  • INotificationRule

Define an notification rule triggered by the set of the "Action execution" events emitted from this pipeline.

See also: https://docs.aws.amazon.com/dtconsole/latest/userguide/concepts.html#events-ref-pipeline


notifyOnAnyManualApprovalStateChange(id, target, options?)

public notifyOnAnyManualApprovalStateChange(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRule

Parameters

  • id string — Identifier for this notification handler.
  • target INotificationRuleTarget — The target to register for the CodeStar Notifications destination.
  • options NotificationRuleOptions — Additional options to pass to the notification rule.

Returns

  • INotificationRule

Define an notification rule triggered by the set of the "Manual approval" events emitted from this pipeline.

See also: https://docs.aws.amazon.com/dtconsole/latest/userguide/concepts.html#events-ref-pipeline


notifyOnAnyStageStateChange(id, target, options?)

public notifyOnAnyStageStateChange(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRule

Parameters

  • id string — Identifier for this notification handler.
  • target INotificationRuleTarget — The target to register for the CodeStar Notifications destination.
  • options NotificationRuleOptions — Additional options to pass to the notification rule.

Returns

  • INotificationRule

Define an notification rule triggered by the set of the "Stage execution" events emitted from this pipeline.

See also: https://docs.aws.amazon.com/dtconsole/latest/userguide/concepts.html#events-ref-pipeline


notifyOnExecutionStateChange(id, target, options?)

public notifyOnExecutionStateChange(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRule

Parameters

  • id string — Identifier for this notification handler.
  • target INotificationRuleTarget — The target to register for the CodeStar Notifications destination.
  • options NotificationRuleOptions — Additional options to pass to the notification rule.

Returns

  • INotificationRule

Define an notification rule triggered by the set of the "Pipeline execution" events emitted from this pipeline.

See also: https://docs.aws.amazon.com/dtconsole/latest/userguide/concepts.html#events-ref-pipeline


onEvent(id, options?)

public onEvent(id: string, options?: OnEventOptions): Rule

Parameters

  • id string — Identifier for this event handler.
  • options OnEventOptions — Additional options to pass to the event rule.

Returns

  • Rule

Define an event rule triggered by this CodePipeline.


onStateChange(id, options?)

public onStateChange(id: string, options?: OnEventOptions): Rule

Parameters

  • id string — Identifier for this event handler.
  • options OnEventOptions — Additional options to pass to the event rule.

Returns

  • Rule

Define an event rule triggered by the "CodePipeline Pipeline Execution State Change" event emitted from this pipeline.