interface OnCommitOptions
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.CodeCommit.OnCommitOptions |
![]() | software.amazon.awscdk.services.codecommit.OnCommitOptions |
![]() | aws_cdk.aws_codecommit.OnCommitOptions |
![]() | @aws-cdk/aws-codecommit » OnCommitOptions |
Options for the onCommit() method.
Example
import * as codecommit from '@aws-cdk/aws-codecommit';
import * as targets from '@aws-cdk/aws-events-targets';
declare const repo: codecommit.Repository;
const myTopic = new sns.Topic(this, 'Topic');
repo.onCommit('OnCommit', {
target: new targets.SnsTopic(myTopic),
});
Properties
Name | Type | Description |
---|---|---|
branches? | string[] | The branch to monitor. |
description? | string | A description of the rule's purpose. |
event | Event | Additional restrictions for the event to route to the specified target. |
rule | string | A name for the rule. |
target? | IRule | The target to register for the event. |
branches?
Type:
string[]
(optional, default: All branches)
The branch to monitor.
description?
Type:
string
(optional, default: No description)
A description of the rule's purpose.
eventPattern?
Type:
Event
(optional, default: No additional filtering based on an event pattern.)
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.
ruleName?
Type:
string
(optional, default: AWS CloudFormation generates a unique physical ID.)
A name for the rule.
target?
Type:
IRule
(optional, default: No target is added to the rule. Use addTarget()
to add a target.)
The target to register for the event.