AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.4.0 published on Wednesday, May 4, 2022 by Pulumi

Connection

Provides a Glue Connection resource.

Example Usage

Non-VPC Connection

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Glue.Connection("example", new Aws.Glue.ConnectionArgs
        {
            ConnectionProperties = 
            {
                { "JDBC_CONNECTION_URL", "jdbc:mysql://example.com/exampledatabase" },
                { "PASSWORD", "examplepassword" },
                { "USERNAME", "exampleusername" },
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/glue"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := glue.NewConnection(ctx, "example", &glue.ConnectionArgs{
			ConnectionProperties: pulumi.StringMap{
				"JDBC_CONNECTION_URL": pulumi.String("jdbc:mysql://example.com/exampledatabase"),
				"PASSWORD":            pulumi.String("examplepassword"),
				"USERNAME":            pulumi.String("exampleusername"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

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());

        }
}
import pulumi
import pulumi_aws as aws

example = aws.glue.Connection("example", connection_properties={
    "JDBC_CONNECTION_URL": "jdbc:mysql://example.com/exampledatabase",
    "PASSWORD": "examplepassword",
    "USERNAME": "exampleusername",
})
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.glue.Connection("example", {
    connectionProperties: {
        JDBC_CONNECTION_URL: "jdbc:mysql://example.com/exampledatabase",
        PASSWORD: "examplepassword",
        USERNAME: "exampleusername",
    },
});
resources:
  example:
    type: aws:glue:Connection
    properties:
      connectionProperties:
        JDBC_CONNECTION_URL: jdbc:mysql://example.com/exampledatabase
        PASSWORD: examplepassword
        USERNAME: exampleusername

VPC Connection

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Glue.Connection("example", new Aws.Glue.ConnectionArgs
        {
            ConnectionProperties = 
            {
                { "JDBC_CONNECTION_URL", $"jdbc:mysql://{aws_rds_cluster.Example.Endpoint}/exampledatabase" },
                { "PASSWORD", "examplepassword" },
                { "USERNAME", "exampleusername" },
            },
            PhysicalConnectionRequirements = new Aws.Glue.Inputs.ConnectionPhysicalConnectionRequirementsArgs
            {
                AvailabilityZone = aws_subnet.Example.Availability_zone,
                SecurityGroupIdLists = 
                {
                    aws_security_group.Example.Id,
                },
                SubnetId = aws_subnet.Example.Id,
            },
        });
    }

}
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/glue"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := glue.NewConnection(ctx, "example", &glue.ConnectionArgs{
			ConnectionProperties: pulumi.StringMap{
				"JDBC_CONNECTION_URL": pulumi.String(fmt.Sprintf("%v%v%v", "jdbc:mysql://", aws_rds_cluster.Example.Endpoint, "/exampledatabase")),
				"PASSWORD":            pulumi.String("examplepassword"),
				"USERNAME":            pulumi.String("exampleusername"),
			},
			PhysicalConnectionRequirements: &glue.ConnectionPhysicalConnectionRequirementsArgs{
				AvailabilityZone: pulumi.Any(aws_subnet.Example.Availability_zone),
				SecurityGroupIdLists: pulumi.StringArray{
					pulumi.Any(aws_security_group.Example.Id),
				},
				SubnetId: pulumi.Any(aws_subnet.Example.Id),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

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.getExample().getEndpoint())),
                Map.entry("PASSWORD", "examplepassword"),
                Map.entry("USERNAME", "exampleusername")
            ))
            .physicalConnectionRequirements(ConnectionPhysicalConnectionRequirements.builder()
                .availabilityZone(aws_subnet.getExample().getAvailability_zone())
                .securityGroupIdLists(aws_security_group.getExample().getId())
                .subnetId(aws_subnet.getExample().getId())
                .build())
            .build());

        }
}
import pulumi
import pulumi_aws as aws

example = aws.glue.Connection("example",
    connection_properties={
        "JDBC_CONNECTION_URL": f"jdbc:mysql://{aws_rds_cluster['example']['endpoint']}/exampledatabase",
        "PASSWORD": "examplepassword",
        "USERNAME": "exampleusername",
    },
    physical_connection_requirements=aws.glue.ConnectionPhysicalConnectionRequirementsArgs(
        availability_zone=aws_subnet["example"]["availability_zone"],
        security_group_id_lists=[aws_security_group["example"]["id"]],
        subnet_id=aws_subnet["example"]["id"],
    ))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.glue.Connection("example", {
    connectionProperties: {
        JDBC_CONNECTION_URL: `jdbc:mysql://${aws_rds_cluster.example.endpoint}/exampledatabase`,
        PASSWORD: "examplepassword",
        USERNAME: "exampleusername",
    },
    physicalConnectionRequirements: {
        availabilityZone: aws_subnet.example.availability_zone,
        securityGroupIdLists: [aws_security_group.example.id],
        subnetId: aws_subnet.example.id,
    },
});
resources:
  example:
    type: aws:glue:Connection
    properties:
      connectionProperties:
        JDBC_CONNECTION_URL: jdbc:mysql://${aws_rds_cluster.example.endpoint}/exampledatabase
        PASSWORD: examplepassword
        USERNAME: exampleusername
      physicalConnectionRequirements:
        availabilityZone: ${aws_subnet.example.availability_zone}
        securityGroupIdLists:
          - ${aws_security_group.example.id}
        subnetId: ${aws_subnet.example.id}

Create a Connection Resource

new Connection(name: string, args?: ConnectionArgs, opts?: CustomResourceOptions);
@overload
def Connection(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               catalog_id: Optional[str] = None,
               connection_properties: Optional[Mapping[str, str]] = None,
               connection_type: Optional[str] = None,
               description: Optional[str] = None,
               match_criterias: Optional[Sequence[str]] = None,
               name: Optional[str] = None,
               physical_connection_requirements: Optional[ConnectionPhysicalConnectionRequirementsArgs] = None,
               tags: Optional[Mapping[str, str]] = None)
@overload
def Connection(resource_name: str,
               args: Optional[ConnectionArgs] = None,
               opts: Optional[ResourceOptions] = None)
func NewConnection(ctx *Context, name string, args *ConnectionArgs, opts ...ResourceOption) (*Connection, error)
public Connection(string name, ConnectionArgs? args = null, CustomResourceOptions? opts = null)
public Connection(String name, ConnectionArgs args)
public Connection(String name, ConnectionArgs args, CustomResourceOptions options)
type: aws:glue:Connection
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ConnectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args ConnectionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ConnectionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ConnectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ConnectionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Connection Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Connection resource accepts the following input properties:

CatalogId string

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

ConnectionProperties Dictionary<string, string>

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

ConnectionType string

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

Description string

Description of the connection.

MatchCriterias List<string>

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

Name string

The name of the connection.

PhysicalConnectionRequirements ConnectionPhysicalConnectionRequirementsArgs

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

Tags Dictionary<string, string>

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.

CatalogId string

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

ConnectionProperties map[string]string

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

ConnectionType string

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

Description string

Description of the connection.

MatchCriterias []string

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

Name string

The name of the connection.

PhysicalConnectionRequirements ConnectionPhysicalConnectionRequirementsArgs

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

Tags map[string]string

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.

catalogId String

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

connectionProperties Map

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

connectionType String

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

description String

Description of the connection.

matchCriterias List

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

name String

The name of the connection.

physicalConnectionRequirements ConnectionPhysicalConnectionRequirementsArgs

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

tags Map

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.

catalogId string

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

connectionProperties {[key: string]: string}

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

connectionType string

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

description string

Description of the connection.

matchCriterias string[]

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

name string

The name of the connection.

physicalConnectionRequirements ConnectionPhysicalConnectionRequirementsArgs

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

tags {[key: string]: string}

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.

catalog_id str

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

connection_properties Mapping[str, str]

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

connection_type str

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

description str

Description of the connection.

match_criterias Sequence[str]

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

name str

The name of the connection.

physical_connection_requirements ConnectionPhysicalConnectionRequirementsArgs

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

tags Mapping[str, str]

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.

catalogId String

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

connectionProperties Map

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

connectionType String

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

description String

Description of the connection.

matchCriterias List

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

name String

The name of the connection.

physicalConnectionRequirements Property Map

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

tags Map

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.

Outputs

All input properties are implicitly available as output properties. Additionally, the Connection resource produces the following output properties:

Arn string

The ARN of the Glue Connection.

Id string

The provider-assigned unique ID for this managed resource.

TagsAll Dictionary<string, string>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Arn string

The ARN of the Glue Connection.

Id string

The provider-assigned unique ID for this managed resource.

TagsAll map[string]string

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

The ARN of the Glue Connection.

id String

The provider-assigned unique ID for this managed resource.

tagsAll Map

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn string

The ARN of the Glue Connection.

id string

The provider-assigned unique ID for this managed resource.

tagsAll {[key: string]: string}

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn str

The ARN of the Glue Connection.

id str

The provider-assigned unique ID for this managed resource.

tags_all Mapping[str, str]

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

The ARN of the Glue Connection.

id String

The provider-assigned unique ID for this managed resource.

tagsAll Map

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Look up an Existing Connection Resource

Get an existing Connection resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ConnectionState, opts?: CustomResourceOptions): Connection
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        catalog_id: Optional[str] = None,
        connection_properties: Optional[Mapping[str, str]] = None,
        connection_type: Optional[str] = None,
        description: Optional[str] = None,
        match_criterias: Optional[Sequence[str]] = None,
        name: Optional[str] = None,
        physical_connection_requirements: Optional[ConnectionPhysicalConnectionRequirementsArgs] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None) -> Connection
func GetConnection(ctx *Context, name string, id IDInput, state *ConnectionState, opts ...ResourceOption) (*Connection, error)
public static Connection Get(string name, Input<string> id, ConnectionState? state, CustomResourceOptions? opts = null)
public static Connection get(String name, Output<String> id, ConnectionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Arn string

The ARN of the Glue Connection.

CatalogId string

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

ConnectionProperties Dictionary<string, string>

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

ConnectionType string

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

Description string

Description of the connection.

MatchCriterias List<string>

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

Name string

The name of the connection.

PhysicalConnectionRequirements ConnectionPhysicalConnectionRequirementsArgs

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

Tags Dictionary<string, string>

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.

TagsAll Dictionary<string, string>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Arn string

The ARN of the Glue Connection.

CatalogId string

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

ConnectionProperties map[string]string

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

ConnectionType string

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

Description string

Description of the connection.

MatchCriterias []string

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

Name string

The name of the connection.

PhysicalConnectionRequirements ConnectionPhysicalConnectionRequirementsArgs

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

Tags map[string]string

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.

TagsAll map[string]string

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

The ARN of the Glue Connection.

catalogId String

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

connectionProperties Map

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

connectionType String

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

description String

Description of the connection.

matchCriterias List

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

name String

The name of the connection.

physicalConnectionRequirements ConnectionPhysicalConnectionRequirementsArgs

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

tags Map

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.

tagsAll Map

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn string

The ARN of the Glue Connection.

catalogId string

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

connectionProperties {[key: string]: string}

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

connectionType string

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

description string

Description of the connection.

matchCriterias string[]

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

name string

The name of the connection.

physicalConnectionRequirements ConnectionPhysicalConnectionRequirementsArgs

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

tags {[key: string]: string}

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.

tagsAll {[key: string]: string}

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn str

The ARN of the Glue Connection.

catalog_id str

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

connection_properties Mapping[str, str]

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

connection_type str

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

description str

Description of the connection.

match_criterias Sequence[str]

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

name str

The name of the connection.

physical_connection_requirements ConnectionPhysicalConnectionRequirementsArgs

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

tags Mapping[str, str]

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.

tags_all Mapping[str, str]

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

The ARN of the Glue Connection.

catalogId String

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

connectionProperties Map

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

connectionType String

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

description String

Description of the connection.

matchCriterias List

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

name String

The name of the connection.

physicalConnectionRequirements Property Map

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

tags Map

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.

tagsAll Map

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Supporting Types

ConnectionPhysicalConnectionRequirements

AvailabilityZone string

The availability zone of the connection. This field is redundant and implied by subnet_id, but is currently an api requirement.

SecurityGroupIdLists List<string>

The security group ID list used by the connection.

SubnetId string

The subnet ID used by the connection.

AvailabilityZone string

The availability zone of the connection. This field is redundant and implied by subnet_id, but is currently an api requirement.

SecurityGroupIdLists []string

The security group ID list used by the connection.

SubnetId string

The subnet ID used by the connection.

availabilityZone String

The availability zone of the connection. This field is redundant and implied by subnet_id, but is currently an api requirement.

securityGroupIdLists List

The security group ID list used by the connection.

subnetId String

The subnet ID used by the connection.

availabilityZone string

The availability zone of the connection. This field is redundant and implied by subnet_id, but is currently an api requirement.

securityGroupIdLists string[]

The security group ID list used by the connection.

subnetId string

The subnet ID used by the connection.

availability_zone str

The availability zone of the connection. This field is redundant and implied by subnet_id, but is currently an api requirement.

security_group_id_lists Sequence[str]

The security group ID list used by the connection.

subnet_id str

The subnet ID used by the connection.

availabilityZone String

The availability zone of the connection. This field is redundant and implied by subnet_id, but is currently an api requirement.

securityGroupIdLists List

The security group ID list used by the connection.

subnetId String

The subnet ID used by the connection.

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

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.