CfnMetricStreamProps

class aws_cdk.aws_cloudwatch.CfnMetricStreamProps(*, firehose_arn, output_format, role_arn, exclude_filters=None, include_filters=None, name=None, statistics_configurations=None, tags=None)

Bases: object

Properties for defining a CfnMetricStream.

Parameters
  • firehose_arn (str) – The ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream. This Amazon Kinesis Firehose delivery stream must already exist and must be in the same account as the metric stream.

  • output_format (str) – The output format for the stream. Valid values are json and opentelemetry0.7 For more information about metric stream output formats, see Metric streams output formats . This parameter is required.

  • role_arn (str) – The ARN of an IAM role that this metric stream will use to access Amazon Kinesis Firehose resources. 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.

  • exclude_filters (Union[IResolvable, Sequence[Union[IResolvable, MetricStreamFilterProperty]], None]) – If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces that you specify here. 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.

  • include_filters (Union[IResolvable, Sequence[Union[IResolvable, MetricStreamFilterProperty]], None]) – If you specify this parameter, the stream sends only the metrics from the metric namespaces that you specify here. 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.

  • name (Optional[str]) – If you are creating a new metric stream, this is the name for the new stream. 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.

  • statistics_configurations (Union[IResolvable, Sequence[Union[IResolvable, MetricStreamStatisticsConfigurationProperty]], None]) – By default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT statistics for each metric that is streamed. 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 opentelemetry0 .7, you can stream percentile statistics (p??) .

  • tags (Optional[Sequence[CfnTag]]) – An array of key-value pairs to apply to the metric stream. For more information, see Tag .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_cloudwatch as cloudwatch

cfn_metric_stream_props = cloudwatch.CfnMetricStreamProps(
    firehose_arn="firehoseArn",
    output_format="outputFormat",
    role_arn="roleArn",

    # the properties below are optional
    exclude_filters=[cloudwatch.CfnMetricStream.MetricStreamFilterProperty(
        namespace="namespace"
    )],
    include_filters=[cloudwatch.CfnMetricStream.MetricStreamFilterProperty(
        namespace="namespace"
    )],
    name="name",
    statistics_configurations=[cloudwatch.CfnMetricStream.MetricStreamStatisticsConfigurationProperty(
        additional_statistics=["additionalStatistics"],
        include_metrics=[cloudwatch.CfnMetricStream.MetricStreamStatisticsMetricProperty(
            metric_name="metricName",
            namespace="namespace"
        )]
    )],
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Attributes

exclude_filters

If you specify this parameter, the stream sends metrics from all metric namespaces except for the namespaces that you specify here.

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-excludefilters

Return type

Union[IResolvable, List[Union[IResolvable, MetricStreamFilterProperty]], None]

firehose_arn

The ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream.

This Amazon Kinesis Firehose delivery stream must already exist and must be in the same account as the metric stream.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-firehosearn

Return type

str

include_filters

If you specify this parameter, the stream sends only the metrics from the metric namespaces that you specify here.

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-includefilters

Return type

Union[IResolvable, List[Union[IResolvable, MetricStreamFilterProperty]], None]

name

If you are creating a new metric stream, this is the name for the new stream.

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-name

Return type

Optional[str]

output_format

The output format for the stream.

Valid values are json and opentelemetry0.7 For more information about metric stream output formats, see Metric streams output formats .

This parameter is required.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-outputformat

Return type

str

role_arn

The ARN of an IAM role that this metric stream will use to access Amazon Kinesis Firehose resources.

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-rolearn

Return type

str

statistics_configurations

By default, a metric stream always sends the MAX, MIN, SUM, and SAMPLECOUNT statistics for each metric that is streamed.

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 opentelemetry0 .7, you can stream percentile statistics (p??) .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-statisticsconfigurations

Return type

Union[IResolvable, List[Union[IResolvable, MetricStreamStatisticsConfigurationProperty]], None]

tags

An array of key-value pairs to apply to the metric stream.

For more information, see Tag .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-metricstream.html#cfn-cloudwatch-metricstream-tags

Return type

Optional[List[CfnTag]]