# IRuleTarget

An abstract target for EventRules.

Implemented by: [ApiDestination](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events_targets.ApiDestination.html), [ApiGateway](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events_targets.ApiGateway.html), [ApiGatewayV2](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events_targets.ApiGatewayV2.html), [AppSync](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events_targets.AppSync.html), [AwsApi](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events_targets.AwsApi.html), [BatchJob](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events_targets.BatchJob.html), CloudWatchLogGroup, CodeBuildProject, CodePipeline, EcsTask, EventBus, FirehoseDeliveryStream, KinesisFirehoseStream, KinesisFirehoseStreamV2, KinesisStream, LambdaFunction, RedshiftQuery, SfnStateMachine, SnsTopic, SqsQueue
Used as argument in: [IAction.onStateChange](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codepipeline.IAction.html#onstatechange), [IStage.onStateChange](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codepipeline.IStage.html#onstatechange), [Rule.addTarget](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.Rule.html#addtarget)

- Source: [`aws-events/lib/target.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-events/lib/target.ts#L10)
- Type last changed: v2.235.0 · 15 Jan 2026

## Methods

- `bind(rule: IRuleRef, id?: string): RuleTargetConfig` — Returns the rule target specification.

  NOTE: Do not use the various `inputXxx` options. They can be set in a call to `addTarget`.

  **Parameters**

  - `rule` — The EventBridge Rule that would trigger this target.
  - `id` — The id of the target that will be attached to the rule.
