Show / Hide Table of Contents

Class RuleProps

Properties for defining an EventBridge Rule.

Inheritance
System.Object
RuleProps
Implements
IRuleProps
Namespace: Amazon.CDK.AWS.Events
Assembly: Amazon.CDK.AWS.Events.dll
Syntax (csharp)
public class RuleProps : Object, IRuleProps
Syntax (vb)
Public Class RuleProps
    Inherits Object
    Implements IRuleProps

Synopsis

Constructors

RuleProps()

Properties

Description

A description of the rule's purpose.

Enabled

Indicates whether the rule is enabled.

EventBus

The event bus to associate with this rule.

EventPattern

Describes which events EventBridge routes to the specified target.

RuleName

A name for the rule.

Schedule

The schedule or rate (frequency) that determines when EventBridge runs the rule.

Targets

Targets to invoke when this rule matches an event.

Constructors

RuleProps()

public RuleProps()

Properties

Description

A description of the rule's purpose.

public string Description { get; set; }
Property Value

System.String

Remarks

Default: - No description.

Enabled

Indicates whether the rule is enabled.

public Nullable<bool> Enabled { get; set; }
Property Value

System.Nullable<System.Boolean>

Remarks

Default: true

EventBus

The event bus to associate with this rule.

public IEventBus EventBus { get; set; }
Property Value

IEventBus

Remarks

Default: - The default event bus.

EventPattern

Describes which events EventBridge routes to the specified target.

public IEventPattern EventPattern { get; set; }
Property Value

IEventPattern

Remarks

These routed events are matched events. For more information, see Events and Event Patterns in the Amazon EventBridge User Guide.

Default: - None.

See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html

You must specify this property (either via props or via addEventPattern), the scheduleExpression property, or both. The method addEventPattern can be used to add filter values to the event pattern.

RuleName

A name for the rule.

public string RuleName { get; set; }
Property Value

System.String

Remarks

Default: - AWS CloudFormation generates a unique physical ID and uses that ID for the rule name. For more information, see Name Type.

Schedule

The schedule or rate (frequency) that determines when EventBridge runs the rule.

public Schedule Schedule { get; set; }
Property Value

Schedule

Remarks

For more information, see Schedule Expression Syntax for Rules in the Amazon EventBridge User Guide.

Default: - None.

See: https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html

You must specify this property, the eventPattern property, or both.

Targets

Targets to invoke when this rule matches an event.

public IRuleTarget[] Targets { get; set; }
Property Value

IRuleTarget[]

Remarks

Input will be the full matched event. If you wish to specify custom target input, use addTarget(target[, inputOptions]).

Default: - No targets.

Implements

IRuleProps
Back to top Generated by DocFX