Interface ILogGroup
- All Superinterfaces:
software.constructs.IConstruct
,software.constructs.IDependable
,IResource
,IResourceWithPolicy
,software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
ILogGroup.Jsii$Default
- All Known Implementing Classes:
ILogGroup.Jsii$Proxy
,LogGroup
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-12-11T23:26:35.974Z")
@Stability(Stable)
public interface ILogGroup
extends software.amazon.jsii.JsiiSerializable, IResourceWithPolicy
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Internal default implementation forILogGroup
.static final class
A proxy class which represents a concrete javascript instance of this type. -
Method Summary
Modifier and TypeMethodDescriptionaddMetricFilter
(String id, MetricFilterOptions props) Create a new Metric Filter on this Log Group.Create a new Log Stream for this Log Group.addStream
(String id, StreamOptions props) Create a new Log Stream for this Log Group.addSubscriptionFilter
(String id, SubscriptionFilterOptions props) Create a new Subscription Filter on this Log Group.extractMetric
(String jsonField, String metricNamespace, String metricName) Extract a metric from structured log events in the LogGroup.The ARN of this log group, with ':*' appended.The name of this log group.grant
(IGrantable grantee, @NotNull String... actions) Give the indicated permissions on this log group and all streams.grantRead
(IGrantable grantee) Give permissions to read from this log group and streams.grantWrite
(IGrantable grantee) Give permissions to write to create and write to streams in this log group.Public method to get the physical name of this log group.Return the given named metric for this Log Group.metric
(String metricName, MetricOptions props) Return the given named metric for this Log Group.The volume of log events in uncompressed bytes uploaded to CloudWatch Logs.metricIncomingBytes
(MetricOptions props) The volume of log events in uncompressed bytes uploaded to CloudWatch Logs.The number of log events uploaded to CloudWatch Logs.The number of log events uploaded to CloudWatch Logs.Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.awscdk.services.iam.IResourceWithPolicy
addToResourcePolicy
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getLogGroupArn
The ARN of this log group, with ':*' appended. -
getLogGroupName
The name of this log group. -
addMetricFilter
@Stability(Stable) @NotNull MetricFilter addMetricFilter(@NotNull String id, @NotNull MetricFilterOptions props) Create a new Metric Filter on this Log Group.- Parameters:
id
- Unique identifier for the construct in its parent. This parameter is required.props
- Properties for creating the MetricFilter. This parameter is required.
-
addStream
Create a new Log Stream for this Log Group.- Parameters:
id
- Unique identifier for the construct in its parent. This parameter is required.props
- Properties for creating the LogStream.
-
addStream
Create a new Log Stream for this Log Group.- Parameters:
id
- Unique identifier for the construct in its parent. This parameter is required.
-
addSubscriptionFilter
@Stability(Stable) @NotNull SubscriptionFilter addSubscriptionFilter(@NotNull String id, @NotNull SubscriptionFilterOptions props) Create a new Subscription Filter on this Log Group.- Parameters:
id
- Unique identifier for the construct in its parent. This parameter is required.props
- Properties for creating the SubscriptionFilter. This parameter is required.
-
extractMetric
@Stability(Stable) @NotNull Metric extractMetric(@NotNull String jsonField, @NotNull String metricNamespace, @NotNull String metricName) Extract a metric from structured log events in the LogGroup.Creates a MetricFilter on this LogGroup that will extract the value of the indicated JSON field in all records where it occurs.
The metric will be available in CloudWatch Metrics under the indicated namespace and name.
- Parameters:
jsonField
- JSON field to extract (example: '$.myfield'). This parameter is required.metricNamespace
- Namespace to emit the metric under. This parameter is required.metricName
- Name to emit the metric under. This parameter is required.- Returns:
- A Metric object representing the extracted metric
-
grant
@Stability(Stable) @NotNull Grant grant(@NotNull IGrantable grantee, @NotNull @NotNull String... actions) Give the indicated permissions on this log group and all streams.- Parameters:
grantee
- This parameter is required.actions
- This parameter is required.
-
grantRead
Give permissions to read from this log group and streams.- Parameters:
grantee
- This parameter is required.
-
grantWrite
Give permissions to write to create and write to streams in this log group.- Parameters:
grantee
- This parameter is required.
-
logGroupPhysicalName
Public method to get the physical name of this log group. -
metric
@Stability(Stable) @NotNull Metric metric(@NotNull String metricName, @Nullable MetricOptions props) Return the given named metric for this Log Group.- Parameters:
metricName
- The name of the metric. This parameter is required.props
- Properties for the metric.
-
metric
Return the given named metric for this Log Group.- Parameters:
metricName
- The name of the metric. This parameter is required.
-
metricIncomingBytes
The volume of log events in uncompressed bytes uploaded to CloudWatch Logs.When used with the LogGroupName dimension, this is the volume of log events in uncompressed bytes uploaded to the log group.
- Parameters:
props
- Properties for the Cloudwatch metric.
-
metricIncomingBytes
The volume of log events in uncompressed bytes uploaded to CloudWatch Logs.When used with the LogGroupName dimension, this is the volume of log events in uncompressed bytes uploaded to the log group.
-
metricIncomingLogEvents
The number of log events uploaded to CloudWatch Logs.When used with the LogGroupName dimension, this is the number of log events uploaded to the log group.
- Parameters:
props
- Properties for the Cloudwatch metric.
-
metricIncomingLogEvents
The number of log events uploaded to CloudWatch Logs.When used with the LogGroupName dimension, this is the number of log events uploaded to the log group.
-