MetricGraphConfig

class aws_cdk.aws_cloudwatch.MetricGraphConfig(*, metric_name, namespace, period, rendering_properties, color=None, dimensions=None, label=None, statistic=None, unit=None)

Bases: object

(deprecated) Properties used to construct the Metric identifying part of a Graph.

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

  • namespace (str) – (deprecated) Namespace of the metric.

  • period (Union[int, float]) – (deprecated) How many seconds to aggregate over.

  • rendering_properties (Union[MetricRenderingProperties, Dict[str, Any]]) – (deprecated) Rendering properties override yAxis parameter of the widget object.

  • color (Optional[str]) – (deprecated) Color for the graph line.

  • dimensions (Optional[Sequence[Union[Dimension, Dict[str, Any]]]]) – (deprecated) The dimensions to apply to the alarm.

  • label (Optional[str]) – (deprecated) Label for the metric.

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

  • unit (Optional[Unit]) – (deprecated) The unit of the alarm.

Deprecated:

Replaced by MetricConfig

Stability:

deprecated

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

# value: Any

metric_graph_config = cloudwatch.MetricGraphConfig(
    metric_name="metricName",
    namespace="namespace",
    period=123,
    rendering_properties=cloudwatch.MetricRenderingProperties(
        period=123,

        # the properties below are optional
        color="color",
        label="label",
        stat="stat"
    ),

    # the properties below are optional
    color="color",
    dimensions=[cloudwatch.Dimension(
        name="name",
        value=value
    )],
    label="label",
    statistic="statistic",
    unit=cloudwatch.Unit.SECONDS
)

Attributes

color

(deprecated) Color for the graph line.

Deprecated:

Use color in renderingProperties

Stability:

deprecated

dimensions

(deprecated) The dimensions to apply to the alarm.

Stability:

deprecated

label

(deprecated) Label for the metric.

Deprecated:

Use label in renderingProperties

Stability:

deprecated

metric_name

(deprecated) Name of the metric.

Stability:

deprecated

namespace

(deprecated) Namespace of the metric.

Stability:

deprecated

period

(deprecated) How many seconds to aggregate over.

Deprecated:

Use period in renderingProperties

Stability:

deprecated

rendering_properties

(deprecated) Rendering properties override yAxis parameter of the widget object.

Stability:

deprecated

statistic

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

Deprecated:

Use stat in renderingProperties

Stability:

deprecated

unit

(deprecated) The unit of the alarm.

Deprecated:

not used in dashboard widgets

Stability:

deprecated