Skip to content
v2.278.0

MetricFilterReference Struct ​

A reference to a MetricFilter resource.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_logs as interfaces_logs } from 'aws-cdk-lib/interfaces';
const metricFilterReference: interfaces_logs.MetricFilterReference = {
  filterName: 'filterName',
  logGroupName: 'logGroupName',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.interfaces import aws_logs as interfaces_logs

metric_filter_reference = interfaces_logs.MetricFilterReference(
    filter_name="filterName",
    log_group_name="logGroupName"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.interfaces.logs.*;

MetricFilterReference metricFilterReference = MetricFilterReference.builder()
        .filterName("filterName")
        .logGroupName("logGroupName")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.Interfaces.Logs;

var metricFilterReference = new MetricFilterReference {
    FilterName = "filterName",
    LogGroupName = "logGroupName"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

metricFilterReference := &MetricFilterReference{
	FilterName: jsii.String("filterName"),
	LogGroupName: jsii.String("logGroupName"),
}

Properties ​

filterNamestringfilter_namestrfilterNameStringFilterNamestringFilterName*string required #
The FilterName of the MetricFilter resource.
logGroupNamestringlog_group_namestrlogGroupNameStringLogGroupNamestringLogGroupName*string required #
The LogGroupName of the MetricFilter resource.