MetricStreamFilterProperty Struct
This structure contains a metric namespace and optionally, a list of metric names, to either include in a metric ' stream or exclude from a metric stream.
A metric stream's filters can include up to 1000 total names. This limit applies to the sum of namespace names and metric names in the filters. For example, this could include 10 metric namespace filters with 99 metrics each, or 20 namespace filters with 49 metrics specified in each filter.
| Source | |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudwatch as cloudwatch } from 'aws-cdk-lib';
const metricStreamFilterProperty: cloudwatch.CfnMetricStream.MetricStreamFilterProperty = {
namespace: 'namespace',
// the properties below are optional
metricNames: ['metricNames'],
};
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cloudwatch as cloudwatch
metric_stream_filter_property = cloudwatch.CfnMetricStream.MetricStreamFilterProperty(
namespace="namespace",
# the properties below are optional
metric_names=["metricNames"]
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cloudwatch.*;
MetricStreamFilterProperty metricStreamFilterProperty = MetricStreamFilterProperty.builder()
.namespace("namespace")
// the properties below are optional
.metricNames(List.of("metricNames"))
.build();
// 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.AWS.CloudWatch;
var metricStreamFilterProperty = new MetricStreamFilterProperty {
Namespace = "namespace",
// the properties below are optional
MetricNames = new [] { "metricNames" }
};
// 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"
metricStreamFilterProperty := &MetricStreamFilterProperty{
Namespace: jsii.String("namespace"),
// the properties below are optional
MetricNames: []*string{
jsii.String("metricNames"),
},
}
Properties
metricNamesoptionalstring[]metric_namesoptionaltyping.List[str]metricNamesoptionalList<String>MetricNamesoptionalstring[]MetricNamesoptional*[]*string #notes
If you omit this parameter, all metrics in the namespace are included or excluded, depending on whether this filter is specified as an exclude filter or an include filter.
Each metric name can contain only ASCII printable characters (ASCII range 32 through 126). Each metric name must contain at least one non-whitespace character.
The namespace can contain only ASCII printable characters (ASCII range 32 through 126). It must contain at least one non-whitespace character.