UNPKG

872 BTypeScriptView Raw
1import { Metric, MetricOptions } from '@aws-cdk/aws-cloudwatch';
2import { Resource } from '@aws-cdk/core';
3import { Construct } from 'constructs';
4import { ILogGroup, MetricFilterOptions } from './log-group';
5/**
6 * Properties for a MetricFilter
7 */
8export interface MetricFilterProps extends MetricFilterOptions {
9 /**
10 * The log group to create the filter on.
11 */
12 readonly logGroup: ILogGroup;
13}
14/**
15 * A filter that extracts information from CloudWatch Logs and emits to CloudWatch Metrics
16 */
17export declare class MetricFilter extends Resource {
18 private readonly metricName;
19 private readonly metricNamespace;
20 constructor(scope: Construct, id: string, props: MetricFilterProps);
21 /**
22 * Return the given named metric for this Metric Filter
23 *
24 * @default avg over 5 minutes
25 */
26 metric(props?: MetricOptions): Metric;
27}