Class ConnectionOptions.Builder
java.lang.Object
software.amazon.awscdk.services.glue.alpha.ConnectionOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ConnectionOptions>
- Enclosing interface:
ConnectionOptions
@Stability(Experimental)
public static final class ConnectionOptions.Builder
extends Object
implements software.amazon.jsii.Builder<ConnectionOptions>
A builder for
ConnectionOptions-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.connectionName(String connectionName) Sets the value ofConnectionOptions.getConnectionName()description(String description) Sets the value ofConnectionOptions.getDescription()matchCriteria(List<String> matchCriteria) Sets the value ofConnectionOptions.getMatchCriteria()properties(Map<String, String> properties) Sets the value ofConnectionOptions.getProperties()secret(ISecretRef secret) Sets the value ofConnectionOptions.getSecret()securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofConnectionOptions.getSecurityGroups()Sets the value ofConnectionOptions.getSubnet()Sets the value ofConnectionOptions.getVpc()vpcSubnets(SubnetSelection vpcSubnets) Sets the value ofConnectionOptions.getVpcSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
connectionName
Sets the value ofConnectionOptions.getConnectionName()- Parameters:
connectionName- The name of the connection.- Returns:
this
-
description
Sets the value ofConnectionOptions.getDescription()- Parameters:
description- The description of the connection.- Returns:
this
-
matchCriteria
Sets the value ofConnectionOptions.getMatchCriteria()- Parameters:
matchCriteria- 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- Returns:
this
-
properties
Sets the value ofConnectionOptions.getProperties()- Parameters:
properties- Key-Value pairs that define parameters for the connection.- Returns:
this
-
secret
Sets the value ofConnectionOptions.getSecret()- Parameters:
secret- A reference to a Secrets Manager secret holding the credentials for this connection. The secret is referenced through the connection'sSECRET_IDproperty, so Glue reads the credentials at runtime and the secret value never appears in the synthesized template. Prefer this over placing credentials directly inproperties. Accepts anysecretsmanager.ISecret.- Returns:
this
-
securityGroups
@Stability(Experimental) public ConnectionOptions.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofConnectionOptions.getSecurityGroups()- Parameters:
securityGroups- The list of security groups needed to successfully make this connection e.g. to successfully connect to VPC.- Returns:
this
-
subnet
Sets the value ofConnectionOptions.getSubnet()- Parameters:
subnet- 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 withvpc: providesubnetto pin the connection to a specific subnet, or providevpc(optionally withvpcSubnets) to let the CDK select one for you.- Returns:
this
-
vpc
Sets the value ofConnectionOptions.getVpc()- Parameters:
vpc- The VPC to connect to resources within. When provided, the CDK selects a subnet from this VPC usingvpcSubnets. A Glue connection targets a single subnet, so the first subnet of the selection is used.Mutually exclusive with
subnet.- Returns:
this
-
vpcSubnets
Sets the value ofConnectionOptions.getVpcSubnets()- Parameters:
vpcSubnets- Which subnets ofvpcto select the connection subnet from. Only used whenvpcis provided. Since a Glue connection targets a single subnet, the first subnet of the selection is used.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ConnectionOptions>- Returns:
- a new instance of
ConnectionOptions - Throws:
NullPointerException- if any required attribute was not provided
-