Class OnCommitOptions
Options for the onCommit() method.
Inheritance
Namespace: Amazon.CDK.AWS.CodeCommit
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class OnCommitOptions : Object, IOnCommitOptions, IOnEventOptions, IEventCommonOptions
Syntax (vb)
Public Class OnCommitOptions
Inherits Object
Implements IOnCommitOptions, IOnEventOptions, IEventCommonOptions
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.CodeCommit;
using Amazon.CDK.AWS.Events.Targets;
Repository repo;
var myTopic = new Topic(this, "Topic");
repo.OnCommit("OnCommit", new OnCommitOptions {
Target = new SnsTopic(myTopic)
});
Synopsis
Constructors
OnCommitOptions() |
Properties
Branches | The branch to monitor. |
CrossStackScope | The scope to use if the source of the rule and its target are in different Stacks (but in the same account & region). |
Description | A description of the rule's purpose. |
EventPattern | Additional restrictions for the event to route to the specified target. |
RuleName | A name for the rule. |
Target | The target to register for the event. |
Constructors
OnCommitOptions()
public OnCommitOptions()
Properties
Branches
The branch to monitor.
public string[] Branches { get; set; }
Property Value
System.String[]
Remarks
Default: - All branches
CrossStackScope
The scope to use if the source of the rule and its target are in different Stacks (but in the same account & region).
public Construct CrossStackScope { get; set; }
Property Value
Constructs.Construct
Remarks
This helps dealing with cycles that often arise in these situations.
Default: - none (the main scope will be used, even for cross-stack Events)
Description
A description of the rule's purpose.
public string Description { get; set; }
Property Value
System.String
Remarks
Default: - No description
EventPattern
Additional restrictions for the event to route to the specified target.
public IEventPattern EventPattern { get; set; }
Property Value
Remarks
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.
See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html
RuleName
A name for the rule.
public string RuleName { get; set; }
Property Value
System.String
Remarks
Default: AWS CloudFormation generates a unique physical ID.
Target
The target to register for the event.
public IRuleTarget Target { get; set; }
Property Value
Remarks
Default: - No target is added to the rule. Use addTarget()
to add a target.