MetricOptions

class aws_cdk.aws_cloudwatch.MetricOptions(*, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

Bases: aws_cdk.aws_cloudwatch.CommonMetricOptions

__init__(*, color=None, dimensions=None, label=None, period=None, statistic=None, unit=None)

Properties of a metric that can be changed.

Parameters
  • color (Optional[str]) – Color for this metric when added to a Graph in a Dashboard.

  • dimensions (Optional[Mapping[str, Any]]) – Dimensions of the metric. Default: - No dimensions.

  • label (Optional[str]) – Label for this metric when added to a Graph in a Dashboard.

  • period (Optional[Duration]) – The period over which the specified statistic is applied. Default: Duration.minutes(5)

  • statistic (Optional[str]) – What function to use for aggregating. Can be one of the following: - “Minimum” | “min” - “Maximum” | “max” - “Average” | “avg” - “Sum” | “sum” - “SampleCount | “n” - “pNN.NN” Default: Average

  • unit (Optional[Unit]) – Unit for the metric that is associated with the alarm.

Attributes

color

Color for this metric when added to a Graph in a Dashboard.

Return type

Optional[str]

dimensions

Dimensions of the metric.

default :default: - No dimensions.

Return type

Optional[Mapping[str, Any]]

label

Label for this metric when added to a Graph in a Dashboard.

Return type

Optional[str]

period

The period over which the specified statistic is applied.

default :default: Duration.minutes(5)

Return type

Optional[Duration]

statistic

What function to use for aggregating.

Can be one of the following:

  • “Minimum” | “min”

  • “Maximum” | “max”

  • “Average” | “avg”

  • “Sum” | “sum”

  • “SampleCount | “n”

  • “pNN.NN”

default :default: Average

Return type

Optional[str]

unit

Unit for the metric that is associated with the alarm.

Return type

Optional[Unit]