# WindowsEventProperty

The `AWS::ApplicationInsights::Application WindowsEvent` property type specifies a Windows Event to monitor for the component.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_applicationinsights as applicationinsights } from 'aws-cdk-lib';
const windowsEventProperty: applicationinsights.CfnApplication.WindowsEventProperty = {
  eventLevels: ['eventLevels'],
  eventName: 'eventName',
  logGroupName: 'logGroupName',

  // the properties below are optional
  patternSet: 'patternSet',
};
```

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_applicationinsights as applicationinsights

windows_event_property = applicationinsights.CfnApplication.WindowsEventProperty(
    event_levels=["eventLevels"],
    event_name="eventName",
    log_group_name="logGroupName",

    # the properties below are optional
    pattern_set="patternSet"
)
```

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

WindowsEventProperty windowsEventProperty = WindowsEventProperty.builder()
        .eventLevels(List.of("eventLevels"))
        .eventName("eventName")
        .logGroupName("logGroupName")

        // the properties below are optional
        .patternSet("patternSet")
        .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.ApplicationInsights;

var windowsEventProperty = new WindowsEventProperty {
    EventLevels = new [] { "eventLevels" },
    EventName = "eventName",
    LogGroupName = "logGroupName",

    // the properties below are optional
    PatternSet = "patternSet"
};
```

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"

windowsEventProperty := &WindowsEventProperty{
	EventLevels: []*string{
		jsii.String("eventLevels"),
	},
	EventName: jsii.String("eventName"),
	LogGroupName: jsii.String("logGroupName"),

	// the properties below are optional
	PatternSet: jsii.String("patternSet"),
}
```

## Properties

- `eventLevels`: string[] (required) — The levels of event to log.

  You must specify each level to log. Possible values include `INFORMATION` , `WARNING` , `ERROR` , `CRITICAL` , and `VERBOSE` . This field is required for each type of Windows Event to log.

- `eventName`: string (required) — The type of Windows Events to log, equivalent to the Windows Event log channel name.

  For example, System, Security, CustomEventName, and so on. This field is required for each type of Windows event to log.

- `logGroupName`: string (required) — The CloudWatch log group name to be associated with the monitored log.

- `patternSet`: string — The log pattern set.
