Show / Hide Table of Contents

Interface IOnEventOptions

Standard set of options for onXxx event handlers on construct.

Inherited Members
IEventCommonOptions.CrossStackScope
IEventCommonOptions.Description
IEventCommonOptions.EventPattern
IEventCommonOptions.RuleName
Namespace: Amazon.CDK.AWS.Events
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IOnEventOptions : IEventCommonOptions
Syntax (vb)
Public Interface IOnEventOptions Inherits IEventCommonOptions
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.Lambda;
            using Amazon.CDK.AWS.Events.Targets;


            var repo = new Repository(this, "Repo");
            var lambdaHandler = new Function(this, "LambdaFunction", new FunctionProps {
                Runtime = Runtime.PYTHON_3_12,
                Code = Code.FromInline("# dummy func"),
                Handler = "index.handler"
            });

            repo.OnEvent("OnEventTargetLambda", new OnEventOptions {
                Target = new LambdaFunction(lambdaHandler)
            });

Synopsis

Properties

Target

The target to register for the event.

Properties

Target

The target to register for the event.

IRuleTarget? Target { get; }
Property Value

IRuleTarget

Remarks

Default: - No target is added to the rule. Use addTarget() to add a target.

Back to top Generated by DocFX