# ConnectionLogOptionsProperty

Describes the client connection logging options for the Client VPN endpoint.

- Source: Generated at build time
- Type last changed: v2.275.0 · 26 Oct 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_ec2 as ec2 } from 'aws-cdk-lib';
const connectionLogOptionsProperty: ec2.CfnClientVpnEndpoint.ConnectionLogOptionsProperty = {
  enabled: false,

  // the properties below are optional
  cloudwatchLogGroup: 'cloudwatchLogGroup',
  cloudwatchLogStream: 'cloudwatchLogStream',
  includeAuthorizationPolicyContext: false,
};
```

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

connection_log_options_property = ec2.CfnClientVpnEndpoint.ConnectionLogOptionsProperty(
    enabled=False,

    # the properties below are optional
    cloudwatch_log_group="cloudwatchLogGroup",
    cloudwatch_log_stream="cloudwatchLogStream",
    include_authorization_policy_context=False
)
```

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

ConnectionLogOptionsProperty connectionLogOptionsProperty = ConnectionLogOptionsProperty.builder()
        .enabled(false)

        // the properties below are optional
        .cloudwatchLogGroup("cloudwatchLogGroup")
        .cloudwatchLogStream("cloudwatchLogStream")
        .includeAuthorizationPolicyContext(false)
        .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 connectionLogOptionsProperty = new ConnectionLogOptionsProperty {
    Enabled = false,

    // the properties below are optional
    CloudwatchLogGroup = "cloudwatchLogGroup",
    CloudwatchLogStream = "cloudwatchLogStream",
    IncludeAuthorizationPolicyContext = false
};
```

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"

connectionLogOptionsProperty := &ConnectionLogOptionsProperty{
	Enabled: jsii.Boolean(false),

	// the properties below are optional
	CloudwatchLogGroup: jsii.String("cloudwatchLogGroup"),
	CloudwatchLogStream: jsii.String("cloudwatchLogStream"),
	IncludeAuthorizationPolicyContext: jsii.Boolean(false),
}
```

## Properties

- `cloudwatchLogGroup`: string — The name of the CloudWatch Logs log group.

  Required if connection logging is enabled.

- `cloudwatchLogStream`: string — The name of the CloudWatch Logs log stream to which the connection data is published.

- `enabled`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) (required) — Indicates whether connection logging is enabled.

- `includeAuthorizationPolicyContext`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Indicates whether authorization-policy evaluation context is included in the connection logs.
