# CfnConnectionProps

Properties for defining a `CfnConnection`.

Used as props by: [CfnConnection](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_directconnect.CfnConnection.html)

- Source: Generated at build time
- Type last changed: v2.241.0 · 2 Mar 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_directconnect as directconnect } from 'aws-cdk-lib';
const cfnConnectionProps: directconnect.CfnConnectionProps = {
  bandwidth: 'bandwidth',
  connectionName: 'connectionName',
  location: 'location',

  // the properties below are optional
  lagId: 'lagId',
  providerName: 'providerName',
  requestMacSec: false,
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

```python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_directconnect as directconnect

cfn_connection_props = directconnect.CfnConnectionProps(
    bandwidth="bandwidth",
    connection_name="connectionName",
    location="location",

    # the properties below are optional
    lag_id="lagId",
    provider_name="providerName",
    request_mac_sec=False,
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

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

CfnConnectionProps cfnConnectionProps = CfnConnectionProps.builder()
        .bandwidth("bandwidth")
        .connectionName("connectionName")
        .location("location")

        // the properties below are optional
        .lagId("lagId")
        .providerName("providerName")
        .requestMacSec(false)
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .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.DirectConnect;

var cfnConnectionProps = new CfnConnectionProps {
    Bandwidth = "bandwidth",
    ConnectionName = "connectionName",
    Location = "location",

    // the properties below are optional
    LagId = "lagId",
    ProviderName = "providerName",
    RequestMacSec = false,
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

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"

cfnConnectionProps := &CfnConnectionProps{
	Bandwidth: jsii.String("bandwidth"),
	ConnectionName: jsii.String("connectionName"),
	Location: jsii.String("location"),

	// the properties below are optional
	LagId: jsii.String("lagId"),
	ProviderName: jsii.String("providerName"),
	RequestMacSec: jsii.Boolean(false),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `bandwidth`: string (required) — The bandwidth of the connection.

- `connectionName`: string (required) — The name of the connection.

- `lagId`: string | [ILagRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_directconnect.ILagRef.html)

- `location`: string (required) — The location of the connection.

- `providerName`: string — The name of the service provider associated with the requested connection.

- `requestMacSec`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Indicates whether you want the connection to support MAC Security (MACsec).

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — The tags associated with the connection.
