Telemetry.AwsLogGroupSubscription
An override that subscribes a CloudWatch log group to an aws
Source, or keeps it unsubscribed (subscribed: false) even when the
source subscribes new log groups automatically, before the source has
found the group.
sourceId, region and name identify the log group: changing one
replaces the override. subscribed changes in place.
Subscribing a log group
Section titled “Subscribing a log group”Subscribe one log group, keep another out
const aws = yield* BetterStack.Telemetry.Source("aws", { platform: "aws" });yield* BetterStack.Telemetry.AwsLogGroupSubscription("api-logs", { sourceId: aws.id, region: "us-east-1", name: "/aws/lambda/api", subscribed: true,});yield* BetterStack.Telemetry.AwsLogGroupSubscription("noisy-logs", { sourceId: aws.id, region: "us-east-1", name: "/aws/lambda/noisy", subscribed: false,});name string required
CloudWatch log-group name.
region string required
AWS region of the log group.
sourceId string required
The ID of the aws source. Get it via List sources.
subscribed boolean required
true subscribes the log group. false keeps it unsubscribed, even when automatic subscription is on.
teamId string
Team that owns the resource, such as t123. Defaults to the credentials' team (BETTERSTACK_TEAM_ID, or the profile's team). Changing it replaces the resource.
Attributes
Section titled “Attributes”id string always set
The aws_log_group_subscription's id.
sourceId string always set
The aws source the override belongs to.
createdAt string
When the override was created.
name string
CloudWatch log-group name.
region string
AWS region of the log group.
subscribed boolean
true subscribes the log group. false keeps it unsubscribed, even when automatic subscription is on.
teamId string
Team that owns the source, such as t123.
updatedAt string
When the override was last updated.
Lookup
Section titled “Lookup”AwsLogGroupSubscription.lookup(props) reads an object this stack does not manage. It is never created, updated or deleted.
id string required
The override's id.
sourceId string required
The aws source it belongs to.
teamId string
Team that owns the source, such as t123. Defaults to the credentials' team.