Interface SearchExpressionProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable,SearchExpressionOptions
- All Known Implementing Classes:
SearchExpressionProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)",
date="2025-11-04T09:27:36.525Z")
@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 classA builder forSearchExpressionPropsstatic final classAn 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$toJsonMethods 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.BuilderofSearchExpressionProps
-