ScheduledQueryConfigurationProperty Struct
The scheduled query configuration for the log alarm.
| Source | |
|---|---|
| Type last changed |
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 scheduledQueryConfigurationProperty: cloudwatch.CfnLogAlarm.ScheduledQueryConfigurationProperty = {
aggregationExpression: 'aggregationExpression',
queryString: 'queryString',
scheduleConfiguration: {
scheduleExpression: 'scheduleExpression',
startTimeOffset: 123,
// the properties below are optional
endTimeOffset: 123,
},
scheduledQueryRoleArn: 'scheduledQueryRoleArn',
// the properties below are optional
logGroupIdentifiers: ['logGroupIdentifiers'],
tags: [{
key: 'key',
value: 'value',
}],
};
python
from aws_cdk import CfnTag
# 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
scheduled_query_configuration_property = cloudwatch.CfnLogAlarm.ScheduledQueryConfigurationProperty(
aggregation_expression="aggregationExpression",
query_string="queryString",
schedule_configuration=cloudwatch.CfnLogAlarm.ScheduleConfigurationProperty(
schedule_expression="scheduleExpression",
start_time_offset=123,
# the properties below are optional
end_time_offset=123
),
scheduled_query_role_arn="scheduledQueryRoleArn",
# the properties below are optional
log_group_identifiers=["logGroupIdentifiers"],
tags=[CfnTag(
key="key",
value="value"
)]
)
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.*;
ScheduledQueryConfigurationProperty scheduledQueryConfigurationProperty = ScheduledQueryConfigurationProperty.builder()
.aggregationExpression("aggregationExpression")
.queryString("queryString")
.scheduleConfiguration(ScheduleConfigurationProperty.builder()
.scheduleExpression("scheduleExpression")
.startTimeOffset(123)
// the properties below are optional
.endTimeOffset(123)
.build())
.scheduledQueryRoleArn("scheduledQueryRoleArn")
// the properties below are optional
.logGroupIdentifiers(List.of("logGroupIdentifiers"))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.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 scheduledQueryConfigurationProperty = new ScheduledQueryConfigurationProperty {
AggregationExpression = "aggregationExpression",
QueryString = "queryString",
ScheduleConfiguration = new ScheduleConfigurationProperty {
ScheduleExpression = "scheduleExpression",
StartTimeOffset = 123,
// the properties below are optional
EndTimeOffset = 123
},
ScheduledQueryRoleArn = "scheduledQueryRoleArn",
// the properties below are optional
LogGroupIdentifiers = new [] { "logGroupIdentifiers" },
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
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"
scheduledQueryConfigurationProperty := &ScheduledQueryConfigurationProperty{
AggregationExpression: jsii.String("aggregationExpression"),
QueryString: jsii.String("queryString"),
ScheduleConfiguration: &ScheduleConfigurationProperty{
ScheduleExpression: jsii.String("scheduleExpression"),
StartTimeOffset: jsii.Number(123),
// the properties below are optional
EndTimeOffset: jsii.Number(123),
},
ScheduledQueryRoleArn: jsii.String("scheduledQueryRoleArn"),
// the properties below are optional
LogGroupIdentifiers: []*string{
jsii.String("logGroupIdentifiers"),
},
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
aggregationExpressionstringaggregation_expressionstraggregationExpressionStringAggregationExpressionstringAggregationExpression*string required #The aggregation expression for the scheduled query, e.g. count(*) or avg(latency) by host.
logGroupIdentifiersoptionalstring[]log_group_identifiersoptionaltyping.List[str]logGroupIdentifiersoptionalList<String>LogGroupIdentifiersoptionalstring[]LogGroupIdentifiersoptional*[]*string #The log groups to query.
The query string to execute against the specified log groups.
scheduleConfigurationIResolvable | CfnLogAlarm.schedule_configurationtyping.Union[IResolvable, ScheduleConfigurationProperty]scheduleConfigurationIResolvableScheduleConfigurationIResolvableScheduleConfigurationinterface{} required #The schedule configuration for the scheduled query.
scheduledQueryRoleArnstringscheduled_query_role_arnstrscheduledQueryRoleArnStringScheduledQueryRoleArnstringScheduledQueryRoleArn*string required #The ARN of the IAM role that grants permissions to execute the scheduled query.