Interface ConnectionOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
ConnectionProps
All Known Implementing Classes:
ConnectionOptions.Jsii$Proxy, ConnectionProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-08-27T15:24:50.068Z") @Stability(Experimental) public interface ConnectionOptions extends software.amazon.jsii.JsiiSerializable
(experimental) Base Connection Options.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.glue.alpha.*;
 import software.amazon.awscdk.services.ec2.*;
 import software.amazon.awscdk.interfaces.secretsmanager.*;
 ISecretRef secretRef;
 SecurityGroup securityGroup;
 Subnet subnet;
 SubnetFilter subnetFilter;
 Vpc vpc;
 ConnectionOptions connectionOptions = ConnectionOptions.builder()
         .connectionName("connectionName")
         .description("description")
         .matchCriteria(List.of("matchCriteria"))
         .properties(Map.of(
                 "propertiesKey", "properties"))
         .secret(secretRef)
         .securityGroups(List.of(securityGroup))
         .subnet(subnet)
         .vpc(vpc)
         .vpcSubnets(SubnetSelection.builder()
                 .availabilityZones(List.of("availabilityZones"))
                 .onePerAz(false)
                 .subnetFilters(List.of(subnetFilter))
                 .subnetGroupName("subnetGroupName")
                 .subnets(List.of(subnet))
                 .subnetType(SubnetType.PRIVATE_ISOLATED)
                 .build())
         .build();
 
  • Method Details

    • getConnectionName

      @Stability(Experimental) @Nullable default String getConnectionName()
      (experimental) The name of the connection.

      Default: cloudformation generated name

    • getDescription

      @Stability(Experimental) @Nullable default String getDescription()
      (experimental) The description of the connection.

      Default: no description

    • getMatchCriteria

      @Stability(Experimental) @Nullable default List<String> getMatchCriteria()
      (experimental) 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

      Default: no match criteria

    • getProperties

      @Stability(Experimental) @Nullable default Map<String,String> getProperties()
      (experimental) Key-Value pairs that define parameters for the connection.

      Default: empty properties

      See Also:
    • getSecret

      @Stability(Experimental) @Nullable default ISecretRef getSecret()
      (experimental) 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`

    • getSecurityGroups

      @Stability(Experimental) @Nullable default List<ISecurityGroup> getSecurityGroups()
      (experimental) The list of security groups needed to successfully make this connection e.g. to successfully connect to VPC.

      Default: no security group

    • getSubnet

      @Stability(Experimental) @Nullable default ISubnet getSubnet()
      (experimental) The VPC subnet to connect to resources within a VPC. See more at https://docs.aws.amazon.com/glue/latest/dg/start-connecting.html.

      Mutually exclusive with vpc: provide subnet to pin the connection to a specific subnet, or provide vpc (optionally with vpcSubnets) to let the CDK select one for you.

      Default: - no subnet, unless `vpc` is provided

    • getVpc

      @Stability(Experimental) @Nullable default IVpc getVpc()
      (experimental) The VPC to connect to resources within.

      When provided, the CDK selects a subnet from this VPC using vpcSubnets. A Glue connection targets a single subnet, so the first subnet of the selection is used.

      Mutually exclusive with subnet.

      Default: - no VPC, the subnet is taken from `subnet` if provided

    • getVpcSubnets

      @Stability(Experimental) @Nullable default SubnetSelection getVpcSubnets()
      (experimental) Which subnets of vpc to select the connection subnet from.

      Only used when vpc is provided. Since a Glue connection targets a single subnet, the first subnet of the selection is used.

      Default: - private subnets

    • builder

      @Stability(Experimental) static ConnectionOptions.Builder builder()
      Returns:
      a ConnectionOptions.Builder of ConnectionOptions