# ScheduledQueryConfigurationProperty

The scheduled query configuration for the log alarm.

- Source: Generated at build time
- Type last changed: v2.264.0 · 10 Aug 2026

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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"
    } }
};
```

Golang:

```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

- `aggregationExpression`: string (required) — The aggregation expression for the scheduled query, e.g. count(*) or avg(latency) by host.

- `logGroupIdentifiers`: string[] — The log groups to query.

- `queryString`: string (required) — The query string to execute against the specified log groups.

- `scheduleConfiguration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnLogAlarm.ScheduleConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.CfnLogAlarm.ScheduleConfigurationProperty.html) (required) — The schedule configuration for the scheduled query.

- `scheduledQueryRoleArn`: string (required) — The ARN of the IAM role that grants permissions to execute the scheduled query.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — A list of key-value pairs to associate with the scheduled query that backs the log alarm.
