# QueryLoggingConfigurationProperty

The query logging configuration in an Amazon Managed Service for Prometheus workspace.

- Source: Generated at build time
- Type last changed: v2.199.0 · 27 May 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_aps as aps } from 'aws-cdk-lib';
const queryLoggingConfigurationProperty: aps.CfnWorkspace.QueryLoggingConfigurationProperty = {
  destinations: [{
    cloudWatchLogs: {
      logGroupArn: 'logGroupArn',
    },
    filters: {
      qspThreshold: 123,
    },
  }],
};
```

Python:

```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_aps as aps

query_logging_configuration_property = aps.CfnWorkspace.QueryLoggingConfigurationProperty(
    destinations=[aps.CfnWorkspace.LoggingDestinationProperty(
        cloud_watch_logs=aps.CfnWorkspace.CloudWatchLogDestinationProperty(
            log_group_arn="logGroupArn"
        ),
        filters=aps.CfnWorkspace.LoggingFilterProperty(
            qsp_threshold=123
        )
    )]
)
```

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.aps.*;

QueryLoggingConfigurationProperty queryLoggingConfigurationProperty = QueryLoggingConfigurationProperty.builder()
        .destinations(List.of(LoggingDestinationProperty.builder()
                .cloudWatchLogs(CloudWatchLogDestinationProperty.builder()
                        .logGroupArn("logGroupArn")
                        .build())
                .filters(LoggingFilterProperty.builder()
                        .qspThreshold(123)
                        .build())
                .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.APS;

var queryLoggingConfigurationProperty = new QueryLoggingConfigurationProperty {
    Destinations = new [] { new LoggingDestinationProperty {
        CloudWatchLogs = new CloudWatchLogDestinationProperty {
            LogGroupArn = "logGroupArn"
        },
        Filters = new LoggingFilterProperty {
            QspThreshold = 123
        }
    } }
};
```

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"

queryLoggingConfigurationProperty := &QueryLoggingConfigurationProperty{
	Destinations: []interface{}{
		&LoggingDestinationProperty{
			CloudWatchLogs: &CloudWatchLogDestinationProperty{
				LogGroupArn: jsii.String("logGroupArn"),
			},
			Filters: &LoggingFilterProperty{
				QspThreshold: jsii.Number(123),
			},
		},
	},
}
```

## Properties

- `destinations`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnWorkspace.LoggingDestinationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_aps.CfnWorkspace.LoggingDestinationProperty.html)[] (required) — Defines a destination and its associated filtering criteria for query logging.
