MetricConfig
- class aws_cdk.aws_cloudwatch.MetricConfig(*, math_expression=None, metric_stat=None, rendering_properties=None)
Bases:
object
Properties of a rendered metric.
- Parameters:
math_expression (
Union
[MetricExpressionConfig
,Dict
[str
,Any
],None
]) – In case the metric is a math expression, the details of the math expression. Default: - Nonemetric_stat (
Union
[MetricStatConfig
,Dict
[str
,Any
],None
]) – In case the metric represents a query, the details of the query. Default: - Nonerendering_properties (
Optional
[Mapping
[str
,Any
]]) – Additional properties which will be rendered if the metric is used in a dashboard. Examples are ‘label’ and ‘color’, but any key in here will be added to dashboard graphs. Default: - None
- 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 import aws_cdk.core as cdk # metric: cloudwatch.Metric # rendering_properties: Any # value: Any metric_config = cloudwatch.MetricConfig( math_expression=cloudwatch.MetricExpressionConfig( expression="expression", period=123, using_metrics={ "using_metrics_key": metric }, # the properties below are optional search_account="searchAccount", search_region="searchRegion" ), metric_stat=cloudwatch.MetricStatConfig( metric_name="metricName", namespace="namespace", period=cdk.Duration.minutes(30), statistic="statistic", # the properties below are optional account="account", dimensions=[cloudwatch.Dimension( name="name", value=value )], region="region", unit_filter=cloudwatch.Unit.SECONDS ), rendering_properties={ "rendering_properties_key": rendering_properties } )
Attributes
- math_expression
In case the metric is a math expression, the details of the math expression.
- Default:
None
- metric_stat
In case the metric represents a query, the details of the query.
- Default:
None
- rendering_properties
Additional properties which will be rendered if the metric is used in a dashboard.
Examples are ‘label’ and ‘color’, but any key in here will be added to dashboard graphs.
- Default:
None