commonMain.aws.sdk.kotlin.services.transfer.model.UpdateConnectorRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of transfer-jvm Show documentation
Show all versions of transfer-jvm Show documentation
The AWS SDK for Kotlin client for Transfer
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.transfer.model
import aws.smithy.kotlin.runtime.SdkDsl
public class UpdateConnectorRequest private constructor(builder: Builder) {
/**
* Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon Resource Name (ARN) of the Identity and Access Management role to use.
*
* **For AS2 connectors**
*
* With AS2, you can send files by calling `StartFileTransfer` and specifying the file paths in the request parameter, `SendFilePaths`. We use the file’s parent directory (for example, for `--send-file-paths /bucket/dir/file.txt`, parent directory is `/bucket/dir/`) to temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a final JSON file containing relevant metadata of the transmission. So, the `AccessRole` needs to provide read and write access to the parent directory of the file location used in the `StartFileTransfer` request. Additionally, you need to provide read and write access to the parent directory of the files that you intend to send with `StartFileTransfer`.
*
* If you are using Basic authentication for your AS2 connector, the access role requires the `secretsmanager:GetSecretValue` permission for the secret. If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also needs the `kms:Decrypt` permission for that key.
*
* **For SFTP connectors**
*
* Make sure that the access role provides read and write access to the parent directory of the file location that's used in the `StartFileTransfer` request. Additionally, make sure that the role provides `secretsmanager:GetSecretValue` permission to Secrets Manager.
*/
public val accessRole: kotlin.String? = builder.accessRole
/**
* A structure that contains the parameters for an AS2 connector object.
*/
public val as2Config: aws.sdk.kotlin.services.transfer.model.As2ConnectorConfig? = builder.as2Config
/**
* The unique identifier for the connector.
*/
public val connectorId: kotlin.String? = builder.connectorId
/**
* The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that allows a connector to turn on CloudWatch logging for Amazon S3 events. When set, you can view connector activity in your CloudWatch logs.
*/
public val loggingRole: kotlin.String? = builder.loggingRole
/**
* Specifies the name of the security policy for the connector.
*/
public val securityPolicyName: kotlin.String? = builder.securityPolicyName
/**
* A structure that contains the parameters for an SFTP connector object.
*/
public val sftpConfig: aws.sdk.kotlin.services.transfer.model.SftpConnectorConfig? = builder.sftpConfig
/**
* The URL of the partner's AS2 or SFTP endpoint.
*/
public val url: kotlin.String? = builder.url
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.transfer.model.UpdateConnectorRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateConnectorRequest(")
append("accessRole=$accessRole,")
append("as2Config=$as2Config,")
append("connectorId=$connectorId,")
append("loggingRole=$loggingRole,")
append("securityPolicyName=$securityPolicyName,")
append("sftpConfig=$sftpConfig,")
append("url=$url")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = accessRole?.hashCode() ?: 0
result = 31 * result + (as2Config?.hashCode() ?: 0)
result = 31 * result + (connectorId?.hashCode() ?: 0)
result = 31 * result + (loggingRole?.hashCode() ?: 0)
result = 31 * result + (securityPolicyName?.hashCode() ?: 0)
result = 31 * result + (sftpConfig?.hashCode() ?: 0)
result = 31 * result + (url?.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 UpdateConnectorRequest
if (accessRole != other.accessRole) return false
if (as2Config != other.as2Config) return false
if (connectorId != other.connectorId) return false
if (loggingRole != other.loggingRole) return false
if (securityPolicyName != other.securityPolicyName) return false
if (sftpConfig != other.sftpConfig) return false
if (url != other.url) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.transfer.model.UpdateConnectorRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon Resource Name (ARN) of the Identity and Access Management role to use.
*
* **For AS2 connectors**
*
* With AS2, you can send files by calling `StartFileTransfer` and specifying the file paths in the request parameter, `SendFilePaths`. We use the file’s parent directory (for example, for `--send-file-paths /bucket/dir/file.txt`, parent directory is `/bucket/dir/`) to temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a final JSON file containing relevant metadata of the transmission. So, the `AccessRole` needs to provide read and write access to the parent directory of the file location used in the `StartFileTransfer` request. Additionally, you need to provide read and write access to the parent directory of the files that you intend to send with `StartFileTransfer`.
*
* If you are using Basic authentication for your AS2 connector, the access role requires the `secretsmanager:GetSecretValue` permission for the secret. If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also needs the `kms:Decrypt` permission for that key.
*
* **For SFTP connectors**
*
* Make sure that the access role provides read and write access to the parent directory of the file location that's used in the `StartFileTransfer` request. Additionally, make sure that the role provides `secretsmanager:GetSecretValue` permission to Secrets Manager.
*/
public var accessRole: kotlin.String? = null
/**
* A structure that contains the parameters for an AS2 connector object.
*/
public var as2Config: aws.sdk.kotlin.services.transfer.model.As2ConnectorConfig? = null
/**
* The unique identifier for the connector.
*/
public var connectorId: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that allows a connector to turn on CloudWatch logging for Amazon S3 events. When set, you can view connector activity in your CloudWatch logs.
*/
public var loggingRole: kotlin.String? = null
/**
* Specifies the name of the security policy for the connector.
*/
public var securityPolicyName: kotlin.String? = null
/**
* A structure that contains the parameters for an SFTP connector object.
*/
public var sftpConfig: aws.sdk.kotlin.services.transfer.model.SftpConnectorConfig? = null
/**
* The URL of the partner's AS2 or SFTP endpoint.
*/
public var url: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.transfer.model.UpdateConnectorRequest) : this() {
this.accessRole = x.accessRole
this.as2Config = x.as2Config
this.connectorId = x.connectorId
this.loggingRole = x.loggingRole
this.securityPolicyName = x.securityPolicyName
this.sftpConfig = x.sftpConfig
this.url = x.url
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.transfer.model.UpdateConnectorRequest = UpdateConnectorRequest(this)
/**
* construct an [aws.sdk.kotlin.services.transfer.model.As2ConnectorConfig] inside the given [block]
*/
public fun as2Config(block: aws.sdk.kotlin.services.transfer.model.As2ConnectorConfig.Builder.() -> kotlin.Unit) {
this.as2Config = aws.sdk.kotlin.services.transfer.model.As2ConnectorConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.transfer.model.SftpConnectorConfig] inside the given [block]
*/
public fun sftpConfig(block: aws.sdk.kotlin.services.transfer.model.SftpConnectorConfig.Builder.() -> kotlin.Unit) {
this.sftpConfig = aws.sdk.kotlin.services.transfer.model.SftpConnectorConfig.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}