24 CDK constructs available in aws-cdk-lib/aws-logs
import * as logs from 'aws-cdk-lib/aws-logs';Higher-level abstractions with sensible defaults and convenience methods.
A new CloudWatch Logs Destination for use in cross-account scenarios. CrossAccountDestinations are used to subscribe a Kinesis stream in a different account to a CloudWatch Subscription. For cross-account scenarios, you need to manually create a `CrossAccountDestination` in the destination account. The integration classes in the `aws-cdk-lib/aws-logs-destinations` package (such as `KinesisDestination`) only handle same-account scenarios and do not automatically create `CrossAccountDestination` for cross-account usage.
Define a CloudWatch Log Group.
Creates a custom resource to control the retention policy of a CloudWatch Logs log group. The log group is created if it doesn't already exist. The policy is removed when `retentionDays` is `undefined` or equal to `Infinity`. Log group can be created in the region that is different from stack region by specifying `logGroupRegion`
Define a Log Stream in a Log Group.
A filter that extracts information from CloudWatch Logs and emits to CloudWatch Metrics.
Define a query definition for CloudWatch Logs Insights.
Resource Policy for CloudWatch Log Groups. Policies define the operations that are allowed on this resource. You almost never need to define this construct directly. All AWS resources that support resource policies have a method called `addToResourcePolicy()`, which will automatically create a new resource policy if one doesn't exist yet, otherwise it will add to the existing policy. Prefer to use `addToResourcePolicy()` instead.
A new Subscription on a CloudWatch log group.
Represent the L2 construct for the AWS::Logs::Transformer CloudFormation resource.
Direct CloudFormation resource mappings. One-to-one with CloudFormation resource types.
AWS::Logs::AccountPolicyAWS::Logs::DeliveryAWS::Logs::DeliveryDestinationAWS::Logs::DeliverySourceAWS::Logs::DestinationAWS::Logs::IntegrationAWS::Logs::LogAnomalyDetectorAWS::Logs::LogGroupAWS::Logs::LogStreamAWS::Logs::MetricFilterAWS::Logs::QueryDefinitionAWS::Logs::ResourcePolicyAWS::Logs::ScheduledQueryAWS::Logs::SubscriptionFilterAWS::Logs::TransformerOur bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-cdk-lib/aws-logs