@Stability(value=Stable) public static final class MathExpression.Builder extends Object implements software.amazon.jsii.Builder<MathExpression>
MathExpression.| Modifier and Type | Method and Description |
|---|---|
MathExpression |
build() |
MathExpression.Builder |
color(String color)
Color for this metric when added to a Graph in a Dashboard.
|
static MathExpression.Builder |
create() |
MathExpression.Builder |
expression(String expression)
The expression defining the metric.
|
MathExpression.Builder |
label(String label)
Label for this expression when added to a Graph in a Dashboard.
|
MathExpression.Builder |
period(Duration period)
The period over which the expression's statistics are applied.
|
MathExpression.Builder |
searchAccount(String searchAccount)
Account to evaluate search expressions within.
|
MathExpression.Builder |
searchRegion(String searchRegion)
Region to evaluate search expressions within.
|
MathExpression.Builder |
usingMetrics(Map<String,? extends IMetric> usingMetrics)
The metrics used in the expression, in a map.
|
@Stability(value=Stable) public static MathExpression.Builder create()
MathExpression.Builder.@Stability(value=Stable) public MathExpression.Builder color(String color)
Default: - Automatic color
color - Color for this metric when added to a Graph in a Dashboard. This parameter is required.this@Stability(value=Stable) public MathExpression.Builder label(String label)
If this expression evaluates to more than one time series (for
example, through the use of METRICS() or SEARCH() expressions),
each time series will appear in the graph using a combination of the
expression label and the individual metric label. Specify the empty
string ('') to suppress the expression label and only keep the
metric label.
You can use dynamic labels to show summary information about the displayed time series in the legend. For example, if you use:
[max: ${MAX}] MyMetric
As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph's legend. If the math expression produces more than one time series, the maximum will be shown for each individual time series produce by this math expression.
Default: - Expression value is used as label
label - Label for this expression when added to a Graph in a Dashboard. This parameter is required.this@Stability(value=Stable) public MathExpression.Builder period(Duration period)
This period overrides all periods in the metrics used in this math expression.
Default: Duration.minutes(5)
period - The period over which the expression's statistics are applied. This parameter is required.this@Stability(value=Stable) public MathExpression.Builder searchAccount(String searchAccount)
Specifying a searchAccount has no effect to the account used for metrics within the expression (passed via usingMetrics).
Default: - Deployment account.
searchAccount - Account to evaluate search expressions within. This parameter is required.this@Stability(value=Stable) public MathExpression.Builder searchRegion(String searchRegion)
Specifying a searchRegion has no effect to the region used for metrics within the expression (passed via usingMetrics).
Default: - Deployment region.
searchRegion - Region to evaluate search expressions within. This parameter is required.this@Stability(value=Stable) public MathExpression.Builder expression(String expression)
When an expression contains a SEARCH function, it cannot be used within an Alarm.
expression - The expression defining the metric. This parameter is required.this@Stability(value=Stable) public MathExpression.Builder usingMetrics(Map<String,? extends IMetric> usingMetrics)
The key is the identifier that represents the given metric in the expression, and the value is the actual Metric object.
Default: - Empty map.
usingMetrics - The metrics used in the expression, in a map. This parameter is required.this@Stability(value=Stable) public MathExpression build()
build in interface software.amazon.jsii.Builder<MathExpression>Copyright © 2023. All rights reserved.