@aws-cdk_aws-glue-alpha.Connection

class Connection (construct) ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Glue.Alpha.Connection
Gogithub.com/aws/aws-cdk-go/awscdkgluealpha/v2#Connection
Javasoftware.amazon.awscdk.services.glue.alpha.Connection
Pythonaws_cdk.aws_glue_alpha.Connection
TypeScript (source)@aws-cdk/aws-glue-alpha ยป Connection

Implements IConstruct, IDependable, IResource, IConnection

An AWS Glue connection to a data source.

Example

declare const securityGroup: ec2.SecurityGroup;
declare const subnet: ec2.Subnet;
new glue.Connection(this, 'MyConnection', {
  type: glue.ConnectionType.NETWORK,
  // The security groups granting AWS Glue inbound access to the data source within the VPC
  securityGroups: [securityGroup],
  // The VPC subnet which contains the data source
  subnet,
});

Initializer

new Connection(scope: Construct, id: string, props: ConnectionProps)

Parameters

  • scope Construct
  • id string
  • props ConnectionProps

Construct Props

NameTypeDescription
type๐Ÿ”นConnectionTypeThe type of the connection.
connectionName?๐Ÿ”นstringThe name of the connection.
description?๐Ÿ”นstringThe description of the connection.
matchCriteria?๐Ÿ”นstring[]A list of criteria that can be used in selecting this connection.
properties?๐Ÿ”น{ [string]: string }Key-Value pairs that define parameters for the connection.
securityGroups?๐Ÿ”นISecurityGroup[]The list of security groups needed to successfully make this connection e.g. to successfully connect to VPC.
subnet?๐Ÿ”นISubnetThe VPC subnet to connect to resources within a VPC.

type๐Ÿ”น

Type: ConnectionType

The type of the connection.


connectionName?๐Ÿ”น

Type: string (optional, default: cloudformation generated name)

The name of the connection.


description?๐Ÿ”น

Type: string (optional, default: no description)

The description of the connection.


matchCriteria?๐Ÿ”น

Type: string[] (optional, default: no match criteria)

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


properties?๐Ÿ”น

Type: { [string]: string } (optional, default: empty properties)

Key-Value pairs that define parameters for the connection.

See also: https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-connect.html


securityGroups?๐Ÿ”น

Type: ISecurityGroup[] (optional, default: no security group)

The list of security groups needed to successfully make this connection e.g. to successfully connect to VPC.


subnet?๐Ÿ”น

Type: ISubnet (optional, default: no 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.

Properties

NameTypeDescription
connectionArn๐Ÿ”นstringThe ARN of the connection.
connectionName๐Ÿ”นstringThe name of the connection.
env๐Ÿ”นResourceEnvironmentThe environment this resource belongs to.
node๐Ÿ”นNodeThe tree node.
stack๐Ÿ”นStackThe stack in which this resource is defined.

connectionArn๐Ÿ”น

Type: string

The ARN of the connection.


connectionName๐Ÿ”น

Type: string

The name of the connection.


env๐Ÿ”น

Type: ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


node๐Ÿ”น

Type: Node

The tree node.


stack๐Ÿ”น

Type: Stack

The stack in which this resource is defined.

Methods

NameDescription
addProperty(key, value)๐Ÿ”นAdd additional connection parameters.
applyRemovalPolicy(policy)๐Ÿ”นApply the given removal policy to this resource.
toString()๐Ÿ”นReturns a string representation of this construct.
static fromConnectionArn(scope, id, connectionArn)๐Ÿ”นCreates a Connection construct that represents an external connection.
static fromConnectionName(scope, id, connectionName)๐Ÿ”นCreates a Connection construct that represents an external connection.

addProperty(key, value)๐Ÿ”น

public addProperty(key: string, value: string): void

Parameters

  • key string โ€” parameter key.
  • value string โ€” parameter value.

Add additional connection parameters.


applyRemovalPolicy(policy)๐Ÿ”น

public applyRemovalPolicy(policy: RemovalPolicy): void

Parameters

  • policy RemovalPolicy

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).


toString()๐Ÿ”น

public toString(): string

Returns

  • string

Returns a string representation of this construct.


static fromConnectionArn(scope, id, connectionArn)๐Ÿ”น

public static fromConnectionArn(scope: Construct, id: string, connectionArn: string): IConnection

Parameters

  • scope Construct โ€” The scope creating construct (usually this).
  • id string โ€” The construct's id.
  • connectionArn string โ€” arn of external connection.

Returns

  • IConnection

Creates a Connection construct that represents an external connection.


static fromConnectionName(scope, id, connectionName)๐Ÿ”น

public static fromConnectionName(scope: Construct, id: string, connectionName: string): IConnection

Parameters

  • scope Construct โ€” The scope creating construct (usually this).
  • id string โ€” The construct's id.
  • connectionName string โ€” name of external connection.

Returns

  • IConnection

Creates a Connection construct that represents an external connection.