@Stability(value=Experimental)
See: Description
| Interface | Description |
|---|---|
| CfnEventBusPolicy.ConditionProperty |
EXPERIMENTAL
|
| CfnEventBusPolicyProps |
Properties for defining a `AWS::Events::EventBusPolicy`.
|
| CfnRule.EcsParametersProperty |
EXPERIMENTAL
|
| CfnRule.InputTransformerProperty |
EXPERIMENTAL
|
| CfnRule.KinesisParametersProperty |
EXPERIMENTAL
|
| CfnRule.RunCommandParametersProperty |
EXPERIMENTAL
|
| CfnRule.RunCommandTargetProperty |
EXPERIMENTAL
|
| CfnRule.SqsParametersProperty |
EXPERIMENTAL
|
| CfnRule.TargetProperty |
EXPERIMENTAL
|
| CfnRuleProps |
Properties for defining a `AWS::Events::Rule`.
|
| EventPattern |
Events in Amazon CloudWatch Events are represented as JSON objects.
|
| IRule |
EXPERIMENTAL
|
| IRuleTarget |
An abstract target for EventRules.
|
| OnEventOptions |
Standard set of options for `onXxx` event handlers on construct.
|
| RuleProps |
EXPERIMENTAL
|
| RuleTargetConfig |
Properties for an event rule target.
|
| RuleTargetInputProperties |
The input properties for an event target.
|
| Class | Description |
|---|---|
| CfnEventBusPolicy |
A CloudFormation `AWS::Events::EventBusPolicy`.
|
| CfnEventBusPolicy.ConditionProperty.Builder |
A builder for
CfnEventBusPolicy.ConditionProperty |
| CfnEventBusPolicy.ConditionProperty.Jsii$Proxy |
A proxy class which represents a concrete javascript instance of this type.
|
| CfnEventBusPolicyProps.Builder |
A builder for
CfnEventBusPolicyProps |
| CfnEventBusPolicyProps.Jsii$Proxy |
A proxy class which represents a concrete javascript instance of this type.
|
| CfnRule |
A CloudFormation `AWS::Events::Rule`.
|
| CfnRule.EcsParametersProperty.Builder |
A builder for
CfnRule.EcsParametersProperty |
| CfnRule.EcsParametersProperty.Jsii$Proxy |
A proxy class which represents a concrete javascript instance of this type.
|
| CfnRule.InputTransformerProperty.Builder |
A builder for
CfnRule.InputTransformerProperty |
| CfnRule.InputTransformerProperty.Jsii$Proxy |
A proxy class which represents a concrete javascript instance of this type.
|
| CfnRule.KinesisParametersProperty.Builder |
A builder for
CfnRule.KinesisParametersProperty |
| CfnRule.KinesisParametersProperty.Jsii$Proxy |
A proxy class which represents a concrete javascript instance of this type.
|
| CfnRule.RunCommandParametersProperty.Builder |
A builder for
CfnRule.RunCommandParametersProperty |
| CfnRule.RunCommandParametersProperty.Jsii$Proxy |
A proxy class which represents a concrete javascript instance of this type.
|
| CfnRule.RunCommandTargetProperty.Builder |
A builder for
CfnRule.RunCommandTargetProperty |
| CfnRule.RunCommandTargetProperty.Jsii$Proxy |
A proxy class which represents a concrete javascript instance of this type.
|
| CfnRule.SqsParametersProperty.Builder |
A builder for
CfnRule.SqsParametersProperty |
| CfnRule.SqsParametersProperty.Jsii$Proxy |
A proxy class which represents a concrete javascript instance of this type.
|
| CfnRule.TargetProperty.Builder |
A builder for
CfnRule.TargetProperty |
| CfnRule.TargetProperty.Jsii$Proxy |
A proxy class which represents a concrete javascript instance of this type.
|
| CfnRuleProps.Builder |
A builder for
CfnRuleProps |
| CfnRuleProps.Jsii$Proxy |
A proxy class which represents a concrete javascript instance of this type.
|
| EventField |
Represents a field in the event pattern.
|
| EventPattern.Builder |
A builder for
EventPattern |
| EventPattern.Jsii$Proxy |
A proxy class which represents a concrete javascript instance of this type.
|
| IRule.Jsii$Proxy |
A proxy class which represents a concrete javascript instance of this type.
|
| IRuleTarget.Jsii$Proxy |
A proxy class which represents a concrete javascript instance of this type.
|
| OnEventOptions.Builder |
A builder for
OnEventOptions |
| OnEventOptions.Jsii$Proxy |
A proxy class which represents a concrete javascript instance of this type.
|
| Rule |
Defines a CloudWatch Event Rule in this stack.
|
| RuleProps.Builder |
A builder for
RuleProps |
| RuleProps.Jsii$Proxy |
A proxy class which represents a concrete javascript instance of this type.
|
| RuleTargetConfig.Builder |
A builder for
RuleTargetConfig |
| RuleTargetConfig.Jsii$Proxy |
A proxy class which represents a concrete javascript instance of this type.
|
| RuleTargetInput |
The input to send to the event target.
|
| RuleTargetInputProperties.Builder |
A builder for
RuleTargetInputProperties |
| RuleTargetInputProperties.Jsii$Proxy |
A proxy class which represents a concrete javascript instance of this type.
|
This API is still under active development and subject to non-backward compatible changes or removal in any future version. Use of the API is not recommended in production environments. Experimental APIs are not subject to the Semantic Versioning model.
Amazon CloudWatch Events delivers a near real-time stream of system events that describe changes in AWS resources. For example, an AWS CodePipeline emits the State Change event when the pipeline changes it's state.
The Rule construct defines a CloudWatch events rule which monitors an
event based on an event
pattern
and invoke event targets when the pattern is matched against a triggered
event. Event targets are objects that implement the IEventTarget interface.
Normally, you will use one of the source.onXxx(name[, target[, options]]) -> Rule methods on the event source to define an event rule associated with
the specific activity. You can targets either via props, or add targets using
rule.addTarget.
For example, to define an rule that triggers a CodeBuild project build when a commit is pushed to the "master" branch of a CodeCommit repository:
const onCommitRule = repo.onCommit('OnCommitToMaster', project, 'master');
You can add additional targets, with optional input
transformer
using eventRule.addTarget(target[, input]). For example, we can add a SNS
topic target which formats a human-readable message for the commit.
For example, this adds an SNS topic as a target:
onCommitRule.addTarget(topic, {
template: 'A commit was pushed to the repository <repo> on branch <branch>',
pathsMap: {
branch: '$.detail.referenceName',
repo: '$.detail.repositoryName'
}
});
The @aws-cdk/aws-events-targets module includes classes that implement the IRuleTarget
interface for various AWS services.
The following targets are supported:
targets.SnsTopic: publish into an SNS topic when an event rule is triggered.targets.CodeBuildProject: start a CodeBuild project when an event rule is triggered.targets.LambdaFunction: invoke an AWS Lambda function when an event rule is triggered.Copyright © 2019. All rights reserved.