# ConnectionProps

Construction properties for `Connection`.

Extends: ConnectionProps
Extends: ConnectionOptions
Used as props by: Connection

- Source: [`lib/connection.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0-alpha.0/packages/@aws-cdk/aws-glue-alpha/lib/connection.ts#L383)
- Type last changed: v2.270.0-alpha.0 · 18 Sep 2026

## Example

```ts
declare const securityGroup: ec2.SecurityGroup;
declare const vpc: ec2.Vpc;
new glue.Connection(this, 'MyConnection', {
  type: glue.ConnectionType.NETWORK,
  securityGroups: [securityGroup],
  // vpcSubnets is optional - defaults to private subnets
  network: glue.ConnectionNetwork.vpc(vpc, { subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS }),
});
```

## Properties

- `connectionName`: string = cloudformation generated name — The name of the connection.

- `description`: string = no description — The description of the connection.

- `matchCriteria`: string[] = no match criteria — A list of criteria that can be used in selecting this connection.

  This is useful for filtering the results of https://awscli.amazonaws.com/v2/documentation/api/latest/reference/glue/get-connections.html

- `network`: [ConnectionNetwork](/cdk/api/v2/docs/@aws-cdk_aws-glue-alpha.ConnectionNetwork.html) = no VPC network placement — The VPC network placement for this connection, so it can reach resources inside a VPC. See more at https://docs.aws.amazon.com/glue/latest/dg/start-connecting.html.

  Build it with `ConnectionNetwork.subnet(subnet)` to pin a specific subnet,
  or `ConnectionNetwork.vpc(vpc, vpcSubnets?)` to let the CDK select one.

- `properties`: { [key: string]: string } = empty properties — Key-Value pairs that define parameters for the connection.

- `secret`: [ISecretRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_secretsmanager.ISecretRef.html) = no secret; any credentials must be supplied via `properties` — A reference to a Secrets Manager secret holding the credentials for this connection.

  The secret is referenced through the connection's `SECRET_ID` property, so
  Glue reads the credentials at runtime and the secret value never appears in
  the synthesized template. Prefer this over placing credentials directly in
  `properties`. Accepts any `secretsmanager.ISecret`.

  **Default:** no secret; any credentials must be supplied via `properties`

- `securityGroups`: [ISecurityGroup](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.ISecurityGroup.html)[] = no security group — The list of security groups needed to successfully make this connection e.g. to successfully connect to VPC.

- `type`: [ConnectionType](/cdk/api/v2/docs/@aws-cdk_aws-glue-alpha.ConnectionType.html) (required) — The type of the connection.
