@Generated(value="jsii-pacmak/1.29.0 (build 41df200)", date="2021-06-02T09:55:31.738Z") @Stability(value=Experimental) public class LogGroup extends Resource implements ILogGroup
| Modifier and Type | Class and Description |
|---|---|
static class |
LogGroup.Builder
(experimental) A fluent builder for
LogGroup. |
software.amazon.jsii.JsiiObject.InitializationModeILogGroup.Jsii$Default, ILogGroup.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
LogGroup(software.constructs.Construct scope,
String id) |
|
LogGroup(software.constructs.Construct scope,
String id,
LogGroupProps props) |
protected |
LogGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
LogGroup(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
MetricFilter |
addMetricFilter(String id,
MetricFilterOptions props)
(experimental) Create a new Metric Filter on this Log Group.
|
LogStream |
addStream(String id)
(experimental) Create a new Log Stream for this Log Group.
|
LogStream |
addStream(String id,
StreamOptions props)
(experimental) Create a new Log Stream for this Log Group.
|
SubscriptionFilter |
addSubscriptionFilter(String id,
SubscriptionFilterOptions props)
(experimental) Create a new Subscription Filter on this Log Group.
|
Metric |
extractMetric(String jsonField,
String metricNamespace,
String metricName)
(experimental) Extract a metric from structured log events in the LogGroup.
|
static ILogGroup |
fromLogGroupArn(software.constructs.Construct scope,
String id,
String logGroupArn)
(experimental) Import an existing LogGroup given its ARN.
|
static ILogGroup |
fromLogGroupName(software.constructs.Construct scope,
String id,
String logGroupName)
(experimental) Import an existing LogGroup given its name.
|
String |
getLogGroupArn()
(experimental) The ARN of this log group.
|
String |
getLogGroupName()
(experimental) The name of this log group.
|
Grant |
grant(IGrantable grantee,
String... actions)
(experimental) Give the indicated permissions on this log group and all streams.
|
Grant |
grantWrite(IGrantable grantee)
(experimental) Give permissions to create and write to streams in this log group.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected LogGroup(software.amazon.jsii.JsiiObjectRef objRef)
protected LogGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public LogGroup(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@Nullable
LogGroupProps props)
scope - This parameter is required.id - This parameter is required.props - @Stability(value=Experimental)
public LogGroup(@NotNull
software.constructs.Construct scope,
@NotNull
String id)
scope - This parameter is required.id - This parameter is required.@Stability(value=Experimental) @NotNull public static ILogGroup fromLogGroupArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String logGroupArn)
scope - This parameter is required.id - This parameter is required.logGroupArn - This parameter is required.@Stability(value=Experimental) @NotNull public static ILogGroup fromLogGroupName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String logGroupName)
scope - This parameter is required.id - This parameter is required.logGroupName - This parameter is required.@Stability(value=Experimental) @NotNull public MetricFilter addMetricFilter(@NotNull String id, @NotNull MetricFilterOptions props)
addMetricFilter in interface ILogGroupid - Unique identifier for the construct in its parent. This parameter is required.props - Properties for creating the MetricFilter. This parameter is required.@Stability(value=Experimental) @NotNull public LogStream addStream(@NotNull String id, @Nullable StreamOptions props)
@Stability(value=Experimental) @NotNull public LogStream addStream(@NotNull String id)
@Stability(value=Experimental) @NotNull public SubscriptionFilter addSubscriptionFilter(@NotNull String id, @NotNull SubscriptionFilterOptions props)
addSubscriptionFilter in interface ILogGroupid - Unique identifier for the construct in its parent. This parameter is required.props - Properties for creating the SubscriptionFilter. This parameter is required.@Stability(value=Experimental) @NotNull public Metric extractMetric(@NotNull String jsonField, @NotNull String metricNamespace, @NotNull String metricName)
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.
extractMetric in interface ILogGroupjsonField - 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.@Stability(value=Experimental) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull String... actions)
@Stability(value=Experimental) @NotNull public Grant grantWrite(@NotNull IGrantable grantee)
grantWrite in interface ILogGroupgrantee - This parameter is required.@Stability(value=Experimental) @NotNull public String getLogGroupArn()
getLogGroupArn in interface ILogGroup@Stability(value=Experimental) @NotNull public String getLogGroupName()
getLogGroupName in interface ILogGroupCopyright © 2021. All rights reserved.