GradientEdge CDK Utils
    Preparing search index...

    Provides operations on AWS EventBridge.

    • A new instance of this class is injected into CommonConstruct constructor.
    • If a custom construct extends CommonConstruct, an instance is available within the context.
    import { CommonConstruct } from '@gradientedge/cdk-utils'

    class CustomConstruct extends CommonConstruct {
    constructor(parent: Construct, id: string, props: common.CommonStackProps) {
    super(parent, id, props)
    this.props = props
    this.eventManager.createLambdaRule('MyLambdaRule', this, lambdaFunction)
    }
    }
    Index

    Constructors

    Methods

    • Parameters

      • id: string

        scoped id of the resource

      • scope: CommonConstruct

        scope in which this resource is defined

      • props: RuleProps

        the CfnRule properties for the event rule

      • cluster: ICluster

        the ECS cluster to run the Fargate task in

      • task: ITaskDefinition

        the ECS task definition to execute

      • subnetIds: string[]

        the list of subnet IDs for the Fargate task's VPC configuration

      • role: Role | CfnRole

        the IAM role granting EventBridge permission to run the ECS task

      • OptionaleventPattern: any

        optional event pattern to filter events

      Returns CfnRule

    • Parameters

      • id: string

        scoped id of the resource

      • scope: CommonConstruct

        scope in which this resource is defined

      • props: RuleProps

        the CfnRule properties for the event rule

      • lambdaFunction: IFunction

        the Lambda function to invoke as the rule target

      • OptionaleventBusName: string

        optional name of the custom event bus to attach the rule to

      • OptionaleventPattern: any

        optional event pattern to filter events

      • OptionalscheduleExpression: string

        optional cron or rate expression for scheduled rules

      Returns CfnRule