@Generated(value="jsii-pacmak/1.30.0 (build adae23f)", date="2021-06-30T10:00:50.348Z") @Stability(value=Experimental) public class MathExpression extends software.amazon.jsii.JsiiObject implements IMetric
The math expression is a combination of an expression (x+y) and metrics to apply expression on. It also contains metadata which is used only in graphs, such as color and label. It makes sense to embed this in here, so that compound constructs can attach that metadata to metrics they expose.
This class does not represent a resource, so hence is not a construct. Instead, MathExpression is an abstraction that makes it easy to specify metrics for use in both alarms and graphs.
| Modifier and Type | Class and Description |
|---|---|
static class |
MathExpression.Builder
(experimental) A fluent builder for
MathExpression. |
software.amazon.jsii.JsiiObject.InitializationModeIMetric.Jsii$Default, IMetric.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
protected |
MathExpression(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
MathExpression(software.amazon.jsii.JsiiObjectRef objRef) |
|
MathExpression(MathExpressionProps props) |
| Modifier and Type | Method and Description |
|---|---|
Alarm |
createAlarm(software.constructs.Construct scope,
String id,
CreateAlarmOptions props)
(experimental) Make a new Alarm for this metric.
|
String |
getColor()
(experimental) The hex color code, prefixed with '#' (e.g.
|
String |
getExpression()
(experimental) The expression defining the metric.
|
String |
getLabel()
(experimental) Label for this metric when added to a Graph.
|
Duration |
getPeriod()
(experimental) Aggregation period of this metric.
|
Map<String,IMetric> |
getUsingMetrics()
(experimental) The metrics used in the expression as KeyValuePair
|
MetricConfig |
toMetricConfig()
(experimental) Inspect the details of the metric object.
|
String |
toString()
(experimental) Returns a string representation of an object.
|
MathExpression |
with(MathExpressionOptions props)
(experimental) Return a copy of Metric with properties changed.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected MathExpression(software.amazon.jsii.JsiiObjectRef objRef)
protected MathExpression(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public MathExpression(@NotNull
MathExpressionProps props)
props - This parameter is required.@Stability(value=Experimental) @NotNull public Alarm createAlarm(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CreateAlarmOptions props)
Combines both properties that may adjust the metric (aggregation) as well as alarm properties.
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Experimental) @NotNull public MetricConfig toMetricConfig()
toMetricConfig in interface IMetric@Stability(value=Experimental) @NotNull public String toString()
@Stability(value=Experimental) @NotNull public MathExpression with(@NotNull MathExpressionOptions props)
All properties except namespace and metricName can be changed.
props - The set of properties to change. This parameter is required.@Stability(value=Experimental) @NotNull public String getExpression()
@Stability(value=Experimental) @NotNull public Duration getPeriod()
@Stability(value=Experimental) @NotNull public Map<String,IMetric> getUsingMetrics()
@Stability(value=Experimental) @Nullable public String getColor()
@Stability(value=Experimental) @Nullable public String getLabel()
Copyright © 2021. All rights reserved.