MetricStatConfig

class aws_cdk.aws_cloudwatch.MetricStatConfig(*, metric_name, namespace, period, statistic, account=None, dimensions=None, region=None, unit_filter=None)

Bases: object

Properties for a concrete metric.

NOTE: unit is no longer on this object since it is only used for Alarms, and doesn’t mean what one would expect it to mean there anyway. It is most likely to be misused.

Parameters
  • metric_name (str) – Name of the metric.

  • namespace (str) – Namespace of the metric.

  • period (Duration) – How many seconds to aggregate over.

  • statistic (str) – Aggregation function to use (can be either simple or a percentile).

  • account (Optional[str]) – Account which this metric comes from. Default: Deployment account.

  • dimensions (Optional[List[Dimension]]) – The dimensions to apply to the alarm. Default: []

  • region (Optional[str]) – Region which this metric comes from. Default: Deployment region.

  • unit_filter (Optional[Unit]) – Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. This field has been renamed from plain unit to clearly communicate its purpose. Default: - Refer to all metric datums

Attributes

account

Account which this metric comes from.

Default

Deployment account.

Return type

Optional[str]

dimensions

The dimensions to apply to the alarm.

Default

[]

Return type

Optional[List[Dimension]]

metric_name

Name of the metric.

Return type

str

namespace

Namespace of the metric.

Return type

str

period

How many seconds to aggregate over.

Return type

Duration

region

Region which this metric comes from.

Default

Deployment region.

Return type

Optional[str]

statistic

Aggregation function to use (can be either simple or a percentile).

Return type

str

unit_filter

Unit used to filter the metric stream.

Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units.

This field has been renamed from plain unit to clearly communicate its purpose.

Default
  • Refer to all metric datums

Return type

Optional[Unit]