interface IPipeline
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.CodePipeline.IPipeline |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awscodepipeline#IPipeline |
![]() | software.amazon.awscdk.services.codepipeline.IPipeline |
![]() | aws_cdk.aws_codepipeline.IPipeline |
![]() | 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
Name | Type | Description |
---|---|---|
env | Resource | The environment this resource belongs to. |
node | Node | The tree node. |
pipeline | string | The ARN of the Pipeline. |
pipeline | string | The name of the Pipeline. |
stack | Stack | The stack in which this resource is defined. |
env
Type:
Resource
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
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
bind | Returns a source configuration for notification rule. |
notify | Defines a CodeStar notification rule triggered when the pipeline events emitted by you specified, it very similar to onEvent API. |
notify | Define an notification rule triggered by the set of the "Action execution" events emitted from this pipeline. |
notify | Define an notification rule triggered by the set of the "Manual approval" events emitted from this pipeline. |
notify | Define an notification rule triggered by the set of the "Stage execution" events emitted from this pipeline. |
notify | Define an notification rule triggered by the set of the "Pipeline execution" events emitted from this pipeline. |
on | Define an event rule triggered by this CodePipeline. |
on | 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
Removal
Policy
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
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
INotification
— The target to register for the CodeStar Notifications destination.Rule Target - options
Pipeline
— Customization options for CodeStar notification rule.Notify On Options
Returns
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
INotification
— The target to register for the CodeStar Notifications destination.Rule Target - options
Notification
— Additional options to pass to the notification rule.Rule Options
Returns
Define an notification rule triggered by the set of the "Action execution" events emitted from this pipeline.
notifyOnAnyManualApprovalStateChange(id, target, options?)
public notifyOnAnyManualApprovalStateChange(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRule
Parameters
- id
string
— Identifier for this notification handler. - target
INotification
— The target to register for the CodeStar Notifications destination.Rule Target - options
Notification
— Additional options to pass to the notification rule.Rule Options
Returns
Define an notification rule triggered by the set of the "Manual approval" events emitted from this pipeline.
notifyOnAnyStageStateChange(id, target, options?)
public notifyOnAnyStageStateChange(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRule
Parameters
- id
string
— Identifier for this notification handler. - target
INotification
— The target to register for the CodeStar Notifications destination.Rule Target - options
Notification
— Additional options to pass to the notification rule.Rule Options
Returns
Define an notification rule triggered by the set of the "Stage execution" events emitted from this pipeline.
notifyOnExecutionStateChange(id, target, options?)
public notifyOnExecutionStateChange(id: string, target: INotificationRuleTarget, options?: NotificationRuleOptions): INotificationRule
Parameters
- id
string
— Identifier for this notification handler. - target
INotification
— The target to register for the CodeStar Notifications destination.Rule Target - options
Notification
— Additional options to pass to the notification rule.Rule Options
Returns
Define an notification rule triggered by the set of the "Pipeline execution" events emitted from this pipeline.
onEvent(id, options?)
public onEvent(id: string, options?: OnEventOptions): Rule
Parameters
- id
string
— Identifier for this event handler. - options
On
— Additional options to pass to the event rule.Event Options
Returns
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
On
— Additional options to pass to the event rule.Event Options
Returns
Define an event rule triggered by the "CodePipeline Pipeline Execution State Change" event emitted from this pipeline.