commonMain.aws.sdk.kotlin.services.databasemigrationservice.model.MicrosoftSqlServerSettings.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of databasemigrationservice-jvm Show documentation
Show all versions of databasemigrationservice-jvm Show documentation
The AWS SDK for Kotlin client for Database Migration Service
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.databasemigrationservice.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Provides information that defines a Microsoft SQL Server endpoint.
*/
public class MicrosoftSqlServerSettings private constructor(builder: Builder) {
/**
* Specifies using Kerberos authentication with Microsoft SQL Server.
*/
public val authenticationMethod: aws.sdk.kotlin.services.databasemigrationservice.model.SqlServerAuthenticationMethod? = builder.authenticationMethod
/**
* The maximum size of the packets (in bytes) used to transfer data using BCP.
*/
public val bcpPacketSize: kotlin.Int? = builder.bcpPacketSize
/**
* Specifies a file group for the DMS internal tables. When the replication task starts, all the internal DMS control tables (awsdms_ apply_exception, awsdms_apply, awsdms_changes) are created for the specified file group.
*/
public val controlTablesFileGroup: kotlin.String? = builder.controlTablesFileGroup
/**
* Database name for the endpoint.
*/
public val databaseName: kotlin.String? = builder.databaseName
/**
* Forces LOB lookup on inline LOB.
*/
public val forceLobLookup: kotlin.Boolean? = builder.forceLobLookup
/**
* Endpoint connection password.
*/
public val password: kotlin.String? = builder.password
/**
* Endpoint TCP port.
*/
public val port: kotlin.Int? = builder.port
/**
* Cleans and recreates table metadata information on the replication instance when a mismatch occurs. An example is a situation where running an alter DDL statement on a table might result in different information about the table cached in the replication instance.
*/
public val querySingleAlwaysOnNode: kotlin.Boolean? = builder.querySingleAlwaysOnNode
/**
* When this attribute is set to `Y`, DMS only reads changes from transaction log backups and doesn't read from the active transaction log file during ongoing replication. Setting this parameter to `Y` enables you to control active transaction log file growth during full load and ongoing replication tasks. However, it can add some source latency to ongoing replication.
*/
public val readBackupOnly: kotlin.Boolean? = builder.readBackupOnly
/**
* Use this attribute to minimize the need to access the backup log and enable DMS to prevent truncation using one of the following two methods.
*
* *Start transactions in the database:* This is the default method. When this method is used, DMS prevents TLOG truncation by mimicking a transaction in the database. As long as such a transaction is open, changes that appear after the transaction started aren't truncated. If you need Microsoft Replication to be enabled in your database, then you must choose this method.
*
* *Exclusively use sp_repldone within a single task*: When this method is used, DMS reads the changes and then uses sp_repldone to mark the TLOG transactions as ready for truncation. Although this method doesn't involve any transactional activities, it can only be used when Microsoft Replication isn't running. Also, when using this method, only one DMS task can access the database at any given time. Therefore, if you need to run parallel DMS tasks against the same database, use the default method.
*/
public val safeguardPolicy: aws.sdk.kotlin.services.databasemigrationservice.model.SafeguardPolicy? = builder.safeguardPolicy
/**
* The full Amazon Resource Name (ARN) of the IAM role that specifies DMS as the trusted entity and grants the required permissions to access the value in `SecretsManagerSecret`. The role must allow the `iam:PassRole` action. `SecretsManagerSecret` has the value of the Amazon Web Services Secrets Manager secret that allows access to the SQL Server endpoint.
*
* You can specify one of two sets of values for these permissions. You can specify the values for this setting and `SecretsManagerSecretId`. Or you can specify clear-text values for `UserName`, `Password`, `ServerName`, and `Port`. You can't specify both. For more information on creating this `SecretsManagerSecret` and the `SecretsManagerAccessRoleArn` and `SecretsManagerSecretId` required to access it, see [Using secrets to access Database Migration Service resources](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.html#security-iam-secretsmanager) in the *Database Migration Service User Guide*.
*/
public val secretsManagerAccessRoleArn: kotlin.String? = builder.secretsManagerAccessRoleArn
/**
* The full ARN, partial ARN, or friendly name of the `SecretsManagerSecret` that contains the SQL Server endpoint connection details.
*/
public val secretsManagerSecretId: kotlin.String? = builder.secretsManagerSecretId
/**
* Fully qualified domain name of the endpoint. For an Amazon RDS SQL Server instance, this is the output of [DescribeDBInstances](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeDBInstances.html), in the ` Endpoint.Address` field.
*/
public val serverName: kotlin.String? = builder.serverName
/**
* Indicates the mode used to fetch CDC data.
*/
public val tlogAccessMode: aws.sdk.kotlin.services.databasemigrationservice.model.TlogAccessMode? = builder.tlogAccessMode
/**
* Use the `TrimSpaceInChar` source endpoint setting to right-trim data on CHAR and NCHAR data types during migration. Setting `TrimSpaceInChar` does not left-trim data. The default value is `true`.
*/
public val trimSpaceInChar: kotlin.Boolean? = builder.trimSpaceInChar
/**
* Use this to attribute to transfer data for full-load operations using BCP. When the target table contains an identity column that does not exist in the source table, you must disable the use BCP for loading table option.
*/
public val useBcpFullLoad: kotlin.Boolean? = builder.useBcpFullLoad
/**
* When this attribute is set to `Y`, DMS processes third-party transaction log backups if they are created in native format.
*/
public val useThirdPartyBackupDevice: kotlin.Boolean? = builder.useThirdPartyBackupDevice
/**
* Endpoint connection user name.
*/
public val username: kotlin.String? = builder.username
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.databasemigrationservice.model.MicrosoftSqlServerSettings = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("MicrosoftSqlServerSettings(")
append("authenticationMethod=$authenticationMethod,")
append("bcpPacketSize=$bcpPacketSize,")
append("controlTablesFileGroup=$controlTablesFileGroup,")
append("databaseName=$databaseName,")
append("forceLobLookup=$forceLobLookup,")
append("password=*** Sensitive Data Redacted ***,")
append("port=$port,")
append("querySingleAlwaysOnNode=$querySingleAlwaysOnNode,")
append("readBackupOnly=$readBackupOnly,")
append("safeguardPolicy=$safeguardPolicy,")
append("secretsManagerAccessRoleArn=$secretsManagerAccessRoleArn,")
append("secretsManagerSecretId=$secretsManagerSecretId,")
append("serverName=$serverName,")
append("tlogAccessMode=$tlogAccessMode,")
append("trimSpaceInChar=$trimSpaceInChar,")
append("useBcpFullLoad=$useBcpFullLoad,")
append("useThirdPartyBackupDevice=$useThirdPartyBackupDevice,")
append("username=$username")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = authenticationMethod?.hashCode() ?: 0
result = 31 * result + (bcpPacketSize ?: 0)
result = 31 * result + (controlTablesFileGroup?.hashCode() ?: 0)
result = 31 * result + (databaseName?.hashCode() ?: 0)
result = 31 * result + (forceLobLookup?.hashCode() ?: 0)
result = 31 * result + (password?.hashCode() ?: 0)
result = 31 * result + (port ?: 0)
result = 31 * result + (querySingleAlwaysOnNode?.hashCode() ?: 0)
result = 31 * result + (readBackupOnly?.hashCode() ?: 0)
result = 31 * result + (safeguardPolicy?.hashCode() ?: 0)
result = 31 * result + (secretsManagerAccessRoleArn?.hashCode() ?: 0)
result = 31 * result + (secretsManagerSecretId?.hashCode() ?: 0)
result = 31 * result + (serverName?.hashCode() ?: 0)
result = 31 * result + (tlogAccessMode?.hashCode() ?: 0)
result = 31 * result + (trimSpaceInChar?.hashCode() ?: 0)
result = 31 * result + (useBcpFullLoad?.hashCode() ?: 0)
result = 31 * result + (useThirdPartyBackupDevice?.hashCode() ?: 0)
result = 31 * result + (username?.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 MicrosoftSqlServerSettings
if (authenticationMethod != other.authenticationMethod) return false
if (bcpPacketSize != other.bcpPacketSize) return false
if (controlTablesFileGroup != other.controlTablesFileGroup) return false
if (databaseName != other.databaseName) return false
if (forceLobLookup != other.forceLobLookup) return false
if (password != other.password) return false
if (port != other.port) return false
if (querySingleAlwaysOnNode != other.querySingleAlwaysOnNode) return false
if (readBackupOnly != other.readBackupOnly) return false
if (safeguardPolicy != other.safeguardPolicy) return false
if (secretsManagerAccessRoleArn != other.secretsManagerAccessRoleArn) return false
if (secretsManagerSecretId != other.secretsManagerSecretId) return false
if (serverName != other.serverName) return false
if (tlogAccessMode != other.tlogAccessMode) return false
if (trimSpaceInChar != other.trimSpaceInChar) return false
if (useBcpFullLoad != other.useBcpFullLoad) return false
if (useThirdPartyBackupDevice != other.useThirdPartyBackupDevice) return false
if (username != other.username) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.databasemigrationservice.model.MicrosoftSqlServerSettings = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Specifies using Kerberos authentication with Microsoft SQL Server.
*/
public var authenticationMethod: aws.sdk.kotlin.services.databasemigrationservice.model.SqlServerAuthenticationMethod? = null
/**
* The maximum size of the packets (in bytes) used to transfer data using BCP.
*/
public var bcpPacketSize: kotlin.Int? = null
/**
* Specifies a file group for the DMS internal tables. When the replication task starts, all the internal DMS control tables (awsdms_ apply_exception, awsdms_apply, awsdms_changes) are created for the specified file group.
*/
public var controlTablesFileGroup: kotlin.String? = null
/**
* Database name for the endpoint.
*/
public var databaseName: kotlin.String? = null
/**
* Forces LOB lookup on inline LOB.
*/
public var forceLobLookup: kotlin.Boolean? = null
/**
* Endpoint connection password.
*/
public var password: kotlin.String? = null
/**
* Endpoint TCP port.
*/
public var port: kotlin.Int? = null
/**
* Cleans and recreates table metadata information on the replication instance when a mismatch occurs. An example is a situation where running an alter DDL statement on a table might result in different information about the table cached in the replication instance.
*/
public var querySingleAlwaysOnNode: kotlin.Boolean? = null
/**
* When this attribute is set to `Y`, DMS only reads changes from transaction log backups and doesn't read from the active transaction log file during ongoing replication. Setting this parameter to `Y` enables you to control active transaction log file growth during full load and ongoing replication tasks. However, it can add some source latency to ongoing replication.
*/
public var readBackupOnly: kotlin.Boolean? = null
/**
* Use this attribute to minimize the need to access the backup log and enable DMS to prevent truncation using one of the following two methods.
*
* *Start transactions in the database:* This is the default method. When this method is used, DMS prevents TLOG truncation by mimicking a transaction in the database. As long as such a transaction is open, changes that appear after the transaction started aren't truncated. If you need Microsoft Replication to be enabled in your database, then you must choose this method.
*
* *Exclusively use sp_repldone within a single task*: When this method is used, DMS reads the changes and then uses sp_repldone to mark the TLOG transactions as ready for truncation. Although this method doesn't involve any transactional activities, it can only be used when Microsoft Replication isn't running. Also, when using this method, only one DMS task can access the database at any given time. Therefore, if you need to run parallel DMS tasks against the same database, use the default method.
*/
public var safeguardPolicy: aws.sdk.kotlin.services.databasemigrationservice.model.SafeguardPolicy? = null
/**
* The full Amazon Resource Name (ARN) of the IAM role that specifies DMS as the trusted entity and grants the required permissions to access the value in `SecretsManagerSecret`. The role must allow the `iam:PassRole` action. `SecretsManagerSecret` has the value of the Amazon Web Services Secrets Manager secret that allows access to the SQL Server endpoint.
*
* You can specify one of two sets of values for these permissions. You can specify the values for this setting and `SecretsManagerSecretId`. Or you can specify clear-text values for `UserName`, `Password`, `ServerName`, and `Port`. You can't specify both. For more information on creating this `SecretsManagerSecret` and the `SecretsManagerAccessRoleArn` and `SecretsManagerSecretId` required to access it, see [Using secrets to access Database Migration Service resources](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.html#security-iam-secretsmanager) in the *Database Migration Service User Guide*.
*/
public var secretsManagerAccessRoleArn: kotlin.String? = null
/**
* The full ARN, partial ARN, or friendly name of the `SecretsManagerSecret` that contains the SQL Server endpoint connection details.
*/
public var secretsManagerSecretId: kotlin.String? = null
/**
* Fully qualified domain name of the endpoint. For an Amazon RDS SQL Server instance, this is the output of [DescribeDBInstances](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeDBInstances.html), in the ` Endpoint.Address` field.
*/
public var serverName: kotlin.String? = null
/**
* Indicates the mode used to fetch CDC data.
*/
public var tlogAccessMode: aws.sdk.kotlin.services.databasemigrationservice.model.TlogAccessMode? = null
/**
* Use the `TrimSpaceInChar` source endpoint setting to right-trim data on CHAR and NCHAR data types during migration. Setting `TrimSpaceInChar` does not left-trim data. The default value is `true`.
*/
public var trimSpaceInChar: kotlin.Boolean? = null
/**
* Use this to attribute to transfer data for full-load operations using BCP. When the target table contains an identity column that does not exist in the source table, you must disable the use BCP for loading table option.
*/
public var useBcpFullLoad: kotlin.Boolean? = null
/**
* When this attribute is set to `Y`, DMS processes third-party transaction log backups if they are created in native format.
*/
public var useThirdPartyBackupDevice: kotlin.Boolean? = null
/**
* Endpoint connection user name.
*/
public var username: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.databasemigrationservice.model.MicrosoftSqlServerSettings) : this() {
this.authenticationMethod = x.authenticationMethod
this.bcpPacketSize = x.bcpPacketSize
this.controlTablesFileGroup = x.controlTablesFileGroup
this.databaseName = x.databaseName
this.forceLobLookup = x.forceLobLookup
this.password = x.password
this.port = x.port
this.querySingleAlwaysOnNode = x.querySingleAlwaysOnNode
this.readBackupOnly = x.readBackupOnly
this.safeguardPolicy = x.safeguardPolicy
this.secretsManagerAccessRoleArn = x.secretsManagerAccessRoleArn
this.secretsManagerSecretId = x.secretsManagerSecretId
this.serverName = x.serverName
this.tlogAccessMode = x.tlogAccessMode
this.trimSpaceInChar = x.trimSpaceInChar
this.useBcpFullLoad = x.useBcpFullLoad
this.useThirdPartyBackupDevice = x.useThirdPartyBackupDevice
this.username = x.username
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.databasemigrationservice.model.MicrosoftSqlServerSettings = MicrosoftSqlServerSettings(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy