Show / Hide Table of Contents

Interface ILogGroup

Inherited Members
IResourceWithPolicy.AddToResourcePolicy(PolicyStatement)
IResource.ApplyRemovalPolicy(RemovalPolicy)
IResource.Env
IResource.Stack
Namespace: Amazon.CDK.AWS.Logs
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ILogGroup : IResourceWithPolicy, IResource, IConstruct, IDependable
Syntax (vb)
Public Interface ILogGroup Inherits IResourceWithPolicy, IResource, IConstruct, IDependable

Synopsis

Properties

LogGroupArn

The ARN of this log group, with ':*' appended.

LogGroupName

The name of this log group.

Methods

AddMetricFilter(string, IMetricFilterOptions)

Create a new Metric Filter on this Log Group.

AddStream(string, IStreamOptions?)

Create a new Log Stream for this Log Group.

AddSubscriptionFilter(string, ISubscriptionFilterOptions)

Create a new Subscription Filter on this Log Group.

ExtractMetric(string, string, string)

Extract a metric from structured log events in the LogGroup.

Grant(IGrantable, params string[])

Give the indicated permissions on this log group and all streams.

GrantRead(IGrantable)

Give permissions to read from this log group and streams.

GrantWrite(IGrantable)

Give permissions to write to create and write to streams in this log group.

LogGroupPhysicalName()

Public method to get the physical name of this log group.

Metric(string, IMetricOptions?)

Return the given named metric for this Log Group.

MetricIncomingBytes(IMetricOptions?)

The volume of log events in uncompressed bytes uploaded to CloudWatch Logs.

MetricIncomingLogEvents(IMetricOptions?)

The number of log events uploaded to CloudWatch Logs.

Properties

LogGroupArn

The ARN of this log group, with ':*' appended.

string LogGroupArn { get; }
Property Value

string

Remarks

Attribute: true

LogGroupName

The name of this log group.

string LogGroupName { get; }
Property Value

string

Remarks

Attribute: true

Methods

AddMetricFilter(string, IMetricFilterOptions)

Create a new Metric Filter on this Log Group.

MetricFilter AddMetricFilter(string id, IMetricFilterOptions props)
Parameters
id string

Unique identifier for the construct in its parent.

props IMetricFilterOptions

Properties for creating the MetricFilter.

Returns

MetricFilter

AddStream(string, IStreamOptions?)

Create a new Log Stream for this Log Group.

LogStream AddStream(string id, IStreamOptions? props = null)
Parameters
id string

Unique identifier for the construct in its parent.

props IStreamOptions

Properties for creating the LogStream.

Returns

LogStream

AddSubscriptionFilter(string, ISubscriptionFilterOptions)

Create a new Subscription Filter on this Log Group.

SubscriptionFilter AddSubscriptionFilter(string id, ISubscriptionFilterOptions props)
Parameters
id string

Unique identifier for the construct in its parent.

props ISubscriptionFilterOptions

Properties for creating the SubscriptionFilter.

Returns

SubscriptionFilter

ExtractMetric(string, string, string)

Extract a metric from structured log events in the LogGroup.

Metric ExtractMetric(string jsonField, string metricNamespace, string metricName)
Parameters
jsonField string

JSON field to extract (example: '$.myfield').

metricNamespace string

Namespace to emit the metric under.

metricName string

Name to emit the metric under.

Returns

Metric

A Metric object representing the extracted metric

Remarks

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.

Grant(IGrantable, params string[])

Give the indicated permissions on this log group and all streams.

Grant Grant(IGrantable grantee, params string[] actions)
Parameters
grantee IGrantable
actions string[]
Returns

Grant

GrantRead(IGrantable)

Give permissions to read from this log group and streams.

Grant GrantRead(IGrantable grantee)
Parameters
grantee IGrantable
Returns

Grant

GrantWrite(IGrantable)

Give permissions to write to create and write to streams in this log group.

Grant GrantWrite(IGrantable grantee)
Parameters
grantee IGrantable
Returns

Grant

LogGroupPhysicalName()

Public method to get the physical name of this log group.

string LogGroupPhysicalName()
Returns

string

Metric(string, IMetricOptions?)

Return the given named metric for this Log Group.

Metric Metric(string metricName, IMetricOptions? props = null)
Parameters
metricName string

The name of the metric.

props IMetricOptions

Properties for the metric.

Returns

Metric

MetricIncomingBytes(IMetricOptions?)

The volume of log events in uncompressed bytes uploaded to CloudWatch Logs.

Metric MetricIncomingBytes(IMetricOptions? props = null)
Parameters
props IMetricOptions

Properties for the Cloudwatch metric.

Returns

Metric

Remarks

When used with the LogGroupName dimension, this is the volume of log events in uncompressed bytes uploaded to the log group.

MetricIncomingLogEvents(IMetricOptions?)

The number of log events uploaded to CloudWatch Logs.

Metric MetricIncomingLogEvents(IMetricOptions? props = null)
Parameters
props IMetricOptions

Properties for the Cloudwatch metric.

Returns

Metric

Remarks

When used with the LogGroupName dimension, this is the number of log events uploaded to the log group.

Back to top Generated by DocFX