Interface ICfnMetricStreamProps
Properties for defining a CfnMetricStream
.
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICfnMetricStreamProps
Syntax (vb)
Public Interface ICfnMetricStreamProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// 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 cfnMetricStreamProps = new CfnMetricStreamProps {
FirehoseArn = "firehoseArn",
OutputFormat = "outputFormat",
RoleArn = "roleArn",
// the properties below are optional
ExcludeFilters = new [] { new MetricStreamFilterProperty {
Namespace = "namespace",
// the properties below are optional
MetricNames = new [] { "metricNames" }
} },
IncludeFilters = new [] { new MetricStreamFilterProperty {
Namespace = "namespace",
// the properties below are optional
MetricNames = new [] { "metricNames" }
} },
IncludeLinkedAccountsMetrics = false,
Name = "name",
StatisticsConfigurations = new [] { new MetricStreamStatisticsConfigurationProperty {
AdditionalStatistics = new [] { "additionalStatistics" },
IncludeMetrics = new [] { new MetricStreamStatisticsMetricProperty {
MetricName = "metricName",
Namespace = "namespace"
} }
} },
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
Synopsis
Properties
ExcludeFilters | If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces that you specify here. |
FirehoseArn | The ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream. |
IncludeFilters | If you specify this parameter, the stream sends only the metrics from the metric namespaces that you specify here. |
IncludeLinkedAccountsMetrics | If you are creating a metric stream in a monitoring account, specify |
Name | If you are creating a new metric stream, this is the name for the new stream. |
OutputFormat | The output format for the stream. |
RoleArn | The ARN of an IAM role that this metric stream will use to access Amazon Kinesis Firehose resources. |
StatisticsConfigurations | By default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT statistics for each metric that is streamed. |
Tags | An array of key-value pairs to apply to the metric stream. |
Properties
ExcludeFilters
If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces that you specify here.
virtual object ExcludeFilters { get; }
Property Value
System.Object
Remarks
You cannot specify both IncludeFilters
and ExcludeFilters
in the same metric stream.
When you modify the IncludeFilters
or ExcludeFilters
of an existing metric stream in any way, the metric stream is effectively restarted, so after such a change you will get only the datapoints that have a timestamp after the time of the update.
FirehoseArn
The ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream.
string FirehoseArn { get; }
Property Value
System.String
Remarks
This Amazon Kinesis Firehose delivery stream must already exist and must be in the same account as the metric stream.
IncludeFilters
If you specify this parameter, the stream sends only the metrics from the metric namespaces that you specify here.
virtual object IncludeFilters { get; }
Property Value
System.Object
Remarks
You cannot specify both IncludeFilters
and ExcludeFilters
in the same metric stream.
When you modify the IncludeFilters
or ExcludeFilters
of an existing metric stream in any way, the metric stream is effectively restarted, so after such a change you will get only the datapoints that have a timestamp after the time of the update.
IncludeLinkedAccountsMetrics
If you are creating a metric stream in a monitoring account, specify true
to include metrics from source accounts that are linked to this monitoring account, in the metric stream.
virtual object IncludeLinkedAccountsMetrics { get; }
Property Value
System.Object
Remarks
The default is false
.
For more information about linking accounts, see CloudWatch cross-account observability
Name
If you are creating a new metric stream, this is the name for the new stream.
virtual string Name { get; }
Property Value
System.String
Remarks
The name must be different than the names of other metric streams in this account and Region.
If you are updating a metric stream, specify the name of that stream here.
OutputFormat
The output format for the stream.
string OutputFormat { get; }
Property Value
System.String
Remarks
Valid values are json
, opentelemetry1.0
and opentelemetry0.7
For more information about metric stream output formats, see Metric streams output formats .
This parameter is required.
RoleArn
The ARN of an IAM role that this metric stream will use to access Amazon Kinesis Firehose resources.
string RoleArn { get; }
Property Value
System.String
Remarks
This IAM role must already exist and must be in the same account as the metric stream. This IAM role must include the firehose:PutRecord
and firehose:PutRecordBatch
permissions.
StatisticsConfigurations
By default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT statistics for each metric that is streamed.
virtual object StatisticsConfigurations { get; }
Property Value
System.Object
Remarks
You can use this parameter to have the metric stream also send additional statistics in the stream. This array can have up to 100 members.
For each entry in this array, you specify one or more metrics and the list of additional statistics to stream for those metrics. The additional statistics that you can stream depend on the stream's OutputFormat
. If the OutputFormat
is json
, you can stream any additional statistic that is supported by CloudWatch , listed in CloudWatch statistics definitions . If the OutputFormat
is OpenTelemetry, you can stream percentile statistics.
Tags
An array of key-value pairs to apply to the metric stream.
virtual ICfnTag[] Tags { get; }
Property Value
ICfnTag[]