# CloudwatchLogOptionsSpecificationProperty

Options for sending VPN tunnel logs to CloudWatch.

- Source: Generated at build time
- Type last changed: v2.227.0 · 21 Nov 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_ec2 as ec2 } from 'aws-cdk-lib';
const cloudwatchLogOptionsSpecificationProperty: ec2.CfnVPNConnection.CloudwatchLogOptionsSpecificationProperty = {
  bgpLogEnabled: false,
  bgpLogGroupArn: 'bgpLogGroupArn',
  bgpLogOutputFormat: 'bgpLogOutputFormat',
  logEnabled: false,
  logGroupArn: 'logGroupArn',
  logOutputFormat: 'logOutputFormat',
};
```

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_ec2 as ec2

cloudwatch_log_options_specification_property = ec2.CfnVPNConnection.CloudwatchLogOptionsSpecificationProperty(
    bgp_log_enabled=False,
    bgp_log_group_arn="bgpLogGroupArn",
    bgp_log_output_format="bgpLogOutputFormat",
    log_enabled=False,
    log_group_arn="logGroupArn",
    log_output_format="logOutputFormat"
)
```

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

CloudwatchLogOptionsSpecificationProperty cloudwatchLogOptionsSpecificationProperty = CloudwatchLogOptionsSpecificationProperty.builder()
        .bgpLogEnabled(false)
        .bgpLogGroupArn("bgpLogGroupArn")
        .bgpLogOutputFormat("bgpLogOutputFormat")
        .logEnabled(false)
        .logGroupArn("logGroupArn")
        .logOutputFormat("logOutputFormat")
        .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.EC2;

var cloudwatchLogOptionsSpecificationProperty = new CloudwatchLogOptionsSpecificationProperty {
    BgpLogEnabled = false,
    BgpLogGroupArn = "bgpLogGroupArn",
    BgpLogOutputFormat = "bgpLogOutputFormat",
    LogEnabled = false,
    LogGroupArn = "logGroupArn",
    LogOutputFormat = "logOutputFormat"
};
```

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"

cloudwatchLogOptionsSpecificationProperty := &CloudwatchLogOptionsSpecificationProperty{
	BgpLogEnabled: jsii.Boolean(false),
	BgpLogGroupArn: jsii.String("bgpLogGroupArn"),
	BgpLogOutputFormat: jsii.String("bgpLogOutputFormat"),
	LogEnabled: jsii.Boolean(false),
	LogGroupArn: jsii.String("logGroupArn"),
	LogOutputFormat: jsii.String("logOutputFormat"),
}
```

## Properties

- `bgpLogEnabled`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Specifies whether to enable BGP logging for the VPN connection. Default value is `False` .

  Valid values: `True` | `False`

- `bgpLogGroupArn`: string — The Amazon Resource Name (ARN) of the CloudWatch log group where BGP logs will be sent.

- `bgpLogOutputFormat`: string — The desired output format for BGP logs to be sent to CloudWatch. Default format is `json` .

  Valid values: `json` | `text`

- `logEnabled`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Enable or disable VPN tunnel logging feature. Default value is `False` .

  Valid values: `True` | `False`

- `logGroupArn`: string — The Amazon Resource Name (ARN) of the CloudWatch log group to send logs to.

- `logOutputFormat`: string — Set log format. Default format is `json` .

  Valid values: `json` | `text`
