Interface SearchExpressionProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
,SearchExpressionOptions
- All Known Implementing Classes:
SearchExpressionProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.112.0 (build de1bc80)",
date="2025-07-24T11:33:10.798Z")
@Stability(Stable)
public interface SearchExpressionProps
extends software.amazon.jsii.JsiiSerializable, SearchExpressionOptions
Properties for a SearchExpression.
Example:
SearchExpression cpuUtilization = SearchExpression.Builder.create() .expression("SEARCH('{AWS/EC2,InstanceId} MetricName=\"CPUUtilization\"', 'Average', 900)") .label("EC2 CPU Utilization") .color("#ff7f0e") .build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forSearchExpressionProps
static final class
An implementation forSearchExpressionProps
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
The search expression defining the metrics to be retrieved.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
Methods inherited from interface software.amazon.awscdk.services.cloudwatch.SearchExpressionOptions
getColor, getLabel, getPeriod, getSearchAccount, getSearchRegion
-
Method Details
-
getExpression
The search expression defining the metrics to be retrieved.A search expression cannot be used within an Alarm.
A search expression allows you to retrieve and graph multiple related metrics in a single statement. It can return up to 500 time series.
Examples:
SEARCH('{AWS/EC2,InstanceId} CPUUtilization', 'Average', 300)
SEARCH('{AWS/ApplicationELB,LoadBalancer} RequestCount', 'Sum', 60)
SEARCH('{MyNamespace,ServiceName} Errors', 'Sum')
For more information about search expression syntax, see: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/search-expression-syntax.html
-
builder
- Returns:
- a
SearchExpressionProps.Builder
ofSearchExpressionProps
-