ConnectionArgs

data class ConnectionArgs(val catalogId: Output<String>? = null, val connectionProperties: Output<Map<String, String>>? = null, val connectionType: Output<String>? = null, val description: Output<String>? = null, val matchCriterias: Output<List<String>>? = null, val name: Output<String>? = null, val physicalConnectionRequirements: Output<ConnectionPhysicalConnectionRequirementsArgs>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<ConnectionArgs>

Provides a Glue Connection resource.

Example Usage

Non-VPC Connection

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.glue.Connection;
import com.pulumi.aws.glue.ConnectionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Connection("example", ConnectionArgs.builder()
.connectionProperties(Map.ofEntries(
Map.entry("JDBC_CONNECTION_URL", "jdbc:mysql://example.com/exampledatabase"),
Map.entry("PASSWORD", "examplepassword"),
Map.entry("USERNAME", "exampleusername")
))
.build());
}
}

VPC Connection

For more information, see the AWS Documentation.

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.glue.Connection;
import com.pulumi.aws.glue.ConnectionArgs;
import com.pulumi.aws.glue.inputs.ConnectionPhysicalConnectionRequirementsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Connection("example", ConnectionArgs.builder()
.connectionProperties(Map.ofEntries(
Map.entry("JDBC_CONNECTION_URL", String.format("jdbc:mysql://%s/exampledatabase", aws_rds_cluster.example().endpoint())),
Map.entry("PASSWORD", "examplepassword"),
Map.entry("USERNAME", "exampleusername")
))
.physicalConnectionRequirements(ConnectionPhysicalConnectionRequirementsArgs.builder()
.availabilityZone(aws_subnet.example().availability_zone())
.securityGroupIdLists(aws_security_group.example().id())
.subnetId(aws_subnet.example().id())
.build())
.build());
}
}

Import

Glue Connections can be imported using the CATALOG-ID (AWS account ID if not custom) and NAME, e.g.,

$ pulumi import aws:glue/connection:Connection MyConnection 123456789012:MyConnection

Constructors

Link copied to clipboard
constructor(catalogId: Output<String>? = null, connectionProperties: Output<Map<String, String>>? = null, connectionType: Output<String>? = null, description: Output<String>? = null, matchCriterias: Output<List<String>>? = null, name: Output<String>? = null, physicalConnectionRequirements: Output<ConnectionPhysicalConnectionRequirementsArgs>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val catalogId: Output<String>? = null

The ID of the Data Catalog in which to create the connection. If none is supplied, the AWS account ID is used by default.

Link copied to clipboard
val connectionProperties: Output<Map<String, String>>? = null

A map of key-value pairs used as parameters for this connection.

Link copied to clipboard
val connectionType: Output<String>? = null

The type of the connection. Supported are: CUSTOM, JDBC, KAFKA, MARKETPLACE, MONGODB, and NETWORK. Defaults to JBDC.

Link copied to clipboard
val description: Output<String>? = null

Description of the connection.

Link copied to clipboard
val matchCriterias: Output<List<String>>? = null

A list of criteria that can be used in selecting this connection.

Link copied to clipboard
val name: Output<String>? = null

The name of the connection.

Link copied to clipboard

A map of physical connection requirements, such as VPC and SecurityGroup. Defined below.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Functions

Link copied to clipboard
open override fun toJava(): ConnectionArgs