Event targets for Amazon EventBridge
Project description
Event Targets for Amazon EventBridge
---This library contains integration classes to send Amazon EventBridge to any
number of supported AWS Services. Instances of these classes should be passed
to the rule.addTarget()
method.
Currently supported are:
- Start a CodeBuild build
- Start a CodePipeline pipeline
- Run an ECS task
- Invoke a Lambda function
- Publish a message to an SNS topic
- Send a message to an SQS queue
- Start a StepFunctions state machine
- Queue a Batch job
- Make an AWS API call
- Put a record to a Kinesis stream
- Log an event into a LogGroup
- Put a record to a Kinesis Data Firehose stream
See the README of the @aws-cdk/aws-events
library for more information on
EventBridge.
LogGroup
Use the LogGroup
target to log your events in a CloudWatch LogGroup.
For example, the following code snippet creates an event rule with a CloudWatch LogGroup as a target.
Every events sent from the aws.ec2
source will be sent to the CloudWatch LogGroup.
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
import aws_cdk.aws_logs as logs
import aws_cdk.aws_events as events
import aws_cdk.aws_events_targets as targets
log_group = logs.LogGroup(self, "MyLogGroup",
log_group_name="MyLogGroup"
)
rule = events.Rule(self, "rule",
event_pattern=EventPattern(
source=["aws.ec2"]
)
)
rule.add_target(targets.CloudWatchLogGroup(log_group))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for aws-cdk.aws-events-targets-1.81.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38d45997872ea462291aea4dd9eefd4dbdc98cdc1ea78a692523acb861891c3a |
|
MD5 | f4f7fc07d0c960adef62f05c28cb56f1 |
|
BLAKE2b-256 | 0347f03d699c420c7e19bfc610a59f6c2c54d29a94ff9ef7173dc780c91e2331 |
Close
Hashes for aws_cdk.aws_events_targets-1.81.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a930639b6b962cc47f1629d6b1143924a8c9cd32eea17821772680cbd9ec2ef6 |
|
MD5 | bc888c280cb76fac441709f13e7ff65e |
|
BLAKE2b-256 | b768ec3c01f305389c335af5a8c359a411488bac7f5b4fb3eaea41cbc3070bba |