# ConnectionOptions

Base Connection Options.

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

## Example

```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';
import { aws_glue as glue } from 'aws-cdk-lib';
import { aws_secretsmanager as interfaces_secretsmanager } from 'aws-cdk-lib/interfaces';

declare const connectionNetwork: glue.ConnectionNetwork;
declare const secretRef: interfaces_secretsmanager.ISecretRef;
declare const securityGroup: ec2.SecurityGroup;
const connectionOptions: glue.ConnectionOptions = {
  connectionName: 'connectionName',
  description: 'description',
  matchCriteria: ['matchCriteria'],
  network: connectionNetwork,
  properties: {
    propertiesKey: 'properties',
  },
  secret: secretRef,
  securityGroups: [securityGroup],
};
```

## Properties

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

  **Default:** cloudformation generated name

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

  **Default:** no description

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

  **Default:** no match criteria

  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-lib.aws_glue.ConnectionNetwork.html) — 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.

  **Default:** no VPC network placement

  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 } — Key-Value pairs that define parameters for the connection.

  **Default:** empty properties

- `secret`: [ISecretRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_secretsmanager.ISecretRef.html) — A reference to a Secrets Manager secret holding the credentials for this connection.

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

  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`.

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

  **Default:** no security group
