IPipeline¶
-
class
aws_cdk.aws_codepipeline.
IPipeline
(*args, **kwds)¶ Bases:
aws_cdk.core.IResource
,aws_cdk.aws_codestarnotifications.INotificationRuleSource
,typing_extensions.Protocol
The abstract view of an AWS CodePipeline as required and used by Actions.
It extends {@link events.IRuleTarget}, so this interface can be used as a Target for CloudWatch Events.
Methods
-
apply_removal_policy
(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
).- Parameters
policy (
RemovalPolicy
) –- Return type
None
-
bind_as_notification_rule_source
(scope)¶ Returns a source configuration for notification rule.
- Parameters
scope (
Construct
) –- Return type
-
notify_on
(id, target, *, events, detail_type=None, enabled=None, notification_rule_name=None)¶ 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
andnotifyOnAnyManualApprovalStateChange
to define rules for these specific event emitted.- Parameters
id (
str
) – The id of the CodeStar notification rule.target (
INotificationRuleTarget
) – The target to register for the CodeStar Notifications destination.events (
Sequence
[PipelineNotificationEvents
]) – A list of event types associated with this notification rule for CodePipeline Pipeline. For a complete list of event types and IDs, see Notification concepts in the Developer Tools Console User Guide.detail_type (
Optional
[DetailType
]) – The level of detail to include in the notifications for this resource. BASIC will include only the contents of the event as it would appear in AWS CloudWatch. FULL will include any supplemental information provided by AWS CodeStar Notifications and/or the service for the resource for which the notification is created. Default: DetailType.FULLenabled (
Optional
[bool
]) – The status of the notification rule. If the enabled is set to DISABLED, notifications aren’t sent for the notification rule. Default: truenotification_rule_name (
Optional
[str
]) – The name for the notification rule. Notification rule names must be unique in your AWS account. Default: - generated from theid
- Return type
- Returns
CodeStar notification rule associated with this build project.
-
notify_on_any_action_state_change
(id, target, *, detail_type=None, enabled=None, notification_rule_name=None)¶ Define an notification rule triggered by the set of the “Action execution” events emitted from this pipeline.
- Parameters
id (
str
) – Identifier for this notification handler.target (
INotificationRuleTarget
) – The target to register for the CodeStar Notifications destination.detail_type (
Optional
[DetailType
]) – The level of detail to include in the notifications for this resource. BASIC will include only the contents of the event as it would appear in AWS CloudWatch. FULL will include any supplemental information provided by AWS CodeStar Notifications and/or the service for the resource for which the notification is created. Default: DetailType.FULLenabled (
Optional
[bool
]) – The status of the notification rule. If the enabled is set to DISABLED, notifications aren’t sent for the notification rule. Default: truenotification_rule_name (
Optional
[str
]) – The name for the notification rule. Notification rule names must be unique in your AWS account. Default: - generated from theid
- See
https://docs.aws.amazon.com/dtconsole/latest/userguide/concepts.html#events-ref-pipeline
- Return type
-
notify_on_any_manual_approval_state_change
(id, target, *, detail_type=None, enabled=None, notification_rule_name=None)¶ Define an notification rule triggered by the set of the “Manual approval” events emitted from this pipeline.
- Parameters
id (
str
) – Identifier for this notification handler.target (
INotificationRuleTarget
) – The target to register for the CodeStar Notifications destination.detail_type (
Optional
[DetailType
]) – The level of detail to include in the notifications for this resource. BASIC will include only the contents of the event as it would appear in AWS CloudWatch. FULL will include any supplemental information provided by AWS CodeStar Notifications and/or the service for the resource for which the notification is created. Default: DetailType.FULLenabled (
Optional
[bool
]) – The status of the notification rule. If the enabled is set to DISABLED, notifications aren’t sent for the notification rule. Default: truenotification_rule_name (
Optional
[str
]) – The name for the notification rule. Notification rule names must be unique in your AWS account. Default: - generated from theid
- See
https://docs.aws.amazon.com/dtconsole/latest/userguide/concepts.html#events-ref-pipeline
- Return type
-
notify_on_any_stage_state_change
(id, target, *, detail_type=None, enabled=None, notification_rule_name=None)¶ Define an notification rule triggered by the set of the “Stage execution” events emitted from this pipeline.
- Parameters
id (
str
) – Identifier for this notification handler.target (
INotificationRuleTarget
) – The target to register for the CodeStar Notifications destination.detail_type (
Optional
[DetailType
]) – The level of detail to include in the notifications for this resource. BASIC will include only the contents of the event as it would appear in AWS CloudWatch. FULL will include any supplemental information provided by AWS CodeStar Notifications and/or the service for the resource for which the notification is created. Default: DetailType.FULLenabled (
Optional
[bool
]) – The status of the notification rule. If the enabled is set to DISABLED, notifications aren’t sent for the notification rule. Default: truenotification_rule_name (
Optional
[str
]) – The name for the notification rule. Notification rule names must be unique in your AWS account. Default: - generated from theid
- See
https://docs.aws.amazon.com/dtconsole/latest/userguide/concepts.html#events-ref-pipeline
- Return type
-
notify_on_execution_state_change
(id, target, *, detail_type=None, enabled=None, notification_rule_name=None)¶ Define an notification rule triggered by the set of the “Pipeline execution” events emitted from this pipeline.
- Parameters
id (
str
) – Identifier for this notification handler.target (
INotificationRuleTarget
) – The target to register for the CodeStar Notifications destination.detail_type (
Optional
[DetailType
]) – The level of detail to include in the notifications for this resource. BASIC will include only the contents of the event as it would appear in AWS CloudWatch. FULL will include any supplemental information provided by AWS CodeStar Notifications and/or the service for the resource for which the notification is created. Default: DetailType.FULLenabled (
Optional
[bool
]) – The status of the notification rule. If the enabled is set to DISABLED, notifications aren’t sent for the notification rule. Default: truenotification_rule_name (
Optional
[str
]) – The name for the notification rule. Notification rule names must be unique in your AWS account. Default: - generated from theid
- See
https://docs.aws.amazon.com/dtconsole/latest/userguide/concepts.html#events-ref-pipeline
- Return type
-
on_event
(id, *, description=None, event_pattern=None, rule_name=None, target=None)¶ Define an event rule triggered by this CodePipeline.
- Parameters
id (
str
) – Identifier for this event handler.description (
Optional
[str
]) – A description of the rule’s purpose. Default: - No descriptionevent_pattern (
Optional
[EventPattern
]) – Additional restrictions for the event to route to the specified target. The method that generates the rule probably imposes some type of event filtering. The filtering implied by what you pass here is added on top of that filtering. Default: - No additional filtering based on an event pattern.rule_name (
Optional
[str
]) – A name for the rule. Default: AWS CloudFormation generates a unique physical ID.target (
Optional
[IRuleTarget
]) – The target to register for the event. Default: - No target is added to the rule. UseaddTarget()
to add a target.
- Return type
-
on_state_change
(id, *, description=None, event_pattern=None, rule_name=None, target=None)¶ Define an event rule triggered by the “CodePipeline Pipeline Execution State Change” event emitted from this pipeline.
- Parameters
id (
str
) – Identifier for this event handler.description (
Optional
[str
]) – A description of the rule’s purpose. Default: - No descriptionevent_pattern (
Optional
[EventPattern
]) – Additional restrictions for the event to route to the specified target. The method that generates the rule probably imposes some type of event filtering. The filtering implied by what you pass here is added on top of that filtering. Default: - No additional filtering based on an event pattern.rule_name (
Optional
[str
]) – A name for the rule. Default: AWS CloudFormation generates a unique physical ID.target (
Optional
[IRuleTarget
]) – The target to register for the event. Default: - No target is added to the rule. UseaddTarget()
to add a target.
- Return type
Attributes
-
env
¶ 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.
- Return type
-
node
¶ The construct tree node for this construct.
- Return type
-
pipeline_arn
¶ The ARN of the Pipeline.
- Attribute
true
- Return type
str
-
pipeline_name
¶ The name of the Pipeline.
- Attribute
true
- Return type
str
-