commonMain.aws.sdk.kotlin.services.glue.model.Connection.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glue-jvm Show documentation
Show all versions of glue-jvm Show documentation
The AWS SDK for Kotlin client for Glue
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* Defines a connection to a data source.
*/
public class Connection private constructor(builder: Builder) {
/**
* The authentication properties of the connection.
*/
public val authenticationConfiguration: aws.sdk.kotlin.services.glue.model.AuthenticationConfiguration? = builder.authenticationConfiguration
/**
* These key-value pairs define parameters for the connection:
* + `HOST` - The host URI: either the fully qualified domain name (FQDN) or the IPv4 address of the database host.
* + `PORT` - The port number, between 1024 and 65535, of the port on which the database host is listening for database connections.
* + `USER_NAME` - The name under which to log in to the database. The value string for `USER_NAME` is "`USERNAME`".
* + `PASSWORD` - A password, if one is used, for the user name.
* + `ENCRYPTED_PASSWORD` - When you enable connection password protection by setting `ConnectionPasswordEncryption` in the Data Catalog encryption settings, this field stores the encrypted password.
* + `JDBC_DRIVER_JAR_URI` - The Amazon Simple Storage Service (Amazon S3) path of the JAR file that contains the JDBC driver to use.
* + `JDBC_DRIVER_CLASS_NAME` - The class name of the JDBC driver to use.
* + `JDBC_ENGINE` - The name of the JDBC engine to use.
* + `JDBC_ENGINE_VERSION` - The version of the JDBC engine to use.
* + `CONFIG_FILES` - (Reserved for future use.)
* + `INSTANCE_ID` - The instance ID to use.
* + `JDBC_CONNECTION_URL` - The URL for connecting to a JDBC data source.
* + `JDBC_ENFORCE_SSL` - A Boolean string (true, false) specifying whether Secure Sockets Layer (SSL) with hostname matching is enforced for the JDBC connection on the client. The default is false.
* + `CUSTOM_JDBC_CERT` - An Amazon S3 location specifying the customer's root certificate. Glue uses this root certificate to validate the customer’s certificate when connecting to the customer database. Glue only handles X.509 certificates. The certificate provided must be DER-encoded and supplied in Base64 encoding PEM format.
* + `SKIP_CUSTOM_JDBC_CERT_VALIDATION` - By default, this is `false`. Glue validates the Signature algorithm and Subject Public Key Algorithm for the customer certificate. The only permitted algorithms for the Signature algorithm are SHA256withRSA, SHA384withRSA or SHA512withRSA. For the Subject Public Key Algorithm, the key length must be at least 2048. You can set the value of this property to `true` to skip Glue’s validation of the customer certificate.
* + `CUSTOM_JDBC_CERT_STRING` - A custom JDBC certificate string which is used for domain match or distinguished name match to prevent a man-in-the-middle attack. In Oracle database, this is used as the `SSL_SERVER_CERT_DN`; in Microsoft SQL Server, this is used as the `hostNameInCertificate`.
* + `CONNECTION_URL` - The URL for connecting to a general (non-JDBC) data source.
* + `SECRET_ID` - The secret ID used for the secret manager of credentials.
* + `CONNECTOR_URL` - The connector URL for a MARKETPLACE or CUSTOM connection.
* + `CONNECTOR_TYPE` - The connector type for a MARKETPLACE or CUSTOM connection.
* + `CONNECTOR_CLASS_NAME` - The connector class name for a MARKETPLACE or CUSTOM connection.
* + `KAFKA_BOOTSTRAP_SERVERS` - A comma-separated list of host and port pairs that are the addresses of the Apache Kafka brokers in a Kafka cluster to which a Kafka client will connect to and bootstrap itself.
* + `KAFKA_SSL_ENABLED` - Whether to enable or disable SSL on an Apache Kafka connection. Default value is "true".
* + `KAFKA_CUSTOM_CERT` - The Amazon S3 URL for the private CA cert file (.pem format). The default is an empty string.
* + `KAFKA_SKIP_CUSTOM_CERT_VALIDATION` - Whether to skip the validation of the CA cert file or not. Glue validates for three algorithms: SHA256withRSA, SHA384withRSA and SHA512withRSA. Default value is "false".
* + `KAFKA_CLIENT_KEYSTORE` - The Amazon S3 location of the client keystore file for Kafka client side authentication (Optional).
* + `KAFKA_CLIENT_KEYSTORE_PASSWORD` - The password to access the provided keystore (Optional).
* + `KAFKA_CLIENT_KEY_PASSWORD` - A keystore can consist of multiple keys, so this is the password to access the client key to be used with the Kafka server side key (Optional).
* + `ENCRYPTED_KAFKA_CLIENT_KEYSTORE_PASSWORD` - The encrypted version of the Kafka client keystore password (if the user has the Glue encrypt passwords setting selected).
* + `ENCRYPTED_KAFKA_CLIENT_KEY_PASSWORD` - The encrypted version of the Kafka client key password (if the user has the Glue encrypt passwords setting selected).
* + `KAFKA_SASL_MECHANISM` - `"SCRAM-SHA-512"`, `"GSSAPI"`, `"AWS_MSK_IAM"`, or `"PLAIN"`. These are the supported [SASL Mechanisms](https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml).
* + `KAFKA_SASL_PLAIN_USERNAME` - A plaintext username used to authenticate with the "PLAIN" mechanism.
* + `KAFKA_SASL_PLAIN_PASSWORD` - A plaintext password used to authenticate with the "PLAIN" mechanism.
* + `ENCRYPTED_KAFKA_SASL_PLAIN_PASSWORD` - The encrypted version of the Kafka SASL PLAIN password (if the user has the Glue encrypt passwords setting selected).
* + `KAFKA_SASL_SCRAM_USERNAME` - A plaintext username used to authenticate with the "SCRAM-SHA-512" mechanism.
* + `KAFKA_SASL_SCRAM_PASSWORD` - A plaintext password used to authenticate with the "SCRAM-SHA-512" mechanism.
* + `ENCRYPTED_KAFKA_SASL_SCRAM_PASSWORD` - The encrypted version of the Kafka SASL SCRAM password (if the user has the Glue encrypt passwords setting selected).
* + `KAFKA_SASL_SCRAM_SECRETS_ARN` - The Amazon Resource Name of a secret in Amazon Web Services Secrets Manager.
* + `KAFKA_SASL_GSSAPI_KEYTAB` - The S3 location of a Kerberos `keytab` file. A keytab stores long-term keys for one or more principals. For more information, see [MIT Kerberos Documentation: Keytab](https://web.mit.edu/kerberos/krb5-latest/doc/basic/keytab_def.html).
* + `KAFKA_SASL_GSSAPI_KRB5_CONF` - The S3 location of a Kerberos `krb5.conf` file. A krb5.conf stores Kerberos configuration information, such as the location of the KDC server. For more information, see [MIT Kerberos Documentation: krb5.conf](https://web.mit.edu/kerberos/krb5-1.12/doc/admin/conf_files/krb5_conf.html).
* + `KAFKA_SASL_GSSAPI_SERVICE` - The Kerberos service name, as set with `sasl.kerberos.service.name` in your [Kafka Configuration](https://kafka.apache.org/documentation/#brokerconfigs_sasl.kerberos.service.name).
* + `KAFKA_SASL_GSSAPI_PRINCIPAL` - The name of the Kerberos princial used by Glue. For more information, see [Kafka Documentation: Configuring Kafka Brokers](https://kafka.apache.org/documentation/#security_sasl_kerberos_clientconfig).
* + `ROLE_ARN` - The role to be used for running queries.
* + `REGION` - The Amazon Web Services Region where queries will be run.
* + `WORKGROUP_NAME` - The name of an Amazon Redshift serverless workgroup or Amazon Athena workgroup in which queries will run.
* + `CLUSTER_IDENTIFIER` - The cluster identifier of an Amazon Redshift cluster in which queries will run.
* + `DATABASE` - The Amazon Redshift database that you are connecting to.
*/
public val connectionProperties: Map? = builder.connectionProperties
/**
* The type of the connection. Currently, SFTP is not supported.
*/
public val connectionType: aws.sdk.kotlin.services.glue.model.ConnectionType? = builder.connectionType
/**
* The timestamp of the time that this connection definition was created.
*/
public val creationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.creationTime
/**
* The description of the connection.
*/
public val description: kotlin.String? = builder.description
/**
* A timestamp of the time this connection was last validated.
*/
public val lastConnectionValidationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.lastConnectionValidationTime
/**
* The user, group, or role that last updated this connection definition.
*/
public val lastUpdatedBy: kotlin.String? = builder.lastUpdatedBy
/**
* The timestamp of the last time the connection definition was updated.
*/
public val lastUpdatedTime: aws.smithy.kotlin.runtime.time.Instant? = builder.lastUpdatedTime
/**
* A list of criteria that can be used in selecting this connection.
*/
public val matchCriteria: List? = builder.matchCriteria
/**
* The name of the connection definition.
*/
public val name: kotlin.String? = builder.name
/**
* The physical connection requirements, such as virtual private cloud (VPC) and `SecurityGroup`, that are needed to make this connection successfully.
*/
public val physicalConnectionRequirements: aws.sdk.kotlin.services.glue.model.PhysicalConnectionRequirements? = builder.physicalConnectionRequirements
/**
* The status of the connection. Can be one of: `READY`, `IN_PROGRESS`, or `FAILED`.
*/
public val status: aws.sdk.kotlin.services.glue.model.ConnectionStatus? = builder.status
/**
* The reason for the connection status.
*/
public val statusReason: kotlin.String? = builder.statusReason
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.Connection = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Connection(")
append("authenticationConfiguration=$authenticationConfiguration,")
append("connectionProperties=$connectionProperties,")
append("connectionType=$connectionType,")
append("creationTime=$creationTime,")
append("description=$description,")
append("lastConnectionValidationTime=$lastConnectionValidationTime,")
append("lastUpdatedBy=$lastUpdatedBy,")
append("lastUpdatedTime=$lastUpdatedTime,")
append("matchCriteria=$matchCriteria,")
append("name=$name,")
append("physicalConnectionRequirements=$physicalConnectionRequirements,")
append("status=$status,")
append("statusReason=$statusReason")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = authenticationConfiguration?.hashCode() ?: 0
result = 31 * result + (connectionProperties?.hashCode() ?: 0)
result = 31 * result + (connectionType?.hashCode() ?: 0)
result = 31 * result + (creationTime?.hashCode() ?: 0)
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (lastConnectionValidationTime?.hashCode() ?: 0)
result = 31 * result + (lastUpdatedBy?.hashCode() ?: 0)
result = 31 * result + (lastUpdatedTime?.hashCode() ?: 0)
result = 31 * result + (matchCriteria?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (physicalConnectionRequirements?.hashCode() ?: 0)
result = 31 * result + (status?.hashCode() ?: 0)
result = 31 * result + (statusReason?.hashCode() ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as Connection
if (authenticationConfiguration != other.authenticationConfiguration) return false
if (connectionProperties != other.connectionProperties) return false
if (connectionType != other.connectionType) return false
if (creationTime != other.creationTime) return false
if (description != other.description) return false
if (lastConnectionValidationTime != other.lastConnectionValidationTime) return false
if (lastUpdatedBy != other.lastUpdatedBy) return false
if (lastUpdatedTime != other.lastUpdatedTime) return false
if (matchCriteria != other.matchCriteria) return false
if (name != other.name) return false
if (physicalConnectionRequirements != other.physicalConnectionRequirements) return false
if (status != other.status) return false
if (statusReason != other.statusReason) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.Connection = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The authentication properties of the connection.
*/
public var authenticationConfiguration: aws.sdk.kotlin.services.glue.model.AuthenticationConfiguration? = null
/**
* These key-value pairs define parameters for the connection:
* + `HOST` - The host URI: either the fully qualified domain name (FQDN) or the IPv4 address of the database host.
* + `PORT` - The port number, between 1024 and 65535, of the port on which the database host is listening for database connections.
* + `USER_NAME` - The name under which to log in to the database. The value string for `USER_NAME` is "`USERNAME`".
* + `PASSWORD` - A password, if one is used, for the user name.
* + `ENCRYPTED_PASSWORD` - When you enable connection password protection by setting `ConnectionPasswordEncryption` in the Data Catalog encryption settings, this field stores the encrypted password.
* + `JDBC_DRIVER_JAR_URI` - The Amazon Simple Storage Service (Amazon S3) path of the JAR file that contains the JDBC driver to use.
* + `JDBC_DRIVER_CLASS_NAME` - The class name of the JDBC driver to use.
* + `JDBC_ENGINE` - The name of the JDBC engine to use.
* + `JDBC_ENGINE_VERSION` - The version of the JDBC engine to use.
* + `CONFIG_FILES` - (Reserved for future use.)
* + `INSTANCE_ID` - The instance ID to use.
* + `JDBC_CONNECTION_URL` - The URL for connecting to a JDBC data source.
* + `JDBC_ENFORCE_SSL` - A Boolean string (true, false) specifying whether Secure Sockets Layer (SSL) with hostname matching is enforced for the JDBC connection on the client. The default is false.
* + `CUSTOM_JDBC_CERT` - An Amazon S3 location specifying the customer's root certificate. Glue uses this root certificate to validate the customer’s certificate when connecting to the customer database. Glue only handles X.509 certificates. The certificate provided must be DER-encoded and supplied in Base64 encoding PEM format.
* + `SKIP_CUSTOM_JDBC_CERT_VALIDATION` - By default, this is `false`. Glue validates the Signature algorithm and Subject Public Key Algorithm for the customer certificate. The only permitted algorithms for the Signature algorithm are SHA256withRSA, SHA384withRSA or SHA512withRSA. For the Subject Public Key Algorithm, the key length must be at least 2048. You can set the value of this property to `true` to skip Glue’s validation of the customer certificate.
* + `CUSTOM_JDBC_CERT_STRING` - A custom JDBC certificate string which is used for domain match or distinguished name match to prevent a man-in-the-middle attack. In Oracle database, this is used as the `SSL_SERVER_CERT_DN`; in Microsoft SQL Server, this is used as the `hostNameInCertificate`.
* + `CONNECTION_URL` - The URL for connecting to a general (non-JDBC) data source.
* + `SECRET_ID` - The secret ID used for the secret manager of credentials.
* + `CONNECTOR_URL` - The connector URL for a MARKETPLACE or CUSTOM connection.
* + `CONNECTOR_TYPE` - The connector type for a MARKETPLACE or CUSTOM connection.
* + `CONNECTOR_CLASS_NAME` - The connector class name for a MARKETPLACE or CUSTOM connection.
* + `KAFKA_BOOTSTRAP_SERVERS` - A comma-separated list of host and port pairs that are the addresses of the Apache Kafka brokers in a Kafka cluster to which a Kafka client will connect to and bootstrap itself.
* + `KAFKA_SSL_ENABLED` - Whether to enable or disable SSL on an Apache Kafka connection. Default value is "true".
* + `KAFKA_CUSTOM_CERT` - The Amazon S3 URL for the private CA cert file (.pem format). The default is an empty string.
* + `KAFKA_SKIP_CUSTOM_CERT_VALIDATION` - Whether to skip the validation of the CA cert file or not. Glue validates for three algorithms: SHA256withRSA, SHA384withRSA and SHA512withRSA. Default value is "false".
* + `KAFKA_CLIENT_KEYSTORE` - The Amazon S3 location of the client keystore file for Kafka client side authentication (Optional).
* + `KAFKA_CLIENT_KEYSTORE_PASSWORD` - The password to access the provided keystore (Optional).
* + `KAFKA_CLIENT_KEY_PASSWORD` - A keystore can consist of multiple keys, so this is the password to access the client key to be used with the Kafka server side key (Optional).
* + `ENCRYPTED_KAFKA_CLIENT_KEYSTORE_PASSWORD` - The encrypted version of the Kafka client keystore password (if the user has the Glue encrypt passwords setting selected).
* + `ENCRYPTED_KAFKA_CLIENT_KEY_PASSWORD` - The encrypted version of the Kafka client key password (if the user has the Glue encrypt passwords setting selected).
* + `KAFKA_SASL_MECHANISM` - `"SCRAM-SHA-512"`, `"GSSAPI"`, `"AWS_MSK_IAM"`, or `"PLAIN"`. These are the supported [SASL Mechanisms](https://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml).
* + `KAFKA_SASL_PLAIN_USERNAME` - A plaintext username used to authenticate with the "PLAIN" mechanism.
* + `KAFKA_SASL_PLAIN_PASSWORD` - A plaintext password used to authenticate with the "PLAIN" mechanism.
* + `ENCRYPTED_KAFKA_SASL_PLAIN_PASSWORD` - The encrypted version of the Kafka SASL PLAIN password (if the user has the Glue encrypt passwords setting selected).
* + `KAFKA_SASL_SCRAM_USERNAME` - A plaintext username used to authenticate with the "SCRAM-SHA-512" mechanism.
* + `KAFKA_SASL_SCRAM_PASSWORD` - A plaintext password used to authenticate with the "SCRAM-SHA-512" mechanism.
* + `ENCRYPTED_KAFKA_SASL_SCRAM_PASSWORD` - The encrypted version of the Kafka SASL SCRAM password (if the user has the Glue encrypt passwords setting selected).
* + `KAFKA_SASL_SCRAM_SECRETS_ARN` - The Amazon Resource Name of a secret in Amazon Web Services Secrets Manager.
* + `KAFKA_SASL_GSSAPI_KEYTAB` - The S3 location of a Kerberos `keytab` file. A keytab stores long-term keys for one or more principals. For more information, see [MIT Kerberos Documentation: Keytab](https://web.mit.edu/kerberos/krb5-latest/doc/basic/keytab_def.html).
* + `KAFKA_SASL_GSSAPI_KRB5_CONF` - The S3 location of a Kerberos `krb5.conf` file. A krb5.conf stores Kerberos configuration information, such as the location of the KDC server. For more information, see [MIT Kerberos Documentation: krb5.conf](https://web.mit.edu/kerberos/krb5-1.12/doc/admin/conf_files/krb5_conf.html).
* + `KAFKA_SASL_GSSAPI_SERVICE` - The Kerberos service name, as set with `sasl.kerberos.service.name` in your [Kafka Configuration](https://kafka.apache.org/documentation/#brokerconfigs_sasl.kerberos.service.name).
* + `KAFKA_SASL_GSSAPI_PRINCIPAL` - The name of the Kerberos princial used by Glue. For more information, see [Kafka Documentation: Configuring Kafka Brokers](https://kafka.apache.org/documentation/#security_sasl_kerberos_clientconfig).
* + `ROLE_ARN` - The role to be used for running queries.
* + `REGION` - The Amazon Web Services Region where queries will be run.
* + `WORKGROUP_NAME` - The name of an Amazon Redshift serverless workgroup or Amazon Athena workgroup in which queries will run.
* + `CLUSTER_IDENTIFIER` - The cluster identifier of an Amazon Redshift cluster in which queries will run.
* + `DATABASE` - The Amazon Redshift database that you are connecting to.
*/
public var connectionProperties: Map? = null
/**
* The type of the connection. Currently, SFTP is not supported.
*/
public var connectionType: aws.sdk.kotlin.services.glue.model.ConnectionType? = null
/**
* The timestamp of the time that this connection definition was created.
*/
public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The description of the connection.
*/
public var description: kotlin.String? = null
/**
* A timestamp of the time this connection was last validated.
*/
public var lastConnectionValidationTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The user, group, or role that last updated this connection definition.
*/
public var lastUpdatedBy: kotlin.String? = null
/**
* The timestamp of the last time the connection definition was updated.
*/
public var lastUpdatedTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* A list of criteria that can be used in selecting this connection.
*/
public var matchCriteria: List? = null
/**
* The name of the connection definition.
*/
public var name: kotlin.String? = null
/**
* The physical connection requirements, such as virtual private cloud (VPC) and `SecurityGroup`, that are needed to make this connection successfully.
*/
public var physicalConnectionRequirements: aws.sdk.kotlin.services.glue.model.PhysicalConnectionRequirements? = null
/**
* The status of the connection. Can be one of: `READY`, `IN_PROGRESS`, or `FAILED`.
*/
public var status: aws.sdk.kotlin.services.glue.model.ConnectionStatus? = null
/**
* The reason for the connection status.
*/
public var statusReason: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.Connection) : this() {
this.authenticationConfiguration = x.authenticationConfiguration
this.connectionProperties = x.connectionProperties
this.connectionType = x.connectionType
this.creationTime = x.creationTime
this.description = x.description
this.lastConnectionValidationTime = x.lastConnectionValidationTime
this.lastUpdatedBy = x.lastUpdatedBy
this.lastUpdatedTime = x.lastUpdatedTime
this.matchCriteria = x.matchCriteria
this.name = x.name
this.physicalConnectionRequirements = x.physicalConnectionRequirements
this.status = x.status
this.statusReason = x.statusReason
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.Connection = Connection(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.AuthenticationConfiguration] inside the given [block]
*/
public fun authenticationConfiguration(block: aws.sdk.kotlin.services.glue.model.AuthenticationConfiguration.Builder.() -> kotlin.Unit) {
this.authenticationConfiguration = aws.sdk.kotlin.services.glue.model.AuthenticationConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.glue.model.PhysicalConnectionRequirements] inside the given [block]
*/
public fun physicalConnectionRequirements(block: aws.sdk.kotlin.services.glue.model.PhysicalConnectionRequirements.Builder.() -> kotlin.Unit) {
this.physicalConnectionRequirements = aws.sdk.kotlin.services.glue.model.PhysicalConnectionRequirements.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}