# CfnConnectionProps

Properties for defining a `CfnConnection`.

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

- Source: Generated at build time
- Type last changed: v2.138.0 · 18 Apr 2024

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codeconnections as codeconnections } from 'aws-cdk-lib';
const cfnConnectionProps: codeconnections.CfnConnectionProps = {
  connectionName: 'connectionName',

  // the properties below are optional
  hostArn: 'hostArn',
  providerType: 'providerType',
  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_codeconnections as codeconnections

cfn_connection_props = codeconnections.CfnConnectionProps(
    connection_name="connectionName",

    # the properties below are optional
    host_arn="hostArn",
    provider_type="providerType",
    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.codeconnections.*;

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

        // the properties below are optional
        .hostArn("hostArn")
        .providerType("providerType")
        .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.CodeConnections;

var cfnConnectionProps = new CfnConnectionProps {
    ConnectionName = "connectionName",

    // the properties below are optional
    HostArn = "hostArn",
    ProviderType = "providerType",
    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{
	ConnectionName: jsii.String("connectionName"),

	// the properties below are optional
	HostArn: jsii.String("hostArn"),
	ProviderType: jsii.String("providerType"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

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

  Connection names must be unique in an AWS account .

- `hostArn`: string — The Amazon Resource Name (ARN) of the host associated with the connection.

- `providerType`: string — The name of the external provider where your third-party code repository is configured.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — Specifies the tags applied to a connection.
