# ModeProperty

The configuration for the private connection.

Specify either a service-managed or a self-managed mode.

- Source: Generated code
- Type last changed: v2.276.0 · 10 Nov 2026

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_securityagent as securityagent } from 'aws-cdk-lib';
const modeProperty: securityagent.CfnPrivateConnection.ModeProperty = {
  selfManaged: {
    resourceConfigurationId: 'resourceConfigurationId',
  },
  serviceManaged: {
    hostAddress: 'hostAddress',
    subnetIds: ['subnetIds'],
    vpcId: 'vpcId',

    // the properties below are optional
    dnsResolution: 'dnsResolution',
    ipAddressType: 'ipAddressType',
    ipv4AddressesPerEni: 123,
    portRanges: ['portRanges'],
    securityGroupIds: ['securityGroupIds'],
  },
};
```

## Properties

- `selfManaged`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnPrivateConnection.SelfManagedProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_securityagent.CfnPrivateConnection.SelfManagedProperty.html) — The configuration for a self-managed private connection, where you manage your own resource configuration.

- `serviceManaged`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnPrivateConnection.ServiceManagedProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_securityagent.CfnPrivateConnection.ServiceManagedProperty.html) — The configuration for a service-managed private connection, where the service manages the resource gateway lifecycle.
