Interface ILogGroup
Inherited Members
Namespace: Amazon.CDK.AWS.Logs
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ILogGroup : IResourceWithPolicy, IResource
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, 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
System.String
Remarks
Attribute: true
LogGroupName
The name of this log group.
string LogGroupName { get; }
Property Value
System.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 System.String
Unique identifier for the construct in its parent.
- props IMetricFilterOptions
Properties for creating the MetricFilter.
Returns
AddStream(String, IStreamOptions)
Create a new Log Stream for this Log Group.
LogStream AddStream(string id, IStreamOptions props = null)
Parameters
- id System.String
Unique identifier for the construct in its parent.
- props IStreamOptions
Properties for creating the LogStream.
Returns
AddSubscriptionFilter(String, ISubscriptionFilterOptions)
Create a new Subscription Filter on this Log Group.
SubscriptionFilter AddSubscriptionFilter(string id, ISubscriptionFilterOptions props)
Parameters
- id System.String
Unique identifier for the construct in its parent.
- props ISubscriptionFilterOptions
Properties for creating the SubscriptionFilter.
Returns
ExtractMetric(String, String, String)
Extract a metric from structured log events in the LogGroup.
Metric ExtractMetric(string jsonField, string metricNamespace, string metricName)
Parameters
- jsonField System.String
JSON field to extract (example: '$.myfield').
- metricNamespace System.String
Namespace to emit the metric under.
- metricName System.String
Name to emit the metric under.
Returns
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, String[])
Give the indicated permissions on this log group and all streams.
Grant Grant(IGrantable grantee, params string[] actions)
Parameters
- grantee IGrantable
- actions System.String[]
Returns
GrantRead(IGrantable)
Give permissions to read from this log group and streams.
Grant GrantRead(IGrantable grantee)
Parameters
- grantee IGrantable
Returns
GrantWrite(IGrantable)
Give permissions to write to create and write to streams in this log group.
Grant GrantWrite(IGrantable grantee)
Parameters
- grantee IGrantable
Returns
LogGroupPhysicalName()
Public method to get the physical name of this log group.
string LogGroupPhysicalName()
Returns
System.String
Metric(String, IMetricOptions)
Return the given named metric for this Log Group.
Metric Metric(string metricName, IMetricOptions props = null)
Parameters
- metricName System.String
The name of the metric.
- props IMetricOptions
Properties for the metric.
Returns
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
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
Remarks
When used with the LogGroupName dimension, this is the number of log events uploaded to the log group.