Interface ILogGroup.Jsii$Default
- All Superinterfaces:
software.constructs.IConstruct
,software.constructs.IConstruct.Jsii$Default
,software.constructs.IDependable
,software.constructs.IDependable.Jsii$Default
,ILogGroup
,IResource
,IResource.Jsii$Default
,IResourceWithPolicy
,IResourceWithPolicy.Jsii$Default
,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
ILogGroup.Jsii$Proxy
- Enclosing interface:
ILogGroup
ILogGroup
.-
Nested Class Summary
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
Nested classes/interfaces inherited from interface software.constructs.IDependable
software.constructs.IDependable.Jsii$Default, software.constructs.IDependable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.logs.ILogGroup
ILogGroup.Jsii$Default, ILogGroup.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default, IResource.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.iam.IResourceWithPolicy
IResourceWithPolicy.Jsii$Default, IResourceWithPolicy.Jsii$Proxy
-
Method Summary
Modifier and TypeMethodDescriptiondefault MetricFilter
addMetricFilter
(String id, MetricFilterOptions props) Create a new Metric Filter on this Log Group.default LogStream
addStream
(String id, StreamOptions props) Create a new Log Stream for this Log Group.default SubscriptionFilter
addSubscriptionFilter
(String id, SubscriptionFilterOptions props) Create a new Subscription Filter on this Log Group.default AddToResourcePolicyResult
addToResourcePolicy
(PolicyStatement statement) Add a statement to the resource's resource policy.default void
applyRemovalPolicy
(RemovalPolicy policy) Apply the given removal policy to this resource.default Metric
extractMetric
(String jsonField, String metricNamespace, String metricName) Extract a metric from structured log events in the LogGroup.default ResourceEnvironment
getEnv()
The environment this resource belongs to.default String
The ARN of this log group, with ':*' appended.default String
The name of this log group.default software.constructs.Node
getNode()
The tree node.default Stack
getStack()
The stack in which this resource is defined.default Grant
grant
(IGrantable grantee, @NotNull String... actions) Give the indicated permissions on this log group and all streams.default Grant
grantRead
(IGrantable grantee) Give permissions to read from this log group and streams.default Grant
grantWrite
(IGrantable grantee) Give permissions to write to create and write to streams in this log group.default String
Public method to get the physical name of this log group.default Metric
metric
(String metricName, MetricOptions props) Return the given named metric for this Log Group.default Metric
metricIncomingBytes
(MetricOptions props) The volume of log events in uncompressed bytes uploaded to CloudWatch Logs.default Metric
The number of log events uploaded to CloudWatch Logs.Methods inherited from interface software.amazon.awscdk.services.logs.ILogGroup
addStream, metric, metricIncomingBytes, metricIncomingLogEvents
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getNode
@Stability(Stable) @NotNull default software.constructs.Node getNode()The tree node.- Specified by:
getNode
in interfacesoftware.constructs.IConstruct
- Specified by:
getNode
in interfacesoftware.constructs.IConstruct.Jsii$Default
- Specified by:
getNode
in interfaceIResource.Jsii$Default
- Specified by:
getNode
in interfaceIResourceWithPolicy.Jsii$Default
-
getEnv
The environment this resource belongs to.For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
- Specified by:
getEnv
in interfaceIResource
- Specified by:
getEnv
in interfaceIResource.Jsii$Default
- Specified by:
getEnv
in interfaceIResourceWithPolicy.Jsii$Default
-
getStack
The stack in which this resource is defined.- Specified by:
getStack
in interfaceIResource
- Specified by:
getStack
in interfaceIResource.Jsii$Default
- Specified by:
getStack
in interfaceIResourceWithPolicy.Jsii$Default
-
getLogGroupArn
The ARN of this log group, with ':*' appended.- Specified by:
getLogGroupArn
in interfaceILogGroup
-
getLogGroupName
The name of this log group.- Specified by:
getLogGroupName
in interfaceILogGroup
-
applyRemovalPolicy
Apply the given removal policy to this resource.The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (
RemovalPolicy.DESTROY
), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN
).- Specified by:
applyRemovalPolicy
in interfaceIResource
- Specified by:
applyRemovalPolicy
in interfaceIResource.Jsii$Default
- Specified by:
applyRemovalPolicy
in interfaceIResourceWithPolicy.Jsii$Default
- Parameters:
policy
- This parameter is required.
-
addToResourcePolicy
@Stability(Stable) @NotNull default AddToResourcePolicyResult addToResourcePolicy(@NotNull PolicyStatement statement) Add a statement to the resource's resource policy.- Specified by:
addToResourcePolicy
in interfaceIResourceWithPolicy
- Specified by:
addToResourcePolicy
in interfaceIResourceWithPolicy.Jsii$Default
- Parameters:
statement
- This parameter is required.
-
addMetricFilter
@Stability(Stable) @NotNull default MetricFilter addMetricFilter(@NotNull String id, @NotNull MetricFilterOptions props) Create a new Metric Filter on this Log Group.- Specified by:
addMetricFilter
in interfaceILogGroup
- 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
@Stability(Stable) @NotNull default LogStream addStream(@NotNull String id, @Nullable StreamOptions props) Create a new Log Stream for this Log Group. -
addSubscriptionFilter
@Stability(Stable) @NotNull default SubscriptionFilter addSubscriptionFilter(@NotNull String id, @NotNull SubscriptionFilterOptions props) Create a new Subscription Filter on this Log Group.- Specified by:
addSubscriptionFilter
in interfaceILogGroup
- 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 default 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.
- Specified by:
extractMetric
in interfaceILogGroup
- 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 default Grant grant(@NotNull IGrantable grantee, @NotNull @NotNull String... actions) Give the indicated permissions on this log group and all streams. -
grantRead
Give permissions to read from this log group and streams. -
grantWrite
Give permissions to write to create and write to streams in this log group.- Specified by:
grantWrite
in interfaceILogGroup
- Parameters:
grantee
- This parameter is required.
-
logGroupPhysicalName
Public method to get the physical name of this log group.- Specified by:
logGroupPhysicalName
in interfaceILogGroup
-
metric
@Stability(Stable) @NotNull default Metric metric(@NotNull String metricName, @Nullable MetricOptions props) Return the given named metric for this Log Group. -
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.
- Specified by:
metricIncomingBytes
in interfaceILogGroup
- 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.
- Specified by:
metricIncomingLogEvents
in interfaceILogGroup
- Parameters:
props
- Properties for the Cloudwatch metric.
-