Skip to content
v2.277.0

QueryProperty Struct Added in v2.277.0 ​

The query the alert runs, and the language it is written in.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudwatch as cloudwatch } from 'aws-cdk-lib';
const queryProperty: cloudwatch.CfnAlert.QueryProperty = {
  expression: 'expression',
  language: 'language',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cloudwatch as cloudwatch

query_property = cloudwatch.CfnAlert.QueryProperty(
    expression="expression",
    language="language"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cloudwatch.*;

QueryProperty queryProperty = QueryProperty.builder()
        .expression("expression")
        .language("language")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CloudWatch;

var queryProperty = new QueryProperty {
    Expression = "expression",
    Language = "language"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

queryProperty := &QueryProperty{
	Expression: jsii.String("expression"),
	Language: jsii.String("language"),
}

Properties ​

expressionstringexpressionstrexpressionStringExpressionstringExpression*stringrequired#
The query expression.

For PromQL, the series value is returned in a field named value.

languagestringlanguagestrlanguageStringLanguagestringLanguage*stringrequired#
The query language.

Valid values: SQL, PROMQL.