Class CloudWatchLogGroup
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.events.targets.CloudWatchLogGroup
- All Implemented Interfaces:
IRuleTarget
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:47.716Z")
@Stability(Stable)
public class CloudWatchLogGroup
extends software.amazon.jsii.JsiiObject
implements IRuleTarget
Use an AWS CloudWatch LogGroup as an event rule target.
Example:
import software.amazon.awscdk.services.logs.*; LogGroup logGroup = LogGroup.Builder.create(this, "MyLogGroup") .logGroupName("MyLogGroup") .build(); Rule rule = Rule.Builder.create(this, "rule") .eventPattern(EventPattern.builder() .source(List.of("aws.ec2")) .build()) .build(); rule.addTarget(new CloudWatchLogGroup(logGroup));
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.events.IRuleTarget
IRuleTarget.Jsii$Default, IRuleTarget.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionCloudWatchLogGroup
(ILogGroup logGroup) CloudWatchLogGroup
(ILogGroup logGroup, LogGroupProps props) protected
CloudWatchLogGroup
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CloudWatchLogGroup
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionReturns a RuleTarget that can be used to log an event into a CloudWatch LogGroup.Returns a RuleTarget that can be used to log an event into a CloudWatch LogGroup.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
CloudWatchLogGroup
protected CloudWatchLogGroup(software.amazon.jsii.JsiiObjectRef objRef) -
CloudWatchLogGroup
protected CloudWatchLogGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CloudWatchLogGroup
@Stability(Stable) public CloudWatchLogGroup(@NotNull ILogGroup logGroup, @Nullable LogGroupProps props) - Parameters:
logGroup
- This parameter is required.props
-
-
CloudWatchLogGroup
- Parameters:
logGroup
- This parameter is required.
-
-
Method Details
-
bind
@Stability(Stable) @NotNull public RuleTargetConfig bind(@NotNull IRule _rule, @Nullable String _id) Returns a RuleTarget that can be used to log an event into a CloudWatch LogGroup.- Specified by:
bind
in interfaceIRuleTarget
- Parameters:
_rule
- This parameter is required._id
-
-
bind
Returns a RuleTarget that can be used to log an event into a CloudWatch LogGroup.- Specified by:
bind
in interfaceIRuleTarget
- Parameters:
_rule
- This parameter is required.
-