Class MetricFilter
A filter that extracts information from CloudWatch Logs and emits to CloudWatch Metrics.
Inherited Members
Namespace: Amazon.CDK.AWS.Logs
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class MetricFilter : Resource, IResource
Syntax (vb)
Public Class MetricFilter
Inherits Resource
Implements IResource
Remarks
ExampleMetadata: lit=aws-logs/test/integ.metricfilter.lit.ts infused
Examples
new MetricFilter(this, "MetricFilter", new MetricFilterProps {
LogGroup = logGroup,
MetricNamespace = "MyApp",
MetricName = "Latency",
FilterPattern = FilterPattern.Exists("$.latency"),
MetricValue = "$.latency"
});
Synopsis
Constructors
MetricFilter(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
MetricFilter(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
MetricFilter(Construct, String, IMetricFilterProps) |
Methods
Metric(IMetricOptions) | Return the given named metric for this Metric Filter. |
Constructors
MetricFilter(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected MetricFilter(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
MetricFilter(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected MetricFilter(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
MetricFilter(Construct, String, IMetricFilterProps)
public MetricFilter(Construct scope, string id, IMetricFilterProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IMetricFilterProps
Methods
Metric(IMetricOptions)
Return the given named metric for this Metric Filter.
public virtual Metric Metric(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: avg over 5 minutes
Implements
Constructs.IConstruct
Constructs.IDependable