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.87.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0f4cae2134f09b9d5364c2e22e3c7a9c6a8cae0fcbbbf88b0f17b53bd3e9fa6 |
|
MD5 | 7200ea8f9b4776f8d798a01a8de482ce |
|
BLAKE2b-256 | 54ef7eec5cb935d3bb3ae878946f7d9b9dd1f5523f4f37f5b5426f5c49440f59 |
Close
Hashes for aws_cdk.aws_events_targets-1.87.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e99ff9c5b71e74e42de6139e8bd700079192f6ab321edb87709b188b74f90a8e |
|
MD5 | eb2605830cb4a20c99900bef2029471c |
|
BLAKE2b-256 | 96f4ca826ba3c7c745ca0985b7e305c5a0e5d385ca3761705ba535a75f891ae0 |